/* v3.6.0-alpha.2 — main menu, scoped independently of combat HUD. */
#startScreen{isolation:isolate;background:#090e12;overflow:auto;overscroll-behavior:contain;text-align:left;touch-action:pan-y}
#startScreen .menu-scene{position:fixed;inset:0;z-index:-2;pointer-events:none}
.menu-scene img{width:100%;height:100%;object-fit:cover;object-position:66% center}
#startScreen:after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#080d12ed 0%,#080d12c9 31%,#080d1220 67%),linear-gradient(0deg,#080d12de,transparent 32%)}
.menu-shell{min-height:100vh;min-height:100dvh;width:min(1520px,100%);margin:0 auto!important;padding:28px clamp(24px,5vw,80px) 20px;display:flex;flex-direction:column;gap:32px}
.menu-masthead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:18px;border-bottom:1px solid #d9ba772b}
.menu-wordmark{font:700 17px Cinzel,Georgia,serif;letter-spacing:.17em;color:#e8ddc6}.menu-wordmark b{color:#d9ae67}
#startScreen .release-badge{margin:0;background:#0b131bc9;border:1px solid #a0b4b747;border-radius:3px;color:#c3cfcb;font:600 11px/1.4 system-ui;letter-spacing:.06em;padding:6px 9px}
.menu-content{width:min(520px,47%);margin:auto 0}.menu-heading{display:flex;align-items:center;gap:16px}.menu-crest{width:84px;height:84px;object-fit:contain;flex-shrink:0}#startScreen .menu-kicker{font:600 10px/1.6 system-ui;letter-spacing:.16em;color:#8db7c7;margin:0 0 12px}
#startScreen h1{font:500 clamp(30px,3.25vw,48px)/1.14 Cinzel,Georgia,serif;color:#f0e8d8;letter-spacing:-.025em;margin:0;text-transform:none}#startScreen h1 em{font-style:normal;color:#d9b578}#startScreen .menu-intro{font:400 14px/1.6 Inter,system-ui;color:#c0c8c8;margin:20px 0 22px}
.menu-actions{display:grid;gap:9px}.menu-actions button{width:100%;max-width:none!important;border-radius:3px;cursor:pointer;font:600 13px/1.4 Inter,system-ui;letter-spacing:.07em;min-height:50px;touch-action:manipulation;transition:background-color .15s,border-color .15s}
.menu-actions small{display:block;font:500 10px/1.6 Inter,system-ui;letter-spacing:.06em}.menu-actions strong{display:block;font-size:14px}.menu-play{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;background:linear-gradient(110deg,#e4c68b,#b98a44);color:#151a1c;border:1px solid #f4d7a0;box-shadow:0 4px 26px #b2853826;text-align:left}.menu-play>span:last-child{font-size:26px}.menu-play:hover{background:#efd39a}
#startScreen #collectionBtn{display:flex;align-items:center;gap:15px;margin:0;padding:12px 18px;background:#10222be8;border:1px solid #749aaa80;color:#e4e9e5;text-align:left}.menu-inventory>span:first-child{font-size:28px;color:#8dbac7}.menu-inventory>span:last-child{margin-left:auto;font-size:25px;color:#94b8c7}.menu-inventory small{color:#a3b7bd;letter-spacing:0}.menu-chapter{padding:12px 18px;background:#11191ec9;color:#dbcfb8;border:1px solid #81765780}.menu-chapter:disabled{color:#939b9d;border-color:#73828b36;background:#0d141bb5;cursor:not-allowed;opacity:1}
#startScreen .menu-progress{font:400 11px/1.5 Inter,system-ui;color:#b5b7ad;margin:8px 0 14px}.menu-save,#startScreen #collectionSummary,#startScreen #saveStatus{max-width:none;font:400 11px/1.55 Inter,system-ui;color:#acbcbc;margin:4px 0}#startScreen #saveStatus{color:#d0bb8d}
.channel-card{display:flex;gap:14px;align-items:center;margin:23px 0 12px;padding:17px 18px;border:1px solid #a6815b65;border-radius:4px;background:radial-gradient(ellipse at top right,#93572c35,transparent 70%),#11171cdd;color:#ece8dc;text-decoration:none;min-height:100px}.channel-play{display:grid;place-items:center;width:42px;height:32px;flex-shrink:0;background:#b82e2a;color:white;border-radius:9px;font-size:15px}.channel-copy{display:grid;gap:4px}.channel-copy>small{font:600 9px/1.5 system-ui;letter-spacing:.12em;color:#bcb6ac}.channel-copy strong{font:700 27px/1.1 Georgia,serif;letter-spacing:-.04em}.channel-copy strong em{color:#d0a468;font-style:normal}.channel-copy>span{font:400 11px/1.5 system-ui;color:#b6c0c2}.channel-arrow{font-size:26px;margin-left:auto;color:#c8a86d}.channel-card:hover{border-color:#d2b07c;background-color:#1d262d}
.menu-help{border-top:1px solid #bcbca128;color:#b8c4c8;font:400 12px/1.7 Inter,system-ui}.menu-help summary{min-height:48px;cursor:pointer;padding:15px 0;font-size:10px;letter-spacing:.1em;color:#d4c7ad}.menu-help summary>span{float:right;letter-spacing:0;color:#aeb9bb}.menu-help p{margin:0 0 12px}.menu-help b{color:#e2d2b4}.touch-help{display:none}.menu-footer{display:flex;justify-content:space-between;gap:15px;font:500 9px/1.6 Inter,system-ui;letter-spacing:.14em;color:#a4b1b2;padding-top:18px;border-top:1px solid #d9ba7726}
#startScreen :is(button,a,summary):focus-visible{outline:3px solid #92d9ec;outline-offset:4px}
@media(pointer:coarse){.touch-help{display:block}.desktop-help{display:none}}
@media(min-width:701px) and (max-width:1000px){.menu-content{width:56%}.menu-crest{display:none}.menu-shell{padding-inline:28px}.menu-scene img{object-position:63% center}}
@media(max-width:700px){
  .menu-shell{gap:16px;padding:18px max(20px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));padding-top:max(18px,env(safe-area-inset-top))}
  #startScreen .menu-scene{position:absolute;height:340px;inset:0 0 auto}.menu-scene img{object-position:center 22%;object-fit:cover}
  #startScreen:after{position:absolute;height:350px;background:linear-gradient(0deg,#090e12 0%,#090e1299 27%,#090e1220 68%,#090e125e 100%)}
  .menu-masthead{border:0;padding:0}.menu-wordmark{font-size:13px;text-shadow:0 2px 8px #000}.menu-content{width:100%;margin:170px 0 0}.menu-heading{gap:12px}.menu-crest{width:65px;height:65px}#startScreen .menu-kicker{font-size:8px;margin-bottom:7px;letter-spacing:.09em}
  #startScreen h1{font-size:clamp(26px,7.5vw,38px)}#startScreen .menu-intro{font-size:12px;margin:13px 0 17px}.menu-actions strong{font-size:13px}.menu-play{padding:14px 16px}.channel-card{margin-top:19px;padding:15px}.channel-copy strong{font-size:26px}.channel-copy>small{font-size:8px}.menu-footer{font-size:8px;letter-spacing:.06em}.menu-footer>span:last-child{display:none}
}
@media(max-width:360px){.menu-crest{display:none}.menu-content{margin-top:145px}.menu-shell{padding-inline:16px}.channel-copy strong{font-size:24px}}
@media(min-width:701px) and (max-height:650px){.menu-shell{gap:18px;padding-block:18px}.menu-content{width:min(520px,60%)}.menu-heading .menu-crest{width:60px;height:60px}#startScreen h1{font-size:30px}#startScreen .menu-kicker{margin-bottom:5px}#startScreen .menu-intro{margin:12px 0}.channel-card{margin-top:14px}.menu-footer{padding-top:12px}}
@media(prefers-reduced-motion:reduce){.menu-actions button{transition:none}}

/* V4 alpha.2: campaign chapters and replayable maps have distinct visual groups. */
.menu-content{width:min(680px,54%);margin:auto 0}
.menu-actions{gap:14px}
.menu-section{display:grid;gap:9px;padding:14px;border:1px solid #c2a66b47;border-radius:5px;background:linear-gradient(135deg,#0d171de8,#11191ddf)}
.endless-menu{border-color:#8fb6c244;background:linear-gradient(135deg,#0a171de8,#0e1b20de)}
.menu-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.menu-section-heading .menu-kicker{margin:0 0 3px;font-size:9px}
.menu-section-heading h2{margin:0;color:#e9deca;font:700 19px/1.2 Cinzel,Georgia,serif;letter-spacing:.1em}
.menu-section-mark{color:#d2b77d;font:600 15px/1 Georgia,serif;letter-spacing:.1em}
.endless-menu .menu-section-mark{font-size:24px;color:#99c6d0}
.map-card-list,.endless-map-list{display:grid;gap:7px}
.map-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:58px;padding:9px 12px;border:1px solid #8b806455;border-radius:4px;background:#121d22;color:#e7e0d1;text-align:left;cursor:pointer;touch-action:manipulation}
.map-card:hover:not(:disabled){border-color:#d8b675;background:#1a292e}
.map-card:focus-visible{outline:3px solid #92d9ec;outline-offset:2px}
.map-card-primary{border-color:#e5c786;background:linear-gradient(105deg,#d9b777,#a98143);color:#171b1b;box-shadow:0 4px 20px #b2853826}
.map-card-primary:hover:not(:disabled){background:linear-gradient(105deg,#f0d498,#c39a58)}
.map-card-kirchende{border-left:3px solid #8f9d70}
.map-card-endless{background:#102126}
.map-number{display:grid;place-items:center;width:34px;height:34px;border:1px solid currentColor;border-radius:50%;font:700 12px/1 Cinzel,Georgia,serif;color:#d7bd89}
.map-card-primary .map-number{color:#372c1b}
.map-copy{display:grid;min-width:0;gap:2px}
.map-copy small{font:700 8px/1.4 Inter,system-ui;letter-spacing:.12em;color:#829ba0}
.map-card-primary .map-copy small{color:#55452e}
.map-copy strong{overflow:hidden;text-overflow:ellipsis;font:700 13px/1.3 Cinzel,Georgia,serif;letter-spacing:.04em}
.map-copy>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 10px/1.4 Inter,system-ui;color:#b2c0bd}
.map-card-primary .map-copy>span{color:#51452f}
.map-status{padding:4px 6px;border:1px solid #9aa5a144;border-radius:2px;color:#9ba9a8;font:700 8px/1.2 Inter,system-ui;letter-spacing:.08em;white-space:nowrap}
.map-card:not(:disabled) .map-status{border-color:#89ad8a88;color:#b5d19d}
.map-card:disabled{cursor:not-allowed;opacity:.66}
.menu-utility{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#startScreen .menu-utility button{min-height:52px;margin:0;padding:9px 12px}
#startScreen .menu-progress{margin:2px 0 5px}
@media(max-width:700px){
  .menu-content{width:100%;margin:163px 0 0}
  .menu-actions{gap:11px}
  .menu-section{gap:8px;padding:11px}
  .menu-section-heading h2{font-size:16px}
  .map-card{grid-template-columns:32px minmax(0,1fr) auto;gap:9px;min-height:56px;padding:8px}
  .map-number{width:30px;height:30px}
  .map-copy small{font-size:7px}
  .map-copy strong{font-size:11px}
  .map-copy>span{font-size:9px}
  .map-status{font-size:7px;padding:4px}
  .menu-utility{grid-template-columns:1fr}
  .channel-card{margin-top:12px}
}
@media(max-width:360px){.menu-content{margin-top:145px}.menu-section{padding:9px}.map-card{grid-template-columns:28px minmax(0,1fr) auto;gap:7px}.map-number{width:27px;height:27px}.map-status{font-size:6px}}
@media(prefers-reduced-motion:reduce){.map-card{transition:none}}

/* First-run Einleitung tutorial: high-contrast speech bubble and anchored arrow. */
#introTutorial{z-index:40;display:block;padding:0;background:#03090bb0;backdrop-filter:blur(1px);text-align:left}
#introTutorial.hidden{display:none}
#introTutorial .tutorial-bubble{position:fixed;top:clamp(82px,13vh,150px);left:50%;transform:translateX(-50%);z-index:2;width:min(500px,calc(100vw - 36px));padding:20px 22px 16px;background:linear-gradient(145deg,#17252bfa,#0b1319f5);border:1px solid #d5b56b;border-radius:8px;box-shadow:0 16px 60px #000c,0 0 26px #ddbd6530;color:#f1eadb}
#introTutorial .tutorial-bubble:after{content:"";position:absolute;left:34px;bottom:-11px;width:20px;height:20px;background:#101a20;border-right:1px solid #d5b56b;border-bottom:1px solid #d5b56b;transform:rotate(45deg)}
#introTutorial[data-step="3"] .tutorial-bubble{top:auto;bottom:clamp(105px,18vh,190px)}
#introTutorial[data-step="3"] .tutorial-bubble:after{left:50%;top:-11px;bottom:auto;transform:rotate(225deg)}
#introTutorial[data-step="4"] .tutorial-bubble{left:24px;top:auto;bottom:clamp(105px,16vh,180px);transform:none}
#introTutorial[data-step="4"] .tutorial-bubble:after{left:auto;right:40px;top:auto;bottom:-11px;transform:rotate(45deg)}
#introTutorial .tutorial-kicker{margin:0 0 8px;color:#d7bd81;font:700 10px/1.4 system-ui;letter-spacing:.16em}
#introTutorial .tutorial-bubble h2{margin:0;color:#f0e5ce;font:700 clamp(20px,3vw,27px)/1.25 Cinzel,Georgia,serif;letter-spacing:.025em}
#introTutorial #tutorialText{margin:10px 0 16px;color:#d3dddc;font:400 14px/1.65 Inter,system-ui,sans-serif}
#introTutorial .tutorial-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}
#introTutorial .tutorial-actions button{min-height:48px;margin:0;padding:10px 16px}
#introTutorial #tutorialNext{margin-left:auto}
#introTutorial :is(button):focus-visible{outline:3px solid #91dced;outline-offset:3px}
#introTutorial .tutorial-arrow{position:fixed;z-index:1;height:3px;transform-origin:left center;background:linear-gradient(90deg,#f0d48c,#a9e8f3);box-shadow:0 0 8px #e3c57a;pointer-events:none}
#introTutorial .tutorial-arrow:after{content:"";position:absolute;right:-2px;top:-7px;border-left:13px solid #b9edf2;border-top:8px solid transparent;border-bottom:8px solid transparent;filter:drop-shadow(0 0 3px #e5cf84)}
@media(pointer:coarse){
  #introTutorial .tutorial-bubble{width:calc(100vw - 24px);padding:17px 17px 14px}
  #introTutorial #tutorialText{font-size:14px;line-height:1.55}
  #introTutorial .tutorial-actions button{min-height:52px}
  #introTutorial[data-step="0"] .tutorial-bubble,#introTutorial[data-step="1"] .tutorial-bubble,#introTutorial[data-step="2"] .tutorial-bubble{top:calc(env(safe-area-inset-top) + 74px)}
  #introTutorial[data-step="3"] .tutorial-bubble,#introTutorial[data-step="4"] .tutorial-bubble{bottom:calc(env(safe-area-inset-bottom) + 96px)}
}
@media(max-width:700px) and (orientation:portrait){
  #introTutorial .tutorial-bubble{max-height:calc(100dvh - env(safe-area-inset-top) - 102px);overflow:auto}
  #introTutorial[data-step="4"] .tutorial-bubble{left:12px;right:12px;width:auto}
}
@media(prefers-reduced-motion:reduce){#introTutorial .tutorial-arrow{box-shadow:none}}

.hero-choice{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0;color:#dbc594;font-size:11px;letter-spacing:.08em}
.hero-choice button{min-height:48px;padding:10px 14px;background:#152124e8;border:1px solid #74654c;border-radius:6px;color:#c8c7b9;font:inherit;cursor:pointer}
.hero-choice button[aria-pressed="true"]{background:#343326;border-color:#e4be73;color:#ffe1a2;box-shadow:inset 0 1px #ffe4b033,0 0 16px #ddab4520}
.hero-choice button:focus-visible{outline:3px solid #ffe4a0;outline-offset:3px}

/* Alpha 8 startup hotfix: keep long phone menus in normal document flow. */
#startScreen:not(.hidden){display:block;align-items:initial;justify-content:initial;padding:0;overflow-y:auto;overflow-x:hidden}
#startScreen>.menu-scene{margin:0!important}
#startScreen .menu-shell{min-width:0;max-width:100%;flex-shrink:0}
#startScreen :is(.menu-content,.menu-actions,.menu-section,.map-card-list,.endless-map-list){min-width:0;max-width:100%}
#startScreen .menu-content{flex-shrink:0}
#startScreen .hero-choice{min-width:0;max-width:100%}
#startScreen .hero-choice button{min-width:0;max-width:100%;flex:1 1 180px;white-space:normal;line-height:1.4;overflow-wrap:break-word}
@media(max-width:1000px){
 #startScreen .menu-content{width:100%;max-width:680px}
}
@media(max-width:700px){
 #startScreen .menu-content{margin:110px 0 0}
 #startScreen .hero-choice>span{flex-basis:100%}
 #startScreen .map-card{grid-template-columns:32px minmax(0,1fr);gap:5px 9px;min-width:0}
 #startScreen .map-number{grid-column:1;grid-row:1 / span 2}
 #startScreen .map-copy{grid-column:2;grid-row:1}
 #startScreen .map-copy strong,#startScreen .map-copy>span{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
 #startScreen .map-copy strong{font-size:12px;line-height:1.4}
 #startScreen .map-status{grid-column:2;grid-row:2;justify-self:start;max-width:100%;white-space:normal;font-size:8px;line-height:1.4}
 #startScreen .map-arrow{display:none}
 #startScreen .menu-shell{gap:16px;padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right));padding-bottom:max(24px,env(safe-area-inset-bottom))}
}

.hero-menu-banner{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:contain;margin:0 0 18px;border-radius:3px}

/* Four main entries; map cards, hero selection and settings live in submenus. */
#startScreen [hidden]{display:none!important}
#startScreen .menu-content{width:min(900px,100%);max-width:900px;margin:0 auto}
#startScreen .menu-shell{gap:20px}
#startScreen .hero-menu-banner{width:100%;aspect-ratio:3/1;object-fit:cover;margin:0 0 14px}
#startScreen .menu-heading,#startScreen .menu-intro{display:none}
.menu-home-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 auto;width:100%}
#startScreen .menu-art-button{position:relative;display:block;width:100%;min-height:64px;margin:0;padding:0;border:0;border-radius:8px;background:#18140f;cursor:pointer;touch-action:manipulation;overflow:hidden}
.menu-art-button img{display:block;width:100%;height:auto;aspect-ratio:1024/264;object-fit:contain}
.menu-art-button span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.menu-art-button:hover{filter:brightness(1.15)}
.menu-art-button:active{filter:brightness(.85)}
#startScreen .menu-back{min-height:48px;padding:10px 16px;margin:0 0 12px;border:1px solid #ad8d53;border-radius:5px;background:#191d1e;color:#f0d7a2;font:600 14px system-ui;cursor:pointer}
#startScreen .menu-section h2{margin:0;color:#e9deca;font:700 20px/1.4 Georgia,serif}
#startScreen .menu-options button{min-height:48px;margin:0}
#startScreen .menu-save,#startScreen .menu-progress{margin-top:10px}
#startScreen .menu-utility{grid-template-columns:1fr}
@media(max-width:700px){
 #startScreen .menu-shell{padding-top:max(12px,env(safe-area-inset-top));gap:12px}
 #startScreen .menu-content{margin:0 auto}
 #startScreen .menu-home-actions{grid-template-columns:1fr;gap:10px;max-width:480px}
 #startScreen .hero-menu-banner{min-height:110px;object-fit:cover;object-position:75% center}
 #startScreen .menu-art-button{min-height:72px}
}

/* Refined menu: quiet scenery, a single hero banner and compact status. */
#startScreen{background:#090f13}
#startScreen>.menu-scene{position:fixed;inset:0;height:100%;opacity:.4}
#startScreen .menu-scene img{object-fit:cover;object-position:center 45%}
#startScreen:after{position:fixed;inset:0;height:auto;background:linear-gradient(180deg,#08101438,#080e14cc 74%)}
#startScreen .menu-shell{width:min(1120px,100%);padding:18px clamp(12px,3vw,36px) 20px;gap:12px}
#startScreen .menu-masthead{padding-bottom:8px;border-bottom:1px solid #bba06a22}
.menu-hero-figure{margin:0 0 12px}
#startScreen .hero-menu-banner{display:block;width:100%;height:auto;min-height:0;aspect-ratio:3/1;object-fit:cover;margin:0;border:1px solid #aa8a4a55;border-radius:5px}
#menuHeroCaption{padding:8px 2px 0;color:#d9c69f;font:500 12px/1.4 system-ui;letter-spacing:.08em}
#startScreen .menu-home-actions{gap:9px;max-width:760px}
#startScreen .menu-art-button{min-height:56px;aspect-ratio:5/1;background:#12171a;border-radius:5px}
#startScreen .menu-art-button img{height:100%;aspect-ratio:auto;object-fit:fill;filter:saturate(.7) brightness(.92)}
#startScreen .menu-art-button:hover img{filter:saturate(.8) brightness(1.05)}
.menu-compact-status{margin:14px 0 8px;color:#bbc6c4;font:500 12px/1.5 system-ui;font-variant-numeric:tabular-nums}
.menu-storage-warning{margin:8px 0;padding:10px 12px;color:#f1c69e;background:#35271e;border:1px solid #ac845a55;font:12px/1.5 system-ui}
.menu-save-details{font:12px/1.7 system-ui;color:#b7c5c3;border-top:1px solid #b9a06a33;margin-top:8px;padding-top:8px}
.menu-save-details summary{padding:10px 0;min-height:44px;cursor:pointer}
#startScreen .channel-card{min-height:72px;margin:14px 0 8px;padding:12px 16px}
#startScreen .channel-copy strong{font-size:23px}
#startScreen .menu-footer{padding-top:10px}
@media(max-width:700px){
 #startScreen .menu-shell{padding:12px max(12px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));gap:10px}
 #startScreen .menu-home-actions{max-width:none;gap:8px}
 #startScreen .menu-art-button{min-height:54px;aspect-ratio:5/1}
 #startScreen .hero-menu-banner{min-height:0;aspect-ratio:3/1;object-position:center}
 #menuHeroCaption{font-size:11px}
 #startScreen .menu-wordmark{font-size:12px}
 .menu-compact-status{font-size:11px}
}

a.menu-art-button{text-decoration:none;color:inherit}

/* Patch A: compact TD2 command hierarchy with two explicit game modes. */
.menu-primary-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;max-width:620px!important}
.menu-command{display:grid;grid-template-columns:38px minmax(0,1fr) 24px;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 14px;border:1px solid #756548;border-radius:3px;background:linear-gradient(180deg,#172025f2,#0d1418f2);box-shadow:inset 0 1px #ffffff0a,0 5px 18px #0007;color:#ddd4c2;text-align:left;text-decoration:none;cursor:pointer;touch-action:manipulation}
.menu-command:hover{border-color:#b4935b;background:linear-gradient(180deg,#202a2ef5,#11191df5)}
.menu-command-primary{border-color:#a98a50;background:linear-gradient(100deg,#292419f5,#151a1cf5 68%);box-shadow:inset 3px 0 #c39b59,0 7px 22px #0008}
.menu-command-quiet{background:linear-gradient(180deg,#141b1fef,#0c1215ef);color:#c1c6c2}
.menu-command-mark{display:grid;place-items:center;width:34px;height:34px;border:1px solid #8f774d66;border-radius:50%;color:#d3b473;font:700 16px/1 Georgia,serif}
.menu-command>span:nth-child(2){display:grid;gap:2px;min-width:0}
.menu-command strong{color:#eee5d2;font:700 15px/1.25 Cinzel,Georgia,serif;letter-spacing:.035em}
.menu-command small{color:#9faaa8;font:500 10px/1.35 Inter,system-ui;letter-spacing:.025em}
.menu-command-arrow{color:#b99b63;font:300 27px/1 system-ui;text-align:right}
.mode-choice-list{display:grid;gap:9px}
.campaign-endless-link{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:9px 13px;border:1px solid #58798588;border-radius:3px;background:#0d2026;color:#c4d8d8;font:650 11px/1.4 Inter,system-ui;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
#startScreen[data-menu-panel]:not([data-menu-panel="home"]) :is(.menu-hero-figure,.menu-compact-status,.channel-card,.menu-help){display:none}
#startScreen[data-menu-panel]:not([data-menu-panel="home"]) .menu-content{max-width:760px}
@media(max-width:700px){
  #startScreen .menu-primary-actions{gap:7px}
  #startScreen .menu-command{grid-template-columns:36px minmax(0,1fr) 20px;min-height:58px;padding:9px 12px}
  #startScreen .menu-command strong{font-size:14px}
  #startScreen .menu-command small{font-size:9px}
  #startScreen[data-menu-panel="home"] .hero-menu-banner{max-height:118px}
  #startScreen[data-menu-panel="home"] .channel-card{min-height:58px;margin:9px 0 5px;padding:8px 12px}
  #startScreen[data-menu-panel="home"] .menu-help{display:none}
}
@media(max-height:430px) and (orientation:landscape){
  #startScreen .menu-shell{padding:8px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left));gap:6px}
  #startScreen .menu-content{width:min(720px,100%);margin:0 auto}
  #startScreen .menu-hero-figure{display:none}
  #startScreen .menu-primary-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:none!important}
  #startScreen .menu-command{grid-template-columns:28px minmax(0,1fr) 14px;min-height:52px;padding:7px 9px;gap:7px}
  #startScreen .menu-command-mark{width:26px;height:26px;font-size:12px}
  #startScreen .menu-command small{display:none}
  #startScreen :is(.menu-compact-status,.channel-card,.menu-help,.menu-footer){display:none}
}

/* Show both heroes without cropping the selection banner, including mobile. */
#startScreen .hero-menu-banner{aspect-ratio:6/1;object-fit:contain;object-position:center;min-height:0}

/* ===== Graphics pass patch-a1-ui1: living scenery, gilded hierarchy, tactile commands. ===== */
/* Backdrop: slow drift keeps the menu plate alive without stealing focus. */
@media(prefers-reduced-motion:no-preference){
  .menu-scene img{animation:td2-menu-drift 80s ease-in-out infinite alternate}
}
@keyframes td2-menu-drift{from{transform:scale(1.06) translate3d(0,0,0)}to{transform:scale(1.12) translate3d(-1.6%,.8%,0)}}
/* Vignette: keeps the centre stage readable against bright scenery. */
.menu-scene:after{content:"";position:absolute;inset:0;background:radial-gradient(120% 90% at 50% 38%,transparent 42%,#05090c8f 100%)}
/* Wordmark: gilded letters with a safe fallback. */
@supports(-webkit-background-clip:text){
  .menu-wordmark{background:linear-gradient(100deg,#efe3c8,#e0cb9c 55%,#d9ae67);-webkit-background-clip:text;background-clip:text;color:transparent}
  .menu-wordmark b{background:linear-gradient(100deg,#f0d9a2,#c99a54);-webkit-background-clip:text;background-clip:text;color:transparent}
}
/* Hero banner: framed like a mounted plate. */
#startScreen .hero-menu-banner{box-shadow:0 10px 30px #000a,0 0 0 1px #ffffff08,inset 0 1px #ffffff14}
#menuHeroCaption{color:#cbb98f}
/* Command cards: tactile gold response. */
.menu-command{transition:transform .16s ease,border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
.menu-command:hover{transform:translateY(-1px);border-color:#c9a86a;box-shadow:0 8px 24px #0009,inset 0 1px #ffffff12}
.menu-command:active{transform:translateY(0);filter:brightness(.94)}
.menu-command-mark{transition:transform .16s ease,border-color .16s ease,background-color .16s ease}
.menu-command:hover .menu-command-mark{transform:scale(1.06);border-color:#b4935b}
.menu-command-arrow{transition:transform .16s ease}
.menu-command:hover .menu-command-arrow{transform:translateX(3px)}
.menu-command-primary{border-color:#c8a366;background:linear-gradient(100deg,#2e281af5,#1a1f1ef2 68%);box-shadow:inset 3px 0 #d1ac69,0 7px 22px #0008,0 0 18px #c39a5224}
.menu-command-primary:hover{border-color:#e8c887;box-shadow:inset 3px 0 #dcb670,0 8px 26px #0009,0 0 26px #c39a5236}
.menu-command-primary .menu-command-mark{border-color:#c8a366;color:#e9c987;background:#3a301866}
/* Map and channel cards: same lift language. */
.map-card{transition:transform .14s ease,border-color .14s ease,background-color .14s ease}
.map-card:hover:not(:disabled){transform:translateY(-1px)}
.channel-card{transition:transform .15s ease,border-color .15s ease,background-color .15s ease}
.channel-card:hover{transform:translateY(-1px);border-color:#d2b07c}
/* Gold focus ring, matching the in-game HUD accent. */
#startScreen :is(button,a,summary):focus-visible{outline-color:#f3d291}
/* Entrance choreography: masthead, banner, commands, footer rise in sequence. */
@media(prefers-reduced-motion:no-preference){
  #startScreen:not(.hidden) .menu-masthead{animation:td2-menu-rise .45s cubic-bezier(.2,.7,.3,1) both}
  #startScreen:not(.hidden) .menu-hero-figure{animation:td2-menu-rise .45s cubic-bezier(.2,.7,.3,1) .06s both}
  #startScreen:not(.hidden) .menu-primary-actions{animation:td2-menu-rise .45s cubic-bezier(.2,.7,.3,1) .12s both}
  #startScreen:not(.hidden) .channel-card{animation:td2-menu-rise .45s cubic-bezier(.2,.7,.3,1) .2s both}
  #startScreen:not(.hidden) .menu-footer{animation:td2-menu-rise .45s cubic-bezier(.2,.7,.3,1) .26s both}
  #startScreen:not(.hidden) .menu-back,#startScreen:not(.hidden) .menu-section{animation:td2-menu-rise .3s ease both}
  #startScreen:not(.hidden) .menu-section{animation-delay:.05s}
}
@keyframes td2-menu-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ===== menu-v3 redesign: generated memorial-yard scenery, 2:1 hero plates, seal crest ===== */
#startScreen{background:#070b10}
#startScreen>.menu-scene{opacity:.55}
#startScreen .menu-scene img{object-position:72% 42%}
#startScreen:after{background:linear-gradient(90deg,#060a0ef2 0%,#060a0ed0 30%,#060a0e26 62%,transparent 82%),linear-gradient(0deg,#060a0ef2,transparent 38%),linear-gradient(180deg,#060a0e99,transparent 22%)}
.menu-scene:after{background:radial-gradient(130% 95% at 55% 36%,transparent 40%,#04070a99 100%)}
.menu-crest{filter:drop-shadow(0 4px 14px #000c);width:96px;height:96px}
#startScreen .hero-menu-banner{aspect-ratio:2/1;object-fit:cover;object-position:78% 38%;border-color:#c9a86a66;box-shadow:0 14px 40px #000c,0 0 0 1px #ffffff0a}
#menuHeroCaption{color:#e3cfa0;text-shadow:0 1px 4px #000}
.menu-command{background:linear-gradient(180deg,#141d23f5,#0b1116f5);border-color:#6d5f43cc}
.menu-command:hover{border-color:#e0bd7d}
.menu-command-primary{background:linear-gradient(100deg,#33291af8,#171b1df5 68%);box-shadow:inset 3px 0 #d9ae67,0 8px 26px #000a}
.menu-command-mark{background:#241f1566}
.menu-command:hover .menu-command-mark{border-color:#e0bd7d;color:#f0d9a2;transform:scale(1.06)}
.map-card{background:#101a20ee;border-color:#7d7257aa}
.map-card:hover:not(:disabled){border-color:#e0bd7d;background:#1a2a31}
.map-card-primary{border-color:#f0d498;background:linear-gradient(105deg,#e2c384,#b08a4a);box-shadow:0 6px 24px #b2853830}
.menu-section{border-color:#d9b77d40;background:linear-gradient(135deg,#0b141be8,#101820e0)}
.menu-shell{gap:16px}
.menu-masthead{border-bottom-color:#e0bd7d33}
@media(max-width:700px){
  #startScreen>.menu-scene{opacity:.5}
  #startScreen .menu-scene img{object-position:center 30%}
  #startScreen .hero-menu-banner{aspect-ratio:2/1;object-position:76% 40%}
  .menu-crest{width:64px;height:64px}
}

/* menu-v3: responsive scenery swap without srcset (keeps the asset-existence test simple). */
.menu-scene .menu-scene-mobile{display:none}
@media(max-width:700px){
  #startScreen .menu-scene img:not(.menu-scene-mobile){display:none}
  .menu-scene .menu-scene-mobile{display:block}
}

/* Command Hub V5 */
#startScreen .menu-home-actions{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:clamp(8px,1.6vw,14px)!important;max-width:800px!important;width:100%;
}
#startScreen .menu-command{
  position:relative;isolation:isolate;display:grid;grid-template-columns:52px minmax(0,1fr) 20px;
  align-items:center;gap:12px;min-height:116px;padding:18px 19px;overflow:hidden;
  border-radius:11px;border:1px solid #ad8857ad;background:#0d151bd9;
  box-shadow:inset 0 1px 0 #e9d5a421,0 12px 26px #0009;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
#startScreen .menu-command::before{
  content:"";position:absolute;inset:0;z-index:-2;opacity:.37;
  background-size:cover;background-position:center;filter:saturate(.64) contrast(1.05);
  pointer-events:none;
}
#startScreen .menu-command::after{
  content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(90deg,#0a1018f5 1%,#0d141be5 42%,#0b121ab0 100%);
  pointer-events:none;
}
#startScreen .menu-command-primary::before{background-image:url("assets/menu/level-gallery/level-01-einleitung.webp")}
#startScreen #menuCharacterBtn::before{background-image:url("assets/menu/v5-avatars/kim-marksman-v6.webp");background-position:88% 30%;background-size:auto 140%;background-repeat:no-repeat}
#startScreen .menu-command-quiet::before{background-image:url("assets/menu/level-gallery/menu-background.webp")}
#startScreen .menu-command-mark{
  width:50px;height:50px;font:700 23px/1 Cinzel,Georgia,serif;
  border:1px solid #d9b77a77;border-radius:10px;background:#241c13b8;color:#f3d499;
  box-shadow:0 3px 16px #0007,inset 0 1px #f7da9a22;
}
#startScreen .menu-command strong{font-size:clamp(14px,1.65vw,20px);line-height:1.22;color:#fff0d5;text-shadow:0 2px 7px #000a}
#startScreen .menu-command small{font-size:clamp(10px,1.1vw,12px);line-height:1.4;color:#cbd1cc;letter-spacing:0}
#startScreen .menu-command-arrow{color:#ebc686;font-size:25px}
#startScreen .menu-command-primary{border-color:#e2ba70;box-shadow:inset 3px 0 #e8c17c,0 12px 26px #0009}
#startScreen #menuCharacterBtn .menu-command-mark{border-color:#a8b6aa;color:#e0e9d9}
#startScreen .menu-command:focus-visible{outline:3px solid #9ce9ee;outline-offset:3px}
#startScreen .menu-command:hover{transform:translateY(-2px);border-color:#f0d39c;box-shadow:0 15px 30px #000a,0 0 18px #d6ab5029}
#startScreen .menu-command:active{transform:scale(.985);filter:brightness(.91)}
#startScreen .channel-card{max-width:800px;margin:12px auto 0;min-height:55px;padding:10px 16px;opacity:.78}
#startScreen .channel-copy strong{font-size:17px}
#startScreen .menu-help{max-width:800px;margin-inline:auto;opacity:.78}
#startScreen .menu-footer{font-size:10px;letter-spacing:.06em;opacity:.88}
#startScreen .menu-version{color:#dbc394;white-space:nowrap}
#startScreen .menu-masthead .menu-version-top{display:inline-flex;align-items:center;flex:0 0 auto;margin-left:auto;padding:5px 8px;border:1px solid #b99b634d;border-radius:5px;background:#0d171ccc;font:700 clamp(9px,2.8vw,10px)/1.3 Inter,system-ui;letter-spacing:.1em;color:#e1cfaa}
#startScreen .menu-masthead{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
#startScreen .menu-wordmark{min-width:0}
#startScreen .menu-command:focus-visible,#startScreen .map-card:focus-visible,#startScreen .menu-back:focus-visible{outline:3px solid #9ce9ee;outline-offset:3px}
#startScreen .menu-hero-figure{
  position:relative;isolation:isolate;overflow:hidden;max-width:800px;
  height:clamp(178px,27vh,270px);margin:0 auto 11px;border:1px solid #c9ac7266;
  border-radius:10px;background:linear-gradient(90deg,#090f17db,#0a101999 55%,#121a2099),url("assets/menu/memorial-yard-v4.webp?v=menu-v4a1") center 45% / cover no-repeat;
  box-shadow:0 14px 34px #000a,inset 0 1px #fff2;
}
#startScreen .menu-hero-figure::after{
  content:"";position:absolute;inset:0;z-index:-1;
  background:radial-gradient(circle at 76% 44%,#65b1a51d,transparent 30%),linear-gradient(0deg,#0b121be6,transparent 47%);
  pointer-events:none;
}
#startScreen .menu-hero-figure .hero-menu-banner{
  display:block;width:50%;max-width:360px;height:100%;max-height:none;min-height:0;
  margin:0 8% 0 auto;padding:0;aspect-ratio:auto;object-fit:contain;object-position:center bottom;
  border:0;border-radius:0;background:none;box-shadow:none;filter:drop-shadow(0 8px 12px #000c);
}
#startScreen #menuHeroCaption{
  position:absolute;left:clamp(12px,3vw,28px);bottom:clamp(12px,2vw,24px);
  max-width:46%;margin:0;padding:0;color:#f0d7a5;
  font:700 clamp(13px,2vw,19px)/1.35 Cinzel,Georgia,serif;letter-spacing:.02em;
  text-shadow:0 2px 8px #000,0 1px 2px #000;
}
@media(max-width:700px){
  #startScreen .menu-content{margin:0 auto}
  #startScreen .menu-hero-figure{height:clamp(133px,21vh,178px);background-image:linear-gradient(90deg,#090f17ee,#0a101988),url("assets/menu/memorial-yard-mobile-v4.webp?v=menu-v4a1")}
  #startScreen .menu-hero-figure .hero-menu-banner{width:54%;height:100%;max-height:none;margin-right:6%;object-fit:contain;object-position:center bottom}
  #startScreen #menuHeroCaption{max-width:46%;font-size:clamp(11px,3.4vw,14px)}
  #startScreen .menu-home-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  #startScreen .menu-command{grid-template-columns:30px minmax(0,1fr);gap:8px;min-height:98px;padding:10px 9px;border-radius:8px;align-content:center}
  #startScreen .menu-command-mark{width:29px;height:31px;font-size:16px;border-radius:6px}
  #startScreen .menu-command strong{font-size:clamp(12px,3.6vw,16px);line-height:1.25;overflow-wrap:anywhere}
  #startScreen .menu-command small{display:none}
  #startScreen .menu-command-arrow{display:none}
  #startScreen[data-menu-panel="home"] .hero-menu-banner{max-height:116px;object-fit:cover;object-position:80% 37%;aspect-ratio:3/1}
  #startScreen .menu-hero-figure{margin-bottom:8px}
  #startScreen .channel-card{min-height:50px;margin-top:10px;padding:8px 12px}
  #startScreen .channel-copy strong{font-size:15px}
  #startScreen .menu-help{display:block;opacity:.7}
  #startScreen .menu-footer{display:flex;flex-wrap:wrap;gap:4px 10px;justify-content:center;padding-top:8px}
  #startScreen .menu-footer>span:nth-child(2){display:none}
}
@media(max-width:420px){
  #startScreen .menu-shell{padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))}
  #startScreen .menu-masthead .menu-version{padding:5px 7px;font-size:9px;letter-spacing:.06em}
  #startScreen .menu-home-actions{gap:7px!important}
  #startScreen .menu-command{min-height:92px;padding:8px 7px;gap:6px;grid-template-columns:27px minmax(0,1fr)}
  #startScreen .menu-command-mark{width:26px;height:28px;font-size:14px}
  #startScreen .menu-command strong{font-size:clamp(11px,3.55vw,14px)}
  #startScreen .channel-copy small,#startScreen .channel-copy>span{display:none}
}
@media(max-height:430px) and (orientation:landscape){
  #startScreen .menu-home-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-width:750px!important}
  #startScreen .menu-command{grid-template-columns:30px minmax(0,1fr);min-height:54px;padding:6px 10px;gap:8px}
  #startScreen .menu-command-mark{width:28px;height:29px;font-size:15px}
  #startScreen .menu-command small,#startScreen .menu-command-arrow{display:none}
  #startScreen .menu-command strong{font-size:13px}
  #startScreen .menu-footer{display:flex}
}
@media(prefers-reduced-motion:reduce){
  #startScreen .menu-command,#startScreen .menu-command-mark,#startScreen .menu-command-arrow{animation:none!important;transition:none!important}
}

/* TD2 V5: Kim & Marcel shared artwork stays decorative; buttons remain native HTML. */
#startScreen .menu-hero-figure{background-image:linear-gradient(0deg,#09111acc,#09111a10 65%),url("assets/menu/kim-marcel-command-hub-v6.webp");background-position:center,center 19%;background-size:cover,cover}
#startScreen .menu-hero-figure .hero-menu-banner{opacity:0;pointer-events:none}
@media(max-width:700px){#startScreen .menu-hero-figure{background-image:linear-gradient(0deg,#09111acc,#09111a10 65%),url("assets/menu/kim-marcel-command-hub-v6.webp");background-position:center,center 17%;background-size:cover,cover}}

/* Test-only controls use the existing dark menu style and mobile touch sizes. */
#startScreen .menu-developer-toggle[aria-pressed="true"]{border-color:#bc9b62;background:#302817;color:#ffe1a2}
#startScreen .menu-developer-note{margin:5px 0 12px;color:#c6b895;font:400 12px/1.5 system-ui}
#startScreen .menu-developer-toast{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;pointer-events:none;background:#070c12bf;color:#f3d99b;text-align:center;text-shadow:0 2px 12px #000}
#startScreen .menu-developer-toast[hidden]{display:none}
#startScreen .menu-developer-toast strong{font:700 clamp(25px,7vw,38px)/1.2 Georgia,serif;letter-spacing:.15em}
#startScreen .menu-developer-toast span{font:700 12px/1.4 system-ui;letter-spacing:.12em}

/* Beta #330: both existing hero portraits remain visible, including a 360px
   high desktop preview. This changes layout only; art approval remains open. */
#startScreen[data-menu-panel="home"] .menu-hero-figure{position:relative;isolation:isolate;}
#startScreen .menu-hero-figure .hero-menu-banner,
#startScreen .menu-hero-figure .hero-menu-companion{
  position:absolute;top:0;bottom:0;width:44%;height:100%;
  max-width:none;min-height:0;object-fit:contain;object-position:center bottom;
  margin:0;padding:0;border:0;pointer-events:none;
  filter:drop-shadow(0 7px 10px #000c);
}
#startScreen .menu-hero-figure .hero-menu-banner{right:7%;left:auto;}
#startScreen .menu-hero-figure .hero-menu-companion{left:7%;right:auto;}
#startScreen .menu-hero-figure #menuHeroCaption{position:absolute;bottom:10px;left:14px;z-index:2;}
@media (max-height:430px) and (orientation:landscape){
  #startScreen[data-menu-panel="home"] .menu-hero-figure{
    display:block;height:clamp(64px,20dvh,86px);
    width:100%;max-width:720px;margin:0 auto 4px;overflow:hidden;
  }
  #startScreen .menu-hero-figure #menuHeroCaption{
    left:10px;bottom:4px;font-size:10px;padding:0;
  }
}

/* Hero visibility: show BOTH real V5 Style-2 portraits on the native home
   banner. The previous composite-only background hid the individual images.
   Submenus remain unchanged; buttons stay native and touch-accessible. */
#startScreen[data-menu-panel="home"] .menu-hero-figure{
  display:block;
  width:min(100%,800px);
  background-image:linear-gradient(0deg,#09111acc,#09111a10 65%),url("assets/menu/memorial-yard-v4.webp?v=menu-v4a1");
  background-position:center,center 45%;
  background-size:cover,cover;
}
#startScreen[data-menu-panel="home"] .menu-hero-figure .hero-menu-banner,
#startScreen[data-menu-panel="home"] .menu-hero-figure .hero-menu-companion{
  display:block;
  opacity:1;
  visibility:visible;
  width:44%;
  height:100%;
  object-fit:contain;
  object-position:center bottom;
}
@media(max-width:700px){
  #startScreen[data-menu-panel="home"] .menu-hero-figure{
    height:clamp(130px,21dvh,185px);
    background-image:linear-gradient(0deg,#09111acc,#09111a10 65%),url("assets/menu/memorial-yard-mobile-v4.webp?v=menu-v4a1");
  }
  #startScreen[data-menu-panel="home"] .menu-hero-figure .hero-menu-banner{right:3%;left:auto;}
  #startScreen[data-menu-panel="home"] .menu-hero-figure .hero-menu-companion{left:3%;right:auto;}
  #startScreen[data-menu-panel="home"] #menuHeroCaption{
    left:8px;bottom:6px;max-width:100%;
    font-size:11px;text-shadow:0 2px 6px #000;
  }
}

/* Selected hero is the right-hand figure. Keep its caption with the selected
   portrait instead of placing it over the left-hand companion. */
#startScreen[data-menu-panel="home"] .menu-hero-figure #menuHeroCaption{
  left:auto;right:5%;bottom:6px;max-width:46%;text-align:right;
  white-space:normal;overflow-wrap:normal;
}
@media (max-height:430px) and (orientation:landscape){
  #startScreen[data-menu-panel="home"] .menu-hero-figure{
    height:clamp(86px,25dvh,112px);
  }
  #startScreen[data-menu-panel="home"] .menu-hero-figure #menuHeroCaption{
    left:auto;right:5%;bottom:3px;
  }
}

/* Three independent TD menu destinations: the campaign fills the first row. */
#startScreen .menu-home-actions > #menuCampaignBtn{grid-column:1/-1}
