/**
 * S192 — Aetherlan shell and archive presentation.
 * One restrained navy / aged-gold palette; hierarchy comes from spacing and art.
 * Existing game-screen.css owns panel visibility and map geometry. This layer
 * changes presentation only. Routes, world values, portrait crops and gates stay
 * with their existing modules. SVG icons are rendered locally by header.php.
 */
.game-theme {
  --ui-ink: #e7e9e7;
  --ui-muted: #9dabb5;
  --ui-gold: #c8ad77;
  --ui-line: #c8ad7733;
  --ui-deep: #0c1823;
  --ui-panel: #132331;
  --ui-raised: #1a2d3c;
}
.game-shell { --hud: 68px; --dock: 88px; color: var(--ui-ink); background: var(--ui-deep); }
.game-shell button, .game-shell a { transition: background-color .18s, border-color .18s, color .18s; }
.game-shell button:focus-visible, .game-shell a:focus-visible,
.game-shell input:focus-visible, .game-shell select:focus-visible { outline: 2px solid #e2c591; outline-offset: 3px; }
.game-shell .game-hud {
  padding-inline: 28px; gap: 24px; border-bottom: 1px solid #ba9b5f66;
  background: linear-gradient(100deg, #142939fa, #0d1d2bf5 70%, #162a38fa);
  box-shadow: 0 5px 24px #050d1666;
}
.game-shell .game-brand { gap: 13px; }
.game-shell .game-brand > span { display: grid; place-items: center; color: var(--ui-gold); }
.game-shell .game-brand svg { width: 34px; height: 34px; }
.game-shell .game-brand b { font-size: 23px; letter-spacing: 3px; color: #eee1c4; }
.game-shell .game-brand small { font-size: 8px; letter-spacing: 2.4px; color: #8e9da6; }
.game-shell .game-brand:hover { background: transparent; }
.game-shell .game-chapter { min-width: 170px; gap: 14px; padding: 6px 18px; border-color: var(--ui-line); }
.game-shell .game-chapter b { font-size: 16px; letter-spacing: 2px; color: #d5d3c4; }
.game-shell .game-chapter > span { font-size: 9px; color: #9f8655; }
.game-shell .game-hud-state { gap: 18px; }
.game-shell .game-clock { font-size: 14px; color: #e1d0aa; }
.game-shell .game-clock small { font-size: 12px; color: var(--ui-muted); }
.game-shell .game-hud #game-account { color: #bfc8ca; border-color: var(--ui-line); font-size: 12px; }
.game-shell .game-hud #game-account:hover { color: #f4dfb2; background: transparent; }

/* The approved map stays the scene; only the background art is toned down. */
.game-shell .game-map, .game-shell .map-stage { background: #102232; }
.game-shell #map > image { filter: saturate(.8) brightness(.94); }
.game-shell .game-map::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 44%, transparent 45%, #06152435 100%);
}
.game-shell .game-utility { top: 20px; left: 24px; gap: 6px; padding: 4px; background: #10202ce8; border: 1px solid var(--ui-line); border-radius: 4px; box-shadow: 0 6px 20px #07121d44; }
.game-shell .game-utility button, .game-shell .game-utility a { gap: 8px; padding: 0 12px; color: #c5cdd0; background: transparent; border: 1px solid transparent; border-radius: 2px; box-shadow: none; font-size: 12px; }
.game-shell .game-utility svg { width: 17px; height: 17px; flex: 0 0 auto; color: #c5ad7c; }
.game-shell .game-utility button:hover, .game-shell .game-utility a:hover,
.game-shell .game-utility button[aria-pressed=true] { background: #2b3e4a; border-color: #bca17166; color: #f2dfb9; }
.game-shell .game-map-tools { top: 20px; right: 24px; gap: 4px; padding: 4px; background: #10202ce8; border: 1px solid var(--ui-line); border-radius: 4px; box-shadow: 0 6px 20px #07121d44; }
.game-shell .game-map-tools button { display: grid; place-items: center; width: 42px; height: 42px; background: transparent; border: 1px solid transparent; border-radius: 2px; box-shadow: none; color: #b7c2c7; font-size: 11px; }
.game-shell .game-map-tools svg { width: 20px; height: 20px; }
.game-shell .game-map-tools button[aria-pressed=true] { color: #ead3a4; border-color: #bca17155; background: #2a3e4c; }
.game-shell .game-map-tools button:hover:not(:disabled) { background: #354b59; color: #fff0d5; }
.game-shell .game-map-note { right: 24px; bottom: 14px; padding: 7px 11px; font-size: 11px; line-height: 1.6; color: #bec8cb; background: #10202cdd; border: 1px solid #c8ad7726; border-radius: 3px; }

/* The four capitals and six player destinations remain distinct groups. */
.game-shell .game-dock { height: var(--dock); padding: 10px 24px; gap: 24px; border-top: 1px solid #ba9b5f66; background: linear-gradient(#172b39, #0e1d2b); box-shadow: 0 -6px 24px #05111e66; }
.game-shell .game-nation-dock { gap: 8px; }
.game-shell .game-nation-dock button { min-height: 54px; gap: 8px; padding: 5px 12px 5px 7px; clip-path: none; border: 1px solid #c8ad7726; border-radius: 3px; background: #172d3b; font-size: 12px; color: #b9c5ca; }
.game-shell .game-nation-dock img { width: 38px; height: 42px; filter: drop-shadow(0 2px 3px #0006); }
.game-shell .game-nation-dock button[aria-pressed=true] { color: #f2dfb8; background: #293d48; border-color: #bda16b99; box-shadow: inset 0 -2px 0 #c8ad77; }
.game-shell .game-nation-dock button:hover { background: #2c424e; border-color: #bda16b77; }
.game-shell .game-actions { gap: 5px; }
.game-shell .game-actions button, .game-shell .game-actions a { min-width: 78px; min-height: 56px; padding: 8px 11px; gap: 8px; clip-path: none; border: 1px solid transparent; border-radius: 3px; color: #aebdc4; font-size: 12px; }
.game-shell .game-actions i { display: grid; place-items: center; color: #a79a7b; }
.game-shell .game-actions svg { display: block; width: 21px; height: 21px; }
.game-shell .game-actions [aria-current=page], .game-shell .game-actions [aria-pressed=true] { color: #f4dfb7; background: #2d414e; border-color: #c8ad774d; box-shadow: inset 0 -2px 0 #c8ad77; }
.game-shell .game-actions [aria-current=page] i, .game-shell .game-actions [aria-pressed=true] i { color: #ddc38c; }
.game-shell .game-actions a:hover, .game-shell .game-actions button:hover { background: #263b49; color: #f3e4c9; }

/* Quiet panel chrome gives illustrations and primary text the strongest contrast. */
.game-shell .game-main-panel, .game-shell .game-drawer { border: 1px solid #a58f6366; border-radius: 5px; background: linear-gradient(125deg, #1a303f, #101f2c 70%); box-shadow: 0 16px 60px #03101dc0; }
.game-shell .game-main-panel { inset: 18px 24px; }
.game-shell .game-main-panel::before { display: none; }
.game-shell .gold-frame { border-color: #a58f6355; background: #152936; box-shadow: 0 10px 30px #06101c66; }
.game-shell .gold-frame::after { opacity: .45; inset: 6px; background-size: 23px; }
.game-shell .game-drawer { top: 86px; left: 24px; bottom: 18px; }
.game-shell .game-panel-head { padding: 13px 22px; gap: 16px; border-bottom: 1px solid var(--ui-line); background: #0b1b284f; }
.game-shell .game-panel-head small { color: #9a9d91; font-size: 9px; letter-spacing: 1.6px; }
.game-shell .game-panel-head h2 { font-size: 21px; color: #ece0c7; letter-spacing: 2px; margin-top: 3px; }
.game-shell .game-panel-head button { background: transparent; border-color: var(--ui-line); border-radius: 3px; color: #c0b391; font-size: 23px; }
.game-shell .game-panel-head button:hover { background: #334550; color: #fff0d3; }
.game-shell .game-drawer-scroll { padding: 20px; scrollbar-color: #65716d #122331; }
.game-shell .game-archive-breadcrumb { padding: 4px 24px; gap: 6px; border-bottom-color: #c8ad7726; color: #7e929e; background: #0b1b282e; }
.game-shell .game-archive-crumb { border: 0; background: transparent; color: #aebcc4; font-size: 12px; padding: 6px 4px; }
.game-shell .game-archive-crumb:hover { color: #eddbb6; background: transparent; }
.game-shell .game-archive-crumb:last-child { color: #e7d2a9; }
.game-shell .game-archive-portal { padding: 24px 28px 30px; scrollbar-color: #65716d #122331; }
.game-shell .game-archive-heading { margin-bottom: 22px; }
.game-shell .game-archive-heading small { color: #ab9970; font-size: 9px; letter-spacing: 2px; }
.game-shell .game-archive-heading h1 { margin: 7px 0 8px; font-size: 30px; letter-spacing: 3px; color: #f0e2c7; }
.game-shell .game-archive-heading p { margin: 0; color: #a6b7c2; font-size: 13px; line-height: 1.8; }
.game-shell .game-archive-grid { gap: 18px; }
.game-shell .game-archive-nations { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.game-shell .game-archive-nation { position: relative; display: flex; flex-direction: column; gap: 0; align-items: stretch; min-height: 290px; padding: 0; overflow: hidden; border: 1px solid #b59c654d; border-radius: 4px; color: #bdc7ca; background: #172c3a; text-align: center; box-shadow: 0 6px 18px #07111c55; }
.game-shell .game-archive-nation > .game-archive-realm-art { display: block; flex: 0 0 130px; width: 100%; height: 130px; background-size: 380% auto; background-position: 58% 5%; filter: saturate(.62); opacity: .8; mask-image: linear-gradient(#000 30%, #0008 70%, transparent); }
.game-shell .game-archive-nation[data-archive-nation="2"] > .game-archive-realm-art { background-position: 96% 66%; }
.game-shell .game-archive-nation[data-archive-nation="3"] > .game-archive-realm-art { background-position: 53% 83%; }
.game-shell .game-archive-nation[data-archive-nation="4"] > .game-archive-realm-art { background-position: 4% 44%; }
.game-shell .game-archive-nation > img { position: absolute; top: 75px; left: 50%; transform: translateX(-50%); width: 76px; height: 82px; object-fit: contain; filter: drop-shadow(0 4px 8px #0009); }
.game-shell .game-archive-nation > .game-archive-nation-copy { display: grid; justify-items: center; align-content: start; gap: 9px; padding: 35px 14px 22px; }
.game-shell .game-archive-nation strong { font-size: clamp(18px, 1.65vw, 25px); letter-spacing: 1px; color: #eee2c9; font-weight: 400; }
.game-shell .game-archive-nation small { font-size: 11px; line-height: 1.6; color: #9fb2bd; }
.game-shell .game-archive-nation .game-archive-nation-copy > span { font-size: 12px; color: #b9c3c7; }
.game-shell .game-archive-nation em { margin-top: 6px; font-size: 11px; font-style: normal; color: #d9bd83; }
.game-shell .game-archive-nation:hover { background: #213b49; border-color: #c8ad77b3; box-shadow: 0 8px 24px #040e1966; }
.game-shell .game-archive-nation:hover > .game-archive-realm-art { opacity: 1; }
.game-shell .game-archive-links { gap: 8px; }
.game-shell .game-archive-links a, .game-shell .game-archive-action, .game-shell .game-archive-choice { border-color: #c8ad773b; border-radius: 3px; background: #182e3c; color: #d2c4a5; font-size: 12px; }
.game-shell .game-archive-links a:hover, .game-shell .game-archive-action:hover, .game-shell .game-archive-choice:hover { background: #2c414e; border-color: #c8ad7799; color: #f4e2be; }
.game-shell .game-archive-country { max-width: none; padding: 20px 24px; border: 1px solid var(--ui-line); border-radius: 4px; background: linear-gradient(105deg, #253d4b, #132634); }
.game-shell .game-archive-country > img { width: 94px; height: 114px; }
.game-shell .game-archive-country h1 { color: #efe1c6; font-size: 30px; }
.game-shell .game-archive-country p { color: #b9c8d0; font-size: 14px; line-height: 1.9; }
.game-shell .game-archive-choice { padding: 22px 24px; font-size: 20px; }
.game-shell .game-archive-search-wrap { padding: 12px 28px 0; gap: 16px; color: #a9b9c4; }
.game-shell .game-archive-search-wrap input, .game-shell .game-roster-tools input, .game-shell .game-roster-tools select { background: #0d202e; border: 1px solid #7f8b8066; border-radius: 3px; color: #e8dec7; }

/* Keep standing-based frames, but let faces occupy more of each card. */
.game-shell .game-archive-roster { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px 18px; padding-top: 12px; }
.game-shell .game-archive-person.is-portrait { --fw: 24px; --fo: 1px; --fpb: 16px; min-height: 0; max-height: none; height: auto; aspect-ratio: 3 / 4; box-shadow: 0 6px 18px #020b1466; }
.game-shell .game-archive-person.is-portrait[data-frame="crown"] { --fw: 36px; --fo: 2px; --fpb: 19px; box-shadow: 0 6px 18px #020b1480; }
.game-shell .game-archive-person.is-portrait[data-frame="noble"] { --fw: 30px; --fo: 1px; --fpb: 17px; }
.game-shell .game-archive-person.is-portrait > span:last-child { padding: 50px 12px var(--fpb); gap: 6px; }
.game-shell .game-archive-person.is-portrait strong { font-size: 22px; letter-spacing: 1px; }
.game-shell .game-archive-person.is-portrait small { font-size: 12px; line-height: 1.6; color: #ced7da; }
.game-shell .game-archive-person.is-portrait em { font-size: 10px; color: #c8b789; }
.game-shell .game-archive-medal { width: 32px; height: 32px; top: -10px; }
.game-shell .game-archive-person.is-portrait[data-frame="crown"] .game-archive-medal { width: 38px; height: 38px; top: -13px; border-width: 2px; box-shadow: 0 0 0 1px #554521, 0 3px 9px #0008; }
.game-shell .game-person { background: #152936; border-radius: 3px; }
.game-shell .game-person-copy > h1 { color: #f0e1bf; }
.game-shell .game-person-copy > p { color: #c7d3da; }
.game-shell .game-person-list > button { background: #182f3e; border-color: #8d9a8a33; border-radius: 3px; }
.game-shell .game-person-list > button[aria-pressed=true] { background: #2b424f; border-color: #bd9e6699; }
.game-shell .game-archive-legion, .game-shell .game-archive-entry { background: #182d3b; border-color: var(--ui-line); border-radius: 4px; }

@media (max-width: 1150px) {
  .game-shell .game-hud { padding-inline: 20px; gap: 16px; }
  .game-shell .game-nation-dock button { padding-inline: 7px; }
  .game-shell .game-actions button, .game-shell .game-actions a { min-width: 70px; padding-inline: 8px; }
  .game-shell .game-archive-nations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-shell .game-archive-nation { min-height: 276px; }
}
@media (max-width: 700px) {
  .game-shell { --hud: 62px; --dock: calc(124px + env(safe-area-inset-bottom, 0px)); }
  .game-shell .game-hud { padding-inline: 12px; gap: 10px; }
  .game-shell .game-brand { gap: 8px; }
  .game-shell .game-brand svg { width: 27px; height: 27px; }
  .game-shell .game-brand b { font-size: 15px; letter-spacing: 1px; }
  .game-shell .game-brand small { font-size: 6px; letter-spacing: 1.2px; }
  .game-shell .game-clock { gap: 2px; font-size: 11px; }
  .game-shell .game-clock small { font-size: 10px; }
  .game-shell .game-hud-state { gap: 8px; }
  .game-shell .game-hud #game-account { max-width: 82px; font-size: 10px; padding-left: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .game-shell .game-utility { top: 12px; left: 12px; right: 12px; gap: 2px; padding: 3px; width: auto; max-width: none; flex-wrap: nowrap; }
  .game-shell .game-utility button, .game-shell .game-utility a { padding-inline: 7px; gap: 5px; font-size: 11px; min-height: 44px; min-width: 0; flex: 1 1 auto; white-space: nowrap; }
  .game-shell .game-utility svg { width: 15px; height: 15px; }
  .game-shell .game-map-tools { top: 76px; right: 12px; padding: 3px; gap: 3px; }
  .game-shell .game-map-tools button { width: 44px; height: 44px; }
  .game-shell .game-map-note { display: none; }
  .game-shell .game-dock { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 44px 58px; gap: 4px; padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .game-shell .game-nation-dock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .game-shell .game-nation-dock button { min-height: 44px; width: 100%; gap: 3px; padding: 3px; justify-content: center; font-size: 10px; }
  .game-shell .game-nation-dock button span { display: inline; }
  .game-shell .game-nation-dock img { width: 25px; height: 30px; }
  .game-shell .game-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .game-shell .game-actions button, .game-shell .game-actions a { flex-direction: column; min-width: 0; min-height: 56px; padding: 5px 1px; gap: 5px; font-size: 10px; }
  .game-shell .game-actions svg { width: 21px; height: 21px; }
  .game-shell .game-main-panel { inset: 10px; border-radius: 4px; }
  .game-shell .game-panel-head { padding: 11px 14px; }
  .game-shell .game-panel-head h2 { font-size: 19px; }
  .game-shell .game-panel-head small { font-size: 8px; }
  .game-shell .game-drawer { top: 68px; left: 10px; bottom: 10px; width: calc(100% - 20px); }
  .game-shell .game-drawer-scroll { padding: 16px; }
  .game-shell .game-archive-breadcrumb { padding: 3px 12px; gap: 5px; }
  .game-shell .game-archive-portal { padding: 17px 13px 24px; }
  .game-shell .game-archive-heading { margin-bottom: 18px; }
  .game-shell .game-archive-heading h1 { font-size: 25px; margin: 6px 0 8px; }
  .game-shell .game-archive-heading p { font-size: 12px; }
  .game-shell .game-archive-grid { gap: 12px; }
  .game-shell .game-archive-nations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-shell .game-archive-nation { min-height: 235px; }
  .game-shell .game-archive-nation > .game-archive-realm-art { flex-basis: 92px; height: 92px; background-size: 460% auto; }
  .game-shell .game-archive-nation > img { width: 60px; height: 66px; top: 47px; }
  .game-shell .game-archive-nation > .game-archive-nation-copy { padding: 27px 7px 15px; gap: 7px; }
  .game-shell .game-archive-nation strong { font-size: 17px; letter-spacing: 0; }
  .game-shell .game-archive-nation small { font-size: 10px; }
  .game-shell .game-archive-nation .game-archive-nation-copy > span { font-size: 10px; line-height: 1.6; }
  .game-shell .game-archive-nation em { font-size: 10px; margin-top: 3px; }
  .game-shell .game-archive-links a, .game-shell .game-archive-action { padding: 10px 12px; font-size: 11px; }
  .game-shell .game-archive-country { padding: 16px 14px; gap: 14px; }
  .game-shell .game-archive-country > img { width: 58px; height: 76px; }
  .game-shell .game-archive-country h1 { font-size: 23px; letter-spacing: 1px; }
  .game-shell .game-archive-country p { font-size: 13px; }
  .game-shell .game-archive-search-wrap { padding: 12px 13px 0; display: grid; gap: 7px; }
  .game-shell .game-archive-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 12px; padding-top: 12px; }
  .game-shell .game-archive-person.is-portrait { --fw: 18px; --fpb: 13px; }
  .game-shell .game-archive-person.is-portrait[data-frame="crown"] { --fw: 26px; --fpb: 15px; }
  .game-shell .game-archive-person.is-portrait[data-frame="noble"] { --fw: 22px; --fpb: 14px; }
  .game-shell .game-archive-person.is-portrait strong { font-size: 18px; }
  .game-shell .game-archive-person.is-portrait small { font-size: 10px; }
  .game-shell .game-archive-person.is-portrait em { font-size: 9px; }
  .game-shell .game-archive-person.is-portrait > span:last-child { padding: 32px 7px var(--fpb); gap: 4px; }
  .game-shell .game-archive-medal { width: 27px; height: 27px; top: -9px; }
  .game-shell .game-archive-person.is-portrait[data-frame="crown"] .game-archive-medal { width: 31px; height: 31px; top: -10px; }
}
@media (max-width: 350px) {
  .game-shell .game-nation-dock img { width: 21px; }
  .game-shell .game-nation-dock button { font-size: 9px; }
  .game-shell .game-utility button, .game-shell .game-utility a { padding-inline: 5px; font-size: 10px; }
  .game-shell .game-archive-nation strong { font-size: 15px; }
}
@media (max-height: 500px) and (min-width: 701px) {
  .game-shell { --hud: 48px; --dock: 60px; }
  .game-shell .game-dock { padding-block: 4px; }
  .game-shell .game-nation-dock button, .game-shell .game-actions button, .game-shell .game-actions a { min-height: 44px; }
  .game-shell .game-brand b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-shell *, .game-shell *::before, .game-shell *::after { transition: none !important; animation: none !important; }
}
