/* Kings & Kaisers site chrome: the game's dark steel / brass palette, Georgia display type. */
:root {
  --bg: #0d1110;
  --bg-2: #141816;
  --panel: #1a1f1c;
  --panel-2: #222824;
  --line: #343b36;
  --line-brass: #6b5a38;
  --brass: #b89b59;
  --brass-hi: #e2c98c;
  --ink: #ddd5c4;
  --ink-hi: #f1e8d9;
  --muted: #9d9582;
  --red: #8d3830;
  --red-hi: #b0705f;
  --ok: #7c9564;
  --warn: #f0b889;
  --danger: #f09a86;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% -20%, #2a302b, var(--bg) 60%) fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brass-hi); }
a:hover { color: #fff0c9; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink-hi); line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 52px); margin: 0 0 14px; letter-spacing: .01em; }
h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; color: var(--brass-hi); }
p { margin: 0 0 12px; }
.eyebrow { display: block; color: #c46a5f; font: 800 11px var(--sans); letter-spacing: .24em; text-transform: uppercase; margin-bottom: 8px; }
.lede { color: #b9b19c; font-size: 17px; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }
main { flex: 1; padding: 34px 0 56px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line-brass); background: linear-gradient(180deg, #2a2418, #16140f); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-hi); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--brass); color: var(--brass-hi); font: 700 18px var(--serif); background: #191712; }
.brand strong { font: 700 19px var(--serif); letter-spacing: .09em; white-space: nowrap; }
.brand strong i { color: #b0443c; font-style: normal; }
.nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.nav a { color: #cfc7b5; text-decoration: none; font: 800 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 6px 2px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brass-hi); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 20px 0 28px; }
.site-footer .wrap { display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid #5a5a4c; background: #1c201d; color: #d9cfb8; font: 800 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--brass); color: #fff0c9; }
.btn-primary { border-color: var(--red-hi); background: linear-gradient(180deg, #8d3830, #62231f); color: #fff0d8; box-shadow: inset 0 0 0 2px rgba(0,0,0,.24); }
.btn-primary:hover { filter: brightness(1.15); color: #fff; }
.btn-brass { border-color: #9c8350; background: #2a2518; color: #f0d898; }
.btn-danger { border-color: #8e4a40; background: transparent; color: #f0a597; }
.btn-small { min-height: 32px; padding: 0 12px; font-size: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #e6c47a; outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
label.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
label.field > span { color: var(--brass); font: 800 10px var(--sans); letter-spacing: .18em; text-transform: uppercase; }
input[type=text], input[type=email], select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #4b4a3e; background: #121513; color: #efe6d4; font: 15px var(--sans); }
input:focus, select:focus { border-color: #c8a75d; box-shadow: 0 0 0 3px rgba(200,167,93,.16); outline: none; }
label.check { display: flex; gap: 10px; align-items: center; margin: 10px 0; }

/* panels */
.panel { position: relative; padding: 26px; background: linear-gradient(145deg, #252a26, #101312 68%); border: 1px solid #806c49; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.panel::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(172,149,98,.16); pointer-events: none; }
.panel + .panel { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.notice { padding: 12px 14px; border: 1px solid #7a5a37; background: rgba(122,90,55,.18); color: #f1cf9c; margin: 0 0 16px; }
.notice.ok { border-color: #56704a; background: rgba(86,112,74,.18); color: #cfe3b9; }
.notice.err { border-color: #8e4a40; background: rgba(142,74,64,.18); color: #f6c1b3; }
.hidden { display: none !important; }
.tag { display: inline-block; padding: 2px 7px; border: 1px solid var(--line-brass); color: var(--brass-hi); font: 800 9px var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.tag.red { background: #7e2f28; border-color: #d08a6e; color: #ffe6c2; }
.tag.green { border-color: #56704a; color: #cfe3b9; }

/* hero */
.hero { padding: 40px 0 26px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
.hero-art { border: 1px solid var(--line-brass); box-shadow: 0 30px 80px #000; aspect-ratio: 4 / 3; background: #121513 url("/game/kings-kaisers-map-6k.webp") 54% 40% / 260% auto no-repeat; position: relative; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(13,17,16,.75)); }
.roundel-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.roundel-row img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.65); }
.feature h3 { font-size: 17px; }
.price { font: 700 46px var(--serif); color: var(--ink-hi); }
.price small { font: 14px var(--sans); color: var(--muted); }
ul.ticks { list-style: none; padding: 0; margin: 12px 0; }
ul.ticks li { padding-left: 22px; position: relative; margin: 6px 0; }
ul.ticks li::before { content: "✦"; position: absolute; left: 0; color: var(--brass); }

/* game cards */
.game-list { display: grid; gap: 8px; }
.game-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #353b36; background: #141816; }
.game-card.your-turn { border-color: var(--red-hi); background: linear-gradient(90deg, rgba(141,56,48,.22), #141816 60%); }
.game-card img, .game-card .dot { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.6); background: #3a3f3a; }
.game-card > div { min-width: 0; display: flex; flex-direction: column; }
.game-card strong { font: 700 16px var(--serif); color: var(--ink-hi); overflow-wrap: anywhere; }
.game-card small { color: #b2a98f; font-size: 12px; }
.empty { color: #8b8f86; padding: 14px; border: 1px dashed #3d433e; }

/* tables (admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 10px; border-bottom: 1px solid #262c28; text-align: left; white-space: nowrap; }
th { color: var(--brass); font: 800 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; background: #151917; position: sticky; top: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { padding: 14px; border: 1px solid var(--line); background: #141816; }
.stat b { display: block; font: 700 26px var(--serif); color: var(--ink-hi); }
.stat span { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
pre.sql { white-space: pre-wrap; font-size: 12px; color: #b9b19c; background: #101312; border: 1px solid var(--line); padding: 10px; max-height: 180px; overflow: auto; }

/* legal pages */
.legal { max-width: 760px; }
.legal h2 { margin-top: 28px; font-size: 22px; }
.review-banner { border: 2px dashed #c46a5f; color: #f6c1b3; padding: 12px 14px; margin-bottom: 20px; font-weight: 700; }

/* cookie note */
.cookie-note { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 640px; margin: 0 auto; padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #1b1f1c; border: 1px solid var(--line-brass); box-shadow: 0 16px 40px #000; font-size: 13px; }

/* auth mount */
#clerk-mount { display: flex; justify-content: center; min-height: 420px; }
.dev-signin { max-width: 440px; margin: 0 auto; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .panel { padding: 20px 16px; }
  .game-card { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .game-card .tag { grid-column: 2; justify-self: start; }
  .nav a { font-size: 10px; }
}
