/* bumpers.me
   A bowling alley circa 1989: pixel type, a maple lane with red bumpers,
   bevelled buttons and hard shadows. Day is Saturday league; night is cosmic bowling. */

/* ------------------------------------------------------------------ */
/* tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
  /* Day: a Saturday-league bowling alley. Cream walls, a maple lane, a retro-shirt red. */
  --paper: #f3ead3;
  --paper-2: #e9dcbc;
  --paper-3: #dccb9f;
  --card: #fbf5e6;
  --ink: #241a3d;
  --ink-2: #54496e;
  --ink-3: #857a98;
  --rule: #c9b68a;
  --rule-2: #e0d1ac;

  --accent: #d42e48;
  --accent-ink: #a81c35;
  --accent-soft: #f6d0cf;
  --ok: #1f8a64;
  --ok-soft: #cde8d6;
  --cold: #2767b0;
  --cold-soft: #d3e0f1;
  --gold: #d38f12;

  --wood-1: #f0c986;
  --wood-2: #e2b56c;
  --board: rgba(128, 72, 12, 0.16);
  --wood-edge: #b9853e;
  --arrow: #a4512a;
  --foul: #7a3b1c;
  --bumper: #e0364f;
  --ball: #3a3cbd;
  --ball-hole: #140f33;
  --ball-shine: #8f93ff;
  --ball-shade: #25257f;
  --pin: #fffdf5;
  --pin-ring: #241a3d;

  --cup: #f2b632;
  --cup-shade: #c27c0e;
  --cup-rim: #6b3f06;
  --cup-base: #54496e;
  --cup-mark: #fff6d8;
  --cup-off: #e3d6b3;
  --cup-off-rim: #c2b089;

  --shadow: #241a3d;
  --bevel-hi: rgba(255, 255, 255, 0.55);
  --bevel-lo: rgba(36, 26, 61, 0.22);
  --glow: transparent;
  --carpet: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='1' y='0' width='1' height='1' fill='%23f08aa0'/><rect x='0' y='1' width='3' height='1' fill='%23f08aa0'/><rect x='10' y='1' width='1' height='1' fill='%236bbfd6'/><rect x='9' y='2' width='1' height='1' fill='%236bbfd6'/><rect x='11' y='2' width='1' height='1' fill='%236bbfd6'/><rect x='8' y='3' width='1' height='1' fill='%236bbfd6'/><rect x='12' y='3' width='1' height='1' fill='%236bbfd6'/><rect x='4' y='5' width='1' height='1' fill='%23e8b64a'/><rect x='11' y='6' width='2' height='1' fill='%23a792d6'/><rect x='11' y='7' width='2' height='1' fill='%23a792d6'/><rect x='2' y='8' width='1' height='1' fill='%236bbfd6'/><rect x='4' y='8' width='1' height='1' fill='%236bbfd6'/><rect x='6' y='8' width='1' height='1' fill='%236bbfd6'/><rect x='1' y='9' width='1' height='1' fill='%236bbfd6'/><rect x='3' y='9' width='1' height='1' fill='%236bbfd6'/><rect x='5' y='9' width='1' height='1' fill='%236bbfd6'/><rect x='7' y='9' width='1' height='1' fill='%236bbfd6'/><rect x='10' y='11' width='1' height='1' fill='%23f08aa0'/><rect x='9' y='12' width='3' height='1' fill='%23f08aa0'/><rect x='4' y='13' width='1' height='1' fill='%23a792d6'/><rect x='3' y='14' width='1' height='1' fill='%23a792d6'/><rect x='5' y='14' width='1' height='1' fill='%23a792d6'/><rect x='15' y='14' width='1' height='1' fill='%23e8b64a'/><rect x='4' y='15' width='1' height='1' fill='%23a792d6'/></svg>");
  --carpet-veil: rgba(233, 220, 188, 0.7);
  --on-accent: #ffffff;
  --scan: transparent;

  --av-0: #f6d9a8; --av-0-ink: #7a4a05;
  --av-1: #c9ead8; --av-1-ink: #1b6848;
  --av-2: #d4defa; --av-2-ink: #2b3f9a;
  --av-3: #f8cfd4; --av-3-ink: #a3203a;
  --av-4: #e2d2f5; --av-4-ink: #5b2f99;
  --av-5: #c8ecef; --av-5-ink: #11636c;

  --float: 4px 4px 0 var(--shadow);
  --scrim: rgba(36, 26, 61, 0.45);

  --f-display: "Pixelify Sans", "Courier New", monospace;
  --f-pixel: "Silkscreen", "Pixelify Sans", monospace;
  --f-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "VT323", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --side-w: 252px;
  --r: 0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Night: cosmic bowling. Black light, neon, a glowing lane. */
    --paper: #120e26;
    --paper-2: #19143a;
    --paper-3: #271f55;
    --card: #1d1742;
    --ink: #f4eeff;
    --ink-2: #bdb2e6;
    --ink-3: #8a7fbd;
    --rule: #3b3175;
    --rule-2: #2a2358;
    --accent: #ff4fa3;
    --accent-ink: #ff8cc5;
    --accent-soft: #4a1840;
    --ok: #4df0a0;
    --ok-soft: #173a36;
    --cold: #3fd8ff;
    --cold-soft: #16305a;
    --gold: #ffd23f;
    --wood-1: #6b4a2a;
    --wood-2: #5a3d22;
    --board: rgba(0, 0, 0, 0.28);
    --wood-edge: #2d1d0f;
    --arrow: #ffd23f;
    --foul: #3fd8ff;
    --bumper: #ff4fa3;
    --ball: #3fd8ff;
    --ball-hole: #0b0820;
    --ball-shine: #c9f5ff;
    --ball-shade: #1d8fb8;
    --pin: #fbf7ff;
    --pin-ring: #0b0820;
    --cup: #ffd23f;
    --cup-shade: #d69a12;
    --cup-rim: #0b0820;
    --cup-base: #9b6bff;
    --cup-mark: #5a3a00;
    --cup-off: #241d4c;
    --cup-off-rim: #3b3175;
    --shadow: #05030f;
    --bevel-hi: rgba(255, 255, 255, 0.12);
    --bevel-lo: rgba(0, 0, 0, 0.45);
    --glow: rgba(255, 79, 163, 0.55);
    --carpet: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='1' y='0' width='1' height='1' fill='%23ff4fa3'/><rect x='0' y='1' width='3' height='1' fill='%23ff4fa3'/><rect x='10' y='1' width='1' height='1' fill='%233fd8ff'/><rect x='9' y='2' width='1' height='1' fill='%233fd8ff'/><rect x='11' y='2' width='1' height='1' fill='%233fd8ff'/><rect x='8' y='3' width='1' height='1' fill='%233fd8ff'/><rect x='12' y='3' width='1' height='1' fill='%233fd8ff'/><rect x='4' y='5' width='1' height='1' fill='%23ffd23f'/><rect x='11' y='6' width='2' height='1' fill='%239b6bff'/><rect x='11' y='7' width='2' height='1' fill='%239b6bff'/><rect x='2' y='8' width='1' height='1' fill='%233fd8ff'/><rect x='4' y='8' width='1' height='1' fill='%233fd8ff'/><rect x='6' y='8' width='1' height='1' fill='%233fd8ff'/><rect x='1' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='3' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='5' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='7' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='10' y='11' width='1' height='1' fill='%23ff4fa3'/><rect x='9' y='12' width='3' height='1' fill='%23ff4fa3'/><rect x='4' y='13' width='1' height='1' fill='%239b6bff'/><rect x='3' y='14' width='1' height='1' fill='%239b6bff'/><rect x='5' y='14' width='1' height='1' fill='%239b6bff'/><rect x='15' y='14' width='1' height='1' fill='%23ffd23f'/><rect x='4' y='15' width='1' height='1' fill='%239b6bff'/></svg>");
    --carpet-veil: rgba(25, 20, 58, 0.84);
    --on-accent: #120e26;
    --scan: rgba(0, 0, 0, 0.16);
    --av-0: #4a3510; --av-0-ink: #ffd23f;
    --av-1: #123d31; --av-1-ink: #4df0a0;
    --av-2: #16305a; --av-2-ink: #3fd8ff;
    --av-3: #4a1840; --av-3-ink: #ff8cc5;
    --av-4: #33205e; --av-4-ink: #c7a8ff;
    --av-5: #0f3a44; --av-5-ink: #7de9f2;
    --float: 4px 4px 0 var(--shadow);
    --scrim: rgba(5, 3, 15, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  /* Night: cosmic bowling. Black light, neon, a glowing lane. */
  --paper: #120e26;
  --paper-2: #19143a;
  --paper-3: #271f55;
  --card: #1d1742;
  --ink: #f4eeff;
  --ink-2: #bdb2e6;
  --ink-3: #8a7fbd;
  --rule: #3b3175;
  --rule-2: #2a2358;
  --accent: #ff4fa3;
  --accent-ink: #ff8cc5;
  --accent-soft: #4a1840;
  --ok: #4df0a0;
  --ok-soft: #173a36;
  --cold: #3fd8ff;
  --cold-soft: #16305a;
  --gold: #ffd23f;
  --wood-1: #6b4a2a;
  --wood-2: #5a3d22;
  --board: rgba(0, 0, 0, 0.28);
  --wood-edge: #2d1d0f;
  --arrow: #ffd23f;
  --foul: #3fd8ff;
  --bumper: #ff4fa3;
  --ball: #3fd8ff;
  --ball-hole: #0b0820;
  --ball-shine: #c9f5ff;
  --ball-shade: #1d8fb8;
  --pin: #fbf7ff;
  --pin-ring: #0b0820;
  --cup: #ffd23f;
  --cup-shade: #d69a12;
  --cup-rim: #0b0820;
  --cup-base: #9b6bff;
  --cup-mark: #5a3a00;
  --cup-off: #241d4c;
  --cup-off-rim: #3b3175;
  --shadow: #05030f;
  --bevel-hi: rgba(255, 255, 255, 0.12);
  --bevel-lo: rgba(0, 0, 0, 0.45);
  --glow: rgba(255, 79, 163, 0.55);
  --carpet: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 16 16' shape-rendering='crispEdges'><rect x='1' y='0' width='1' height='1' fill='%23ff4fa3'/><rect x='0' y='1' width='3' height='1' fill='%23ff4fa3'/><rect x='10' y='1' width='1' height='1' fill='%233fd8ff'/><rect x='9' y='2' width='1' height='1' fill='%233fd8ff'/><rect x='11' y='2' width='1' height='1' fill='%233fd8ff'/><rect x='8' y='3' width='1' height='1' fill='%233fd8ff'/><rect x='12' y='3' width='1' height='1' fill='%233fd8ff'/><rect x='4' y='5' width='1' height='1' fill='%23ffd23f'/><rect x='11' y='6' width='2' height='1' fill='%239b6bff'/><rect x='11' y='7' width='2' height='1' fill='%239b6bff'/><rect x='2' y='8' width='1' height='1' fill='%233fd8ff'/><rect x='4' y='8' width='1' height='1' fill='%233fd8ff'/><rect x='6' y='8' width='1' height='1' fill='%233fd8ff'/><rect x='1' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='3' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='5' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='7' y='9' width='1' height='1' fill='%233fd8ff'/><rect x='10' y='11' width='1' height='1' fill='%23ff4fa3'/><rect x='9' y='12' width='3' height='1' fill='%23ff4fa3'/><rect x='4' y='13' width='1' height='1' fill='%239b6bff'/><rect x='3' y='14' width='1' height='1' fill='%239b6bff'/><rect x='5' y='14' width='1' height='1' fill='%239b6bff'/><rect x='15' y='14' width='1' height='1' fill='%23ffd23f'/><rect x='4' y='15' width='1' height='1' fill='%239b6bff'/></svg>");
  --carpet-veil: rgba(25, 20, 58, 0.84);
  --on-accent: #120e26;
  --scan: rgba(0, 0, 0, 0.16);
  --av-0: #4a3510; --av-0-ink: #ffd23f;
  --av-1: #123d31; --av-1-ink: #4df0a0;
  --av-2: #16305a; --av-2-ink: #3fd8ff;
  --av-3: #4a1840; --av-3-ink: #ff8cc5;
  --av-4: #33205e; --av-4-ink: #c7a8ff;
  --av-5: #0f3a44; --av-5-ink: #7de9f2;
  --float: 4px 4px 0 var(--shadow);
  --scrim: rgba(5, 3, 15, 0.7);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ */
/* base                                                                */
/* ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 0; }

.mono { font-family: var(--f-mono); font-size: 1.22em; letter-spacing: 0.01em; line-height: 1; }
.ico { display: inline-flex; flex: none; align-items: center; justify-content: center; }
.ico svg { display: block; }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  font: 500 15px/1 var(--f-mono);
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 0;
  white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: 0;
}
.skip:focus { top: 12px; }

.noscript { padding: 48px; font-size: 17px; }

/* ------------------------------------------------------------------ */
/* shell                                                               */
/* ------------------------------------------------------------------ */

.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.side {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
}
.side-inner { display: flex; flex-direction: column; min-height: 100%; padding: 18px 12px 14px; gap: 18px; }

.main { min-width: 0; padding: 44px clamp(20px, 5vw, 64px) 140px; outline: none; }

.mobilebar { display: none; }
.scrim { display: none; }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px; font: 400 21px/1 var(--f-display); }
.brand em { font-style: normal; color: var(--accent); }
.pinmark { display: inline-flex; flex: none; }
.pinmark svg { display: block; }
/* brand + empty-state pins: rock on their base now and then, get knocked over on hover */
.brand .pinmark svg, .empty .pinmark svg { transform-origin: 50% 97%; animation: wobble 7s ease-in-out 1.2s infinite; }
.empty .pinmark svg { animation-delay: 0.4s; }
.brand:hover .pinmark svg, .empty .pinmark:hover svg { animation: knock 0.9s cubic-bezier(0.3, 0.6, 0.4, 1); }
@keyframes wobble {
  0%, 76%, 100% { transform: rotate(0); }
  80% { transform: rotate(-9deg); }
  85% { transform: rotate(7deg); }
  90% { transform: rotate(-4deg); }
  95% { transform: rotate(2deg); }
}
@keyframes knock {
  0% { transform: rotate(0); }
  30% { transform: rotate(-58deg); }
  48% { transform: rotate(14deg); }
  64% { transform: rotate(-8deg); }
  80% { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}

/* capture */
.capture {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: 36px; padding: 0 8px 0 10px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  font-weight: 500; font-size: 14px; text-align: left;
  transition: border-color 0.15s;
}
.capture span:not(.ico) { flex: 1; }
.capture:hover { border-color: var(--ink-3); }

/* nav */
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item, .side-btn, .side-lane {
  display: flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 8px; border-radius: 0;
  color: var(--ink-2); font-size: 14px;
  background: none; border: 0; width: 100%; text-align: left;
}
.nav-item:hover, .side-btn:hover, .side-lane:hover { background: var(--paper-3); color: var(--ink); }
.nav-item.on, .side-btn.on, .side-lane.on { background: var(--paper-3); color: var(--ink); font-weight: 500; }
.nav-label { flex: 1; }
.nav-count { font: 17px var(--f-mono); color: var(--ink-3); }

.side-section { display: flex; flex-direction: column; gap: 1px; }
.side-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 6px; font-size: 12px; font-weight: 600; color: var(--ink-3);
}
.side-lane-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-lane.open { color: var(--ink-3); }
.side-lane.open .mini { background: none; border: 1px dashed var(--rule); }
.side-lane.is-cold .side-lane-name::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 0; background: var(--cold); vertical-align: 1px; }

