/* Shared game HUD. Mobile places play within thumb reach and keeps every destination visible. */
:root{--hud-bottom:76px;--hud-play:106px;--hud-gold:#ffd386;--hud-panel:#142c45}
body{background:#09182a;-webkit-text-size-adjust:100%}
.game-shell{background:radial-gradient(ellipse at 50% 0,#17345388,transparent 65%);min-height:100dvh}
.game-header{background:#0c1c2eee;border-bottom:1px solid #d6b4772b;min-height:80px}
.game-brand{color:#f1cc88}.game-brand .brand-seal{background:#f1cc88;color:#14273c;box-shadow:none}.game-brand small{color:#93a9bc}
.game-tabs svg{stroke-width:1.9}.game-tabs button{min-height:48px;padding:12px 15px}
.hud-wallet{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--hud-gold);font-weight:800;white-space:nowrap}.hud-wallet svg{width:18px;height:18px}
.profile-chip{min-height:44px}.profile-chip img{box-shadow:0 0 0 3px #f1cc8b13;border:2px solid #e1b96b}
.tournament-empty>svg{width:60px;height:60px;color:var(--gold)}
.hatch-traits b{display:flex;align-items:center;gap:4px}.hatch-traits b svg{width:16px;height:16px}
.ready-players>div{min-width:0}.ready-players h3,.ready-players small,.ready-players b{overflow-wrap:anywhere}.tournament-lobby h2{overflow-wrap:anywhere}
.live-combat-modal:has([data-live-battle][data-battle-in-progress]) .modal-header [data-action=close]{visibility:hidden;pointer-events:none}
.live-combat-modal .modal-header{min-height:44px;position:relative}
html,dialog,.battle-feed ol,.battle-log ol{scrollbar-width:thin;scrollbar-color:#52718e #102237}dialog{overscroll-behavior:contain}.modal-header{position:sticky;top:0;z-index:8;background:#17283ef5}.modal-header h2{min-width:0;overflow-wrap:anywhere}.modal-header .icon-btn{flex-shrink:0;min-width:44px;min-height:44px}
@media(max-width:1100px) and (min-width:701px){.game-tabs{gap:2px}.game-tabs button{padding:10px;font-size:12px}.game-header{gap:12px}}
@media(max-width:700px){
 :root{--hud-bottom:calc(68px + env(safe-area-inset-bottom,0px))}
 .game-header{display:flex;position:relative;gap:10px;min-height:70px;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px}
 .game-brand{gap:8px}.game-brand>span:last-child{display:none}.game-brand .brand-seal{width:34px;height:38px;font-size:12px}
 .profile-chip{order:1;margin-inline-end:auto;gap:8px;min-width:0}.profile-chip img{width:38px;height:38px}.profile-chip span{font-size:12px;max-width:135px}.profile-chip small{margin-top:3px}.hud-wallet{order:2;font-size:12px}
 .game-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;inset-inline:0;width:100%;height:var(--hud-bottom);gap:0;padding:6px max(4px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(4px,env(safe-area-inset-left,0px));background:#0d1e32f7;border-top:1px solid #45658470;box-shadow:0 -4px 25px #051120aa;z-index:25;backdrop-filter:blur(18px)}
 .game-tabs button{position:relative;min-width:0;min-height:54px;padding:5px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:9px;border-radius:10px;color:#96b0cb}
 .game-tabs button>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;hyphens:none;line-height:1.2;text-align:center;max-width:100%}.game-tabs button>svg{width:23px;height:23px}.game-tabs button>b{position:absolute;top:0;inset-inline-end:11px;border:2px solid #142539;border-radius:8px;font-size:9px;min-width:17px;padding:0 3px}
 .game-tabs button.active{background:#e5b86a12;box-shadow:none;color:#ffd484}.game-tabs .nav-play{color:#dfbd81}.game-tabs .nav-play svg{background:#ffcf8130;border:1px solid #efbf6e5c;border-radius:11px;padding:5px;width:36px;height:30px}.game-tabs .nav-play.active svg{background:#ffd484;color:#263249}
 .game-main{padding:18px 14px 24px;min-width:0}.game-footer{padding:18px 14px calc(var(--hud-bottom) + 18px);gap:12px;flex-wrap:wrap}.game-footer>span{width:100%;text-align:center;font-size:10px}.game-footer>button{min-height:44px}.game-footer>button svg{width:16px;height:16px}
 .page-intro h1{font-size:25px;line-height:1.15}.page-intro .sub{font-size:12px}.page-intro{align-items:flex-start}.page-intro>.btn{flex-shrink:0;font-size:10px;min-height:44px;padding:8px}
 input,textarea,select,.input{font-size:16px!important}input,select{min-height:44px}.icon-btn{width:44px;height:44px;min-width:44px;min-height:44px}.text-button,.filter-pill{min-height:44px}
 dialog{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 16px);max-width:calc(100vw - 16px);margin:auto;scroll-padding-top:64px}.modal-header{padding:8px 14px}.modal-header h2{font-size:16px;line-height:1.3}
 .identity-page{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}.identity-fields{grid-template-columns:1fr}.avatar-option{min-height:44px}
 .ready-players{grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);gap:7px}.ready-players h3{font-size:13px}.ready-players small{font-size:10px}
 #toast{bottom:calc(var(--hud-bottom) + 14px);max-width:calc(100vw - 28px);font-size:12px}body:has(.is-lobby) #toast{bottom:calc(var(--hud-bottom) + var(--hud-play) + 10px)}
}
.tournament-nav-lock{display:flex;align-items:center;justify-content:center;gap:10px;grid-column:1/-1;color:#d0b1ff;font-size:13px;font-weight:700;min-height:48px}.tournament-nav-lock svg{width:24px;height:24px}.is-tournament .profile-chip:disabled,.is-tournament .game-brand:disabled{opacity:1;cursor:default}
.tournament-confirm{padding:24px;text-align:center}.tournament-confirm-emblem{display:grid;place-items:center;margin:0 auto 18px;width:76px;height:76px;border-radius:22px;background:linear-gradient(140deg,#63467b,#26334f);border:1px solid #d4b08b55}.tournament-confirm-emblem svg{width:45px;height:45px;color:#ffdc9b}.tournament-confirm h3{font-size:22px;margin:0 0 12px}.tournament-confirm p{color:#b9cadd;font-size:14px;line-height:1.6}.tournament-confirm .detail-actions{justify-content:center;gap:10px;margin-top:24px}.tournament-confirm .btn{min-height:48px}
.tournament-actions>.btn:first-child,.tournament-confirm .btn:not(.secondary),.result .detail-actions>.btn:first-child,.endless-challenge [data-next],.challenge-finish>.btn{min-height:56px;font-size:17px;font-weight:850;background:linear-gradient(#ffe2a5,#f4bc61);color:#292113;border:1px solid #ffe3af;border-bottom:4px solid #a7712d;box-shadow:0 4px 0 #594027,0 6px 24px #e5ac391a}
.tournament-actions>.btn:first-child{min-width:220px}.tournament-confirm .btn:not(.secondary){min-width:155px}.tournament-actions>.btn:first-child:active,.tournament-confirm .btn:not(.secondary):active,.result .detail-actions>.btn:first-child:active{transform:translateY(2px)}
@media(max-width:700px){.is-tournament .tournament-actions>.btn:first-child{position:fixed;inset-inline:16px;bottom:calc(var(--hud-bottom) + 12px);width:calc(100% - 32px);min-height:60px;z-index:24;font-size:21px;border-radius:14px;box-shadow:0 4px 0 #594027,0 0 0 10px #0b1b2df5}.is-tournament .game-footer{padding-bottom:calc(var(--hud-bottom) + 105px)}.tournament-confirm .detail-actions{display:flex;flex-direction:column-reverse}.tournament-confirm .detail-actions>.btn{width:100%}.result .detail-actions{display:flex;flex-direction:column}.result .detail-actions>.btn:first-child{width:100%;font-size:18px}.result .detail-actions>.btn.ghost{font-size:12px;min-height:44px}.endless-challenge [data-next],.challenge-finish>.btn{width:100%}}

/* Play: original blue 3D art, one clear choice and a single primary action. */
.game-main:has(.game-lobby){max-width:1140px;padding-top:28px}
.game-lobby{max-width:1060px;margin:auto}.lobby-heading{margin:0 0 24px}.lobby-heading .eyebrow{margin:0 0 6px;letter-spacing:.2em}.lobby-heading h1{font-size:clamp(42px,5vw,62px);line-height:1;letter-spacing:-.035em;margin:0;font-weight:850;color:#f1f7ff}
.game-tabs .nav-play{font-weight:850}.game-tabs .nav-play.active{color:#ffe0a1}
.play-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.adventure-hub .play-mode-card{--mode-color:#92d4ff;position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;padding:0;overflow:hidden;text-align:start;color:#f0f5ff;background:linear-gradient(145deg,#18334f,#10263f);border:1px solid #58748c99;border-radius:18px;cursor:pointer;box-shadow:0 12px 30px #020d1845;transition:border-color .18s,transform .18s,box-shadow .18s}
.play-mode-card.mode-raid{--mode-color:#ffbf85}.play-mode-card.mode-tournament{--mode-color:#ffd886}
.play-mode-card.selected{border-color:#ffdb91;box-shadow:0 0 0 2px #ffd38a,0 0 26px #ffcb5c1c,0 12px 30px #020d1860}
.play-mode-card:hover{transform:translateY(-4px);border-color:#d8eaff}.play-mode-card:focus-visible{outline:3px solid #fff;outline-offset:5px}
.adventure-hub .play-mode-art{position:relative;display:block;flex:none;width:100%;aspect-ratio:1.85;overflow:hidden;background:#0869e8}
.adventure-hub .play-mode-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 44%}
@media(min-width:701px){.adventure-hub .mode-arena .play-mode-art img{object-position:50% 30%}.adventure-hub .mode-raid .play-mode-art img,.adventure-hub .mode-tournament .play-mode-art img{object-position:50% 0%}}
.adventure-hub .play-mode-art:after{content:'';position:absolute;inset:68% 0 0;background:linear-gradient(transparent,#17324d);pointer-events:none}
.play-mode-format{position:absolute;z-index:1;top:13px;inset-inline-start:13px;padding:4px 9px;border:1px solid #d4e9ff66;border-radius:7px;background:#0a2039d9;color:#fff1d1;font-size:11px;font-weight:900;letter-spacing:.08em;box-shadow:0 3px 12px #020d1840}
.adventure-hub .play-mode-copy{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;min-height:151px;margin:0;padding:17px 20px 18px}
.play-mode-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.adventure-hub .play-mode-copy strong{display:block;font-size:27px;line-height:1.15;margin:0;letter-spacing:-.025em}
.play-mode-fact{display:inline-flex;align-items:center;gap:4px;padding:4px 6px;border:1px solid #89abc333;border-radius:6px;color:var(--mode-color);font-size:10px;font-weight:800;white-space:nowrap}.play-mode-fact svg{width:13px;height:13px}
.adventure-hub .play-mode-description{display:block;min-height:39px;margin:9px 0 12px;color:#bfd1e3;font-size:13px;line-height:1.5;max-width:27ch}
.adventure-hub .play-mode-status{display:flex;align-items:center;gap:7px;margin-top:auto;color:#cbe1f0;font-size:11px;font-weight:700;line-height:1.4}.play-mode-status::before{content:'';flex:none;width:5px;height:5px;border-radius:50%;background:var(--mode-color);box-shadow:0 0 8px color-mix(in srgb,var(--mode-color) 35%,transparent)}
.play-mode-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:11px 20px;border-top:1px solid #8da9c629;background:#071a2c40;color:#f1cf90;font-size:12px;font-weight:850}.play-mode-footer svg{width:17px;height:17px;transition:transform .18s}.play-mode-card:hover .play-mode-footer svg{transform:translateX(3px)}[dir=rtl] .play-mode-card:hover .play-mode-footer svg{transform:translateX(-3px)}
.play-mode-check{position:absolute;top:14px;inset-inline-end:14px;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#0a172bd9;color:var(--mode-color);border:1px solid #c1d9f366;z-index:5;box-shadow:0 3px 10px #04142a33}
.play-mode-check svg{width:17px;height:17px}.selected .play-mode-check{background:#ffd38a;color:#352b18;border-color:#ffe1a5}
.lobby-play-dock{max-width:450px;margin:23px auto 0}.lobby-play-status{display:flex;justify-content:center;color:#b3c4d8;font-size:12px;min-height:28px}.lobby-play-status>span{display:flex;align-items:center;gap:6px}.lobby-play-status svg{width:15px;height:15px}
.lobby-play-button{width:100%;min-height:72px;border-radius:10px;border:1px solid #ffe5b3;border-bottom:4px solid #ac742c;background:linear-gradient(#ffe2a5,#f4bc61);color:#2f2414;box-shadow:0 5px 0 #44361e,0 10px 28px #f8bc4320;display:grid;grid-template-columns:28px 1fr auto;padding:12px 20px;gap:12px;text-transform:uppercase;font-size:27px;font-weight:900;letter-spacing:.08em}
.lobby-play-button svg{width:27px;height:27px}.lobby-play-button small{font-size:12px;letter-spacing:0;text-transform:none;font-weight:700;color:#70532b}.lobby-play-button:active{transform:translateY(3px);box-shadow:0 2px 0 #44361e}.lobby-play-button:disabled{filter:saturate(.25);opacity:.55}
/* Village destinations share the same art direction; no empty icon tiles. */
.village-destinations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.village-destinations>.village-destination{position:relative;min-width:0;height:340px;overflow:hidden;border:1px solid #4c7195;border-radius:16px;padding:0;background:#10263f;text-align:start;box-shadow:0 12px 30px #020d1838}
.village-destination>img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 42%}
.village-destination:after{content:'';position:absolute;inset:35% 0 0;background:linear-gradient(transparent,#0a1e36e8 76%,#0a1e36)}
.village-destination-copy{position:absolute;z-index:1;inset:auto 24px 24px}.village-destination-copy h2{font-size:30px;line-height:1.1;margin:0 0 9px;color:#f3f7ff}.village-destination-copy p{max-width:32ch;margin:0;color:#c1d6eb;font-size:14px;line-height:1.5}
.village-destination-arrow{position:absolute;z-index:2;top:16px;inset-inline-end:16px;width:34px;height:34px;background:#0b213acc;border:1px solid #b6d9f166;border-radius:50%;display:grid;place-items:center;color:#ffe0a1}.village-destination-arrow svg{display:block;position:static;inset:auto;width:19px;height:19px}
.village-destination:hover{border-color:#ffda90}.village-destination:focus-visible{outline:3px solid #ffdb91;outline-offset:4px}
@media(max-width:700px){
 .game-main:has(.game-lobby){padding:16px 16px 0}.lobby-heading{margin-bottom:18px}.lobby-heading h1{font-size:42px}.lobby-heading .eyebrow{font-size:9px}
 .play-mode-grid{grid-template-columns:1fr;gap:13px}.adventure-hub .play-mode-card{display:grid;grid-template-columns:112px minmax(0,1fr);border-radius:14px;min-height:0}
 .adventure-hub .play-mode-art{height:100%;aspect-ratio:auto;min-height:150px}.adventure-hub .play-mode-art img{object-fit:cover;object-position:50% 44%}
 .adventure-hub .play-mode-art:after{inset:0 0 0 82%;background:linear-gradient(90deg,transparent,#17324d)}
 .play-mode-format{top:auto;bottom:9px;inset-inline-start:9px;padding:3px 6px;font-size:9px}
 .adventure-hub .play-mode-copy{min-height:0;margin:0;padding:15px 14px 14px 12px;align-self:stretch}.adventure-hub .play-mode-copy strong{font-size:23px;margin:0}.play-mode-heading{gap:6px}.play-mode-fact{padding:3px 5px;font-size:9px}.play-mode-fact svg{width:11px;height:11px}
 .adventure-hub .play-mode-description{min-height:0;margin:8px 0 10px;font-size:12px;line-height:1.4}.adventure-hub .play-mode-status{font-size:10px}.play-mode-footer{grid-column:1/-1;min-height:38px;padding:8px 13px;font-size:11px}.play-mode-footer svg{width:15px;height:15px}
 .play-mode-check{width:23px;height:23px;top:8px;inset-inline-end:8px}.play-mode-check svg{width:13px;height:13px}
 .lobby-play-dock{position:fixed;inset-inline:0;bottom:var(--hud-bottom);max-width:none;margin:0;padding:10px 16px 13px;background:linear-gradient(transparent,#0a1b2df5 18%);z-index:24}.lobby-play-button{max-width:500px;margin:auto;min-height:62px;font-size:25px}.lobby-play-status{font-size:11px;min-height:25px;align-items:center}.is-lobby .game-footer{padding-bottom:calc(var(--hud-bottom) + var(--hud-play) + 18px)}
 .village-destinations{grid-template-columns:1fr;gap:18px}.village-destinations>.village-destination{height:242px}.village-destination>img{object-position:center 40%}.village-destination-copy{inset:auto 19px 18px}.village-destination-copy h2{font-size:27px}.village-destination-copy p{font-size:12px;max-width:32ch}
}
@media(max-width:700px) and (max-height:740px){.play-mode-grid{gap:10px}.lobby-heading{margin-bottom:12px}.lobby-heading h1{font-size:37px}.lobby-heading .eyebrow{display:none}.game-main:has(.game-lobby){padding-top:10px}}
@media(prefers-reduced-motion:reduce){.adventure-hub .play-mode-card,.play-mode-footer svg{transition:none}.play-mode-card:hover,.play-mode-card:hover .play-mode-footer svg,.lobby-play-button:active{transform:none}}


.education-simple{max-width:62ch}.education-simple>p{font-size:16px;line-height:1.75;color:#c7d7e5;margin:16px 0}.education-simple .education-lead{font-size:19px;line-height:1.6;color:#f1f6fb}.education-deeper{margin:14px 0 22px;border:0;border-top:1px solid #94b5d422;border-bottom:1px solid #94b5d422;border-radius:0;padding:0}.education-deeper>summary{min-height:48px;display:flex;align-items:center;gap:9px;font-size:14px;color:#a9c5dc}.education-deeper>summary:before{content:'+';color:#f7d08a;font-size:21px}.education-deeper[open]>summary:before{content:'−'}.education-deeper>p{font-size:14px;line-height:1.75;color:#b7c9db}
@media(max-width:700px){.education-simple>p{font-size:15px}.education-simple .education-lead{font-size:18px}.education-deeper>summary{font-size:14px}}
.education-simple{max-width:65ch;text-wrap:pretty}.education-simple>p{font-size:17px;line-height:1.85;margin:0 0 1.25em}.education-simple .education-lead{font-size:19px;line-height:1.75;margin-bottom:1.3em}
@media(max-width:700px){.education-simple>p{font-size:16px;line-height:1.8}.education-simple .education-lead{font-size:18px}}
/* Locked modes remain visible as the player's next milestones. */
.mode-unlock-badge{display:inline-flex;align-items:center;gap:5px;margin-top:10px;padding:5px 8px;border-radius:7px;color:#f4d18f;background:#0a1c32cc;font-size:10px;line-height:1.3;border:1px solid #a17b3944}
.mode-unlock-badge svg{width:12px;height:12px}.tournament-unlock{text-align:center;max-width:480px;margin:auto}.tournament-unlock>img{width:min(100%,320px);border-radius:24px}.tournament-unlock h2{font-size:22px;line-height:1.3}.mode-unlock-preview .raid-portrait>img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.result-player-copy .player-mode-unlocks{display:flex;flex-direction:column;gap:6px;margin:10px 0 0;color:#9ae6cf;font-size:12px;font-weight:750}.result-player-copy .player-mode-unlocks[hidden]{display:none}.player-mode-unlocks>span{display:flex;align-items:center;gap:6px}.player-mode-unlocks svg{width:16px;height:16px;flex:none}
.play-mode-copy>small{display:block;color:#91acc6;font-size:12px;font-weight:750}
