/* Heroine select (2026-11). One self-contained screen; the older title pieces are retired below. */
body.hero-select-v2 #intro > .title-hero,
body.hero-select-v2 #intro > .character-select,
body.hero-select-v2 #intro > .departure-controls,
body.hero-select-v2 #intro > .title-controls,
body.hero-select-v2 #intro > .title-backdrop { display: none !important; }
body.hero-select-v2 #intro { position: absolute; inset: 0; width: auto; max-width: none; height: auto; margin: 0; padding: 0; transform: none; display: block; overflow: hidden; background: none; }
body.hero-select-v2 #overlay:not(.centered) { background: radial-gradient(120% 90% at 50% 0%, #1d2b27f2 0%, #101815fa 70%); }

.hero-select { --gap: clamp(8px, 1.6vh, 18px); position: absolute; inset: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--gap); padding: clamp(10px, 2.4vh, 28px) clamp(14px, 3vw, 44px); color: #e9e3d7; font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif; box-sizing: border-box; }
.hero-select * { box-sizing: border-box; }
.hs-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-right: 230px; }
.hs-logo { margin: 0; font: 900 clamp(26px, 4.6vh, 44px)/1 "Arial Black", Impact, sans-serif; letter-spacing: -.02em; color: #f3ead6; }
.hs-logo span { color: #f0a8bd; margin-left: .12em; }
.hs-tag { margin: 0; font-size: clamp(13px, 1.9vh, 16px); color: #b9c7ba; }

.hs-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: clamp(8px, 1.2vw, 18px); min-height: 0; align-items: stretch; }
.hs-cards:has(.hs-card.selected:nth-child(1)) { grid-template-columns: 3.8fr 1fr 1fr 1fr 1fr; }
.hs-cards:has(.hs-card.selected:nth-child(2)) { grid-template-columns: 1fr 3.8fr 1fr 1fr 1fr; }
.hs-cards:has(.hs-card.selected:nth-child(3)) { grid-template-columns: 1fr 1fr 3.8fr 1fr 1fr; }
.hs-cards:has(.hs-card.selected:nth-child(4)) { grid-template-columns:1fr 1fr 1fr 3.8fr 1fr; }
.hs-cards:has(.hs-card.selected:nth-child(5)) { grid-template-columns:1fr 1fr 1fr 1fr 3.8fr; }
.hs-card:not(.selected) .hs-name { flex-direction:column; gap:2px; }
.hs-card { --hero: #a7d6b5; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto auto; align-content: end; justify-items: center; gap: 4px; min-width: 0; min-height: 0; padding: 12px 12px 14px; border: 2px solid #3a4a44; border-radius: 10px; background: linear-gradient(180deg, #24322d 0%, #1a2521 100%); color: inherit; font: inherit; text-align: center; cursor: pointer; overflow: hidden; transition: border-color .16s, background-color .16s, transform .16s; }
.hs-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--hero); opacity: .5; }
.hs-card:hover { border-color: color-mix(in srgb, var(--hero) 60%, #3a4a44); transform: translateY(-2px); }
.hs-card:focus-visible { outline: 3px solid #f3ead6; outline-offset: 2px; }
.hs-card.selected { grid-template-columns: minmax(150px, .8fr) minmax(0, 1.5fr); grid-template-rows: minmax(0, 1fr) auto auto auto; justify-items: stretch; text-align: left; border-color: var(--hero); background: linear-gradient(180deg, color-mix(in srgb, var(--hero) 16%, #24322d) 0%, #1a2521 100%); cursor: default; transform: none; }
.hs-card.selected::before { opacity: 1; }
.hs-stage { display: grid; place-items: end center; min-height: 0; width: 100%; }
.hs-stage canvas { width: min(100%, 250px); max-height: 100%; height: auto; aspect-ratio: 132 / 150; object-fit: contain; image-rendering: pixelated; }
.hs-card.selected .hs-stage { grid-column: 1; grid-row: 1; }
.hs-name { display: flex; align-items: baseline; gap: 8px; justify-content: center; }
.hs-card.selected .hs-name { grid-column: 1; grid-row: 2; justify-content: flex-start; }
.hs-name strong { font-size: clamp(20px, 3.2vh, 30px); font-weight: 800; color: #f3ead6; }
.hs-name span { font: 700 12px/1 Consolas, monospace; letter-spacing: .14em; color: var(--hero); }
.hs-catch { margin: 0; font-size: clamp(12px, 1.8vh, 15px); line-height: 1.45; color: #cfd8cc; }
.hs-card.selected .hs-catch { grid-column: 1; grid-row: 3; }
.hs-chip { display: inline-block; justify-self: center; padding: 3px 10px; border-radius: 999px; background: var(--hero); color: #17201d; font-size: 12px; font-weight: 700; white-space: nowrap; }
.hs-card.selected .hs-chip { grid-column: 1; grid-row: 4; justify-self: start; }
.hs-chip.quiet { background: #33443e; color: #dfe8dc; justify-self: start; }

.hs-more { display: none; }
.hs-card.selected .hs-more { grid-column: 2; grid-row: 1 / span 4; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; min-height: 0; align-self: stretch; }
.hs-block { display: grid; grid-template-columns: minmax(120px, 48%) minmax(0, 1fr); gap: 12px; align-items: center; min-height: 0; padding: 8px; border-radius: 8px; background: #141d1acc; }
.hs-block canvas { width: 100%; max-height: 100%; aspect-ratio: 220 / 132; object-fit: contain; image-rendering: pixelated; border-radius: 6px; }
.hs-text { display: grid; gap: 3px; min-width: 0; align-content: center; }
.hs-text strong { font-size: clamp(15px, 2.3vh, 19px); color: #f3ead6; }
.hs-text p { margin: 0; font-size: clamp(12px, 1.75vh, 14px); line-height: 1.45; color: #cfd8cc; }
.hs-label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px !important; font-weight: 700; color: var(--hero, #b9c7ba) !important; letter-spacing: .04em; }
.hs-label kbd { padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; font: 700 11px/1.4 Consolas, monospace; }
.hs-lock { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #33443e; color: #f3ead6; font-size: 11px; }
.hs-lock::before { content: "\1F512\FE0E"; margin-right: 4px; font-size: 10px; }
.hs-bars { display: grid; gap: 3px; margin-top: 2px; }
.hs-bar { display: grid; grid-template-columns: 4.2em 1fr; align-items: center; gap: 6px; font-size: 11px; color: #b9c7ba; }
.hs-bar i { display: block; height: 6px; border-radius: 3px; background: #2c3a34; overflow: hidden; }
.hs-bar b { display: block; height: 100%; border-radius: 3px; background: var(--hero); }
.hs-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #cfd8cc; }
.hs-stat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hs-pips { display: inline-flex; gap: 2px; }
.hs-pips i { width: 9px; height: 9px; border-radius: 2px; background: #33443e; }
.hs-pips i.on { background: var(--hero); }

.hs-actions { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hs-stages { display: grid; gap: 4px; min-width: 0; }
.hs-stages > .hs-label { color: #b9c7ba !important; }
.hs-stage-row { display: flex; gap: 8px; }
body.hero-select-v2 .hs-stages .stage-card { position: relative; display: grid; grid-template-columns: auto; width: 132px; min-width: 0; height: 44px; min-height: 0; margin: 0; padding: 0 12px; border: 2px solid #3a4a44; border-radius: 8px; background: #1a2521 var(--stage-art) center / cover; color: #f3ead6; overflow: hidden; cursor: pointer; transform: none; }
body.hero-select-v2 .hs-stages .stage-card::before { content: ""; position: absolute; inset: 0; background: #101815b8; }
body.hero-select-v2 .hs-stages .stage-card > * { display: none; }
body.hero-select-v2 .hs-stages .stage-card .stage-info { display: grid; position: relative; place-items: center; height: 100%; }
body.hero-select-v2 .hs-stages .stage-card .stage-info > * { display: none; }
body.hero-select-v2 .hs-stages .stage-card .stage-info > strong { display: block; position: relative; z-index: 1; font-size: 14px; font-weight: 700; color: #f3ead6; opacity: 1; visibility: visible; transform: none; text-shadow: 0 1px 0 #101815; }
body.hero-select-v2 .hs-stages .stage-card .stage-info { position: absolute; inset: 0; z-index: 1; opacity: 1; visibility: visible; transform: none; }
body.hero-select-v2 .hs-stages .stage-card[aria-pressed="true"] { border-color: #f3ead6; }
body.hero-select-v2 .hs-stages .stage-card[aria-pressed="true"]::before { background: #10181566; }
.hs-buttons { display: flex; align-items: center; gap: 10px; }
body.hero-select-v2 .hs-buttons button { position: static; margin: 0; transform: none; width: auto; min-width: 0; height: 48px; padding: 0 18px; border-radius: 8px; font: 700 15px/1 "Yu Gothic UI", Meiryo, sans-serif; white-space: nowrap; cursor: pointer; }
body.hero-select-v2 .hs-buttons .subtle-button { border: 2px solid #3a4a44; background: #1a2521; color: #dfe8dc; }
body.hero-select-v2 .hs-buttons .subtle-button:hover { border-color: #8fa396; }
body.hero-select-v2 .hs-buttons #start { min-width: 220px; height: 56px; border: 0; background: #f0a8bd; color: #2a1820; font-size: 19px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 4px 0 #a35c74; }
body.hero-select-v2 .hs-buttons #start:hover { background: #f7bccd; }
body.hero-select-v2 .hs-buttons #start:active { transform: translateY(3px); box-shadow: 0 1px 0 #a35c74; }
body.hero-select-v2 .hs-buttons button:focus-visible { outline: 3px solid #f3ead6; outline-offset: 2px; }

@media (max-height: 640px), (max-width: 1100px) {
  .hs-card.selected { grid-template-columns: minmax(110px, .6fr) minmax(0, 1.6fr); }
  .hs-foot { display: none; }
  .hs-head { padding-right: 200px; }
}
@media (prefers-reduced-motion: reduce) { .hs-card { transition: none; } }

/* Short laptop cards keep the mechanical text wider than the small demo. */
@media (max-width:1100px) {
  .hs-card.selected .hs-more { grid-template-rows:auto minmax(0,1fr) auto; gap:4px; }
  .hs-card.selected .hs-block { grid-template-columns:minmax(64px,30%) minmax(0,1fr); gap:8px; padding:2px; }
  .hs-card.selected .hs-label { flex-wrap:wrap; row-gap:3px; }
  .hs-card.selected .hs-bar { line-height:1.2; }
}

/* Keep the existing global controls in the title header, clear of card hit areas. */
body.hero-select-v2[data-screen="title"] #console-actions { top:clamp(10px,2.4vh,28px); right:clamp(14px,3vw,44px); height:44px; }
body.hero-select-v2[data-screen="title"] #console-actions :is(.help-button,#options-trigger) { color:#e9e3d7; }
.hs-head { min-height:44px; }
@media (max-width:1100px) {
 .hs-card.selected .hs-skill .hs-text { grid-template-columns:minmax(0,1fr) auto; }
 .hs-card.selected .hs-skill .hs-label { grid-column:1; grid-row:1; }
 .hs-card.selected .hs-skill .hs-text > strong { grid-column:1 / -1; grid-row:2; }
 .hs-card.selected .hs-skill .hs-text > .hs-chip.quiet { grid-column:2; grid-row:1; align-self:center; }
 .hs-card.selected .hs-skill .hs-text > p:not(.hs-label) { grid-column:1 / -1; grid-row:3; }
}

@media (max-width:1100px) {
 .hs-card:not(.selected) { padding:8px 4px; grid-template-rows:minmax(0,1fr) auto; }
 .hs-card:not(.selected) .hs-catch, .hs-card:not(.selected) > .hs-chip { display:none; }
 .hs-card:not(.selected) .hs-name strong { font-size:18px; }
 .hs-card:not(.selected) .hs-name span { font-size:10px; letter-spacing:.03em; }
}
.hero-select .hs-loadout{margin:6px 0 0;font-size:12px;line-height:1.4;color:#dce4c9}
@media(max-width:1100px){.hero-select .hs-loadout{display:block;font-size:11px;margin:4px 0 0}}
/* Keep the detail column at full card height when the loadout row is added. */
.hs-card.selected{grid-template-rows:minmax(0,1fr) auto auto auto auto}
.hs-card.selected .hs-loadout{grid-column:1;grid-row:5}
.hs-card.selected .hs-more{grid-row:1 / span 5}
.hero-select .hs-loadout{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 8px;min-width:0}
.hero-select .hs-loadout span{white-space:nowrap}
.hero-select .hs-card.selected .hs-loadout{justify-content:flex-start}
