/* ---------- fonts (self-hosted latin subsets; 和文はシステムフォント) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/archivo-var.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20A0-20CF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-500.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20A0-20CF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-600.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20A0-20CF;
}

/* ---------- design tokens ---------- */
:root {
  color-scheme: light;
  --board: #f4f5f7;
  --board-dot: #d7dae1;
  --surface: #ffffff;
  --ink: #171a21;
  --ink-2: #555b69;
  --muted: #8a90a0;
  --line: #e3e5eb;
  --accent: #2b5be2;
  --on-accent: #ffffff;
  --accent-soft: rgba(43, 91, 226, 0.09);
  --scrim: rgba(23, 26, 33, 0.35);
  --shadow: 0 12px 40px rgba(23, 26, 33, 0.14);
  --sans-jp: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  --display: "Archivo", var(--sans-jp);
  --mono: "IBM Plex Mono", ui-monospace, var(--sans-jp);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --board: #101216;
    --board-dot: #23262e;
    --surface: #181b21;
    --ink: #f2f3f7;
    --ink-2: #a9afbd;
    --muted: #6e7482;
    --line: #262a33;
    --accent: #6b8bff;
    --on-accent: #0d1220;
    --accent-soft: rgba(107, 139, 255, 0.13);
    --scrim: rgba(0, 0, 0, 0.5);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --board: #101216;
  --board-dot: #23262e;
  --surface: #181b21;
  --ink: #f2f3f7;
  --ink-2: #a9afbd;
  --muted: #6e7482;
  --line: #262a33;
  --accent: #6b8bff;
  --on-accent: #0d1220;
  --accent-soft: rgba(107, 139, 255, 0.13);
  --scrim: rgba(0, 0, 0, 0.5);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--display);
  background: var(--board);
  color: var(--ink);
  line-height: 1.6;
}

svg { fill: currentColor; }

.mono { font-family: var(--mono); font-weight: 500; }