/* the lane in miniature: a strip with a ball on it */
.mini {
  position: relative; flex: none;
  width: 28px; height: 8px; border-radius: 0;
  background: var(--wood-2);
  box-shadow: 0 -2px 0 -1px var(--bumper), 0 2px 0 -1px var(--bumper);
}
.mini > span {
  position: absolute; top: 1px;
  left: calc(1px + (100% - 8px) * var(--p, 0));
  width: 6px; height: 6px; border-radius: 0; background: var(--ball);
}

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 1px; padding-top: 8px; border-top: 1px solid var(--rule); }
.side-btn span:not(.ico) { flex: 1; }

/* lane slots: ▣▣□ */
.slots { display: inline-flex; align-items: center; gap: 3px; }
.slot { width: 9px; height: 9px; border-radius: 0; border: 1.5px solid var(--ink-3); }
.slot.used { background: var(--accent); border-color: var(--accent); }
.slots-text { margin-left: 6px; font: 500 17px var(--f-mono); color: var(--ink-3); }

/* ------------------------------------------------------------------ */
/* buttons, inputs, badges                                             */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 13px;
  font-size: 14px; font-weight: 500; line-height: 1;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 0;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.08s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--paper-3); color: var(--ink); }
.btn.danger { color: var(--accent-ink); border-color: var(--accent-soft); background: var(--card); }
.btn.danger:hover { background: var(--accent-soft); border-color: var(--accent); }
.dlg .btn.danger { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.big { height: 46px; padding: 0 22px; font-size: 16px; }
.btn kbd { margin-left: 4px; }
.btn.primary kbd { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--paper) 35%, transparent); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; padding: 0;
  background: none; border: 0; border-radius: 0;
  color: var(--ink-3);
}
.icon-btn:hover { background: var(--paper-3); color: var(--ink); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.on { color: var(--accent); }

.input {
  display: block; width: 100%;
  padding: 10px 12px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 0;
  font-size: 15px; line-height: 1.45;
  resize: vertical;
  transition: border-color 0.15s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--ink-2); }
.input.big { font-size: 18px; padding: 12px 14px; }

.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 0; font: 500 16px/1 var(--f-mono); white-space: nowrap;
}
.badge.cold { background: var(--cold-soft); color: var(--cold); }
.badge.fresh { background: var(--accent-soft); color: var(--accent-ink); }
.badge.today-badge { background: var(--accent-soft); color: var(--accent-ink); }

.pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 0; font-size: 12.5px; font-weight: 500;
  background: var(--paper-3); color: var(--ink-2);
}
.pill-active { background: var(--accent-soft); color: var(--accent-ink); }
.pill-shelved { background: var(--cold-soft); color: var(--cold); }
.pill-done { background: var(--ok-soft); color: var(--ok); }
.pill-dropped { color: var(--ink-3); }

.dot-sep { width: 3px; height: 3px; border-radius: 0; background: var(--ink-3); flex: none; }

/* ------------------------------------------------------------------ */
/* pages                                                               */
/* ------------------------------------------------------------------ */

.page { max-width: 860px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-title { font: 400 clamp(32px, 4.2vw, 42px)/1.08 var(--f-display); }
.page-sub { margin-top: 10px; max-width: 56ch; color: var(--ink-2); font-size: 15.5px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 56px 24px; border: 1px dashed var(--rule); border-radius: 0;
}
.empty h3 { margin-top: 6px; font: 400 21px/1.2 var(--f-display); }
.empty p { max-width: 42ch; color: var(--ink-2); }
.empty-actions { margin-top: 12px; }

/* ------------------------------------------------------------------ */
/* the lane graphic                                                    */
/* ------------------------------------------------------------------ */

.track {
  --h: 42px;
  --ball-size: 18px;
  --pins-w: 30px;
  position: relative;
  height: var(--h);
  margin: 12px 4px;
  border-radius: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 5px, var(--board) 5px 6px),
    var(--wood-1);
  box-shadow: inset 0 0 0 1px var(--wood-edge);
}
.track::before, .track::after {
  content: ""; position: absolute; left: -4px; right: -4px; height: 5px;
  border-radius: 0; background: var(--bumper);
}
.track::before { top: -9px; }
.track::after { bottom: -9px; }

.track .foul { position: absolute; top: 0; bottom: 0; left: 18px; width: 2px; background: var(--foul); }

.lane-arrows { position: absolute; top: 50%; left: 32%; transform: translateY(-50%); height: 70%; }
.lane-arrows svg { height: 100%; width: auto; display: block; }
.lane-arrows path { fill: var(--arrow); }

