.menu-open .game-scene{visibility:hidden;pointer-events:none}
.main-menu{position:fixed;inset:0;z-index:20;overflow:auto;overscroll-behavior:contain;color:#f4edd7;background:radial-gradient(ellipse at 50% 35%,#315744 0,transparent 50%),linear-gradient(160deg,#214c3d,#102f29 70%);-webkit-overflow-scrolling:touch}
.main-menu[hidden]{display:none}
.main-menu:before{content:'';position:fixed;inset:12px;border:1px solid #ddc58923;border-radius:27px;pointer-events:none}
.menu-content{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:12px;min-height:100%;width:min(100%,440px);margin:auto;padding:calc(23px + env(safe-area-inset-top)) 26px calc(18px + env(safe-area-inset-bottom));text-align:center}
.menu-wordmark{display:flex;justify-content:center;align-items:center;gap:17px;color:#c4c7a8;font-size:9px;letter-spacing:2px;margin-bottom:3px}
.menu-wordmark>span:first-child,.menu-wordmark>span:last-child{font-size:20px;color:#d4bd7f}
.menu-heading h1{font-family:Georgia,'Times New Roman',serif;font-size:43px;font-weight:400;letter-spacing:3px;line-height:1.2;color:#f1e7c5;white-space:nowrap;text-shadow:0 4px 20px #0a211c42}
.menu-heading h1 span{color:#d9bf7d}
.menu-heading p{margin-top:10px;color:#c2ceb5;font-size:13px;line-height:1.5}
.menu-save{display:flex;align-items:center;gap:11px;min-height:61px;padding:11px 15px;border:1px solid #e4d49624;border-radius:15px;text-align:left;background:#12362d58}
.menu-save>span:first-child{display:grid;place-items:center;width:32px;height:32px;color:#d9c38c;border-radius:11px;border:1px solid #d8c79b27}
.menu-save>div{flex:1;min-width:0}
.menu-save b{display:block;font-size:13px;font-weight:500;color:#e7e4cd;line-height:1.35}
.menu-save small{display:block;margin-top:4px;color:#b7c5a8;font-size:10px;line-height:1.45}
.menu-save-dot{width:6px;height:6px;border-radius:50%;background:#a2bd7e;box-shadow:0 0 0 4px #a2bd7e13;flex-shrink:0}
.menu-play{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:65px;padding:12px 18px 12px 25px;border:1px solid #f4df9e88;border-radius:17px;background:linear-gradient(135deg,#e9ce91,#cfad65);color:#214435;box-shadow:0 7px 24px #051e1833,inset 0 1px #f4e7c28c;text-align:left;transition:transform .15s,filter .15s}
.menu-play>span{font-family:Georgia,'Times New Roman',serif;font-size:22px;line-height:1.25}
.menu-play i{display:grid;place-items:center;width:35px;height:35px;border-radius:50%;border:1px solid #284b3b32;flex-shrink:0}
.menu-play:active:not(:disabled){transform:translateY(2px);filter:brightness(.97)}
.menu-play:disabled{opacity:.65}
.menu-links{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.menu-links button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:58px;border:1px solid #d4c48931;border-radius:15px;background:#e1d19f08;color:#e9e3cd;font-size:12px;font-weight:500}
.menu-links svg{color:#cbb579}
.menu-about{align-self:center;min-height:42px;padding:7px 15px;background:transparent;color:#becbb0;font-size:12px}
.menu-about svg{margin-left:6px;color:#cdb67b;transform:rotate(-35deg)}
.menu-footer{display:flex;align-items:center;justify-content:space-between;gap:9px;border-top:1px solid #e3cc8d1a;padding-top:14px;color:#abb99b;font-size:9px}
.menu-footer>span{display:flex;align-items:center;gap:5px}
.menu-footer small{font-size:8px;color:#98a88d;letter-spacing:.4px;white-space:nowrap}
.menu-error{border:1px solid #c3a07755;border-radius:12px;background:#b68f5812;padding:10px 12px;color:#f4dcc0;font-size:12px;line-height:1.5;text-align:left}
.menu-retry{align-self:center;background:transparent;color:#ebd39c;display:flex;align-items:center;gap:7px;min-height:38px;font-size:12px}
.profile-portrait{display:flex;align-items:center;gap:18px;margin:23px 0 18px;background:#e6e6cc;border:1px solid #d6d9ba;border-radius:21px;padding:4px 17px 0}
.profile-portrait>svg{width:97px;height:130px;flex-shrink:0}
.profile-portrait h3{font-family:Georgia,serif;font-size:22px;font-weight:400;line-height:1.15;margin:7px 0;color:#294b37}
.profile-portrait p{font-size:12px;margin:0}
.profile-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:16px 0}
.profile-stats>div{display:flex;flex-direction:column;gap:6px;padding:17px;border:1px solid #d2d8bd;border-radius:14px;background:#edf0df}
.profile-stats b{font-family:Georgia,serif;font-size:26px;font-weight:400;color:#37563d}
.profile-stats span{font-size:11px;color:#687d5c}
.settings-divider{margin-top:24px;padding-top:18px;border-top:1px solid #d6dcc5}
@media(max-height:740px){.menu-content{gap:9px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}.menu-art{height:185px;margin-top:0}.menu-avatar{width:134px;height:163px;top:10px}.menu-heading h1{font-size:36px}.menu-heading p{margin-top:6px;font-size:12px}.menu-play{min-height:59px}.menu-links button{min-height:52px}.menu-about{min-height:33px}.menu-footer{padding-top:10px}}
@media(min-width:700px){.menu-content{border-left:1px solid #d4bd7920;border-right:1px solid #d4bd7920;background:#173d2d30;padding-left:34px;padding-right:34px}}
@media(prefers-reduced-motion:reduce){.menu-play{transition:none}}

.menu-content{gap:14px;max-width:420px;padding-top:calc(34px + env(safe-area-inset-top));padding-bottom:calc(28px + env(safe-area-inset-bottom))}
.menu-heading h1{font-size:clamp(29px,8.9vw,40px);letter-spacing:2px}.menu-wordmark{font-size:8px;letter-spacing:1.7px}.menu-rule{display:flex;align-items:center;gap:15px;color:#d4bd7f;margin:12px 15px 14px}.menu-rule:before,.menu-rule:after{content:'';height:1px;flex:1;background:linear-gradient(90deg,transparent,#d4bd7f55)}.menu-rule:after{transform:rotate(180deg)}
.intro-open .main-menu{visibility:hidden}
.brand-intro{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:26px;background:radial-gradient(ellipse at 50% 40%,#2d5945,#102f29 72%);color:#eee2ba;text-align:center}.brand-intro[hidden]{display:none}.intro-logo{width:min(100%,420px)}.intro-star{display:block;font-size:55px;color:#d8bd7f;margin-bottom:22px;animation:intro-star 1.3s ease both}.intro-title{font:400 clamp(30px,9vw,44px)/1.25 Georgia,serif;letter-spacing:3px;white-space:nowrap;clip-path:inset(0 0 0 100%);animation:intro-title 1.9s .2s cubic-bezier(.25,.65,.3,1) both}.intro-title span{color:#d6b66f}.intro-caption{font-size:9px;letter-spacing:3px;color:#b8c4a8;margin-top:17px;animation:intro-caption 1s 1.3s both}.intro-actions{position:absolute;bottom:max(35px,env(safe-area-inset-bottom));display:flex;gap:14px}.intro-actions button{padding:10px 15px;min-height:42px;font-size:11px;border:1px solid #d4bd7f44;border-radius:20px;background:#d4bd7f0b;color:#d9d7bc}
@keyframes intro-title{from{clip-path:inset(0 0 0 100%);filter:blur(5px)}to{clip-path:inset(0);filter:blur(0)}}@keyframes intro-star{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}@keyframes intro-caption{from{opacity:0}to{opacity:1}}
.brand-intro.reduced-motion *{animation:none;clip-path:none}
@media(prefers-reduced-motion:reduce){.brand-intro *{animation:none;clip-path:none}}

/* The visual reveal and startup audio share the controller's start time. */
.brand-intro .intro-title{animation:none;clip-path:inset(0 0 0 100%)}
.brand-intro.is-revealing .intro-title{animation:intro-title 1.9s .2s cubic-bezier(.25,.65,.3,1) both}
.brand-intro.reduced-motion .intro-title,.brand-intro.reduced-motion.is-revealing .intro-title{animation:none;clip-path:none}
@media(prefers-reduced-motion:reduce){.brand-intro.is-revealing .intro-title{animation:none;clip-path:none}}

.menu-account{display:flex;flex-wrap:wrap;justify-content:center;gap:9px 18px;font-size:11px;line-height:1.5}.menu-account a{color:#dfcca0;text-underline-offset:4px}.account-profile-link{display:flex;align-items:center;justify-content:center;text-decoration:none;margin-top:9px}

.menu-data-note{font-size:9px;line-height:1.5;color:#aebfa4}.menu-data-note a{color:#cfbc8c;text-underline-offset:3px}

.menu-sign-in{text-decoration:none}.menu-sign-in:focus-visible{outline:3px solid #f8e7b1;outline-offset:4px}