button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.wordmark {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark em { font-style: normal; color: var(--accent); }
.brand-sub { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.topbar-stats { display: flex; gap: 24px; margin-left: auto; }
.stat { display: flex; flex-direction: column; line-height: 1.3; }
.stat-label { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.08em; }
.stat-value { font-size: 0.95rem; font-variant-numeric: tabular-nums; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-stats[hidden] + .topbar-actions,
.topbar-actions { margin-left: 0; }
.topbar > .topbar-actions:last-child { margin-left: 0; }

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--board);
  border: 1px solid var(--line);
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
}
.seg-btn.active { background: var(--accent); color: var(--on-accent); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- board ---------- */
.board-wrap { padding: 20px 24px 48px; }

/* 月別フィルタ */
.month-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 4px 14px;
}
.month-chip {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.month-chip:hover { transform: translateY(-1px); border-color: var(--accent); }
.month-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.board {
  position: relative;
  min-height: calc(100vh - 170px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: var(--surface);
  background-image: radial-gradient(var(--board-dot) 1.15px, transparent 1.15px);
  background-size: 22px 22px;
  overflow: hidden;
}

.board-hint {
  margin: 12px 4px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- intake ---------- */
.intake {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
}
.intake-inner { max-width: 560px; text-align: center; }
.intake-icon { width: 44px; height: 44px; color: var(--muted); }
.intake h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.intake-lead { margin: 0 0 24px; color: var(--ink-2); font-size: 0.92rem; }

.intake-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }

.paste-form { margin-top: 20px; display: grid; gap: 10px; }
.paste-form textarea {
  width: 100%;
  resize: vertical;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--board);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
}
.paste-form .btn { justify-self: center; }

.intake-error {
  margin: 16px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #d03b3b;
}
:root[data-theme="dark"] .intake-error { color: #e66767; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .intake-error { color: #e66767; }
}

.drop-overlay {
  position: absolute;
  inset: 10px;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.3rem;
  pointer-events: none;
}

/* ---------- cloud chips (カラフルなブロブ) ---------- */
.cloud { position: absolute; inset: 0; pointer-events: none; }
.cloud .chip, .cloud .burst-card { pointer-events: auto; }

.chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  border-radius: 18px;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.15),
    opacity 0.3s,
    left 0.45s cubic-bezier(0.3, 0.9, 0.3, 1),
    top 0.45s cubic-bezier(0.3, 0.9, 0.3, 1);
  color: var(--ink);
  text-align: center;
}
.chip.placed { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.chip:hover { transform: translate(-50%, -50%) scale(1.05); }

/* ステッカー風ブロブ: 白フチ + ツヤ + 色つきの影 */
.chip .blob {
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(130% 130% at 30% 20%,
      color-mix(in oklab, var(--chip-color) 62%, white) 0%,
      var(--chip-color) 58%,
      color-mix(in oklab, var(--chip-color) 88%, black) 100%);
  color: #fff;
  border: 4px solid var(--surface);
  box-shadow:
    0 10px 24px color-mix(in srgb, var(--chip-color) 42%, transparent),
    0 2px 0 rgba(0, 0, 0, 0.04);
}
/* ツヤのハイライト */
.chip .blob::after {
  content: "";
  position: absolute;
  top: 9%;
  left: 14%;
  width: 34%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(2px);
  transform: rotate(-24deg);
  pointer-events: none;
}
.chip:hover .blob { animation: jelly 0.55s cubic-bezier(0.3, 1.3, 0.4, 1) both; }
@keyframes jelly {
  0% { scale: 1 1; }
  28% { scale: 1.1 0.9; }
  55% { scale: 0.94 1.06; }
  78% { scale: 1.03 0.98; }
  100% { scale: 1 1; }
}
.chip svg { display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.12)); }
.chip .chip-label {
  font-weight: 800;
  line-height: 1.3;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 金額はカテゴリ色のピル */
.chip .chip-amount {
  font-family: var(--mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  padding: 3px 10px;
  border-radius: 999px;
  color: color-mix(in oklab, var(--chip-color, var(--ink)) 72%, black);
  background: color-mix(in srgb, var(--chip-color, var(--ink)) 14%, var(--surface));
}
:root[data-theme="dark"] .chip .chip-amount {
  color: color-mix(in oklab, var(--chip-color, var(--ink)) 60%, white);
  background: color-mix(in srgb, var(--chip-color, var(--ink)) 22%, var(--surface));
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .chip .chip-amount {
    color: color-mix(in oklab, var(--chip-color, var(--ink)) 60%, white);
    background: color-mix(in srgb, var(--chip-color, var(--ink)) 22%, var(--surface));
  }
}
.chip .chip-share {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.2;
}

/* 前月比バッジ(月フィルタ中のみ) */
.chip .chip-delta {
  position: absolute;
  top: 2px;
  right: -2px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--muted);
  color: var(--muted);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}
.chip .chip-delta.up { border-color: #d64545; color: #d64545; }
.chip .chip-delta.down { border-color: #0b9444; color: #0b9444; }
.chip .chip-delta.new { border-color: var(--accent); color: var(--accent); }

/* フォーカスモード: 選択チップ以外を退かせる */
.cloud.focus-mode .chip:not(.selected) {
  opacity: 0.16;
  filter: saturate(0.4);
  transform: translate(-50%, -50%) scale(0.82);
}
.cloud.focus-mode .chip:not(.selected):hover {
  opacity: 0.7;
  filter: none;
  transform: translate(-50%, -50%) scale(0.95);
}
.chip.selected { z-index: 3; }

/* ---------- 放射状バースト ---------- */
.burst { position: absolute; inset: 0; z-index: 2; }
.burst-spokes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.burst-spokes line {
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.5s ease 0.15s;
}
.burst-spokes line.out { opacity: 0.35; }

.burst-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 96px;
  max-width: 150px;
  padding: 7px 12px;
  border-radius: 13px;
  background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--chip-color, var(--line)) 32%, var(--line));
  box-shadow: 0 5px 16px color-mix(in srgb, var(--chip-color, #000) 16%, rgba(0, 0, 0, 0.06));
  font-size: 0.78rem;
  transform: translate(calc(-50% + var(--from-x, 0px)), calc(-50% + var(--from-y, 0px))) scale(0.3) rotate(0deg);
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15),
    opacity 0.35s;
}
.burst-card.out {
  transform: translate(-50%, -50%) scale(1) rotate(var(--tilt, 0deg));
  opacity: 1;
}
.burst-card .bc-name {
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.burst-card .bc-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}
.burst-card .bc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.burst-card .bc-row::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  align-self: center;
  background: var(--chip-color, var(--muted));
}
.burst-card .bc-amount {
  font-family: var(--mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.burst-card.more {
  cursor: pointer;
  border-style: dashed;
  color: var(--ink-2);
}
.burst-card.more:hover { border-color: var(--accent); color: var(--accent); }
.burst-card .bc-more { font-weight: 600; font-size: 0.75rem; }

/* ---------- その他カテゴリ整理モード ---------- */
/* 「その他」チップは押すと仕分けに入る目印(点線リング) */
.chip.organizable .blob {
  outline: 2px dashed color-mix(in srgb, var(--chip-color) 55%, var(--surface));
  outline-offset: 5px;
}
.chip.organizable::after {
  content: "仕分け";
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.organize {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--board) 88%, transparent);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.organize.show { opacity: 1; }

.organize-head {
  position: relative;
  flex: none;
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.oh-title { display: flex; align-items: baseline; gap: 12px; }
.oh-title strong { font-size: 1.15rem; font-weight: 800; }
.oh-remain { font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.oh-hint { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); max-width: 640px; }
.oh-close {
  position: absolute;
  top: 12px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.oh-close:hover { background: var(--accent-soft); color: var(--accent); }

/* ドロップ先のデカいカテゴリアイコン */
.organize-targets {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  padding: 16px 24px;
  overflow-y: auto;
  max-height: 34vh;
}
.organize-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 92px;
  padding: 10px 6px 8px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: transparent;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.organize-target:hover { background: var(--accent-soft); }
.organize-target .ot-blob {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: #fff;
  border: 4px solid var(--surface);
  background:
    radial-gradient(130% 130% at 30% 20%,
      color-mix(in oklab, var(--chip-color) 62%, white) 0%,
      var(--chip-color) 58%,
      color-mix(in oklab, var(--chip-color) 88%, black) 100%);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--chip-color) 40%, transparent);
  transition: transform 0.15s;
}
.organize-target .ot-blob svg { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.14)); }
.organize-target .ot-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.2;
}
/* ドラッグ中のホバー: 受け入れを強調 */
.organize-target.over {
  border-color: var(--chip-color);
  background: color-mix(in srgb, var(--chip-color) 14%, transparent);
  transform: translateY(-2px);
}
.organize-target.over .ot-blob { transform: scale(1.14); }
.organize-target.hit .ot-blob { animation: ot-pop 0.4s cubic-bezier(0.3, 1.3, 0.4, 1) both; }
@keyframes ot-pop {
  0% { scale: 1; }
  40% { scale: 1.24; }
  100% { scale: 1; }
}

