/* The account and admin pages, in the landing's palette.
   One radius scale: 20px panels, 12px fields, a full pill for buttons and choices. */
body.panel { min-height: 100vh; display: flex; flex-direction: column; }
.panel main { flex: 1; padding-top: 62px; }
.panel h1 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.panel h2 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.panel h3 { font-size: 16px; }
.panel .band { padding-block: clamp(26px, 3.6vw, 44px) clamp(48px, 6vw, 80px); }
.lead { display: grid; gap: 10px; margin-bottom: 22px; }
.lead p { color: var(--muted); max-width: 60ch; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
button.link { font-size: 14px; }
button.link:disabled { color: var(--muted); text-decoration: none; cursor: default; opacity: .6; }

.field { display: grid; gap: 7px; font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea, .search input, .cell input, .cell select, .copy input {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 16px; color: var(--text);
  border: 1px solid var(--line); background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 76px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .search input:focus-visible,
.cell input:focus-visible, .cell select:focus-visible, .copy input:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline .field { flex: 1 1 180px; }
.error { color: var(--bad); font-size: 14.5px; min-height: 1.5em; }
.ok { color: var(--accent); font-size: 14.5px; min-height: 1.5em; }
.note { color: var(--muted); font-size: 14.5px; }
.notice {
  margin-bottom: 16px; padding: 14px 18px; border-radius: var(--radius); color: var(--text);
  background: color-mix(in srgb, var(--gold) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
}
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
}
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.4vw, 30px); transition: background-color .35s, border-color .35s; }
.card p { color: var(--muted); margin-top: 10px; max-width: 56ch; }
.card .actions, .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s, background-color .2s, border-color .2s; }
.tabs button:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 35%, var(--line)); }
.tabs button[aria-selected="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.tabs button small { margin-left: 6px; font-size: 12.5px; opacity: .7; }
.tabs button small.hot { color: var(--gold); opacity: 1; }

.list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.list li { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; padding: 10px 0; font-size: 15px; align-items: baseline; }
.list li + li { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.list time { color: var(--muted); font-size: 13.5px; }
.list.ways li { grid-template-columns: 190px 1fr auto; }

.avatar {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none;
  font: 700 26px var(--display); color: var(--accent-ink);
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 45%, var(--bg)));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35);
}
.avatar.small { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
/* With a picture of the player's own the gradient is only what shows while it loads. */
.avatar[style*="url"] { background-size: cover; background-position: center; }
button.avatar { border: 0; padding: 0; cursor: pointer; }
button.avatar:hover, button.avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.avatar.large { width: 112px; height: 112px; border-radius: 30px; font-size: 44px; }
.checks { display: grid; gap: 10px; margin-top: 16px; }
.checks label { display: flex; gap: 10px; align-items: baseline; font-size: 15px; cursor: pointer; }
.checks input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; translate: 0 2px; }

/* ------------------------------------------------------------------ sign-in */
/* The way in takes the whole window: the form on a dark side, the client's own sky beside it. */
body.gated .top, body.gated footer { display: none; }
body.gated main { padding-top: 0; }
.gate { min-height: 100dvh; display: grid; grid-template-columns: minmax(360px, 600px) 1fr; }
.gate-form {
  display: grid; grid-template-rows: auto 1fr; padding: clamp(26px, 5vw, 76px); border-right: 1px solid var(--line);
  background: radial-gradient(120% 70% at 0% 100%, color-mix(in srgb, var(--accent) 24%, var(--bg)), var(--bg) 70%);
}
.gate-card { align-self: center; width: min(440px, 100%); display: grid; gap: 16px; padding-block: 36px; }
.gate-card h1 { font-size: clamp(30px, 3.4vw, 42px); }
.gate-card form { display: grid; gap: 14px; }
.gate-card .link { justify-self: end; margin-top: -4px; }
.gate-art { background: url("img/hero.jpg") 80% 50% / cover no-repeat; }
.or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); }

