@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Figtree:wght@400;500;600&display=swap');

:root {
  --ink: #14213D;
  --sun: #FFC72C;
  --paper: #FBFAF6;
  --line: #E0DBCB;
  --muted: #566074;
  --red: #C8102E;
  --ok: #1F7A70;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
h1, h2, h3 { font-family: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 800; }
a { color: var(--ink); }

.bar { background: var(--ink); color: #fff; padding: 14px 20px; }
.bar b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: var(--sun); font-size: 19px; }
.bar span { color: #C9D0E0; font-size: 14px; margin-left: 10px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.muted { color: var(--muted); }

button, .btn {
  font: 600 17px 'Figtree', sans-serif; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--sun); color: var(--ink); padding: 14px 26px; text-decoration: none; display: inline-block;
}
button:hover:not(:disabled) { background: #FFD25A; }
button:disabled { background: #E7E2D3; color: #8B8776; cursor: not-allowed; }
button.quiet { background: transparent; border: 1.5px solid var(--ink); padding: 8px 14px; font-size: 14px; }
button.quiet:hover:not(:disabled) { background: #EFEBDD; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

input, select {
  font: 400 16px 'Figtree', sans-serif; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%;
}
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }

/* ----- Spin page ----- */
.spin-grid { display: grid; gap: 34px; margin-top: 26px; align-items: center; }
@media (min-width: 820px) { .spin-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.wheel-box { position: relative; width: min(92vw, 460px); aspect-ratio: 1; margin: 0 auto; }
.wheel-box canvas { width: 100%; height: 100%; display: block; }
.pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 34px solid var(--ink); filter: drop-shadow(0 2px 0 var(--sun));
}
.stats { display: flex; gap: 28px; margin: 22px 0; }
.stat b { display: block; font: 800 40px 'Bricolage Grotesque', sans-serif; line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; }
.banner { min-height: 54px; font: 800 26px 'Bricolage Grotesque', sans-serif; margin: 6px 0 18px; }
.banner.err { color: var(--red); font: 600 16px 'Figtree', sans-serif; }
.history { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.history li { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.history li.big { background: var(--sun); border-color: var(--sun); }

/* ----- Admin ----- */
.panel { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 22px; margin-top: 22px; }
.row { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 14px; }
@media (min-width: 720px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 2fr 1fr 1.2fr; } }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #EEF6F4; border: 1.5px solid #BFDCD6; }
.notice.warn { background: #FFF6DB; border-color: #F2D88A; }
.notice.bad { background: #FDECEE; border-color: #F2B8BF; }
.notice code { word-break: break-all; font-size: 14px; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
th { font-weight: 600; color: var(--muted); }
.tag { border-radius: 999px; padding: 2px 11px; font-size: 13px; font-weight: 600; background: #EFEBDD; }
.tag.done { background: #D7EEE9; color: #14574F; }
.tag.going { background: #FFF0BF; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