.ball {
  position: absolute; top: 50%;
  left: calc(26px + (100% - 26px - var(--pins-w) - 24px - var(--ball-size)) * var(--p, 0));
  width: var(--ball-size); height: var(--ball-size);
  margin-top: calc(var(--ball-size) / -2);
  border-radius: 0;
  background:
    radial-gradient(circle at 37% 33%, var(--ball-hole) 0 7%, transparent 9%),
    radial-gradient(circle at 60% 30%, var(--ball-hole) 0 7%, transparent 9%),
    radial-gradient(circle at 50% 55%, var(--ball-hole) 0 8%, transparent 10%),
    var(--ball);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  transition: left 0.9s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pins { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); height: 78%; }
.pins svg { height: 100%; width: auto; display: block; }
.pin { fill: var(--pin); stroke: var(--pin-ring); stroke-width: 0.9; transition: opacity 0.4s; }
.struck .pin { opacity: 0.22; }
.struck .ball { left: calc(100% - 12px - var(--pins-w) - var(--ball-size) + 6px); }

.track-big { --h: 60px; --ball-size: 24px; --pins-w: 42px; margin: 16px 4px; }
.track-big::before, .track-big::after { height: 6px; }
.track-big::before { top: -11px; }
.track-big::after { bottom: -11px; }
.track-big .foul { left: 22px; }

.track-empty { opacity: 0.5; }
.track-empty::before, .track-empty::after { background: var(--ink-3); }

/* ------------------------------------------------------------------ */
/* alley                                                               */
/* ------------------------------------------------------------------ */

.today {
  position: relative;
  margin-bottom: 28px; padding: 18px 20px 18px 22px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 0;
}
.today-label { display: flex; align-items: center; gap: 7px; font: 500 18px var(--f-mono); color: var(--accent-ink); letter-spacing: 0.01em; }
.today-step { margin-top: 8px; font: 400 clamp(21px, 2.6vw, 26px)/1.25 var(--f-display); }
.today-project { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.today-project:hover { color: var(--ink); border-color: var(--ink-3); }
.today-note { margin-top: 6px; color: var(--ink-2); }
.today-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.today-done { border-color: var(--ok); }
.today-done .today-label { color: var(--ok); }
.today-done .today-step { text-decoration: line-through; text-decoration-color: var(--ok); text-decoration-thickness: 2px; }

.today-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 14px; }
.option {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  padding: 12px 14px; min-height: 72px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 0;
  transition: border-color 0.15s, background-color 0.15s;
}
.option:hover { border-color: var(--ink); background: var(--card); }
.option-step { font-weight: 500; line-height: 1.35; }
.option-project { font-size: 13px; color: var(--ink-3); }

.lanes { display: flex; flex-direction: column; gap: 14px; }

.lane {
  display: block;
  padding: 16px 20px 16px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0;
}
.lane-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lane-title { font: 400 21px/1.25 var(--f-display); min-width: 0; }
.lane-title:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--ink-3); }
.lane-meta { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--ink-3); font-size: 13px; }
.lane .track { margin: 18px 4px 16px; }

.lane-foot { display: flex; flex-direction: column; gap: 10px; }
.next { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.next-label { flex: none; width: 44px; font: 500 17px var(--f-mono); color: var(--ink-3); }
.next-text { flex: 1; min-width: 0; font-weight: 500; }
.next-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.next.finish .next-label { color: var(--ok); width: auto; }
.inline-input {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px;
  background: var(--paper); border: 1px dashed var(--ink-3); border-radius: 0;
}
.inline-input:focus { outline: none; border-style: solid; border-color: var(--ink-2); }
.inline-input::placeholder { color: var(--ink-3); }

.crumb-line { display: flex; align-items: flex-start; gap: 10px; padding-top: 10px; border-top: 1px solid var(--rule-2); color: var(--ink-2); font-size: 14px; }
.crumb-line .ico { margin-top: 2px; color: var(--ink-3); }
.crumb-text { flex: 1; min-width: 0; }
.crumb-when { flex: none; font: 17px var(--f-mono); color: var(--ink-3); padding-top: 2px; }

.cold-nudge { font-size: 13.5px; color: var(--cold); }
.lane.is-cold .track { filter: saturate(0.55); }

.lane-open {
  display: flex; align-items: center; gap: 22px;
  background: transparent; border-style: dashed;
  transition: border-color 0.15s, background-color 0.15s;
}
.lane-open .track { flex: 0 0 38%; margin: 14px 4px; }
.lane-open .open-text { display: flex; flex-direction: column; gap: 2px; color: var(--ink-3); font-size: 14px; }
.lane-open strong { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.lane-open:hover { border-color: var(--ink-3); background: var(--card); }

.tally {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule);
}
.tally-text { display: flex; align-items: baseline; gap: 12px; color: var(--ink-2); max-width: 46ch; }
.tally-big { font-size: 34px; color: var(--ink); line-height: 1; }
.tally-bars { display: flex; gap: 6px; flex: none; }
.tally-col { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 20px; }
.tally-bar { position: relative; width: 8px; height: 44px; border-radius: 0; background: var(--rule-2); overflow: hidden; }
.tally-bar span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink-2); border-radius: 0; }
.tally-col.is-now .tally-bar span { background: var(--accent); }
.tally-day { font: 15px var(--f-mono); color: var(--ink-3); }
.tally-n { font-size: 10.5px; color: var(--ink-3); height: 12px; }

/* intro */
.intro { padding: 8px 0 0; }
.intro-lane { max-width: 520px; margin-bottom: 36px; }
.intro-title { font: 400 clamp(26px, 3.4vw, 34px)/1.15 var(--f-display); max-width: 22ch; }
.intro-lede { margin-top: 14px; max-width: 58ch; font-size: 16.5px; color: var(--ink-2); }
.rules { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.rules li { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--rule); }
.rule-n { font: 500 18px var(--f-mono); color: var(--accent); padding-top: 3px; }
.rules strong { font-weight: 600; }
.rules p { margin-top: 4px; color: var(--ink-2); font-size: 14.5px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* ------------------------------------------------------------------ */
/* project page                                                        */
/* ------------------------------------------------------------------ */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; min-height: 34px; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }

.project-title {
  font: 400 clamp(32px, 4.6vw, 46px)/1.1 var(--f-display);
  outline: none;
  border-radius: 0;
  margin: 0 -6px; padding: 2px 6px;
  caret-color: var(--accent);
  overflow-wrap: anywhere;
}
.project-title:hover { background: var(--paper-2); }
.project-title:focus { background: var(--paper-2); }

.props { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin-top: 22px; font-size: 14px; }
.prop { display: contents; }
.prop-key, .prop-val { padding: 6px 0; border-bottom: 1px solid var(--rule-2); min-height: 38px; display: flex; align-items: center; }
.prop-key { gap: 8px; color: var(--ink-3); }
.prop-val { min-width: 0; }
.prop-plain { color: var(--ink-2); }
.prop-edit {
  flex: 1; min-width: 0;
  margin: 0 -6px; padding: 3px 6px; border-radius: 0;
  outline: none; caret-color: var(--accent); overflow-wrap: anywhere;
}
.prop-edit:hover, .prop-edit:focus { background: var(--paper-2); }
.prop-edit:empty::before { content: attr(data-ph); color: var(--ink-3); }

.project-track { margin-top: 26px; }
.project-track-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 13px; }

.crumb-card {
  margin-top: 26px; padding: 14px 16px 12px;
  border: 1px dashed var(--rule); border-radius: 0;
  transition: border-color 0.15s, background-color 0.15s;
}
.crumb-card.has { background: var(--paper-2); border-style: solid; border-color: var(--rule-2); }
.crumb-card:focus-within { border-color: var(--ink-3); border-style: solid; }
.crumb-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.crumb-title { font-weight: 600; color: var(--ink-2); }
.crumb-head .crumb-when { margin-left: auto; padding: 0; }
.crumb-input {
  display: block; width: 100%; margin-top: 6px; padding: 0;
  background: none; border: 0; resize: none; overflow: hidden;
  font-size: 15.5px; line-height: 1.5; min-height: 24px;
  caret-color: var(--accent);
}
.crumb-input:focus { outline: none; }
.crumb-input::placeholder { color: var(--ink-3); }

.block-section { margin-top: 38px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.section-title { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.section-title.as-btn { background: none; border: 0; padding: 0; }
.section-aside { font-weight: 400; color: var(--ink-3); font-size: 13.5px; }
.section-count { color: var(--ink-3); }
.section-help { padding: 10px 0 4px; font-size: 13.5px; color: var(--ink-3); }
.later-section .section-head { border-bottom-color: var(--rule); }
.later-section.collapsed .section-body { display: none; }
.later-section.collapsed .section-head { border-bottom-style: dashed; }

/* steps */
.steps { min-height: 2px; }
body.is-dragging .steps { min-height: 40px; }
.steps.drop-end { box-shadow: 0 2px 0 var(--accent); }

.step {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 4px 6px 0;
  border-bottom: 1px solid var(--rule-2);
  outline: none;
}
.step:hover { background: linear-gradient(90deg, transparent, var(--paper-2) 18px); }
.step:focus-visible { background: var(--paper-2); box-shadow: inset 2px 0 0 var(--ink); }
.step.dragging { opacity: 0.35; }
.step.drop-before::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); }

.grip { width: 16px; color: var(--ink-3); opacity: 0; cursor: grab; margin-left: -2px; }
.step:hover .grip { opacity: 0.8; }

.check {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; padding: 0;
  border: 1.5px solid var(--ink-3); border-radius: 0;
  background: var(--card); color: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.check:hover { border-color: var(--ink); color: var(--ink-3); }
.step.done .check { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.step.just-done .check { animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }

.step-n { flex: none; width: 22px; color: var(--ink-3); font-size: 11.5px; }
.step-text {
  flex: 1; min-width: 0; outline: none; padding: 2px 4px; margin: 0 -4px; border-radius: 0;
  caret-color: var(--accent); overflow-wrap: anywhere;
}
.step-text:focus { background: var(--card); box-shadow: 0 0 0 1px var(--rule); }
.step.done .step-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule); }
.step.is-today:not(.done) .step-text { font-weight: 500; }
.step-when { flex: none; font: 17px var(--f-mono); color: var(--ink-3); }

.step-tools { display: flex; align-items: center; gap: 0; flex: none; opacity: 0; transition: opacity 0.12s; }
.step:hover .step-tools, .step:focus-within .step-tools, .step:focus .step-tools { opacity: 1; }

