/* style.css — interface shell. Board-specific styles are at the bottom. */

:root {
  --bg: #f5efe3;
  --surface: #fffdf8;
  --surface-2: #efe7d8;
  --ink: #221d16;
  --ink-2: #6f6557;
  --line: #e2d8c6;
  --board: #e9dfcc;
  --cell: #fbf7ee;
  --wall: #3b342a;
  --good: #2faa5e;
  --meh: #f2b705;
  --bad: #e5484d;
  --dead: #2a2622;
  --gold: #f2b705;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(70, 50, 20, 0.14);
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130e; --surface: #221e17; --surface-2: #2c271e; --ink: #f4eee1; --ink-2: #a89d8a;
    --line: #3a3428; --board: #29241b; --cell: #352f24; --wall: #0b0a07; --dead: #000;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16130e; --surface: #221e17; --surface-2: #2c271e; --ink: #f4eee1; --ink-2: #a89d8a;
  --line: #3a3428; --board: #29241b; --cell: #352f24; --wall: #0b0a07; --dead: #000;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

#app {
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* ---- header ---- */
.top { display: grid; grid-template-columns: 88px 1fr 88px; align-items: center; height: 54px; }
.top-left { display: flex; gap: 4px; }
.top-right { display: flex; gap: 4px; justify-content: flex-end; }
.logo { text-align: center; font-size: 26px; font-weight: 900; letter-spacing: -0.5px; user-select: none; }
.logo span { display: inline-block; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; font-weight: 800; color: var(--ink);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.streak-chip {
  display: inline-flex; align-items: center; gap: 3px; height: 40px; padding: 0 8px; border-radius: 12px;
  font-weight: 800; font-size: 15px;
}
.streak-chip:hover { background: var(--surface-2); }
.streak-chip.cold { color: var(--ink-2); filter: grayscale(1); }

/* ---- tabs ---- */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; }
.tab { height: 34px; border-radius: 10px; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.tab .lock { font-size: 11px; margin-left: 2px; opacity: 0.7; }

main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-top: 10px; }

/* ---- play view ---- */
.meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.meta-title { font-weight: 900; font-size: 17px; white-space: nowrap; }
.meta-sub { color: var(--ink-2); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-left > div { min-width: 0; }
.chips { flex: none; }
.chips { display: flex; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 99px;
  background: var(--surface); border: 1.5px solid var(--line); font-weight: 800; font-size: 13px; white-space: nowrap;
}
.chip b { font-weight: 900; }
.chip.warn { border-color: var(--bad); color: var(--bad); }
.chip.mode { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.board-wrap { flex: 1; display: grid; place-items: center; min-height: 0; padding: 10px 0; }

/* graded move strip */
.strip { display: flex; justify-content: center; gap: 5px; min-height: 26px; flex-wrap: wrap; padding: 2px 0 6px; }
.pip {
  width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); border: 1.5px solid var(--line);
  transition: transform 0.18s, background 0.18s;
}
.pip.par-edge { margin-right: 7px; position: relative; }
.pip.par-edge::after { content: ""; position: absolute; right: -8px; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--ink-2); opacity: 0.5; }
.pip.g { background: var(--good); border-color: var(--good); }
.pip.a { background: var(--meh); border-color: var(--meh); }
.pip.r { background: var(--bad); border-color: var(--bad); }
.pip.x { background: var(--dead); border-color: var(--dead); }
.pip.pop { animation: pip-pop 0.32s ease; }
@keyframes pip-pop { 40% { transform: scale(1.35); } }

.hintline { text-align: center; min-height: 22px; color: var(--ink-2); font-weight: 700; font-size: 14px; }

.actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding-top: 6px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 14px; font-weight: 900; font-size: 15px; background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); text-decoration: none; transition: transform 0.08s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.plus { background: linear-gradient(135deg, #ffd84a, #f59f00); color: #2a1c00; border-color: transparent; }
.btn.small { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.linkish { color: var(--ink-2); font-weight: 800; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---- result card ---- */
.result {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 12px; text-align: center; box-shadow: var(--shadow); margin-top: 4px;
  animation: rise 0.35s ease;
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.result h3 { font-size: 22px; font-weight: 900; }
.result .sub { color: var(--ink-2); font-weight: 700; font-size: 14px; margin-top: 2px; }
.stars { font-size: 30px; letter-spacing: 3px; line-height: 1.2; }
.stars .off { opacity: 0.22; }
.stars span { display: inline-block; animation: star-in 0.4s backwards; }
@keyframes star-in { from { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25); } }
.result .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.next-in { color: var(--ink-2); font-weight: 700; font-size: 13px; text-align: center; }
.next-in b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 15, 8, 0); transition: background 0.18s; padding: 0;
}
.modal-backdrop.open { background: rgba(20, 15, 8, 0.5); }
.modal-card {
  width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(30px); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
}
.modal-backdrop.open .modal-card { transform: none; opacity: 1; }
@media (min-width: 560px) {
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal-card { border-radius: 24px; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; position: sticky; top: -8px; background: var(--bg); z-index: 1; margin: 0 -4px; padding: 4px; }
.modal-head h2 { font-size: 20px; font-weight: 900; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-body p { color: var(--ink); }
.modal-body .muted { color: var(--ink-2); font-size: 14px; }
.modal-body h3 { font-size: 15px; font-weight: 900; margin-top: 4px; }

.card { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px; }
.rows { display: flex; flex-direction: column; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1.5px solid var(--line); font-weight: 800; }
.setting:last-child { border-bottom: 0; }
.setting small { display: block; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 99px; background: var(--line); flex: none; transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--good); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { height: 30px; padding: 0 10px; border-radius: 8px; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
input.text, textarea.text {
  width: 100%; height: 46px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface);
  padding: 0 12px; font: inherit; font-weight: 700; color: var(--ink);
}
textarea.text { height: 84px; padding: 10px 12px; resize: none; font-size: 13px; font-family: ui-monospace, monospace; }

/* stats */
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stat b { display: block; font-size: 26px; font-weight: 900; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.bars { display: flex; flex-direction: column; gap: 5px; }
.bar { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; }
.bar span { white-space: nowrap; }
.bar i { display: block; height: 20px; min-width: 22px; border-radius: 6px; background: var(--ink-2); color: var(--bg); font-style: normal; text-align: right; padding: 0 6px; line-height: 20px; }
.bar.me i { background: var(--good); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; font-weight: 900; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 800; color: var(--ink-2); padding-bottom: 2px; }
.day {
  aspect-ratio: 1; border-radius: 11px; background: var(--surface); border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; font-size: 14px;
  position: relative; line-height: 1;
}
.day small { font-size: 9px; letter-spacing: -0.5px; margin-top: 3px; color: var(--gold); }
.day.future, .day.pre { opacity: 0.3; pointer-events: none; }
.day.today { border-color: var(--ink); }
.day.win { background: color-mix(in srgb, var(--good) 16%, var(--surface)); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.day.perfect { background: color-mix(in srgb, var(--gold) 28%, var(--surface)); border-color: var(--gold); }
.day.fail { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.day.frozen::after { content: "🧊"; position: absolute; top: -6px; right: -4px; font-size: 12px; }
.day .lockmark { position: absolute; bottom: 2px; right: 3px; font-size: 9px; opacity: 0.6; }

/* lists and misc */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.diff-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.diff-pick button { height: 54px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); font-weight: 900; font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.diff-pick button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.diff-pick small { font-size: 10px; font-weight: 700; opacity: 0.7; }
.center { text-align: center; }
.big-emoji { font-size: 44px; line-height: 1; text-align: center; }
.perk { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start; font-weight: 700; }
.perk b { font-weight: 900; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price { border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 12px 10px; text-align: center; position: relative; }
.price.best { border-color: var(--gold); }
.price .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #2a1c00; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.price b { display: block; font-size: 22px; font-weight: 900; }
.price span { font-size: 12px; color: var(--ink-2); font-weight: 700; }

#toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -80px); z-index: 80;
  background: var(--ink); color: var(--bg); font-weight: 800; font-size: 14px; padding: 10px 16px; border-radius: 99px;
  transition: transform 0.25s ease; pointer-events: none; max-width: 90vw; text-align: center; box-shadow: var(--shadow);
}
#toast.show { transform: translate(-50%, 0); }
canvas.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

.scroll { overflow: auto; flex: 1; min-height: 0; padding-bottom: 12px; display: flex; flex-direction: column; gap: 12px; }
.section-title { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-2); }
.foot { text-align: center; color: var(--ink-2); font-size: 12px; font-weight: 700; padding-top: 8px; }
.foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- additions: play header, coach, duel, stats, creator, Plus ---- */
.meta-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.back { height: 30px; padding: 0 10px; border-radius: 99px; background: var(--surface-2); font-weight: 800; font-size: 13px; white-space: nowrap; }
.stars { color: var(--gold); text-align: center; }
.result-body { display: flex; flex-direction: column; gap: 10px; }
.result-body .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.result-body .row .btn { flex: 1; padding: 0 10px; font-size: 14px; white-space: nowrap; }
.result-body .strip { padding: 0; }
.earned { font-weight: 800; font-size: 14px; }
.pip.now { outline: 3px solid var(--ink); outline-offset: 1px; }
.duel { display: flex; flex-direction: column; gap: 6px; }
.duel-row { display: grid; grid-template-columns: 76px 1fr 28px; align-items: center; gap: 6px; font-size: 14px; }
.duel-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-row .strip { justify-content: flex-start; gap: 3px; min-height: 0; }
.duel-row .pip { width: 15px; height: 15px; border-radius: 4px; }
.duel-row span:last-child { font-weight: 900; text-align: right; }
.legends { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.legend { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.rank-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; }
.progress { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd84a, #f59f00); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wk { border-radius: 11px; background: var(--surface); border: 2px solid var(--line); text-align: center; padding: 5px 0 6px; line-height: 1.15; }
.wk small { display: block; font-size: 10px; font-weight: 800; color: var(--ink-2); }
.wk b { font-size: 16px; font-weight: 900; }
.wk.today { border-color: var(--ink); }
.wk.win { background: color-mix(in srgb, var(--good) 16%, var(--surface)); }
.wk.perfect { background: color-mix(in srgb, var(--gold) 30%, var(--surface)); border-color: var(--gold); }
.wk.fail { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.chip.dim { opacity: 0.45; }
.perks { display: flex; flex-direction: column; gap: 10px; }
.price-row { grid-template-columns: repeat(3, 1fr); }
.price { text-decoration: none; color: var(--ink); display: block; }
.price em { display: block; font-style: normal; font-size: 11px; font-weight: 800; color: var(--good); margin-top: 2px; }
.key-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
input.text.short { width: 122px; height: 38px; text-align: center; }
.install { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.day.preseason { border-style: dashed; }
.diff-pick { grid-template-columns: repeat(7, 1fr); gap: 4px; }
.diff-pick button { height: 50px; border-radius: 12px; font-size: 12px; }
.diff-pick small { font-size: 9px; }
#btn-plus { color: var(--ink-2); }
#btn-plus.on { color: var(--gold); }
.tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tool { width: 52px; padding: 5px 0 4px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tool[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.tool small { font-size: 9px; font-weight: 800; color: var(--ink-2); }
.ed-board-wrap { display: grid; place-items: center; height: min(92vw, 400px); }
#ed-status { font-size: 14px; }
#ed-status.ok { color: var(--good); }
.embed .tabs, .embed #btn-plus { display: none; }
a.btn { text-decoration: none; }
a.linkish.center { display: block; text-align: center; }

/* ---- the board ---- */
.board-wrap { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.board { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: calc(var(--sz, 48px) * 0.22); background: var(--board); box-shadow: var(--shadow), 0 0 0 6px var(--board); }
.board.editable { cursor: pointer; touch-action: manipulation; }
.board .grid { position: absolute; inset: 0; display: grid; }
.board .cell { position: relative; margin: 2.5px; border-radius: calc(var(--sz, 48px) * 0.17); background: var(--cell); overflow: hidden; }
.board .cell.wall { background: var(--wall); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.28), inset 0 3px 0 rgba(255, 255, 255, 0.08); }
.board .paint { position: absolute; inset: 0; opacity: 0.42; transition: background 0.16s; }
.board .cell.target .paint { opacity: 1; inset: 13%; border-radius: 50%; transform: scale(0); transition: transform 0.2s cubic-bezier(.3, 1.6, .6, 1), background 0.16s; }
.board .cell.target.painted .paint { transform: scale(1); }
.board .ring { position: absolute; inset: 7%; border-radius: 50%; border: calc(var(--sz, 48px) * 0.085) dashed var(--want); }
.board .cell[data-st="ok"] .ring { border-style: solid; }
.board .cell[data-st="bad"] .ring { border-style: solid; border-color: var(--dead); }
.board .cell[data-st="bad"] .paint { filter: saturate(0.35) brightness(0.8); }
.board .badge { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: calc(var(--sz, 48px) * 0.42); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); pointer-events: none; }
.board .cell.pop .ring { animation: ring-pop 0.4s ease; }
@keyframes ring-pop { 35% { transform: scale(1.22); } }
.board .want { position: absolute; left: 6%; top: 3%; font-size: calc(var(--sz, 48px) * 0.2); font-weight: 900; color: var(--ink); letter-spacing: -1px; display: none; z-index: 1; }
.board.symbols .want { display: block; }

.board .blobs, .board .ghosts, .board .marks { position: absolute; inset: 0; pointer-events: none; }
.board .blob, .board .ghost, .board .dot { position: absolute; left: 0; top: 0; width: var(--sz, 48px); height: var(--sz, 48px); }
.board .blob::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: var(--c); box-shadow: inset 0 calc(var(--sz, 48px) * -0.07) 0 rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.28); }
.board .blob .shine { position: absolute; left: 30%; top: 26%; width: 17%; height: 12%; border-radius: 50%; background: rgba(255, 255, 255, 0.75); transform: rotate(-28deg); }
.board .blob .sym { position: absolute; inset: 0; display: none; place-items: center; font-size: calc(var(--sz, 48px) * 0.3); color: #fff; font-weight: 900; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.board.symbols .blob .sym { display: grid; }
.board .blob.squash-x::before { animation: squash-x 0.22s ease-out; }
.board .blob.squash-y::before { animation: squash-y 0.22s ease-out; }
@keyframes squash-x { 30% { transform: scale(0.8, 1.16); } }
@keyframes squash-y { 30% { transform: scale(1.16, 0.8); } }
.board .ghost::before { content: ""; position: absolute; inset: 16%; border-radius: 50%; border: 3px dashed var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.board .dot { background: none !important; }
.board .dot::before { content: ""; position: absolute; inset: 41%; border-radius: 50%; background: var(--ink); opacity: 0.4; }
.board.locked { filter: none; }

.board .mark { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; color: #fff; background: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.board .mark.dir-U { left: calc(50% - 17px); top: -14px; }
.board .mark.dir-D { left: calc(50% - 17px); bottom: -14px; }
.board .mark.dir-L { top: calc(50% - 17px); left: -14px; }
.board .mark.dir-R { top: calc(50% - 17px); right: -14px; }
.board .mark.best { background: var(--good); animation: mark-pulse 0.9s ease-in-out infinite; }
.board .mark.played.g { background: var(--good); }
.board .mark.played.a { background: var(--meh); color: #2a1c00; }
.board .mark.played.r { background: var(--bad); }
.board .mark.played.x { background: var(--dead); }
@keyframes mark-pulse { 50% { transform: scale(1.22); } }

/* logo, help figure, editor swatches */
.logo { display: flex; align-items: center; justify-content: center; gap: 7px; }
.logo-dots { display: inline-flex; }
.logo-dots i { width: 13px; height: 13px; border-radius: 50%; margin-left: -4px; box-shadow: 0 0 0 2px var(--bg); }
.logo-dots i:first-child { margin-left: 0; }
.mixes { display: flex; justify-content: space-between; gap: 4px; }
.mix { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; font-size: 14px; }
.mixdot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9px; color: #fff; letter-spacing: -1px; }
.swatch { width: 26px; height: 26px; display: grid; place-items: center; font-size: 9px; font-weight: 900; color: #fff; letter-spacing: -1px; }
.sw-blob { border-radius: 50%; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.sw-tile { border-radius: 50%; border: 4px dashed var(--c); color: var(--ink); }
.sw-wall { border-radius: 6px; background: var(--wall); }
.sw-erase, .sw-size { color: var(--ink); font-size: 18px; }

.muted { color: var(--ink-2); font-size: 14px; }
.view p.muted { margin-top: 2px; }

.board .omen { position: absolute; left: 0; top: 0; width: var(--sz, 48px); height: var(--sz, 48px); display: grid; place-items: center; font-weight: 900; font-size: calc(var(--sz, 48px) * 0.5); z-index: 3; }
.board .omen.ok { color: var(--good); text-shadow: 0 0 6px var(--cell); }
.board .omen.bad { color: #fff; }
.board .omen.bad::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: var(--bad); z-index: -1; animation: mark-pulse 0.7s ease-in-out infinite; }

.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.modal-body .row { display: flex; gap: 8px; }
.modal-body .row .btn { flex: 1; }