/* ------------------------------------------------------------------ cabinet */
/* Who is signed in and how the licence stands, over the client's own sky. */
.profile {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 24px;
  padding: clamp(24px, 3.4vw, 44px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 22px; align-items: center;
  background: var(--bg);
}
.profile::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("img/hero.jpg") 70% 32% / cover no-repeat; }
.profile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 94%, transparent) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 46%, color-mix(in srgb, var(--bg) 20%, transparent) 100%);
}
.profile .standing { margin-top: 8px; color: var(--muted); }
.profile .get-launcher { margin-top: 16px; }
.count { text-align: right; font: 700 clamp(48px, 6.4vw, 84px)/1 var(--display); letter-spacing: -0.04em; color: var(--text); text-shadow: 0 6px 30px color-mix(in srgb, var(--bg) 70%, transparent); }
.count small { display: block; margin-top: 8px; font: 500 15px "Golos Text", sans-serif; color: var(--muted); letter-spacing: 0; }
.profile + .tabs { margin-top: 20px; }
.pane { padding-top: 22px; animation: pane .28s cubic-bezier(.2, 0, 0, 1); }
@keyframes pane { from { opacity: 0; transform: translateY(8px); } }

.overview { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); align-items: start; }

/* What the account is: a name over each fact, as many across as fit. */
.about { margin-top: 16px; }
.about-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px 28px; margin: 18px 0 0; }
.about-facts dt { color: var(--muted); font-size: 13.5px; }
.about-facts dd { margin: 3px 0 0; font-weight: 600; font-size: 16.5px; overflow-wrap: anywhere; }
.about-facts small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

/* Buying: the same tiles as on the landing, as a choice; then one sum and one button. */
.card .products { gap: 10px; margin-top: 18px; }
.card .products .product, .card .products:has(> :nth-child(5)) .product {
  flex: 1 1 96px; max-width: 190px; min-height: 0; aspect-ratio: 4 / 5; padding: 12px; border-radius: 16px;
  grid-template: "save" 28px "term" 1fr "cost" auto / minmax(0, 1fr); align-items: start; row-gap: 0;
}
.card .product .term { display: grid; gap: 4px; }
.card .product .term b { font-size: clamp(32px, 3.4vw, 48px); }
.card .product .term span { font-size: 14px; }
.card .product .cost strong { font-size: 17px; }
.card .product .cost small { font-size: 11.5px; }
.card .product .save { font-size: 11px; padding: 3px 8px; margin: 0; justify-self: start; align-self: start; }
.card .product .save i, .card .product.best .save i { display: none; }
.pay { margin-top: 20px; display: grid; gap: 12px; }
.pending { margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); }