.add-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-left: 20px; color: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.add-input { flex: 1; min-width: 0; height: 36px; padding: 0; background: none; border: 0; caret-color: var(--accent); }
.add-input:focus { outline: none; }
.add-input::placeholder { color: var(--ink-3); }
.add-hint { display: none; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.add-hint kbd { margin-left: 6px; }
.add-row:focus-within .add-hint { display: inline-flex; }
.add-row:focus-within { color: var(--ink); }

/* notes: block editor */
.notes-section .section-head { margin-bottom: 10px; }
.doc { position: relative; min-height: 120px; padding-bottom: 48px; font-size: 15.5px; line-height: 1.65; cursor: text; }
.blk { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.txt { flex: 1; min-width: 0; min-height: 1.65em; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; caret-color: var(--accent); padding: 1px 0; }
.txt:empty:focus::before { content: attr(data-ph); color: var(--ink-3); pointer-events: none; }
.doc-empty .txt:empty::before { content: attr(data-ph); color: var(--ink-3); pointer-events: none; }

.blk-h1 .txt { font: 400 25px/1.3 var(--f-display); margin-top: 18px; margin-bottom: 2px; }
.blk-h1 .txt:empty::before, .blk-h2 .txt:empty::before { content: attr(data-ph); color: var(--ink-3); }
.blk-h2 .txt { font-weight: 600; font-size: 17.5px; margin-top: 14px; }
.blk:first-child .txt { margin-top: 0; }
.blk-ul .bullet { flex: none; width: 5px; height: 5px; margin: 0.75em 6px 0 8px; border-radius: 0; background: var(--ink); }
.blk-todo .tick {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 17px; height: 17px; margin: 0.3em 2px 0 2px; padding: 0;
  border: 1.5px solid var(--ink-3); border-radius: 0; background: var(--card); color: transparent;
}
.blk-todo .tick:hover { border-color: var(--ink); }
.blk-todo.checked .tick { background: var(--ink-2); border-color: var(--ink-2); color: var(--paper); }
.blk-todo.checked .txt { color: var(--ink-3); text-decoration: line-through; }
.blk-quote .txt { padding-left: 14px; border-left: 2px solid var(--ink); color: var(--ink-2); margin: 4px 0; }
.blk-divider { padding: 12px 0; outline: none; cursor: default; }
.blk-divider hr { flex: 1; margin: 0; border: 0; border-top: 1px solid var(--rule); }
.blk-divider:focus hr { border-top-color: var(--accent); }

.slash {
  position: absolute; left: 0; z-index: 10;
  width: 240px; padding: 5px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  box-shadow: var(--float);
  font-size: 14px; line-height: 1.3;
}
.slash-item { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 10px; border-radius: 0; cursor: pointer; }
.slash-item.on { background: var(--paper-3); }
.slash-hint { font: 17px var(--f-mono); color: var(--ink-3); }

/* ------------------------------------------------------------------ */
/* parking lot, shelf, finished                                        */
/* ------------------------------------------------------------------ */

.lot-capture {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; padding: 0 16px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  color: var(--ink-3);
  transition: border-color 0.15s;
}
.lot-capture:focus-within { border-color: var(--ink-2); color: var(--ink); }
.lot-input { flex: 1; min-width: 0; height: 52px; background: none; border: 0; font-size: 16px; caret-color: var(--accent); }
.lot-input:focus { outline: none; }
.lot-input::placeholder { color: var(--ink-3); }

.list { border-top: 1px solid var(--rule); }
.idea { display: flex; align-items: center; gap: 16px; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--rule-2); }
.idea-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.idea-title { font-weight: 500; overflow-wrap: anywhere; }
.idea-main:hover .idea-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.idea-note { color: var(--ink-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-meta { display: flex; align-items: center; gap: 8px; flex: none; color: var(--ink-3); font-size: 13px; }
.idea-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.idea.muted .idea-title { color: var(--ink-2); font-weight: 400; }

.shelf-list { display: flex; flex-direction: column; gap: 12px; }
.shelf-item { padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); border-radius: 0; }
.shelf-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shelf-title { font: 400 19px/1.3 var(--f-display); }
.shelf-title:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.shelf-meta { color: var(--ink-3); }
.shelf-note { margin: 12px 0 0; padding: 12px 14px; background: var(--paper-2); border-radius: 0; }
.shelf-note-label { display: block; font: 500 17px var(--f-mono); color: var(--ink-3); margin-bottom: 4px; }
.shelf-note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.shelf-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }

.letgo { margin-top: 48px; }
.letgo-title { font: 400 22px/1.2 var(--f-display); }
.letgo-sub { margin: 6px 0 16px; color: var(--ink-2); }

.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.trophy {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 16px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  transition: border-color 0.15s, transform 0.15s;
}
.trophy:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.trophy-pins { height: 34px; margin-bottom: 8px; }
.trophy-pins .pins { position: static; transform: none; height: 34px; display: inline-block; }
.trophy-date { color: var(--ink-3); }
.trophy-title { font: 400 20px/1.25 var(--f-display); }
.trophy-line { color: var(--ink-2); font-size: 14px; }
.trophy-meta { margin-top: auto; padding-top: 10px; color: var(--ink-3); }

/* ------------------------------------------------------------------ */
/* settings                                                            */
/* ------------------------------------------------------------------ */

.settings-group { margin-bottom: 40px; }
.group-title { padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: 15px; font-weight: 600; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--rule-2); }
.setting-text p { margin-top: 2px; color: var(--ink-2); font-size: 14px; max-width: 50ch; }
.setting-control { flex: none; }

.seg { display: inline-flex; padding: 2px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 0; }
.seg-btn { height: 30px; min-width: 36px; padding: 0 11px; background: none; border: 0; border-radius: 0; font-size: 13.5px; color: var(--ink-2); }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--rule); }
.seg.small .seg-btn { height: 26px; min-width: 32px; padding: 0 8px; font: 18px var(--f-mono); }

.keys { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 16px 0 0; align-items: center; }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ------------------------------------------------------------------ */
/* dialogs, menus, toasts                                              */
/* ------------------------------------------------------------------ */

.dlg {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 0;
  box-shadow: var(--float);
}
.dlg::backdrop { background: var(--scrim); }
.dlg[open] { animation: rise 0.18s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 0 24px; }
.dlg-title { font: 400 22px/1.25 var(--f-display); overflow-wrap: anywhere; }
.dlg-sub { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; overflow-wrap: anywhere; }
.dlg-head .icon-btn { margin-top: -4px; }
.dlg-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 24px 22px; }
.dlg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dlg-small .dlg-foot { padding: 18px 24px 22px; margin: 0; }
.foot-hint { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }

.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-weight: 600; font-size: 14px; }
.field-help { color: var(--ink-3); font-size: 13.5px; margin-bottom: 4px; }
.field-error { color: var(--accent-ink); font-size: 13.5px; min-height: 0; }
.field-error:empty { display: none; }
.notice { padding: 12px 14px; background: var(--accent-soft); border-radius: 0; font-size: 14px; color: var(--ink); }

.swap-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.swap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule-2); }
.swap-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.swap-text strong { font-weight: 500; overflow-wrap: anywhere; }
.swap-text .mono { color: var(--ink-3); }
.swap-actions { display: flex; gap: 4px; flex: none; }

/* palette */
.dlg-palette { width: min(620px, calc(100vw - 24px)); margin-top: 12vh; margin-bottom: auto; }
.palette-bar { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.palette-input { flex: 1; min-width: 0; height: 56px; background: none; border: 0; font-size: 17px; color: var(--ink); caret-color: var(--accent); }
.palette-input:focus { outline: none; }
.palette-input::placeholder { color: var(--ink-3); }
.palette-list { max-height: min(420px, 55dvh); overflow-y: auto; padding: 6px; }
.palette-group { padding: 10px 10px 4px; font: 500 16px var(--f-mono); color: var(--ink-3); }
.palette-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 0; cursor: pointer; color: var(--ink-2); }
.palette-item.on { background: var(--paper-3); color: var(--ink); }
.palette-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-hint { font: 17px var(--f-mono); color: var(--ink-3); }
.palette-empty { padding: 18px 10px; color: var(--ink-3); }

/* popover menu */
.menu {
  position: fixed; z-index: 60;
  min-width: 210px; padding: 5px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  box-shadow: var(--float);
}
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; background: none; border: 0; border-radius: 0; text-align: left; font-size: 14px; color: var(--ink); }
.menu-item .ico { color: var(--ink-3); }
.menu-item:hover, .menu-item:focus { outline: none; background: var(--paper-3); }
.menu-item.danger { color: var(--accent-ink); }
.menu-item.danger .ico { color: var(--accent-ink); }
.menu-hint { margin-left: auto; font: 17px var(--f-mono); color: var(--ink-3); }
.menu-sep { height: 1px; margin: 5px 4px; background: var(--rule-2); }

/* toasts */
.toasts {
  position: fixed; left: 50%; bottom: 22px; z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 16px; min-height: 42px;
  background: var(--ink); color: var(--paper);
  border-radius: 0; box-shadow: var(--float);
  font-size: 14px;
  pointer-events: auto;
  animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  transition: opacity 0.25s, transform 0.25s;
}
.toast:not(:has(.toast-act)) { padding-right: 16px; }
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-act {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  background: none; color: var(--paper);
  border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent); border-radius: 0;
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.toast-act:hover { background: color-mix(in srgb, var(--paper) 12%, transparent); }

/* ------------------------------------------------------------------ */
/* focus mode                                                          */
/* ------------------------------------------------------------------ */

.focus {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
}
.focus[open] { display: flex; flex-direction: column; }
/* The page behind focus mode shouldn't scroll or show its scrollbar. */
:root:has(dialog.focus[open]) { overflow: hidden; }
.focus::backdrop { background: var(--paper); }

