/* Dartpick — visual system
   Colours come from the dartboard itself: baize/board green, sisal, treble red, double green, brass wire.
   Type: Unbounded (the DARTPICK wordmark's face) for headings and scoreboard figures; Barlow for everything else. */

@font-face { font-family: 'Unbounded'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/unbounded-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Unbounded'; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/unbounded-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/unbounded-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #0f2a20;
  --bg-2: #143628;
  --panel: #0b211a;
  --ink: #efe6cf;
  --ink-2: #b9b39f;
  --ink-3: #85826f;
  --red: #d7263d;
  --green: #22a35c;
  --wire: #d4af37;
  --accent: var(--wire);
  --line: rgba(239, 230, 207, 0.14);
  --line-strong: rgba(239, 230, 207, 0.28);
  --good: #3fbf73;
  --bad: #ef5a6a;
  --radius-s: 4px;
  --radius-m: 10px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  --display: 'Unbounded', 'Arial Black', sans-serif;
  --ui: 'Barlow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --bg-image: none;
  --bg-dim: 0.75;
  color-scheme: dark;
}

[data-theme='chalk'] {
  --bg: #2a312e; --bg-2: #323b37; --panel: #232926; --ink: #f2f2ec; --ink-2: #c4c7bf; --ink-3: #8f948b;
  --red: #ff6b6b; --green: #7bd88f; --wire: #f2d06b; --line: rgba(242, 242, 236, 0.16); --line-strong: rgba(242, 242, 236, 0.32);
}
[data-theme='treble'] {
  --bg: #1d1414; --bg-2: #271a1a; --panel: #160f0f; --ink: #f4ead8; --ink-2: #c6b8a6; --ink-3: #8f8273;
  --red: #e5383b; --green: #2fae66; --wire: #e5383b; --line: rgba(244, 234, 216, 0.14); --line-strong: rgba(244, 234, 216, 0.3);
}
[data-theme='sisal'] {
  --bg: #e6d9bb; --bg-2: #ddcfae; --panel: #f3ead6; --ink: #1d1a16; --ink-2: #4c463b; --ink-3: #776f60;
  --red: #b5142b; --green: #0f7a3e; --wire: #8a6a12; --line: rgba(29, 26, 22, 0.16); --line-strong: rgba(29, 26, 22, 0.32);
  --good: #0f7a3e; --bad: #b5142b; --shadow: 0 1px 0 rgba(0, 0, 0, 0.12); color-scheme: light;
}
[data-theme='floodlight'] {
  --bg: #17133a; --bg-2: #201b4d; --panel: #110e2c; --ink: #f1eeff; --ink-2: #bdb6e6; --ink-3: #8a83b8;
  --red: #ff4f8b; --green: #33d6b0; --wire: #ffc94d; --line: rgba(241, 238, 255, 0.14); --line-strong: rgba(241, 238, 255, 0.3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.5 var(--body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(0,0,0,var(--bg-dim)), rgba(0,0,0,var(--bg-dim))), var(--bg-image);
  background-size: cover; background-position: center;
  display: var(--bg-display, none);
}
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .875rem; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
td.num, .kv .num { font-family: var(--ui); font-weight: 600; }
.kv .num { font-family: var(--display); }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .6rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand .mark { height: 32px; width: 32px; color: var(--ink); display: block; flex: none; overflow: visible; }
.brand .wordmark { height: 19px; width: auto; color: var(--ink); display: block; }
.brand img { height: 34px; width: auto; }
.brand span.site-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; gap: .25rem; flex: 1; }
.nav a {
  text-decoration: none; padding: .4rem .7rem; border-radius: var(--radius-s);
  font-family: var(--ui); font-weight: 600; font-size: .98rem; color: var(--ink-2);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current='page'] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.userbox { display: flex; align-items: center; gap: .6rem; }

