/* Menu shell (menu-shell.js): the Crusaders UI kit menu (ui-kit/menus.css, menu-flow.css, lobby-menu.css) placed over the live
   world. #game-title is the kit's .cu-stage with a see-through backdrop: the 3D world (main.js glides the camera to each screen's
   vantage) is the scenery, the kit's tints shade it per screen. Also the kit look for the game's own setup and settings panels
   (Custom Battle, Conquest, Beauty Pageant and Last Light setups, Settings, Pause, How to Play, the match card) so the flow
   reads as one menu. Tokens from theme.css. */
#game-title.cu-stage{position:fixed;inset:0;z-index:44;background:none;overflow:hidden}
#game-title[hidden]:not(.shell-out){display:none!important}
#game-title .cu-tint[data-t="base"]{background:linear-gradient(90deg,#1b2442e0 0,#1b2442a0 34%,#1b244218 66%,#1b244200),linear-gradient(#1b244200 60%,#1b2442b0)}
#game-title .mf-screen{inset:0}
@media (prefers-reduced-motion:no-preference){#game-title:not([hidden]){animation:shell-fade-in .45s ease-out both}#game-title.shell-out{animation:shell-fade-out .36s ease-in both}}
/* press: the status line under the chip */
#title-status{margin:0;min-height:16px;font-size:13.5px;color:var(--ui-parchment-dim);text-shadow:1px 1px 0 var(--ui-ink)}
#title-enter:disabled{opacity:.6;cursor:progress}
/* cards and briefing art come in as <img> (cards/*.svg, portraits/*.svg) */
#game-title .cu-card .art>img,#game-title .cu-brief-art .art>img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .5s cubic-bezier(.16,.84,.24,1)}
#game-title .cu-card:is(:hover,:focus-visible) .art>img{transform:scale(1.05)}
#game-title .cu-card:disabled{opacity:.55;cursor:progress}
#game-title .cu-classes .art{aspect-ratio:1;background:radial-gradient(circle at 50% 75%,#5966a1,#1b2442 72%)}
#game-title .cu-classes .art>img{object-fit:contain;padding:6% 8% 0}
#game-title .cu-portrait>img{position:absolute;left:4%;top:2%;width:92%;height:auto}
/* class cards at most 900 px across, as the kit mockup */
#game-title .cu-classes{max-width:900px}
/* the Play screen's second row: Quick Battle (with its last-match line), Custom Battle, Workshop, Crusader (with your
   portrait), Explore */
#game-title .cu-more{margin-top:4px}
/* the Play screen keeps its shortcut row on screen: the card art gives up height first (it is cropped, not squashed) */
@media (min-width:761px){#game-title [data-screen="play"] .cu-card .art{max-height:max(150px,calc(100vh - 420px))}}
#game-title .cu-more .cu-btn{display:inline-flex;align-items:center;gap:8px}
#title-quick>span{display:flex;flex-direction:column;align-items:flex-start;text-align:left}
#title-quick small{display:block;margin-top:2px;font-size:13.5px;font-weight:400;color:#3a2b3f}
#title-crusader{position:relative}
#title-crusader img{width:30px;height:30px;margin:-6px -8px -6px 2px;image-rendering:pixelated;background:radial-gradient(circle at 50% 42%,#3a5288,#1b2442 70%);border:2px solid var(--ui-ink)}
#title-crusader img[hidden]{display:none}
#game-title button[aria-busy=true]{cursor:progress}
/* Battle briefing: the one-switch option row (Play with bots) */
#game-title .cu-opts-one{grid-template-columns:minmax(0,1fr);max-width:440px}
#game-title .cu-opt:has(input[type=checkbox]) b::after{content:"Off";margin-left:auto;font:400 13.5px/1 var(--ui-body);letter-spacing:.08em;text-transform:uppercase;color:var(--ui-parchment-dim)}
#game-title .cu-opt:has(input[type=checkbox]:checked) b::after{content:"On";color:var(--ui-gold-hi)}
/* Stats: empty rows and the "not tracked yet" tile */
#game-title .cu-ledger-recent li.cu-empty{display:block;color:var(--ui-parchment-dim);font-size:13.5px}
#game-title .cu-tile-wide{grid-column:1/-1}
#game-title .cu-v-note{font-size:22px;color:var(--ui-parchment-dim)}
/* the one-line notice (a Workshop save made from the menu, a Quick Battle waiting for a cancelled setup) */
#title-notice{position:absolute;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:4;margin:0;max-width:min(520px,calc(100vw - 32px));padding:6px 10px;font-size:13.5px;line-height:1.35;color:var(--ui-parchment);background:#1b2442f0;border:2px solid var(--ui-ink);border-left:4px solid var(--ui-good,#7affa0);text-shadow:1px 1px 0 var(--ui-ink)}
#title-notice[hidden]{display:none}
/* touch keeps every row 44px or more (the kit insets the Esc menu slab, the top bar and every .cu-body by the safe areas) */
@media (pointer:coarse){#game-title .cu-pause-foot kbd{display:none}#game-title .cu-subtabs button{min-height:36px}}
/* phones */
@media (max-width:760px){
 #game-title .cu-body{padding:12px 16px 16px}
 #game-title .cu-more{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}/* one height per row (Crusader's single line too) */
 #game-title .cu-more #title-quick{grid-column:1/-1;justify-content:center}
 #game-title .cu-card .line{display:none}
 #game-title .cu-card .name{font-size:22px}
 #game-title .cu-classes .art{aspect-ratio:4/3}
}
/* landscape phones and short windows: cards turn into short banners so the row and the buttons fit */
@media (max-height:520px){
 #game-title .cu-topbar{height:44px}#game-title .cu-body{inset:44px 0 0 0;padding-top:10px;gap:10px}
 #game-title .cu-h{font-size:30px}
 #game-title .cu-modes{grid-template-columns:repeat(5,minmax(0,1fr))}
 #game-title .cu-card .art{aspect-ratio:16/9}#game-title .cu-card .line{display:none}#game-title .cu-card .name{font-size:20px}#game-title .cu-card .plate{padding:6px 8px 8px}
 #game-title .cu-brief-art{display:none}#game-title .cu-brief{grid-template-columns:minmax(0,1fr)}
 #game-title .cu-rules li{font-size:13.5px}#game-title .cu-lede{font-size:14px}
 #game-title .cu-pause-menu button{padding-block:2px;font-size:18px}#game-title .cu-pause-menu small{display:none}#game-title .cu-pause-who{display:none}
}
@media (max-height:520px) and (max-width:760px){#game-title .cu-modes{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* the game's global button states (style.css button:hover, [aria-pressed]) outrank the kit's class-only card and Enter rules */
#game-title .cu-card:is(:hover,[aria-pressed=true]){background:var(--ui-panel-solid);border-color:var(--ui-ink);color:inherit}
#game-title .cu-enter:is(:hover,[aria-pressed=true]){background:#1b2442d0;border-color:var(--ui-ink)}

/* ---------- the kit look for the game's own panels ---------- */
:is(#look-panel,#controls-panel,#battle-panel .battle-dialog,#conquest-panel .conquest-dialog,#pageant-panel .pageant-dialog,#defense-setup .defense-dialog){
 border-image:none!important;border-color:transparent;background:linear-gradient(#1b2442f5,#16203cf5) border-box;outline:3px solid var(--ui-ink);outline-offset:-3px;box-shadow:inset 0 0 0 14px #0000,var(--ui-drop)}
:is(#look-panel .panel-title,#controls-panel .controls-head h2,#battle-panel .battle-dialog h2,#conquest-panel .conquest-dialog h2,#pageant-panel .pageant-dialog h2,#defense-setup .defense-dialog h2){font-family:var(--ui-display);font-weight:400;color:var(--ui-gold-hi);text-shadow:2px 2px 0 var(--ui-ink);letter-spacing:.01em}
#look-panel .panel-title{font-size:28px}
/* phones: Settings over the Esc menu is opaque (the menu's labels showed through) and, on portrait, full width; the Crusader
   screen's note keeps an ink shadow over the scenery */
@media (max-width:760px){body.shell-title #look-panel{background:linear-gradient(#1b2442,#16203c) border-box}}
@media (max-width:520px){body.shell-title #look-panel{left:16px;right:16px;width:auto}}
#game-title [data-screen="crusader"] .cu-lede{text-shadow:1px 1px 0 var(--ui-ink),0 0 8px #0b1224}

/* ---------- fit and reach (playtest LS2, LS3, N3; site audit G7) ---------- */
/* The Press Enter title is the kit's lockup (lobby-menu.js pressEnterHTML, static in index.html); the game adds only the
   status line under the stats note. */
/* The tutorial offer (tutorial.js): its slot under Press Enter is held from the first paint while the offer is due
   (html.tut-offer-due, set by index.html's head script), so the box fills it later without moving a button. */
#tutorial-offer-slot{display:none;box-sizing:border-box;flex:none;width:min(520px,100%);height:112px}
/* Answering the offer empties the slot but keeps its space (tut-offer-kept), so Press Enter does not jump. */
:is(.tut-offer-due,.tut-offer-kept) #tutorial-offer-slot{display:block}
/* The kit lockup places Press Enter absolutely (58% down the stage), so the slot sits under it the same way; on short
   landscape stages it takes the empty right half above the button instead (the stats note runs along the bottom). */
#game-title .cu-press-in>#tutorial-offer-slot{position:absolute;left:0;right:0;margin:0 auto;top:calc(58% + 36px);width:min(520px,calc(100% - 32px))}
@container cu-press (max-height:500px) and (min-width:500px){#game-title .cu-press-in>#tutorial-offer-slot{left:50%;right:0;top:auto;bottom:calc(42% + 40px);width:min(400px,calc(50% - 32px))}}
/* guide | the line over two equal buttons (Play tutorial, Skip: same size and weight) over "Find it any time in How to play." */
#tutorial-offer-slot>#tutorial-offer{box-sizing:border-box;width:100%;height:100%;margin:0;min-width:0;text-align:left;display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto auto;gap:4px 10px;align-items:center;align-content:center;padding:6px 10px}
#tutorial-offer-slot>#tutorial-offer .tut-guide{grid-row:1/4}
#tutorial-offer-slot>#tutorial-offer p{grid-column:2/4;min-width:0;font-size:18px}
#tutorial-offer-slot>#tutorial-offer button{align-self:stretch;min-width:0;min-height:40px;padding:4px 8px;font-size:17px;font-weight:400;color:var(--ui-parchment);background:var(--ui-panel-solid)}
#tutorial-offer-slot>#tutorial-offer button:is(:hover,:focus-visible){background:#36507f}
#tutorial-offer-slot>#tutorial-offer .tut-offer-note{grid-column:2/4;font-size:13px;line-height:1.2;color:var(--ui-parchment-dim,#d9c9a3)}
@media (prefers-reduced-motion:no-preference){#tutorial-offer-slot>#tutorial-offer{animation:shell-fade-in .3s ease-out both}}
/* Short landscape stages (phones on their side, 667 x 375, 568 x 320; playtest r6 M5): the half-width box gets smaller type so
   "Play tutorial" stays on its button; at 360 px tall and less the slot is shorter (it must end below the online chip), the
   guide picture goes and the note shrinks to one line, so every line stays inside the box. */
@container cu-press (max-height:500px) and (min-width:500px){
 #tutorial-offer-slot>#tutorial-offer{gap:3px 8px;padding:5px 8px}
 #tutorial-offer-slot>#tutorial-offer p{font-size:15px;line-height:1.15}
 #tutorial-offer-slot>#tutorial-offer button{font-size:15px;line-height:1.1;padding:2px 6px;min-height:34px}
 #tutorial-offer-slot>#tutorial-offer .tut-offer-note{font-size:12px}}
@container cu-press (max-height:360px) and (min-width:500px){
 #game-title .cu-press-in>#tutorial-offer-slot{left:50%;right:16px;width:auto;margin:0;height:88px}
 #tutorial-offer-slot>#tutorial-offer{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2px 8px;padding:4px 8px}
 #tutorial-offer-slot>#tutorial-offer .tut-guide{display:none}
 #tutorial-offer-slot>#tutorial-offer p{grid-column:1/3;font-size:13.5px;line-height:1.15}
 #tutorial-offer-slot>#tutorial-offer button{font-size:14px;min-height:28px;padding:1px 4px}
 #tutorial-offer-slot>#tutorial-offer .tut-offer-note{grid-column:1/3;font-size:12px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media (max-width:480px){
 #tutorial-offer-slot{height:128px}
 #tutorial-offer-slot>#tutorial-offer{gap:4px 8px;padding:6px 8px}
 #tutorial-offer-slot>#tutorial-offer p{font-size:16px}
 #tutorial-offer-slot>#tutorial-offer button{font-size:16px}
}
/* The Play screen's shortcut row stays on one line on laptop widths (it wrapped Explore below the fold at 1024 x 576). */
@media (min-width:761px) and (max-width:1180px){#game-title .cu-more{gap:8px}#game-title .cu-more .cu-btn{padding-inline:11px;gap:6px}#game-title .cu-more .cu-btn.primary{padding-inline:14px}}
/* Short desktop windows (1024 x 576, 1366 x 657...): tighter Esc menu rows, briefing and class cards, so every button shows
   without scrolling. */
@media (min-width:761px) and (max-height:700px){
 #game-title .cu-pause-panel{gap:8px}#game-title .cu-pause-menu button{padding-block:3px}
 #game-title .cu-brief-main{gap:8px}#game-title .cu-brief .cu-h{font-size:clamp(32px,3.6vw,44px)}#game-title .cu-brief .cu-lede{font-size:14px}
 #game-title .cu-brief .cu-rules{gap:2px}#game-title .cu-brief .cu-rules li{font-size:13.5px}#game-title .cu-brief .cu-rules .ui-ico{--ico:20px}
 #game-title .cu-brief .cu-opt{padding:6px 10px}#game-title .cu-brief .cu-row .cu-btn{padding-inline:12px}#game-title .cu-brief .cu-row .cu-btn.primary{padding-inline:16px}
 #game-title .cu-classes .art{aspect-ratio:4/3}
}
/* Portrait phones: shorter mode-card art (cropped, never squashed) so the shortcut row is nearer the fold. */
@media (max-width:760px) and (min-height:521px){#game-title [data-screen="play"] .cu-card .art{aspect-ratio:4/3}}
/* "More below" (menu-shell.js): over the bottom edge of a screen that scrolls, until it is scrolled to the end. */
#game-title .mf-more-cue{position:absolute;z-index:6;height:48px;display:flex;align-items:flex-end;justify-content:center;padding-bottom:6px;box-sizing:border-box;pointer-events:none;background:linear-gradient(#1b244200,#1b2442e0)}
#game-title .mf-more-cue[hidden]{display:none}
#game-title .mf-more-cue>span{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;font:400 13.5px/1 var(--ui-body);letter-spacing:.08em;text-transform:uppercase;color:var(--ui-ink);background:var(--ui-gold);border:2px solid var(--ui-ink);box-shadow:2px 2px 0 #0008}
#game-title .mf-more-cue>span::after{content:"";width:0;height:0;border:5px solid #0000;border-top:6px solid var(--ui-ink);border-bottom:0}
@media (prefers-reduced-motion:no-preference){#game-title .mf-more-cue>span{animation:mf-more-bob 1.4s ease-in-out infinite}}
@keyframes mf-more-bob{50%{transform:translateY(3px)}}
/* ---------- scrim (lead's menu notes) ---------- */
/* Menu text never sits on busy plaza art: the Play, Crusader and Stats screens lay the kit's Scrim material (tokens.css
   --cu-mat-scrim) under their content column; phones take a full-width scrim. The briefing and the Esc menu carry their own. */
#game-title .mf-screen:is([data-screen="play"],[data-screen="crusader"],[data-screen="stats"])::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:var(--cu-mat-scrim,linear-gradient(90deg,#120d22d9 0,#120d2299 55%,#120d2200));opacity:0;transition:opacity .3s ease-out}
#game-title .mf-screen:is(.is-active,.is-entering)::before{opacity:1}
@media (max-width:760px){#game-title .mf-screen:is([data-screen="play"],[data-screen="crusader"],[data-screen="stats"])::before{background:linear-gradient(#120d22d9,#120d2299)}}
@media (prefers-reduced-motion:reduce){#game-title .mf-screen::before{transition:none}}
/* Short laptop windows (1024 x 576): the battle brief drops its three rule lines (the lede says the same) so the Opponents
   row shows above the sticky Quick Battle tray without scrolling. */
@media (min-width:761px) and (max-height:620px){#game-title [data-screen="brief-battle"] .cu-rules{display:none}}
/* phones (MD11): the Play carousel's dots carry a line saying how many more modes sit to the side (menu-shell.js modeCap) */
#game-title .cu-mode-dots .cu-dots-cap{margin-left:6px;font:400 13.5px/20px var(--ui-body);color:#fff3cde6;text-shadow:2px 2px 0 var(--ui-ink);white-space:nowrap}
#game-title .cu-mode-dots i{min-width:8px}
/* touch-targets.css spaces a button that follows a button on coarse pointers; the offer's grid gap already does, so both
   buttons keep one size */
#tutorial-offer-slot>#tutorial-offer button+button{margin-inline-start:0}
/* five mode cards (Speedway joined the four): the kit's grid is four wide; past the phone strip it is five */
@container cu-stage (min-width:641px){#game-title .cu-modes{grid-template-columns:repeat(5,minmax(0,1fr))}}
/* Esc menu mode cards (Play from the Esc menu): a visible 3px focus ring for the pad and keyboard, not only the dim-the-others cue (menus thread, r12 8421548 #3) */
/* kit platform badge (platform-ui.css, N2-06) on the title: kit now ships light-gold text */
#game-title .cu-platform-badge{position:absolute;z-index:2;left:max(16px,env(safe-area-inset-left));top:max(20px,env(safe-area-inset-top))}
/* only on the Press Enter screen, the corner opposite the online chip */
#game-title:not([data-screen="press"]) .cu-platform-badge{display:none}