.focus-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px clamp(18px, 4vw, 40px); }
.focus-project { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.focus-kicker { font: 500 17px var(--f-mono); color: var(--accent-ink); }
.focus-project strong { font-weight: 600; overflow-wrap: anywhere; }
.focus-line { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13.5px; }
.focus-line span:not(.ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.focus-main {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  width: min(760px, 100%); margin: 0 auto; padding: 0 20px 40px; text-align: center;
}
.focus-main .input { max-width: 560px; text-align: left; }
.focus-count { color: var(--ink-3); }
.focus-step { font: 400 clamp(30px, 5.2vw, 52px)/1.12 var(--f-display); overflow-wrap: anywhere; }
.focus-step.small { font-size: clamp(26px, 3.6vw, 36px); }
.focus-help { color: var(--ink-2); max-width: 46ch; }
.focus-flash { font-size: 14px; color: var(--ok); max-width: 60ch; text-wrap: balance; overflow-wrap: anywhere; }
.focus-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }

.timer { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 10px; }
.timer-face { position: relative; width: 168px; height: 168px; }
.timer-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring-bg { fill: none; stroke: var(--rule); stroke-width: 4; }
.timer-ring-fg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.timer-time { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; letter-spacing: -0.02em; }
.timer.rang .timer-time { color: var(--accent); }
.timer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.timer-note { color: var(--ink-2); font-size: 14px; }

.focus-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(18px, 4vw, 40px) 22px; color: var(--ink-3); font-size: 13.5px; }
.focus-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.focus-crumb span:not(.ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-keys { display: inline-flex; align-items: center; gap: 6px; flex: none; }

/* ------------------------------------------------------------------ */
/* strike! (finishing a project)                                       */
/* ------------------------------------------------------------------ */

.strike {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  animation: fade 0.2s ease-out;
  transition: opacity 0.28s;
}
.strike.out { opacity: 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.strike-pins { position: relative; width: 0; height: 0; margin-bottom: 40px; }
.strike-pin {
  position: absolute; left: -17px; top: -17px;
  animation: scatter 1.1s cubic-bezier(0.15, 0.75, 0.3, 1) var(--d, 0s) both;
}
@keyframes scatter {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0.9; }
}
.strike-word { font: 400 clamp(64px, 12vw, 128px)/1 var(--f-display); color: var(--accent); animation: rise 0.4s 0.15s both; }
.strike-title { font-size: 18px; font-weight: 500; max-width: 40ch; overflow-wrap: anywhere; animation: rise 0.4s 0.25s both; }
.strike-sub { color: var(--ink-2); animation: rise 0.4s 0.3s both; margin-bottom: 14px; }
.strike .btn { animation: rise 0.4s 0.35s both; }
.strike.still .strike-pin { animation: none; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }

/* ------------------------------------------------------------------ */
/* chips on pins: due dates, players, spares                           */
/* ------------------------------------------------------------------ */

.step-chips { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.step-chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 7px 0 5px;
  border: 1px solid var(--rule); border-radius: 0;
  background: var(--card); color: var(--ink-2);
  font: 500 12px/1 var(--f-body); white-space: nowrap;
}
button.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.due-late { border-color: var(--accent-soft); background: var(--accent-soft); color: var(--accent-ink); }
.chip.due-soon { border-color: var(--ink-3); color: var(--ink); }
.chip.due-done { color: var(--ink-3); }
.chip.who { padding-left: 2px; }
.chip.who.mine { border-color: var(--ink-3); color: var(--ink); }
.chip.spare { padding: 0 7px; border-style: dashed; border-color: var(--gold); color: var(--gold); font-family: var(--f-mono); font-size: 11.5px; }
.chip.doing { padding: 0 7px; border-color: var(--cold-soft); background: var(--cold-soft); color: var(--cold); font-family: var(--f-mono); font-size: 11.5px; }
.chip.add { width: 22px; padding: 0; justify-content: center; border-style: dashed; color: var(--ink-3); opacity: 0; }
tr:hover .chip.add, .chip.add:focus-visible { opacity: 1; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; border-radius: 0;
  font: 600 9px/1 var(--f-body); letter-spacing: 0.02em;
}
.av-0 { background: var(--av-0); color: var(--av-0-ink); }
.av-1 { background: var(--av-1); color: var(--av-1-ink); }
.av-2 { background: var(--av-2); color: var(--av-2-ink); }
.av-3 { background: var(--av-3); color: var(--av-3-ink); }
.av-4 { background: var(--av-4); color: var(--av-4-ink); }
.av-5 { background: var(--av-5); color: var(--av-5-ink); }
.av-none { background: var(--paper-3); color: var(--ink-3); }

.next-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.next-text > span:first-child { margin-right: 2px; }

.select {
  height: 34px; max-width: 100%; padding: 0 30px 0 11px;
  font: 500 14px var(--f-body); color: var(--ink);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237d8882' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--rule); border-radius: 0;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
}
.select:hover { border-color: var(--ink-3); }
.select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.prop-val .select { height: 30px; font-size: 13.5px; }
.prop-game { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prop-link { font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.prop-link:hover { color: var(--ink); border-color: var(--ink-3); }
.prop-who { display: inline-flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ */
/* dragging a frame onto an open lane                                  */
/* ------------------------------------------------------------------ */

.waiting { margin-top: 18px; }
.waiting-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.waiting-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.waiting-hint { font-size: 13px; color: var(--ink-3); }
.waiting-list { display: flex; flex-wrap: wrap; gap: 8px; }
.waiting-frame {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  height: 34px; padding: 0 12px 0 10px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  font-size: 14px; color: var(--ink); cursor: grab;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.waiting-frame span:not(.ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waiting-frame .ico { color: var(--ink-3); }
.waiting-frame:hover { border-color: var(--ink-3); transform: translateY(-1px); box-shadow: 0 3px 0 -1px var(--rule); }
.waiting-frame.is-shelved .ico { color: var(--cold); }
.waiting-frame.dragging, .idea.dragging, .shelf-item.dragging { opacity: 0.4; }
.idea[draggable="true"], .shelf-item[draggable="true"] { cursor: grab; }

.lane-open .open-drop { display: none; }
body.is-dragging-frame .lane-open, body.is-dragging-frame .side-lane.open {
  border-color: var(--accent); border-style: dashed; color: var(--ink);
}
body.is-dragging-frame .lane-open .open-idle { display: none; }
body.is-dragging-frame .lane-open .open-drop { display: inline; color: var(--accent-ink); }
.lane-open.drop-ready, .side-lane.open.drop-ready { background: var(--accent-soft); border-style: solid; }
.side-lane.open { border: 1px solid transparent; }
.side-lane.open.drop-ready .mini { border-color: var(--accent); }

/* ------------------------------------------------------------------ */
/* trophy case                                                         */
/* ------------------------------------------------------------------ */

.scoreline {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 28px; border: 1px solid var(--rule); border-radius: 0; background: var(--card); overflow: hidden;
}
.score { padding: 14px 18px; border-left: 1px solid var(--rule-2); }
.score:first-child { border-left: 0; }
.score dt { font-size: 12.5px; color: var(--ink-3); }
.score dd { margin: 4px 0 0; font-size: 28px; line-height: 1; color: var(--ink); }

.case { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 44px; }
.award { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 12px; border: 1px solid var(--rule); border-radius: 0; background: var(--card); }
.award.locked { background: transparent; border-style: dashed; }
.award-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.award-text strong { font: 400 17px/1.25 var(--f-display); }
.award-text p { font-size: 13.5px; color: var(--ink-2); }
.award.locked .award-text strong, .award.locked .award-text p { color: var(--ink-3); }
.award-when { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.award.earned .award-when { color: var(--ok); }

.medal { display: inline-flex; flex: none; }
.medal svg { display: block; overflow: visible; }

.wall-head { margin-bottom: 16px; }
.wall-empty { padding: 14px 0; color: var(--ink-3); }

/* ------------------------------------------------------------------ */
/* power mode: alleys, accounts                                        */
/* ------------------------------------------------------------------ */

.switcher {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 8px 7px 10px; margin-top: -6px;
  background: none; border: 1px solid var(--rule); border-radius: 0;
  text-align: left; color: var(--ink);
}
.switcher:hover { background: var(--paper-3); }
.switcher > .ico { color: var(--ink-3); }
.switcher-dot { flex: none; width: 8px; height: 8px; border-radius: 0; background: var(--ink-3); }
.switcher.kind-shared .switcher-dot, .switcher.kind-public .switcher-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.switcher.st-offline .switcher-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.switcher.st-connecting .switcher-dot { background: var(--ink-3); box-shadow: none; }
.switcher-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.switcher-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher-status { font: 16px var(--f-mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.setting-note { padding: 14px 0; font-size: 13.5px; color: var(--ink-3); }
.setting-server { color: var(--ink-3); font-size: 12.5px; }
.sub-title { margin-top: 28px; padding-bottom: 6px; font: 400 19px/1.3 var(--f-display); }
.code-row { display: inline-flex; align-items: center; gap: 8px; }
.invite-code { padding: 4px 10px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 0; font-size: 15px; letter-spacing: 0.08em; }
.players { list-style: none; margin: 0; padding: 0 0 8px; border-bottom: 1px solid var(--rule-2); }
.player-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.player-row .avatar { width: 26px; height: 26px; font-size: 11px; }
.player-row .player-name { flex: 1; min-width: 0; }
.player-role { color: var(--ink-3); font-size: 12px; }
.alley-settings .setting:has(.setting-control:empty) { padding-bottom: 4px; border-bottom: 0; }

.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.dlg input[type="date"] { font-family: var(--f-mono); font-size: 15px; }
.player-list { display: flex; flex-direction: column; gap: 2px; max-height: 50dvh; overflow-y: auto; }
.player {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 42px; padding: 0 10px; border-radius: 0;
  background: none; border: 1px solid transparent; text-align: left; color: var(--ink);
}
.player:hover { background: var(--paper-2); }
.player.on { border-color: var(--rule); background: var(--card); }
.player .avatar { width: 26px; height: 26px; font-size: 11px; }
.player-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .ico { color: var(--ok); }

.dlg-account .tabs { align-self: flex-start; }
.dlg-alleys { width: min(560px, calc(100vw - 32px)); }
.dlg-alleys .dlg-body { gap: 0; }
.alley-block { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid var(--rule-2); }
.alley-block:first-of-type { border-top: 0; padding-top: 4px; }
.alley-block-title { font-size: 14px; font-weight: 600; }
.alley-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alley-row .input { flex: 1; min-width: 140px; }
.alley-row .seg { margin-right: auto; }
.public-list { display: flex; flex-direction: column; }
.public-alley { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule-2); }
.public-name { flex: 1; min-width: 0; font-weight: 500; }
.public-meta { color: var(--ink-3); }

/* ------------------------------------------------------------------ */
/* power mode: games and the scoresheet                                */
/* ------------------------------------------------------------------ */

.page.wide { max-width: 1180px; }

.game-list { display: flex; flex-direction: column; gap: 12px; }
.game-card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  transition: border-color 0.15s;
}
.game-card:hover { border-color: var(--ink-3); }
.game-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.game-card-title { font: 400 20px/1.25 var(--f-display); }
.game-card-meta { color: var(--ink-3); }
.game-card.is-perfect .game-card-meta { color: var(--ok); }
.mini-sheet { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border: 1px solid var(--ink-3); border-radius: 0; overflow: hidden; }
.mini-cell { position: relative; height: 16px; border-left: 1px solid var(--rule); background: var(--paper-2); }
.mini-cell:first-child { border-left: 0; }
.mini-cell::after { content: ""; position: absolute; left: 0; bottom: 0; top: 0; width: calc(var(--p, 0) * 100%); background: var(--wood-2); }
.mini-cell.rolling::after { background: var(--accent-soft); }
.mini-cell.struck::after { background: var(--ink-2); }
.mini-cell.empty { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--rule-2) 3px 4px); }

.game-sub { margin-top: 10px; color: var(--ink-2); }
.sheet-wrap { margin-top: 28px; overflow-x: auto; padding-bottom: 4px; }
.sheet {
  display: grid; grid-template-columns: repeat(12, minmax(78px, 1fr));
  min-width: 940px;
  border: 1.5px solid var(--ink); border-radius: 0; background: var(--card);
}
.cell {
  position: relative; display: flex; flex-direction: column;
  min-height: 132px; border-left: 1px solid var(--ink-3); color: var(--ink);
}
.cell:first-child { border-left: 0; }
a.cell:hover { background: var(--paper-2); }
.cell-n { height: 22px; padding: 4px 6px 0; font-size: 11px; color: var(--ink-3); }
.cell-mark {
  position: absolute; top: 0; right: 0; min-width: 30px; height: 24px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-left: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3);
  font-size: 12px;
}
.cell.status-done .cell-mark { background: var(--ink); color: var(--paper); font-weight: 600; }
.cell.status-active .cell-mark { color: var(--accent-ink); }
.cell-title {
  padding: 8px 7px 6px; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.cell.status-idea .cell-title, .cell.status-shelved .cell-title { color: var(--ink-2); }
.cell-title { flex: 1; }
.cell-total { display: flex; align-items: center; justify-content: flex-end; height: 30px; margin-top: auto; padding: 0 8px; border-top: 1px solid var(--rule); font-size: 15px; }
.cell.empty { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--rule-2) 6px 7px); }
.cell-add {
  position: absolute; inset: 22px 8px 8px; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px dashed var(--ink-3); border-radius: 0; color: var(--ink-2);
}
.cell-add:hover { border-color: var(--ink); color: var(--ink); }
.sheet-key { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.game-frames-head { margin-top: 38px; }

/* ------------------------------------------------------------------ */
/* power mode: board                                                   */
/* ------------------------------------------------------------------ */

.page-actions .select { height: 34px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { display: flex; flex-direction: column; min-height: 240px; padding: 10px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 0; transition: border-color 0.15s, background-color 0.15s; }
.col.drop-ready { border-color: var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.col-title { font-size: 13.5px; font-weight: 600; }
.col-doing .col-title::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 0; background: var(--cold); vertical-align: 1px; }
.col-done .col-title::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 0; background: var(--ok); vertical-align: 1px; }
.col-count { color: var(--ink-3); }
.col-cards { display: flex; flex-direction: column; gap: 8px; }
.col-empty { padding: 18px 8px; font-size: 13px; color: var(--ink-3); text-align: center; border: 1px dashed var(--rule); border-radius: 0; }
.card {
  display: flex; flex-direction: column; gap: 8px; padding: 10px 8px 10px 10px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 0;
  cursor: grab; transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--ink-3); }
.card.dragging { opacity: 0.4; }
.card-top { display: flex; align-items: flex-start; gap: 9px; }
.card-top .check { margin-top: 1px; }
.card-top .icon-btn { margin: -4px -2px 0 0; opacity: 0; }
.card:hover .card-top .icon-btn, .card:focus-within .card-top .icon-btn { opacity: 1; }
.card-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.card.done .card-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule); }
.card.done .check { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-left: 29px; }
.card-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.frame-link { min-width: 0; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-link:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }

/* ------------------------------------------------------------------ */
/* power mode: table, due dates, leaderboard                           */
/* ------------------------------------------------------------------ */

.table-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.table-bar .search { flex: 1; min-width: 200px; max-width: 420px; height: 34px; padding: 0 12px; font-size: 14px; }
.table-count { margin-left: auto; color: var(--ink-3); }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 0; background: var(--card); }
.pins-table, .lb { width: 100%; border-collapse: collapse; font-size: 14px; }
.pins-table th, .lb th { position: sticky; top: 0; padding: 0; background: var(--paper-2); border-bottom: 1px solid var(--rule); text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.lb th { padding: 10px 14px; }
.th-btn { display: inline-flex; align-items: center; gap: 5px; width: 100%; height: 36px; padding: 0 12px; background: none; border: 0; font: inherit; color: inherit; text-align: left; }
.th-btn:hover { color: var(--ink); }
.th-arrow { font-family: var(--f-mono); color: var(--accent-ink); }
.pins-table td, .lb td { padding: 7px 12px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.pins-table tr:last-child td, .lb tr:last-child td { border-bottom: 0; }
.pins-table tbody tr:hover td { background: var(--paper-2); }
.td-pin { min-width: 260px; }
.td-pin-in { display: flex; align-items: center; gap: 10px; }
.td-text { overflow-wrap: anywhere; }
tr.done .td-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule); }
tr.done .check { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.td-frame { max-width: 220px; }
.td-frame .frame-link { display: block; font-size: 13.5px; color: var(--ink-2); }
.td-game a { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.td-empty { padding: 28px 12px !important; text-align: center; color: var(--ink-3); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 0; border: 1.5px solid var(--ink-3); }
.state-doing::before { background: var(--cold); border-color: var(--cold); }
.state-done::before { background: var(--ok); border-color: var(--ok); }
.state-later { color: var(--ink-3); }
.state-later::before { border-style: dashed; }

.agenda { margin-bottom: 30px; }
.agenda.is-late .section-title { color: var(--accent-ink); }
.agenda-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 0; border-bottom: 1px solid var(--rule-2); }
.agenda-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.agenda-pin { font-weight: 500; overflow-wrap: anywhere; }
.agenda-text .frame-link { font-size: 13px; }
.agenda-chips { display: inline-flex; align-items: center; gap: 4px; flex: none; }

.lb .num { text-align: right; }
.lb-rank { width: 64px; color: var(--ink-3); white-space: nowrap; }
.lb-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.lb-name .avatar { width: 26px; height: 26px; font-size: 11px; }
.lb-week { font-size: 16px; color: var(--ink); }
.lb tr.is-me td { background: var(--paper-2); }
.lb tr.is-top .lb-rank { color: var(--gold); font-weight: 600; }
.lb tr.is-top .lb-rank::after { content: " ★"; }


/* ------------------------------------------------------------------ */
/* the alley at night, 1989: pixels, bevels, hard shadows, neon        */
/* ------------------------------------------------------------------ */

.ico svg, .pinmark svg, .medal svg, .ball svg { display: block; }

/* scanlines: only at night (--scan is transparent by day) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: repeating-linear-gradient(180deg, var(--scan) 0 1px, transparent 1px 3px);
}

/* the sidebar is the carpet under the ball returns */
.side {
  background: linear-gradient(var(--carpet-veil), var(--carpet-veil)), var(--carpet), var(--paper-2);
  background-size: auto, 48px 48px, auto;
  border-right: 3px solid var(--ink);
}
.brand { font: 700 24px/1 var(--f-display); letter-spacing: 0.01em; }
.brand em { text-shadow: 0 0 6px var(--glow), 0 0 16px var(--glow); }
.mobilebar { border-bottom-width: 3px; border-bottom-color: var(--ink); }

.nav-item, .side-btn, .side-lane { font: 500 15px var(--f-display); }
.nav-item.on, .side-btn.on, .side-lane.on { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--accent); }
.nav-item.on .nav-count { color: var(--paper); }
.side-label { font: 700 12px var(--f-display); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); }
.nav-count { font-size: 17px; }
.side-foot { border-top: 2px solid var(--ink); }