main { max-width: 1180px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem); padding-bottom: 6rem; }
.announcement { background: var(--red); color: #fff; padding: .5rem 1rem; text-align: center; font-weight: 600; }

.mobile-nav { display: none; }
@media (max-width: 820px) {
  .nav { display: none; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--panel); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a { text-align: center; padding: .55rem 0 .5rem; text-decoration: none; font-family: var(--ui); font-weight: 600; color: var(--ink-2); font-size: .88rem; }
  .mobile-nav a[aria-current='page'] { color: var(--ink); box-shadow: inset 0 2px 0 var(--red); }
  .topbar { gap: .75rem; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: var(--radius-s); border: 1px solid var(--line-strong);
  background: transparent; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn.small { padding: .3rem .6rem; font-size: .875rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

label.field { display: grid; gap: .3rem; margin-bottom: .9rem; font-weight: 600; font-size: .95rem; }
label.field span.hint { font-weight: 400; color: var(--ink-3); font-size: .85rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: .55rem .7rem; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--panel);
}
textarea { min-height: 5rem; resize: vertical; }
.inline { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; }
.inline > * { margin-bottom: 0; }

.tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin: 0 0 1.25rem; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; padding: .5rem .8rem; cursor: pointer;
  font-family: var(--ui); font-weight: 600; font-size: 1rem; color: var(--ink-2);
}
.tabs button[aria-selected='true'] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }

.toast {
  position: fixed; left: 50%; bottom: 5rem; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: var(--radius-s);
  font-weight: 600; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.toast.error { background: var(--bad); color: #fff; }

.section { margin: 0 0 2.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.section-head h2 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 2rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.1rem 1.2rem; }
.panel + .panel { margin-top: 1rem; }

/* ---------- avatars & flags ---------- */
.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  font-family: var(--ui); font-weight: 700; font-size: calc(var(--size) * .38); color: var(--ink-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { --size: 28px; }
.avatar.lg { --size: 72px; }
.flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; vertical-align: -2px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }

/* ---------- the scoreboard strip (signature element) ---------- */
.board { display: grid; gap: .75rem; }
.match {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.match-meta {
  display: flex; justify-content: space-between; gap: .5rem; align-items: center;
  padding: .45rem .9rem; font-size: .85rem; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.match-meta .state { font-weight: 600; }
.match-meta .state.live { color: var(--red); }
.match-meta .state.live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: .35rem; vertical-align: 1px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .match-meta .state.live::before { animation: none; } }

.row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .75rem;
  padding: .55rem .9rem; width: 100%; text-align: left; background: none; border: 0;
  border-left: 4px solid transparent;
}
.row + .row { border-top: 1px solid var(--line); }
button.row { cursor: pointer; }
button.row:hover:not(:disabled) { background: var(--bg-2); }
button.row:disabled { cursor: default; }
.row.picked { border-left-color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.row.winner .pname { font-weight: 700; }
.row.loser { color: var(--ink-2); }
.pname { display: flex; align-items: center; gap: .5rem; min-width: 0; font-family: var(--ui); font-weight: 600; font-size: 1.12rem; line-height: 1.2; }
.pname .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seed { font-family: var(--ui); font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.pavg { font-family: var(--ui); font-weight: 500; color: var(--ink-2); font-size: .95rem; font-variant-numeric: tabular-nums; min-width: 3.4rem; text-align: right; }
.sets {
  font-family: var(--display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums;
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border: 1px solid var(--wire); border-radius: var(--radius-s); color: var(--ink);
}
.row.winner .sets { background: var(--wire); color: var(--panel); }
.sets.empty { border-style: dashed; border-color: var(--line-strong); color: var(--ink-3); }

.legs { display: flex; gap: .35rem; flex-wrap: wrap; padding: .1rem .9rem .55rem; font-family: var(--ui); font-weight: 500; font-size: .95rem; color: var(--ink-2); }
.legs span { padding: 0 .35rem; border: 1px solid var(--line); border-radius: 3px; font-variant-numeric: tabular-nums; }

.pick-panel { padding: .75rem .9rem .9rem; border-top: 1px solid var(--line); display: grid; gap: .8rem; }
.pick-label { font-size: .875rem; color: var(--ink-2); margin-bottom: .35rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
  padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  cursor: pointer; font-family: var(--ui); font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums;
}
.chip:hover:not(:disabled) { border-color: var(--ink-2); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.chip.correct { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.chip.wrong[aria-pressed='true'] { background: transparent; color: var(--ink-2); text-decoration: line-through; border-color: var(--bad); }
.chip:disabled { cursor: default; }
.market-q { font-weight: 600; margin-bottom: .35rem; }
.market-tag { font-size: .8rem; color: var(--wire); font-weight: 600; margin-right: .4rem; }

.points {
  font-family: var(--display); font-weight: 600; font-size: .82rem;
  padding: .1rem .5rem; border-radius: var(--radius-s); background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--ink);
}
.points.zero { background: var(--bg-2); color: var(--ink-3); }

/* pick distribution meter */
.meter { display: grid; gap: .3rem; }
.meter-row { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr 3rem; gap: .6rem; align-items: center; font-size: .9rem; }
.meter-row .bar { height: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.meter-row .bar i { display: block; height: 100%; background: var(--wire); border-radius: 4px; }
.meter-row .pct { text-align: right; font-family: var(--ui); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.meter-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.day-head { display: flex; align-items: baseline; gap: .75rem; margin: 1.6rem 0 .6rem; }
.day-head h3 { margin: 0; font-size: 1.4rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; margin: .5rem 0 2rem; }
.hero h1 { margin-bottom: .3rem; }
.hero .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; margin: 0; }
.countdown { text-align: right; }
.countdown .num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; line-height: 1; display: block; letter-spacing: -.02em; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; } .countdown { text-align: left; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--ink-2); font-size: .875rem; white-space: nowrap; }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--ink); }
td.r, th.r { text-align: right; }
td.rank { font-family: var(--display); font-weight: 600; font-size: .95rem; width: 3rem; }
tr.me td { background: color-mix(in srgb, var(--wire) 10%, transparent); }
.who { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.who b { font-weight: 600; }
td.pts { font-family: var(--display); font-weight: 600; font-size: 1rem; text-align: right; }
.inline-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--wire); vertical-align: middle; margin-left: .5rem; }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin-bottom: 2rem; }
.tile { background: var(--panel); padding: .9rem 1rem; }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile .num { font-size: 1.6rem; font-weight: 600; line-height: 1.1; display: block; margin-bottom: .2rem; }
.tile .small { color: var(--ink-2); }

/* ---------- bracket (a real tree: slots share each column's height, so every match centres between its feeders) ---------- */
.segs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; }
.seg { padding: .35rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.seg.on { background: var(--ink); color: var(--panel); }
.tabs a { padding: .5rem .8rem; text-decoration: none; font-family: var(--ui); font-weight: 600; color: var(--ink-2); }
.tabs a[aria-current='page'] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
.bk-scroll { overflow-x: auto; padding: .25rem 0 1.5rem; margin: 0 calc(-1 * clamp(1rem, 3vw, 2rem)); padding-inline: clamp(1rem, 3vw, 2rem); }
.bk { --gap: 30px; --w: 198px; --slot: 72px; --link: var(--line-strong); display: flex; gap: var(--gap); width: max-content; }
.bk.compact { --gap: 22px; --w: 150px; --slot: 60px; }
.bk-scroll.wide { width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0; padding-inline: clamp(1rem, 3vw, 2rem); }
.bk-scroll.wide .bk { margin: 0 auto; }
.bk-col { width: var(--w); flex: none; display: flex; flex-direction: column; }
.bk-head { height: 2.6rem; font-family: var(--display); font-weight: 600; font-size: .78rem; display: flex; flex-direction: column; gap: 2px; }
.bk-head span { font-family: var(--ui); font-weight: 500; font-size: .78rem; color: var(--ink-3); }
.bk-slots { flex: 1; display: flex; flex-direction: column; }
.bk-slot { flex: 1 1 0; min-height: var(--slot); display: flex; align-items: center; position: relative; }
/* outbound: a stub to the right, then half of the bracket's vertical bar (top match goes down, bottom match goes up) */
.bk-col.out .bk-slot::after { content: ''; position: absolute; left: 100%; width: calc(var(--gap) / 2); top: 50%; border-top: 1.5px solid var(--link); }
.bk-col.out .bk-slot::before { content: ''; position: absolute; left: calc(100% + var(--gap) / 2 - .75px); border-left: 1.5px solid var(--link); height: 50%; }
.bk-col.out .bk-slot:nth-child(odd)::before { top: 50%; }
.bk-col.out .bk-slot:nth-child(even)::before { top: 0; }
.bk-champ-col .bk-slot::before, .bk-final .bk-slot::before { display: none; }
/* inbound: the stub from the bar into this match */
.bk-col.in .bk-box::before { content: ''; position: absolute; right: 100%; width: calc(var(--gap) / 2); top: 50%; border-top: 1.5px solid var(--link); }
/* the final in the full draw is fed from both sides */
.bk-final.both .bk-box::after { content: ''; position: absolute; left: 100%; width: calc(var(--gap) / 2); top: 50%; border-top: 1.5px solid var(--link); }
/* the other half of the full draw runs right to left */
.bk-col.mirror.out .bk-slot::after { left: auto; right: 100%; }
.bk-col.mirror.out .bk-slot::before { left: auto; right: calc(100% + var(--gap) / 2 - .75px); }
.bk-col.mirror.in .bk-box::before { right: auto; left: 100%; }
/* the champion column only needs the stub in; the final's own column (one match) needs no bar */
.bk-col.out .bk-slot:only-child::before { display: none; }
.bk-box { position: relative; display: block; width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-s); text-decoration: none; overflow: visible; }
a.bk-box:hover { border-color: var(--ink-2); }
.bk-box.tbd { height: calc(var(--slot) - 14px); border-style: dashed; background: transparent; }
.bk-box.live { border-color: var(--red); }
.bk-live { position: absolute; top: -.55rem; right: .4rem; background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; padding: 0 .35rem; border-radius: 3px; }
.bk-p { display: flex; align-items: center; gap: .4rem; padding: .3rem .5rem; font-size: .9rem; border-left: 3px solid transparent; min-width: 0; }
.bk-p + .bk-p { border-top: 1px solid var(--line); }
.bk-p .bk-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-p .seed { font-size: .72rem; }
.bk-p .bk-s { font-family: var(--display); font-weight: 600; font-size: .82rem; min-width: 1ch; text-align: right; }
.bk-p.w { font-weight: 700; }
.bk-p.w .bk-s { color: var(--wire); }
.bk-p.l { color: var(--ink-3); }
.bk-p.tbd { color: var(--ink-3); }
.bk-p.mine { border-left-color: var(--green); }
.bk.compact .bk-p { padding: .18rem .4rem; font-size: .8rem; gap: .3rem; }
.bk.compact .flag { width: 16px; height: 11px; }
.bk-champ { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border-color: var(--wire); font-weight: 700; }
.match.focus { outline: 2px solid var(--wire); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .match.focus { transition: outline-color 1.5s; } }

/* ---------- leagues ---------- */
.league-list { display: grid; gap: .6rem; }
.league-item { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); text-decoration: none; }
.league-item:hover { border-color: var(--line-strong); }
.league-item .grow { flex: 1; min-width: 0; }
.league-item h3 { margin: 0; }
.code { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: .12em; }

