.gw-page { background: radial-gradient(ellipse at 30% 0, #426769, #1f2b30 62%); color: #e7e0ca; }
.gw-page .arcade-main { max-width: 1280px; }
.gw-page .eyebrow { color: #a4c8b8; text-transform: uppercase; letter-spacing: .16em; font: .67rem "Courier New", monospace; }
.gw-page h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 900; letter-spacing: -.04em; color: #f3edda; font-style: italic; }
.gw-page h1 span { color: #dba878; margin-left: .18em; text-shadow: 0 0 22px #dba87855; }
.gw-subtitle { letter-spacing: .45em; font: .72rem "Courier New", monospace; color: #d4c58d !important; }
.gw-page .game-message { max-width: 360px; color: #c7d0c5; font-size: .82rem; line-height: 1.6; }
.gw-page .arcade-stage { border-color: #86aaa055; border-radius: 12px; background: #1f2b30; scroll-margin-top: 90px; box-shadow: 0 28px 80px #0a141899, 0 0 50px #86aaa014; }
.gw-page .canvas-wrap { aspect-ratio: 16 / 9; max-height: none; }
.gw-page canvas { image-rendering: pixelated; }

.gw-overlay { position: absolute; inset: 0; padding: 3% 4%; background: linear-gradient(100deg, #172124f2, #172124e0 60%, #172124a0); overflow-y: auto; color: #e7e0ca; }
.gw-overlay[hidden], .gw-summary[hidden], .gw-portrait[hidden] { display: none; }
.gw-overlay h2 { margin: 0 0 .7rem; font: 900 clamp(1rem, 2.4vw, 1.6rem) "Courier New", monospace; letter-spacing: .08em; color: #dba878; font-style: italic; }
.gw-overlay h3 { margin: 1rem 0 .4rem; font: 700 .72rem "Courier New", monospace; letter-spacing: .14em; text-transform: uppercase; color: #d4c58d; }
.gw-note { color: #c1cabe; font-size: .8rem; line-height: 1.55; margin: .4rem 0; }
.gw-good { color: #a7cfaa; }
.gw-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.gw-page .button { background: #dba878; color: #1f2b30; border: 1px solid #efcf9c; border-radius: 4px; min-height: 44px; font-weight: 800; letter-spacing: .04em; }
.gw-page .button:disabled { opacity: .45; cursor: not-allowed; }
.gw-page .button-secondary { background: #35474a; color: #e7e0ca; border-color: #78938b; }

.gw-hub { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 4%; align-items: start; }
.gw-summary { border-left: 3px solid #d4c58d; background: #29383a; padding: .6rem .9rem; margin-bottom: 1rem; }
.gw-summary h2 { color: #d4c58d; margin-bottom: .3rem; }
.gw-summary ul { margin: 0; padding-left: 1.1rem; font-size: .8rem; line-height: 1.6; }
.gw-fighters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.gw-fighter { display: grid; justify-items: center; gap: .25rem; padding: .5rem .4rem .7rem; text-align: center; border: 2px solid #405657; border-radius: 6px; background: #28383a; color: #d7dbcd; cursor: pointer; font: inherit; }
.gw-fighter strong { font: 900 .9rem "Courier New", monospace; letter-spacing: .1em; color: #f5eedb; }
.gw-fighter > span:last-child { font-size: .66rem; line-height: 1.4; color: #bac7ba; }
.gw-fighter[aria-pressed="true"] { border-color: #dba878; background: #354b4a; box-shadow: 0 0 0 1px #dba878, 0 0 22px #dba87844; }
.gw-fighter:disabled { cursor: not-allowed; opacity: .55; }
.gw-fighter:disabled .gw-fighter-art { filter: grayscale(1) opacity(.65); }
/* Character portraits are original vector art, not tinted animation sheets. */
.gw-fighter-art, .gw-portrait { width: 96px; aspect-ratio: 1; background-position: center; background-size: cover; background-repeat: no-repeat; image-rendering: pixelated; }
.gw-fighter-art[data-sprite="mara"], .gw-portrait[data-sprite="mara"] { background-image: url("../images/gang-wars/mara.svg"); }
.gw-fighter-art[data-sprite="bram"], .gw-portrait[data-sprite="bram"] { background-image: url("../images/gang-wars/bram.svg"); }
.gw-fighter-art[data-sprite="nix"], .gw-portrait[data-sprite="nix"] { background-image: url("../images/gang-wars/nix.svg"); }
.gw-portrait[data-sprite="orla"] { background-image: url("../images/gang-wars/orla.svg"); }
.gw-portrait[data-sprite="rivet"] { background-image: url("../images/gang-wars/rivet.svg"); }
.gw-portrait[data-sprite="mother-grit"] { background-image: url("../images/gang-wars/mother-grit.svg"); }
.gw-portrait[data-sprite="latch"] { background-image: url("../images/gang-wars/latch.svg"); }
.gw-portrait[data-sprite="signalman"] { background-image: url("../images/gang-wars/signalman.svg"); }
.gw-portrait[data-sprite="steward"] { background-image: url("../images/gang-wars/steward.svg"); }
.gw-fighter[aria-pressed="true"] .gw-fighter-art { filter: drop-shadow(0 2px 0 #dba878); }
.gw-rep { font: 700 .8rem "Courier New", monospace; letter-spacing: .14em; color: #d4c58d; margin: 0; }
.gw-rep strong { font-size: 1.8rem; color: #fff; margin-left: .4rem; }
.gw-upgrades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.gw-upgrade { display: grid; gap: .1rem; text-align: left; padding: .45rem .55rem; border: 1px solid #405657; border-radius: 4px; background: #28383a; color: #d7dbcd; cursor: pointer; font: inherit; min-height: 44px; }
.gw-upgrade strong { font-size: .7rem; color: #fff; }
.gw-upgrade span { font-size: .64rem; color: #bac7ba; }
.gw-upgrade em { font-style: normal; font-size: .66rem; color: #d4c58d; font-weight: 700; }
.gw-upgrade:not(:disabled):hover { border-color: #d4c58d; }
.gw-upgrade:disabled { opacity: .55; cursor: not-allowed; }
.gw-contracts { margin: 0; padding-left: 1.1rem; font-size: .74rem; line-height: 1.6; color: #d7dbcd; }

.gw-story { display: flex; align-items: flex-end; gap: 3%; padding-bottom: 4%; background: linear-gradient(0deg, #172124f5, #172124c0 45%, #17212420); }
.gw-portrait { width: 18%; flex-shrink: 0; border: 2px solid #dba878; background-color: #35474a; box-shadow: 0 0 28px #a4c8b833; }
.gw-story-copy { flex: 1; min-width: 0; }
.gw-story-copy h2 { color: #d4c58d; }
#story-line { font-size: clamp(.85rem, 1.8vw, 1.2rem); line-height: 1.65; margin: 0; max-width: 700px; }

.gw-draft { text-align: center; }
.gw-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-top: 1rem; }
.gw-perk { display: grid; align-content: start; gap: .45rem; min-height: 150px; padding: 1rem .8rem; border: 2px solid #78938b; border-radius: 6px; background: #28383a; color: #e7e0ca; cursor: pointer; font: inherit; text-align: left; transition: transform .12s; }
.gw-perk:hover, .gw-perk:focus-visible { transform: translateY(-4px); }
.gw-perk em { font: 700 .62rem "Courier New", monospace; letter-spacing: .12em; font-style: normal; color: #bac7ba; }
.gw-perk strong { font-size: 1rem; color: #fff; }
.gw-perk span { font-size: .78rem; line-height: 1.5; color: #c7d0c5; }
.gw-common { border-color: #78938b; }
.gw-common em { color: #bac7ba; }
.gw-rare { border-color: #d4c58d; box-shadow: 0 0 16px #d4c58d33; }
.gw-rare em { color: #d4c58d; }
.gw-legendary { border-color: #dba878; box-shadow: 0 0 24px #dba87855; background: linear-gradient(160deg, #4b4640, #28383a 60%); }
.gw-legendary em { color: #dba878; }
.gw-draft .gw-actions { justify-content: center; }
.gw-center { display: grid; place-content: center; text-align: center; }
.gw-center .gw-note { max-width: 460px; }
.gw-center .gw-actions { justify-content: center; }

.gw-page .arcade-toolbar { background: #28383a; border-top: 1px solid #78938b55; flex-wrap: wrap; }
.gw-keys { margin: 0; font-size: .74rem; color: #c1cabe; }
.gw-keys kbd { font: 700 .68rem "Courier New", monospace; padding: .05rem .3rem; border: 1px solid #78938b; border-radius: 3px; background: #35474a; color: #f3edda; }
.gw-page .game-actions { flex-wrap: wrap; }
.gw-touch { background: #28383a; justify-content: space-between; align-items: center; gap: .8rem; touch-action: none; }
.gw-pad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 50px); gap: 4px; }
.gw-pad [data-input="up"] { grid-area: 1 / 2; } .gw-pad [data-input="left"] { grid-area: 2 / 1; }
.gw-pad [data-input="right"] { grid-area: 2 / 3; } .gw-pad [data-input="down"] { grid-area: 3 / 2; }
.gw-buttons { display: grid; grid-template-columns: repeat(2, 76px); gap: 6px; }
.gw-touch button { min-width: 0; min-height: 50px; font-size: .72rem; font-weight: 800; background: #35474a; border: 1px solid #78938b; border-radius: 6px; color: #e7e0ca; }
.gw-touch [data-input="attack"] { background: #dba878; color: #1f2b30; min-height: 60px; }
.gw-touch [data-input="special"] { background: #79a99a; color: #1f2b30; }
.gw-touch button.is-held { filter: brightness(1.4); transform: scale(.96); }
.gw-save { color: #bac7ba; font-size: .8rem; }
.gw-page .detail-panel { background: #28383a; border-color: #78938b44; }
.gw-page .detail-panel h2 { color: #a4c8b8; font-size: 1.05rem; }
.gw-page .detail-panel p { color: #c7d0c5; line-height: 1.75; font-size: .87rem; }
.gw-credit { color: #bac7ba; font-size: .78rem; line-height: 1.7; margin-top: 2rem; }
.gw-page button:focus-visible, .gw-page canvas:focus-visible { outline: 3px solid #d4c58d; outline-offset: 3px; }
#gw-stage:fullscreen { display: flex; flex-direction: column; justify-content: center; overflow: auto; background: #1f2b30; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#gw-stage:fullscreen .canvas-wrap { flex: 0 1 auto; width: min(100%, calc((100dvh - 190px) * 16 / 9)); align-self: center; }
@media (prefers-reduced-motion: reduce) { .gw-perk { transition: none; } }
@media (max-width: 760px) {
  .gw-page .canvas-wrap:has(.gw-overlay:not([hidden])) { aspect-ratio: auto; min-height: 520px; }
  .gw-page .canvas-wrap:has(.gw-overlay:not([hidden])) canvas { position: absolute; inset: 0; height: 100%; object-fit: cover; }
  .gw-hub { grid-template-columns: 1fr; }
  .gw-overlay { padding: 1rem; }
  .gw-fighter-art { width: 64px; }
  .gw-portrait { width: 64px; }
  .gw-story { align-items: flex-start; flex-direction: column; justify-content: flex-end; }
  .gw-perk { min-height: 0; }
  .gw-page .game-actions { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .gw-keys { display: none; }
  .gw-touch { gap: .5rem; padding-inline: .5rem; }
  .gw-pad { grid-template-columns: repeat(3, minmax(38px, 52px)); grid-template-rows: repeat(3, 46px); }
  .gw-buttons { grid-template-columns: repeat(2, minmax(58px, 72px)); }
}