/* titles: pixel type with an offset shadow, like a bowling-shirt patch */
.page-title, .project-title { font-weight: 700; text-shadow: 3px 3px 0 var(--accent-soft), 0 0 18px var(--glow); }
.section-title, .group-title, .today-label { font: 700 16px/1 var(--f-pixel); text-transform: uppercase; letter-spacing: 0; }
.col-title, .waiting-title, .alley-block-title, .crumb-title { font: 700 13px var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; }
.section-head, .group-title { border-bottom: 3px solid var(--ink); }
.lane-title, .shelf-title, .trophy-title, .game-card-title, .dlg-title, .award-text strong, .empty h3, .sub-title, .today-step, .intro-title { font-weight: 600; }

/* buttons: chunky, bevelled, and they press in */
.btn {
  font: 600 14.5px/1 var(--f-display); letter-spacing: 0.02em;
  border: 2px solid var(--ink);
  box-shadow: inset -2px -2px 0 var(--bevel-lo), inset 2px 2px 0 var(--bevel-hi), 3px 3px 0 var(--shadow);
  transition: transform 0.06s, box-shadow 0.06s, background-color 0.12s;
}
.btn:hover { border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: inset -2px -2px 0 var(--bevel-lo), inset 2px 2px 0 var(--bevel-hi), 4px 4px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: inset 2px 2px 0 var(--bevel-lo); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--ink); filter: brightness(1.06); }
.btn.primary kbd { border-color: currentColor; }
.btn.ghost { border-color: transparent; box-shadow: none; }
.btn.ghost:hover { transform: none; box-shadow: none; background: var(--paper-3); border-color: transparent; }
.btn.ghost:active { transform: translate(1px, 1px); }
.btn.danger { color: var(--accent-ink); border-color: var(--accent); }
.dlg .btn.danger { color: var(--on-accent); border-color: var(--ink); }
.icon-btn { border: 2px solid transparent; }
.icon-btn:hover { background: var(--paper-3); border-color: var(--ink); }
.capture {
  height: 40px; font: 700 15px var(--f-display);
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--ink);
  box-shadow: inset -2px -2px 0 var(--bevel-lo), inset 2px 2px 0 var(--bevel-hi), 3px 3px 0 var(--shadow);
}
.capture:hover { border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: inset -2px -2px 0 var(--bevel-lo), inset 2px 2px 0 var(--bevel-hi), 4px 4px 0 var(--shadow); }
.capture:active { transform: translate(3px, 3px); box-shadow: none; }
.capture kbd { background: transparent; color: inherit; border-color: currentColor; }