/* 放射状に広がる明細カード */
.organize-field {
  position: relative;
  flex: 1;
  overflow: auto;
}
.organize-hub {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  min-width: 76px;
  height: 76px;
  padding: 0 12px;
  border-radius: 50%;
  border: 2px dashed var(--muted);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}
.organize-card {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 104px;
  max-width: 168px;
  padding: 8px 13px;
  border-radius: 13px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.1);
  font-size: 0.78rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.organize-card.snap {
  transition: left 0.24s cubic-bezier(0.3, 1.1, 0.4, 1), top 0.24s cubic-bezier(0.3, 1.1, 0.4, 1);
}
.organize-card.dragging {
  cursor: grabbing;
  z-index: 5;
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%) scale(1.06) rotate(-2deg);
}
.organize-card .oc-name {
  font-size: 0.74rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.organize-card .oc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.organize-card .oc-date { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.organize-card .oc-amount {
  font-family: var(--mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .organize-target { width: 76px; }
  .organize-target .ot-blob { width: 54px; height: 54px; }
  .organize-targets { max-height: 40vh; }
}

/* ---------- tooltip ---------- */
.tooltip {
  position: fixed;
  z-index: 40;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  pointer-events: none;
}
.tooltip strong { display: block; }
.tooltip span { color: var(--ink-2); font-family: var(--mono); font-size: 0.75rem; }

/* ---------- 全明細テーブル ---------- */
.all-table {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.all-table summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.88rem;
  list-style: none;
}
.all-table summary::-webkit-details-marker { display: none; }
.all-table summary svg { width: 18px; height: 18px; }
.table-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.all-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.all-table th, .all-table td {
  text-align: left;
  padding: 7px 18px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
.all-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.all-table .num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.all-table td.refund { color: var(--accent); }

/* カテゴリ修正セレクト */
.cat-select {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--chip-color, var(--line)) 40%, var(--line));
  background: color-mix(in srgb, var(--chip-color, var(--line)) 10%, var(--surface));
  color: var(--ink);
  cursor: pointer;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  transform: translate(-50%, 16px);
  opacity: 0;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--board);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.3, 1.1, 0.4, 1), opacity 0.3s;
  pointer-events: none;
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .brand-sub { display: none; }
  .topbar-stats { gap: 16px; margin-left: 0; width: 100%; order: 3; }
  .board-wrap { padding: 12px 12px 40px; }
  .board { min-height: calc(100vh - 220px); border-radius: 14px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .chip, .chip .blob, .burst-card, .burst-spokes line { transition: none; }
}