/* The wheel: the page's one loud thing. The prize is decided by the server; this only turns to it. */
.wheel-card {
  position: relative; overflow: hidden; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 20%, var(--card)) 0%, var(--card) 62%);
}
.wheel-card h2 { text-align: left; }
.wheel-box { width: min(340px, 100%); margin: 14px auto 0; aspect-ratio: 1; filter: drop-shadow(0 22px 44px color-mix(in srgb, var(--bg) 80%, transparent)); }
.wheel-box svg { width: 100%; height: 100%; display: block; overflow: visible; }
.disc { transform-origin: 200px 200px; }
.rim { fill: color-mix(in srgb, var(--bg) 70%, var(--card)); stroke: color-mix(in srgb, var(--gold) 70%, var(--bg)); stroke-width: 2; }
.edge { fill: none; stroke: color-mix(in srgb, var(--gold) 55%, transparent); stroke-width: 1.5; }
.gloss { pointer-events: none; }
.sector path { stroke: color-mix(in srgb, var(--bg) 80%, transparent); stroke-width: 1.5; fill: color-mix(in srgb, var(--bg) 62%, var(--card)); transition: fill .4s; }
.sector.odd path { fill: color-mix(in srgb, var(--bg) 30%, var(--card)); }
.sector.days path { fill: color-mix(in srgb, var(--accent) 46%, var(--card)); }
.sector.days.odd path { fill: color-mix(in srgb, var(--accent) 30%, var(--card)); }
.sector.percent path { fill: color-mix(in srgb, var(--gold) 38%, var(--card)); }
.sector.percent.odd path { fill: color-mix(in srgb, var(--gold) 24%, var(--card)); }
.sector { transition: opacity .4s; }
.sector text { text-anchor: middle; fill: var(--text); }
.sector .figure { font-family: var(--display); font-weight: 700; }
.sector .word { font-family: "Golos Text", sans-serif; font-weight: 500; fill: color-mix(in srgb, var(--text) 78%, transparent); }
.sector.none .word { fill: var(--muted); }
.disc.has-won .sector:not(.won) { opacity: .38; }
.sector.won path { animation: won 1.1s ease-in-out 3; }
.sector.days.won path { fill: color-mix(in srgb, var(--accent) 72%, var(--card)); }
.sector.percent.won path { fill: color-mix(in srgb, var(--gold) 62%, var(--card)); }
@keyframes won { 50% { filter: brightness(1.35); } }
.stud { fill: var(--gold); }
.stud.odd { fill: color-mix(in srgb, var(--gold) 34%, var(--bg)); }
/* While it turns the lights run round the rim and the pointer rattles on the pegs. */
.is-spinning .stud { animation: stud .5s linear infinite; animation-delay: calc(var(--at) * -42ms); }
@keyframes stud { 0%, 60% { fill: color-mix(in srgb, var(--gold) 30%, var(--bg)); } 30% { fill: #fff3d6; } }
.hub { fill: var(--bg); stroke: color-mix(in srgb, var(--gold) 70%, var(--bg)); stroke-width: 2; }
.pointer { fill: var(--gold); stroke: var(--bg); stroke-width: 2; stroke-linejoin: round; transform-origin: 200px 12px; }
.is-spinning .pointer { animation: rattle .13s ease-in-out infinite; }
@keyframes rattle { 50% { transform: rotate(-11deg); } }
.wheel-card .button { margin-top: 18px; min-width: 220px; }
.prize { margin-top: 16px; min-height: 76px; display: grid; align-content: center; gap: 4px; }
.prize b { font: 700 26px var(--display); color: var(--text); }
.prize b.pop { animation: pop .42s cubic-bezier(.175, .885, .32, 1.275); }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
.prize span { color: var(--muted); font-size: 14.5px; }
.timer { font: 500 24px var(--display); font-variant-numeric: tabular-nums; letter-spacing: .04em; color: var(--text); }
.week { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.week i {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line); transition: background-color .3s, color .3s, border-color .3s;
}
.week i.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.week i.gift { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); color: var(--gold); }
.week i.gift.on { background: var(--gold); border-color: var(--gold); color: var(--bg); }

/* Settings as rows: what it is on the left, the control on the right. */
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 10px 32px; padding: 26px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row:first-child { padding-top: 6px; }
.row > div > p { color: var(--muted); max-width: 60ch; }
.row .mark { margin-top: 8px; font-size: 14px; color: var(--muted); }
.row .mark.on { color: var(--accent); }
.hwid { margin-top: 12px; font: 600 17px var(--display); letter-spacing: .06em; color: var(--text) !important; }
.row form { margin-top: 14px; }
.copy { display: flex; gap: 8px; margin-top: 14px; }
.copy input { flex: 1; min-width: 0; font-size: 14.5px; }
.qr { width: 172px; padding: 10px; border-radius: 12px; background: #fff; margin-top: 14px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { letter-spacing: .12em; font-weight: 600; overflow-wrap: anywhere; color: var(--text); }
.triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.triple div { padding: 14px 16px; border-radius: 14px; background: var(--card); }
.triple b { display: block; font: 500 24px var(--display); }
.triple span { color: var(--muted); font-size: 13.5px; }
.steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; color: var(--muted); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font: 500 13px var(--display); color: var(--accent); border: 1px solid var(--line);
}

/* -------------------------------------------------------------------- admin */
.tools { display: grid; gap: 12px; grid-template-columns: minmax(220px, 380px) 1fr; align-items: center; margin-bottom: 14px; }
.tools .pick { border: 0; padding: 0; gap: 8px; justify-self: start; width: auto; }
.tools .pick button { border: 1px solid var(--line); background: var(--bg); }
.tools .pick button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.status { min-height: 1.6em; color: var(--accent); font-size: 15px; margin: 12px 0 8px; }
.status.is-error { color: var(--bad); }
.accounts, .sheet { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.accounts th, .sheet th { text-align: left; font-weight: 500; font-size: 13.5px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.accounts td, .sheet td { padding: 11px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: middle; font-size: 15px; }
.accounts tr:last-child td, .sheet tr:last-child td { border-bottom: 0; }
.accounts tbody tr { transition: background-color .15s; }
.accounts tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.who { font-weight: 600; }
.who small { font-weight: 500; font-size: 12.5px; color: var(--gold); margin-left: 8px; }
.person { display: flex; gap: 12px; align-items: center; }
.person span { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.code { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.state { display: inline-flex; align-items: center; gap: 8px; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .5; }
.state.is-on::before { background: var(--accent); opacity: 1; box-shadow: 0 0 10px var(--accent); }
.state.is-soon::before { background: var(--gold); opacity: 1; }
.state.is-over::before { background: var(--bad); opacity: 1; }
.acts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.accounts .seen { white-space: nowrap; }
.accounts .seen small { display: block; color: var(--muted); font-size: 13px; }
/* The orders' filter stands alone in its row, where the accounts have a search field beside theirs. */
.tools:has(> .pick:only-child) { grid-template-columns: 1fr; }
.acts .give { display: flex; gap: 6px; }
.cell input, .cell select { padding: 8px 10px; border-radius: 9px; min-width: 70px; font-size: 15px; }
.scroll { overflow-x: auto; }
.panel-tab > * + * { margin-top: 16px; }
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; }
.form .wide { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: 15px; cursor: pointer; min-height: 46px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 15px; margin: 4px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* The overview: three numbers that matter, the money by day, and who needs attention. */
.headline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.headline div { padding: 22px 24px; border-radius: var(--radius); background: var(--card); }
.headline div:first-child { background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000)); color: var(--accent-ink); }
.headline div:first-child span { color: inherit; opacity: .82; }
.headline b { display: block; font: 700 clamp(28px, 3.4vw, 44px)/1.1 var(--display); letter-spacing: -0.03em; }
.headline span { color: var(--muted); font-size: 14.5px; }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.split.roomy { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.sheet td:first-child input { min-width: 130px; }
.cell select { min-width: 112px; }
.bars { display: flex; align-items: end; gap: 6px; height: 150px; margin-top: 18px; }
.bars div { flex: 1; min-height: 3px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--accent) 22%, var(--card)); transition: background-color .2s; }
.bars div.has { background: var(--accent); }
.bars div:hover { background: var(--gold); }
.bars-foot { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 13px; }
.small-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.small-facts b { color: var(--text); font-weight: 600; }
.preview { position: sticky; top: 88px; }
.preview .wheel-box { width: min(300px, 100%); }

dialog {
  width: min(420px, calc(100vw - 32px)); padding: 26px; border-radius: 20px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line);
}
dialog.wide { width: min(560px, calc(100vw - 32px)); }
dialog[open] { animation: pop .22s cubic-bezier(.2, 0, 0, 1); }
dialog::backdrop { background: rgb(5 3 10 / .6); backdrop-filter: blur(6px); }
dialog form { display: grid; gap: 14px; }
dialog p { color: var(--muted); }
dialog .actions { justify-content: flex-end; margin-top: 6px; }

@media (max-width: 980px) {
  .tools, .overview, .split { grid-template-columns: minmax(0, 1fr); }
  .top nav a:not(.keep) { display: none; }
  .gate { grid-template-columns: 1fr; }
  .gate-form { border-right: 0; }
  .gate-art { display: none; }
  .preview { position: static; }
}
@media (max-width: 760px) {
  .profile { grid-template-columns: auto minmax(0, 1fr); }
  .count { grid-column: 1 / -1; text-align: left; }
  .row { grid-template-columns: 1fr; padding: 22px 0; }
  .headline, .triple { grid-template-columns: 1fr; }
  /* A table is several columns wide; a phone is one. Each row becomes its own block. */
  .accounts, .accounts tbody, .accounts tr, .accounts td, .sheet, .sheet tbody, .sheet tr, .sheet td { display: block; }
  .accounts thead, .sheet thead { display: none; }
  .accounts tr, .sheet tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .accounts tr:last-child, .sheet tr:last-child { border-bottom: 0; }
  .accounts td, .sheet td { padding: 4px 0; border: 0; }
  .accounts td[data-label]::before, .sheet td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 14px; }
  .acts { margin-top: 8px; }
  .list li { grid-template-columns: 1fr; gap: 2px; }
  .card .products .product, .card .products:has(> :nth-child(5)) .product { flex-basis: 40%; max-width: none; aspect-ratio: auto; row-gap: 10px; }
  .about-facts { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 16px; }
}