kbd { font: 400 16px/1 var(--f-mono); height: 20px; border: 2px solid var(--ink-3); border-bottom-width: 3px; }

/* fields */
.input, .select, .lot-capture, .inline-input { border: 2px solid var(--ink-3); box-shadow: inset 2px 2px 0 var(--bevel-lo); }
.input:focus, .select:focus-visible, .lot-capture:focus-within { border-color: var(--ink); outline: none; }
.lot-capture { background: var(--card); }
:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* cards get a thick outline and a hard shadow */
.lane, .today, .shelf-item, .trophy, .game-card, .table-wrap, .scoreline, .award.earned, .switcher, .col, .dlg, .menu {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
}
.today { box-shadow: 4px 4px 0 var(--accent); }
.today-label { color: var(--accent-ink); }
.dlg { border-width: 3px; box-shadow: 8px 8px 0 var(--shadow); }
.dlg-head { padding-bottom: 14px; border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.dlg-body { padding-top: 18px; }
.menu { padding: 4px; }
.menu-item { font: 500 15px var(--f-display); }
.menu-item:hover, .menu-item:focus { background: var(--ink); color: var(--paper); outline: none; }
.trophy:hover, .game-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); border-color: var(--ink); }
.lane-open { border: 2px dashed var(--ink-3); box-shadow: none; }
.award.locked { border: 2px dashed var(--rule); }
.card { border: 2px solid var(--ink-3); box-shadow: 2px 2px 0 var(--shadow); }
.card:hover { border-color: var(--ink); }
.col { background: var(--paper-2); }
.crumb-card { border: 2px dashed var(--ink-3); }
.crumb-card.has { border-style: solid; border-color: var(--ink); background: var(--card); }
.shelf-note { border-left: 4px solid var(--cold); }
.switcher { background: var(--card); }
.switcher:hover { background: var(--paper-3); }

/* toasts: a scoreboard message */
.toast { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--accent); font: 500 15px var(--f-display); letter-spacing: 0.01em; }
.toast-act { font: 600 14px var(--f-display); border: 2px solid currentColor; }

/* small things */
.check { border: 2px solid var(--ink-2); }
.check .ico svg { width: 12px; height: 12px; }
.chip, .badge, .pill { font: 500 13px/1 var(--f-display); border-width: 2px; }
.chip.spare, .chip.doing, .badge { font: 400 16px/1 var(--f-mono); }
.pill { border: 2px solid currentColor; }
.avatar { font: 700 10px/1 var(--f-display); letter-spacing: 0; box-shadow: inset -1px -1px 0 var(--bevel-lo); }
.slot { border-width: 2px; }
.mini { box-shadow: 0 -2px 0 0 var(--bumper), 0 2px 0 0 var(--bumper); }
.mini > span { border-radius: 0; }
.state::before, .switcher-dot { border-radius: 0; }
.seg { border: 2px solid var(--ink-3); }
.seg-btn { font: 500 14px var(--f-display); }
.seg-btn.on { background: var(--ink); color: var(--paper); box-shadow: none; }

/* the lane: maple planks, pixel arrows, a sprite ball, pixel pins */
.track { box-shadow: inset 0 0 0 2px var(--wood-edge), 0 0 22px -6px var(--glow); }
.track::before, .track::after { height: 6px; box-shadow: 0 0 10px var(--glow); }
.track .foul { width: 3px; }
.lane-arrows rect { fill: var(--arrow); }
.track { --ball-size: 16px; }
.track-big { --ball-size: 24px; }
.ball { background: none; box-shadow: none; }
.ball svg { width: 100%; height: 100%; }
.pin-top { fill: var(--pin); }
.pin-rim { fill: var(--pin-ring); }
.pin { transition: opacity 0.4s; }

/* trophy cups: grey until won */
.medal:not(.earned) { --cup: var(--cup-off); --cup-shade: var(--cup-off); --cup-rim: var(--cup-off-rim); --cup-base: var(--cup-off-rim); --cup-mark: var(--cup-off-rim); }
.medal.earned svg { filter: drop-shadow(0 0 6px var(--glow)); }

/* numbers look like a scoreboard */
.tally-big, .score dd, .lb-week, .cell-total, .timer-time { font-family: var(--f-mono); }
.tally-big { font-size: 52px; color: var(--accent); text-shadow: 0 0 10px var(--glow); }
.score dd { font-size: 44px; color: var(--accent); }
.timer-time { font-size: 64px; }
.timer-ring-fg, .timer-ring-bg { stroke-width: 6; stroke-linecap: butt; }
.timer-ring-fg { stroke-dasharray: 8 3; }
.focus { border: 0; }
.focus-kicker { font: 700 16px var(--f-pixel); text-transform: uppercase; }

/* STRIKE! */
.strike { background: linear-gradient(var(--carpet-veil), var(--carpet-veil)), var(--carpet), var(--paper); background-size: auto, 48px 48px, auto; }
.strike-word { font: 700 clamp(64px, 13vw, 140px)/1 var(--f-display); text-transform: uppercase; text-shadow: 5px 5px 0 var(--gold), 10px 10px 0 var(--cold), 0 0 30px var(--glow); }
.strike-title { font: 600 20px/1.3 var(--f-display); }

