/* The console's look: calm, large, few things on a screen. Light and dark come from core/tokens.css. No inline styles are used anywhere (the page's policy forbids them). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; color: var(--ink); letter-spacing: -.01em; }
a { color: inherit; }
button { font-family: var(--sans); cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hide { display: none !important; }
.nojs { padding: 24px; }
main { display: block; min-height: 50vh; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.page { padding: 36px 0 24px; }
.page h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; }
.page .lead { font-size: 17px; color: var(--ink2); max-width: 640px; margin: 10px 0 0; }
.hintline { font-size: 14.5px; color: var(--muted); margin: 8px 0 0; }
.sechead { font-size: 22px; margin: 34px 0 4px; }
.secsub { font-size: 14.5px; color: var(--muted); margin: 0 0 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: var(--tap); padding: 0 22px; border-radius: 10px; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); font: 600 16px var(--sans); text-decoration: none; transition: background .15s; }
.btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn.main { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn.main:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2b1a05; }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn.lg { min-height: 56px; padding: 0 30px; font-size: 18px; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* laptop top menu: no brand text */
.top { background: var(--bar); position: sticky; top: 0; z-index: 30; }
.top .in { max-width: 1040px; margin: 0 auto; padding: 0 32px; display: flex; align-items: stretch; min-height: 56px; gap: 6px; }
.top nav { display: flex; flex: 1; gap: 2px; }
.top nav a { position: relative; display: flex; align-items: center; min-height: var(--tap); padding: 0 16px; font-size: 16px; font-weight: 500; color: var(--bar-dim); text-decoration: none; }
.top nav a:hover { color: var(--bar-ink); }
.top nav a.on { color: var(--bar-ink); font-weight: 600; }
.top nav a.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; background: var(--gold); border-radius: 3px 3px 0 0; }
.top .me { display: flex; align-items: center; padding-left: 18px; font-size: 14px; color: var(--bar-dim); text-decoration: none; border-left: 1px solid rgba(255, 255, 255, .18); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* phone: slim title bar and a bottom bar of five */
.mtop { display: flex; align-items: center; height: 54px; padding: 0 16px; background: var(--bar); position: sticky; top: 0; z-index: 30; }
.mtop h2 { font-size: 20px; color: var(--bar-ink); }
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); padding: 6px 2px calc(8px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 52px; min-width: 0; }
.tabbar a.on { color: var(--accent); }
body.has-tabbar { padding-bottom: 86px; }

/* privacy strip and help line */
.priv { background: var(--strip); color: var(--strip-ink); font-size: 13px; line-height: 1.5; padding: 3px 0; }
.priv .wrap { padding: 0 32px; }
.priv .more-btn { background: none; border: 0; padding: 0 12px; color: var(--strip-ink); font-weight: 700; text-decoration: underline; font-size: inherit; min-height: var(--tap); min-width: var(--tap); vertical-align: middle; }
.priv-rest { }
@media (max-width: 899px) { .priv:not(.open) .priv-rest { display: none; } }
.helpline { text-align: center; font-size: 14px; color: var(--muted); margin: 8px 16px 28px; }
.helpline a { color: var(--accent); }

