/* Bannerline — base, screens, title, results. HUD in hud.css, bottom bar in controlbar.css. */
:root {
  --ink: #f1e9d8;
  --ink2: #c4b9a2;
  --ink3: #8d846f;
  --panel: rgba(18, 20, 24, 0.86);
  --panel2: rgba(30, 32, 38, 0.92);
  --panel-solid: #16181d;
  --line: rgba(214, 188, 128, 0.28);
  --line-strong: rgba(214, 188, 128, 0.6);
  --gold: #f2c45a;
  --gold-dim: #a8843a;
  --blue: #3f86ec;
  --red: #e0503e;
  --green: #5fcf7a;
  --amber: #f0a43a;
  --mana: #4f8ff0;
  --xp: #b98af0;
  --head: 'Alegreya SC', Georgia, serif;
  --ui: 'Barlow Semi Condensed', 'Segoe UI', system-ui, sans-serif;
  --r: 6px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #101215; color: var(--ink); font: 15px/1.35 var(--ui); }
button { font: inherit; color: inherit; }
kbd {
  display: inline-block; min-width: 1.5em; padding: 0 .35em; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 4px; font: 600 11px/1.5 var(--ui); color: var(--ink2); background: rgba(0,0,0,.35); text-align: center;
}
#app { position: fixed; inset: 0; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.screen { position: absolute; inset: 0; }
.screen[hidden] { display: none; }
.boot {
  position: absolute; inset: 0; display: grid; place-items: center; background: #101215; color: var(--ink2);
  font: 600 18px var(--head); letter-spacing: .08em; z-index: 50; transition: opacity .5s;
}
.boot.done { opacity: 0; pointer-events: none; }
.boot.error { color: #ff9a8a; font: 15px var(--ui); white-space: pre-wrap; padding: 24px; place-items: center start; }

/* ---------- title ---------- */
.title-screen {
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(10, 12, 16, 0.15), rgba(10, 12, 16, 0.75) 75%);
}
.title-card {
  width: min(460px, calc(100vw - 32px)); padding: 30px 32px 24px; text-align: center;
  background: linear-gradient(180deg, rgba(22, 24, 29, .92), rgba(14, 15, 18, .94));
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative;
}
.title-card::before, .title-card::after {
  content: ''; position: absolute; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.title-card::before { top: 8px; } .title-card::after { bottom: 8px; }
.crest {
  width: 54px; height: 66px; margin: 0 auto 6px;
  background: linear-gradient(180deg, var(--blue), #23508f);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  position: relative; box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
}
.crest::after {
  content: ''; position: absolute; left: 50%; top: 14px; width: 18px; height: 26px; transform: translateX(-50%);
  background: var(--gold); clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
}
.logo { margin: 0; font: 800 46px/1 var(--head); letter-spacing: .04em; color: var(--ink); text-shadow: 0 2px 0 #000, 0 0 24px rgba(242,196,90,.25); }
.tagline { margin: 8px 0 20px; color: var(--ink2); font-size: 15px; }
.menu { display: grid; gap: 8px; }
.menu-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--r);
  font: 600 17px var(--ui); letter-spacing: .02em; transition: background .12s, border-color .12s, transform .08s;
}
.menu-btn small { font-weight: 500; font-size: 12px; color: var(--ink3); }
.menu-btn:hover:not(:disabled), .menu-btn.focus { background: rgba(242,196,90,.1); border-color: var(--line-strong); }
.menu-btn:active:not(:disabled) { transform: translateY(1px); }
.menu-btn:disabled { opacity: .5; cursor: default; }
.menu-btn.primary { background: linear-gradient(180deg, #d9a842, #a87a24); color: #1a1206; border-color: #f2c45a; text-shadow: 0 1px 0 rgba(255,255,255,.25); }
.menu-btn.primary:hover { background: linear-gradient(180deg, #e8b850, #b98a2c); }
.menu-btn.primary kbd { background: rgba(0,0,0,.2); color: #2a1d08; border-color: rgba(0,0,0,.35); }
.menu[hidden], .setup[hidden] { display: none; }
.setup { display: grid; gap: 10px; text-align: left; }
.setup-row { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 10px; }
.setup-label { color: var(--ink3); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03);
  cursor: pointer; font-weight: 600; font-size: 14px;
}
.chip:hover:not(:disabled) { border-color: var(--line-strong); }
.chip.on { background: rgba(242,196,90,.16); border-color: var(--gold); color: var(--gold); }
.chip:disabled { opacity: .4; cursor: default; }
.setup-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 6px; }
.hint { margin: 16px 0 0; color: var(--ink3); font-size: 13px; }
.title-foot { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: rgba(241,233,216,.45); font-size: 12px; }

/* ---------- results ---------- */
.results-screen { display: grid; place-items: center; background: rgba(8, 9, 12, .62); backdrop-filter: blur(2px); z-index: 30; }
.results-card {
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 26px 28px;
  background: linear-gradient(180deg, rgba(22,24,29,.96), rgba(14,15,18,.97)); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow);
}
.result-head { text-align: center; margin-bottom: 18px; }
.result-word { font: 800 54px/1 var(--head); letter-spacing: .05em; }
.result-word.win { color: var(--gold); text-shadow: 0 0 30px rgba(242,196,90,.35); }
.result-word.lose { color: #c9c2b2; }
.result-word.draw { color: var(--ink2); }
.result-sub { color: var(--ink2); margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-team { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: rgba(255,255,255,.02); }
.result-team h3 { margin: 0 0 8px; font: 700 18px var(--head); display: flex; justify-content: space-between; align-items: baseline; }
.result-team h3 .ban { font: 600 14px var(--ui); color: var(--ink2); }
.result-team.t0 { border-top: 3px solid var(--blue); } .result-team.t1 { border-top: 3px solid var(--red); }
.stat-list { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-size: 14px; }
.stat-list dt { color: var(--ink3); } .stat-list dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.income-chart { width: 100%; height: 120px; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(0,0,0,.25); }
.chart-legend { display: flex; gap: 16px; justify-content: center; color: var(--ink3); font-size: 12px; margin-top: 4px; }
.chart-legend i { display: inline-block; width: 10px; height: 3px; margin-right: 5px; vertical-align: middle; }
.result-sends { margin-top: 14px; font-size: 13px; color: var(--ink2); }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.result-actions .menu-btn { min-width: 170px; }

@media (max-width: 640px) {
  .result-grid { grid-template-columns: 1fr; }
  .logo { font-size: 38px; }
}

/* ---------- shared: menu focus (keyboard + gamepad) ---------- */
.nav-focus { outline: 2px solid var(--gold) !important; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(242,196,90,.18), 0 0 18px rgba(242,196,90,.25) !important; }
.nav-press { animation: navPress .16s; }
@keyframes navPress { 50% { transform: scale(.95); } }
kbd.pad { border-radius: 999px; min-width: 1.6em; color: #bfe6a8; border-color: rgba(150,220,120,.55); }
.result-actions { flex-wrap: wrap; }
.results-card .hint { text-align: center; }
.stat-list dt.who, .stat-list dd.who { color: var(--ink); font-weight: 700; padding-top: 4px; }
.stat-list dt.who:not(:first-child) { border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; padding-top: 8px; }
.stat-list dd.who:not(:nth-child(2)) { border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; padding-top: 8px; }

/* What's new + Credits: a quiet row under the title menu (shared/whats-new.js, shared/credits.js) */
.title-extra { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.title-extra:empty { display: none; }
.menu-btn.small { flex: 1 1 0; min-height: 44px; padding: 6px 12px; font-size: 14px; }
.menu-btn.primary small { color: rgba(26,18,6,.72); }