.scoreline { background: #16112e; }
.score { border-left: 2px solid #2e2560; }
.score dt { font: 700 12px var(--f-display); text-transform: uppercase; letter-spacing: 0.1em; }
.scoreline .score dt { color: #bdb2e6; }
.scoreline .score dd { color: #ffd23f; text-shadow: 0 0 10px rgba(255, 210, 63, 0.45); }
.scoreline .score:nth-child(4) dd { color: #ff4fa3; text-shadow: 0 0 10px rgba(255, 79, 163, 0.5); }
.sheet { border-width: 3px; box-shadow: 4px 4px 0 var(--shadow); }
.cell-mark { font-size: 18px; }
.cell-total { font-size: 22px; }
.game-sub, .sheet-key { font-size: 14.5px; }
.lb .lb-rank { font-size: 20px; }
.pins-table th, .lb th { font: 700 12px var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; }
.th-btn { font: inherit; }

/* AI tools: tokens and setup snippets */
.dlg-ai { width: min(680px, calc(100vw - 32px)); }
.token-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.token-value { flex: 1; min-width: 0; padding: 8px 10px; background: var(--paper-2); border: 2px solid var(--ink); font-size: 17px; overflow-wrap: anywhere; user-select: all; }
.setup-tabs { flex-wrap: wrap; align-self: flex-start; }
.setup-panel { display: flex; flex-direction: column; gap: 8px; }
.setup-code {
  margin: 0; padding: 12px 14px; max-height: 240px; overflow: auto;
  background: #16112e; color: #e9e3ff; border: 2px solid var(--ink);
  font: 400 16px/1.35 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.token-list { display: flex; flex-direction: column; }

/* bumpers.me Pro: sign-in, paywall, subscription banner */
body.booting .shell, body.booting .mobilebar, body.gated .shell, body.gated .mobilebar { visibility: hidden; }
.gate {
  position: fixed; inset: 0; z-index: 80; overflow-y: auto;
  display: grid; place-items: center; padding: 32px 16px;
  background: linear-gradient(var(--carpet-veil), var(--carpet-veil)), var(--carpet), var(--paper);
  background-size: auto, 48px 48px, auto;
}
.gate-card {
  width: min(460px, 100%); display: flex; flex-direction: column; gap: 14px;
  padding: 28px 28px 22px; background: var(--card);
  border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--shadow);
}
.gate-brand { display: flex; align-items: center; gap: 10px; font: 700 26px/1 var(--f-display); }
.gate-brand em { font-style: normal; color: var(--accent); text-shadow: 0 0 10px var(--glow); }
.gate-title { font: 700 clamp(28px, 6vw, 36px)/1.1 var(--f-display); text-shadow: 3px 3px 0 var(--accent-soft); }
.gate-lede { color: var(--ink-2); font-size: 15.5px; }
.gate-price { padding: 10px 12px; background: var(--paper-2); border: 2px dashed var(--ink-3); font-size: 15px; }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-form .btn.big, .gate-card > .btn.big { width: 100%; }
.gate-list { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.gate-switch { font-size: 14px; color: var(--ink-2); text-align: center; }
.gate-note { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.gate-legal { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.gate-legal a { text-decoration: underline; text-underline-offset: 3px; }
.gate-wait { align-items: center; text-align: center; }
.linkish { padding: 0; background: none; border: 0; color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.billing-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: -12px 0 24px; padding: 12px 14px;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--shadow); font-size: 14.5px;
}
.billing-banner.is-off { background: var(--accent-soft); }
.billing-banner.is-warn { background: var(--paper-2); border-style: dashed; }
.billing-banner-actions { display: inline-flex; gap: 8px; }
.trial-pill {
  align-self: flex-start; margin: 0 0 6px 8px; padding: 3px 8px;
  border: 2px solid var(--ink); background: var(--card); font: 600 12.5px var(--f-display);
}
.trial-pill:hover { background: var(--paper-3); }
.connect-block { display: flex; flex-direction: column; gap: 10px; }
.connect-steps { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.connect-steps dt { font: 700 13px var(--f-display); }
.connect-steps dd { margin: 0; color: var(--ink-2); }

/* ------------------------------------------------------------------ */
/* small screens                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .mobilebar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 6px;
    height: 54px; padding: 0 10px;
    padding-top: env(safe-area-inset-top);
    background: var(--paper); border-bottom: 1px solid var(--rule);
  }
  .mobilebar .brand { font-size: 19px; padding-left: 2px; gap: 0; }
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
    width: min(290px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
    box-shadow: var(--float);
  }
  body.side-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 0.2s; display: block; }
  body.side-open .scrim { opacity: 1; pointer-events: auto; }
  .main { padding: 24px 16px 120px; }

  .page-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .lane { padding: 14px 14px; }
  .lane-meta { flex-basis: 100%; order: 3; flex-wrap: wrap; }
  .lane-head { flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; }
  .lane-title { flex: 1; }
  .lane-head .icon-btn { order: 2; margin: -4px -6px 0 0; }
  .lane-open { flex-direction: column; align-items: stretch; gap: 4px; }
  .lane-open .track { flex: none; width: auto; }
  .next { flex-wrap: wrap; }
  .next-label { width: 100%; }
  .next-text { flex-basis: 60%; }
  .tally { flex-direction: column; align-items: flex-start; }

  .topbar { flex-wrap: wrap; }
  .topbar-actions .btn span:not(.ico) { display: none; }
  .topbar-actions .btn { padding: 0 9px; }
  .props { grid-template-columns: minmax(0, 1fr); }
  .prop-key { border-bottom: 0; min-height: 0; padding-bottom: 0; font-size: 12.5px; }
  .grip { display: none; }
  .step-tools { opacity: 1; }
  .step-tools .icon-btn.sm { width: 30px; }
  .step-when { display: none; }
  .step-n { display: none; }
  .add-row { padding-left: 0; }

  .idea { flex-wrap: wrap; gap: 6px 12px; }
  .idea-main { flex-basis: 100%; }
  .idea-actions { margin-left: auto; }
  .setting { flex-direction: column; align-items: flex-start; gap: 12px; }
  .seg { flex-wrap: wrap; }
  .swap { flex-direction: column; align-items: flex-start; }
  .dlg-palette { margin-top: 8px; }
  .focus-foot .focus-keys { display: none; }
  .focus-actions kbd { display: none; }

  .step { flex-wrap: wrap; }
  .step-text { flex: 1 1 0; }
  .step-chips { order: 5; flex-basis: 100%; flex-wrap: wrap; padding: 0 0 4px 28px; }
  .scoreline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score:nth-child(3) { border-left: 0; }
  .score:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
  .board { grid-template-columns: minmax(0, 1fr); }
  .col { min-height: 0; }
  .card-top .icon-btn { opacity: 1; }
  .page-actions { flex-wrap: wrap; }
  .table-count { margin-left: 0; }
  .agenda-row { flex-wrap: wrap; }
  .agenda-chips { flex-basis: 100%; padding-left: 32px; flex-wrap: wrap; }
  .lb th:nth-child(5), .lb td:nth-child(5), .lb th:nth-child(6), .lb td:nth-child(6) { display: none; }
  .waiting-hint { display: none; }
}

@media (hover: none) {
  .step-tools { opacity: 1; }
  .card-top .icon-btn { opacity: 1; }
  .chip.add { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
  .brand .pinmark svg, .empty .pinmark svg { animation: none !important; }
}

/* Victory rolls and the long game. */
.trophy-section-head { margin-top: 32px; margin-bottom: 14px; }
.trophy-section-sub { margin-top: 5px; color: var(--ink-2); font-size: 14px; }
.trophy-progress { display: block; width: 100%; height: 8px; margin: 10px 0 6px; border: 0; border-radius: 0; background: var(--paper-3); accent-color: var(--accent); }
.trophy-progress::-webkit-progress-bar { background: var(--paper-3); }
.trophy-progress::-webkit-progress-value { background: var(--accent); }
.trophy-progress::-moz-progress-bar { background: var(--accent); }
.tier-award { align-items: flex-start; }
.tier-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 7px 0; }
.tier-badge { padding: 2px 5px; border: 1px solid var(--rule); font: 12px var(--f-display); text-transform: capitalize; color: var(--ink-2); }
.tier-badge.earned { color: #241a3d; background: var(--tier-color); border-color: var(--tier-color); }
.tier-bronze { --tier-color: #dca478; }
.tier-silver { --tier-color: #c1d0df; }
.tier-gold { --tier-color: #ffd23f; }
.tier-platinum { --tier-color: #9eefe2; }
.medal.earned[class*="tier-"] { --cup: var(--tier-color); --cup-shade: color-mix(in srgb, var(--tier-color) 65%, #241a3d); }
.victory-invite { display: flex; align-items: center; gap: 20px; justify-content: space-between; padding: 18px; margin: 22px 0; background: var(--accent-soft); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--shadow); }
.victory-invite strong { font: 600 20px var(--f-display); }
.victory-invite p { margin-top: 5px; color: var(--ink-2); font-size: 14px; }
.dlg-celebrate { width: min(580px, calc(100vw - 32px)); }
.celebration-body { align-items: center; text-align: center; padding: 28px 24px 32px; gap: 20px; background: linear-gradient(var(--carpet-veil), var(--carpet-veil)), var(--carpet), var(--paper); }
.celebration-body .strike-word { font-size: clamp(60px, 12vw, 96px); }
.celebration-body .strike-title { overflow-wrap: anywhere; max-width: 100%; }
.celebration-body .dlg-foot { flex-wrap: wrap; justify-content: center; }
.celebration-cup { transform: scale(1.3); }
.victory-ticket { font: 600 15px var(--f-display); padding: 10px 12px; border: 2px dashed var(--accent); color: var(--accent-ink); background: var(--card); }
.dlg-victory { width: min(640px, calc(100vw - 24px)); }
.victory-body { gap: 14px; }
.victory-marquee { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; padding: 12px; background: #16112e; color: #bdb2e6; font: 16px var(--f-mono); border: 2px solid var(--ink); }
.victory-score { color: #ffd23f; font-weight: 400; }
.victory-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.victory-stage { position: relative; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--shadow); overflow: hidden; }
.victory-lane { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; image-rendering: pixelated; touch-action: none; cursor: grab; }
.victory-lane:active { cursor: grabbing; }
.victory-controls { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.victory-kicker { font: 600 12px var(--f-display); letter-spacing: 0.06em; color: var(--accent-ink); }
.victory-status { font: 500 22px/1.2 var(--f-display); min-height: 54px; }
.victory-help { font-size: 13px; color: var(--ink-2); }
.victory-slider { display: flex; flex-direction: column; gap: 6px; }
.victory-slider > span { display: flex; justify-content: space-between; gap: 8px; font: 16px var(--f-mono); }
.victory-slider input { width: 100%; min-height: 28px; accent-color: var(--accent); cursor: pointer; }
.victory-slider input:disabled { cursor: default; }
.perfect-roll::after { content: '★  ★  ★'; position: absolute; top: 35%; left: 0; width: 100%; color: #ffd23f; text-align: center; font: 32px var(--f-display); text-shadow: 3px 3px #241a3d; animation: victory-stars 1s ease-out; pointer-events: none; }
@keyframes victory-stars { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 500px) {
  .victory-body { padding: 14px; }
  .victory-play { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .victory-stage { width: 160px; justify-self: center; }
  .victory-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .victory-controls > .victory-kicker { display: none; }
  .victory-status { grid-column: 1 / -1; grid-row: 1; min-height: 0; font-size: 18px; }
  .victory-controls > .victory-help { grid-column: 1 / -1; grid-row: 2; font-size: 12px; }
  .victory-controls > .victory-help:last-of-type { grid-row: 5; }
  .victory-slider { grid-row: 3; }
  .victory-slider > span { font-size: 14px; }
  .victory-controls > .btn { grid-row: 4; padding: 0 8px; }
  .victory-invite { align-items: stretch; flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .perfect-roll::after { animation: none; }
}

/* Keep setup actions visible on touch screens as well as with a keyboard. */
.lane-game { padding: 0 18px 12px; font-size: 13px; }
.lane-game a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); }
.prop-game { flex-wrap: wrap; }
.pin-compose { flex-wrap: wrap; gap: 8px; }
.pin-compose .add-input { flex: 1 1 160px; min-width: 120px; }
.pin-compose .add-assignee { max-width: 180px; }
.assign-pin { border-style: dashed; }
.frame-picker-list { display: flex; flex-direction: column; max-height: 340px; overflow: auto; }
.frame-picker-row { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 0; border-bottom: 1px solid var(--rule); background: var(--card); color: var(--ink); text-align: left; }
.frame-picker-row:hover, .frame-picker-row:focus-visible { background: var(--paper-3); }
.frame-picker-row span { color: var(--ink-2); font-size: 13px; }
@media (max-width: 500px) {
  .pin-compose .add-hint { display: none; }
  .pin-compose .add-assignee { max-width: none; flex: 1 1 140px; }
  .prop-game .select { max-width: 100%; }
}

.dlg-guide { width: min(640px, calc(100vw - 24px)); }
.play-guide { display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 1.5; }
.guide-terms { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 16px; margin: 0; }
.guide-terms dt { display: flex; align-items: flex-start; gap: 8px; font: 600 18px var(--f-display); }
.guide-terms dd { margin: 0; color: var(--ink-2); }
.intro .play-guide { margin: 24px 0; text-align: left; }
.game-lanes-note { margin: 14px 0; max-width: 70ch; color: var(--ink-2); font-size: 14px; }

/* Personal/shared capacity and team assignments. */
.shared-slots { margin: 1.5rem 0 2rem; }
.assignment-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1rem 0; }
.assignment-card { display:flex; flex-direction:column; align-items:flex-start; gap:.5rem; padding:1.2rem; border:1px solid var(--rule); border-radius:0; box-shadow:3px 3px 0 var(--ink); background:var(--card); color:inherit; text-align:left; font:inherit; overflow-wrap:anywhere; }
.assignment-card.open { border-style:dashed; }
.frame-assignment { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; font-size:.85rem; }
.game .idea { flex-wrap:wrap; }
.game .frame-assignment { flex-basis:100%; padding:.5rem 0; }
@media(max-width:600px) { .assignment-grid { grid-template-columns:1fr; } }

.waiting-games-title { margin-top: 1.5rem; }