/* Home: three doors */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.door { display: flex; flex-direction: column; gap: 8px; padding: 26px 22px; min-height: 150px; border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); }
.door:hover { border-color: var(--accent); }
.door.main { background: var(--btn); border-color: var(--btn); color: #fff; }
.door.main:hover { background: var(--btn-hover); }
.door svg { width: 32px; height: 32px; }
.door b { font: 600 22px var(--serif); }
.door span { font-size: 15px; }
.door:not(.main) span { color: var(--ink2); }

/* strips: what needs you, what is playing */
.strip { margin-top: 26px; }
.strip h2 { font-size: 20px; margin-bottom: 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; background: var(--card); border: 1.5px solid var(--line); border-left: 6px solid var(--c, var(--blue)); border-radius: 12px; margin-bottom: 10px; }
.row .what { flex: 1 1 260px; min-width: 0; }
.row .what b { display: block; font-size: 17px; }
.row .what span { font-size: 14.5px; color: var(--muted); }

/* My games and Create */
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg label span { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; }
.seg input:checked + span { background: var(--btn); border-color: var(--btn); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.gcards, .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 18px; }
.gcard, .tile { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px; background: var(--card); border: 1.5px solid var(--line); border-top: 6px solid var(--c, var(--blue)); border-radius: var(--radius); min-width: 0; }
.gcard .gname, .tile .gname { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gcard h3, .tile h3 { font-size: 20px; }
.gcard .facts { list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--ink2); }
.gcard .by { margin: 0; font-size: 14px; color: var(--muted); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.tile p { margin: 0; color: var(--ink2); font-size: 15px; }
.tile.soon { border-top-style: dashed; opacity: .8; }
.soonword { font-weight: 700; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .role { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.role { background: var(--soft); color: var(--ink2); }
.chip { background: var(--soft); color: var(--ink); }
.chip.pay { background: #FBEBC8; color: #6B4200; }
.chip.live { background: #D6F0E2; color: #0F5A3B; }
.chip.ready { background: #DCE7FB; color: #0B2F78; }
.chip.cancel, .chip.nostart { background: #F6DAD6; color: #8E1C14; }
.chip.draft, .chip.done { background: var(--soft); color: var(--ink2); }
@media (prefers-color-scheme: dark) {
  .chip.pay { background: #4A3610; color: #FBE3A8; }
  .chip.live { background: #123A2B; color: #9BE5C2; }
  .chip.ready { background: #1C2C55; color: #BFD1FF; }
  .chip.cancel, .chip.nostart { background: #4A1B17; color: #FFC2BC; }
}

/* notes, empty states, confirmation panel, toast */
.banner { padding: 12px 16px; border-radius: 10px; background: var(--soft); border: 1.5px solid var(--goldt); color: var(--ink); margin: 14px 0; }
.calmempty { padding: 26px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--ink2); text-align: center; margin-top: 18px; }
.calmempty b { color: var(--ink); font-size: 18px; }
.confirm { padding: 16px 18px; border: 2px solid var(--bad); border-radius: 12px; background: var(--card); margin-top: 14px; }
.confirm p { margin: 0 0 12px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 80; max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; }
.updatebar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
body.has-tabbar .updatebar { bottom: 92px; }
.updatebar button { min-height: var(--tap); border-radius: 8px; border: 0; padding: 0 16px; font-weight: 600; background: var(--gold); color: #2b1a05; }

.kept { margin: 0; display: grid; gap: 4px 16px; grid-template-columns: minmax(0, 1fr); }
.kept dt { font-weight: 700; margin-top: 8px; }
.kept dd { margin: 0; color: var(--ink2); }
.copybox { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; min-height: 48px; padding: 0 12px; font: 16px var(--sans); border: 2px solid var(--accent); border-radius: 10px; background: var(--card); color: var(--ink); }
/* sign-in */
.signin { max-width: 520px; }
.zform { display: grid; gap: 14px; margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input { min-height: 52px; padding: 0 14px; font: 18px var(--sans); border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.opt { display: flex; gap: 12px; align-items: flex-start; }
.opt input { width: 24px; height: 24px; margin: 3px 0 0; flex: none; }
.opt .t { display: grid; gap: 2px; }
.opt .t span { font-size: 14.5px; color: var(--muted); }
.signmsg { min-height: 1.4em; margin: 0; font-weight: 600; }
.signmsg.bad { color: var(--bad); }

/* Billing and Account */
.list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; }
.list .what { flex: 1 1 240px; min-width: 0; }
.list .what b { display: block; }
.list .what span { font-size: 14.5px; color: var(--muted); }
.list .amt { font: 600 18px var(--serif); }
.account { display: grid; gap: 14px; margin-top: 22px; max-width: 560px; }
.account .box { padding: 18px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; }
.account .box h2 { font-size: 20px; }
.account .box p { margin: 0; color: var(--ink2); }

/* Player's screen view */
.pvbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 16px; }
.pvlabel { font-weight: 700; color: var(--ink2); }
.pvstage { margin-top: 18px; overflow: hidden; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--soft); display: flex; justify-content: center; padding: 16px; }
.pvbox { position: relative; width: calc(var(--w) * var(--k)); height: calc(var(--h) * var(--k)); flex: none; }
.pvbox iframe { position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); border: 0; background: #fff; transform: scale(var(--k)); transform-origin: 0 0; border-radius: 6px; }
.pvbox.phone iframe { border-radius: 28px; }

@media (max-width: 899px) {
  .wrap, .priv .wrap { padding: 0 18px; }
  .page { padding: 24px 0 20px; }
  .doors { grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
  .door { min-height: 0; padding: 18px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .door b { font-size: 20px; }
  .door span { flex-basis: 100%; }
  .gcards, .tiles { grid-template-columns: 1fr; }
  .btn { width: auto; }
}
@media (max-width: 380px) {
  .btns .btn { flex: 1 1 100%; }
  .page h1 { font-size: 26px; }
}
.gid { margin: 2px 0; font-size: 14px; opacity: .85; }
.banner2 { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--soft, #eef2fb); font-size: 15px; line-height: 1.4; }
.who { margin: 6px 0; font-size: 14px; opacity: .9; }

.versionline { margin: 18px 16px 90px; text-align: center; font-size: 13px; opacity: .8; }

/* the status pills of a game row: every status has its own colours AND its own mark, so colour is never the only cue */
.chip.s-draft { background: #E6E9EF; color: #2F3748; }
.chip.s-draft::before { content: "\270E "; margin-right: 4px; }
.chip.s-pending { background: #FBEBC8; color: #6B4200; }
.chip.s-pending::before { content: "\25D4 "; margin-right: 4px; }
.chip.s-paid { background: #D6F0E2; color: #0F5A3B; }
.chip.s-paid::before { content: "\2714 "; margin-right: 4px; }
.chip.s-free { background: #CFEFF2; color: #0A4B52; }
.chip.s-free::before { content: "\25C7 "; margin-right: 4px; }
.chip.s-overdue { background: #F6DAD6; color: #8E1C14; }
.chip.s-overdue::before { content: "\0021 "; margin-right: 4px; }
.chip.s-live { background: #DCE7FB; color: #0B2F78; }
.chip.s-live::before { content: "\25CF "; margin-right: 4px; }
.chip.s-done { background: #E8DDF7; color: #4A2A85; }
.chip.s-done::before { content: "\25A0 "; margin-right: 4px; }
.chip.s-cancel { background: #EDEDED; color: #4A4A4A; }
.chip.s-cancel::before { content: "\2715 "; margin-right: 4px; }
.chip.s-deleted { background: #D2D2D2; color: #2A2A2A; }
.chip.s-deleted::before { content: "\232B "; margin-right: 4px; }
.chip.s-cancel { text-decoration: line-through; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip.s-draft { background: #2B3142; color: #D6DBE8; }
  :root:not([data-theme="light"]) .chip.s-pending { background: #4A3610; color: #FBE3A8; }
  :root:not([data-theme="light"]) .chip.s-paid { background: #123A2B; color: #9BE5C2; }
  :root:not([data-theme="light"]) .chip.s-free { background: #0F3B40; color: #9EE3EA; }
  :root:not([data-theme="light"]) .chip.s-overdue { background: #4A1B17; color: #FFC2BC; }
  :root:not([data-theme="light"]) .chip.s-live { background: #1C2C55; color: #BFD1FF; }
  :root:not([data-theme="light"]) .chip.s-done { background: #33264F; color: #D9C8F5; }
  :root:not([data-theme="light"]) .chip.s-cancel { background: #333333; color: #CFCFCF; }
  :root:not([data-theme="light"]) .chip.s-deleted { background: #1E1E1E; color: #BEBEBE; }
}
:root[data-theme="dark"] .chip.s-draft { background: #2B3142; color: #D6DBE8; }
:root[data-theme="dark"] .chip.s-pending { background: #4A3610; color: #FBE3A8; }
:root[data-theme="dark"] .chip.s-paid { background: #123A2B; color: #9BE5C2; }
:root[data-theme="dark"] .chip.s-free { background: #0F3B40; color: #9EE3EA; }
:root[data-theme="dark"] .chip.s-overdue { background: #4A1B17; color: #FFC2BC; }
:root[data-theme="dark"] .chip.s-live { background: #1C2C55; color: #BFD1FF; }
:root[data-theme="dark"] .chip.s-done { background: #33264F; color: #D9C8F5; }
:root[data-theme="dark"] .chip.s-cancel { background: #333333; color: #CFCFCF; }
:root[data-theme="dark"] .chip.s-deleted { background: #1E1E1E; color: #BEBEBE; }

.approve { margin: 8px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink2); }
.approve li { margin: 2px 0; }