/* ---------- support / ko-fi ---------- */
.goal { display: grid; gap: .4rem; }
.goal-bar { height: 14px; background: var(--bg-2); border-radius: 7px; overflow: hidden; }
.goal-bar i { display: block; height: 100%; background: var(--red); border-radius: 7px; }
.goal .num { font-size: 1.3rem; font-weight: 600; }

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 2rem auto; }

/* ---------- theme swatches ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.swatch { border: 2px solid var(--line); border-radius: var(--radius-m); padding: .6rem; cursor: pointer; background: none; text-align: left; }
.swatch[aria-pressed='true'] { border-color: var(--accent); }
.swatch .dots { display: flex; gap: 4px; margin-bottom: .4rem; }
.swatch .dots i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }

/* ---------- admin ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; font-size: .92rem; }
.log { font-size: .82rem; max-height: 360px; overflow: auto; }
.log div { padding: .3rem 0; border-bottom: 1px solid var(--line); }
.ok { color: var(--good); } .err { color: var(--bad); }
details.edit summary { cursor: pointer; color: var(--ink-2); font-size: .9rem; padding: .35rem 0; }
.empty-state { padding: 2rem; text-align: center; color: var(--ink-2); border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }

footer.site-foot { max-width: 1180px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 6rem; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--line); }
footer.site-foot a { color: var(--ink-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
