@import url("../tokens/fonts.css");

/* ==========================================================================
   Tabletop — a premium board game on a wooden table.
   Wooden pieces, cardstock boards, playing cards, dice and score tracks.
   Colours, spacing, radii, shadows, durations and easings come from tokens.css;
   materials and motion live here.
   Rules: only transform/opacity move; entrance animations fill BACKWARDS;
   colour/shadow change only on one element's own hover/active/state.
   ========================================================================== */

:root {
  /* materials (constants, not themeable: they are physical) */
  --tt-wood: #e7c592;            /* natural maple piece */
  --tt-wood-side: #b88a52;       /* its turned edge */
  --tt-cast: rgb(43 29 20 / .42);/* the shadow a piece casts */
  --tt-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .16' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .12 0 0 0 0 .05 .9 0 0 0 -.42'/%3E%3C/filter%3E%3Crect width='240' height='120' filter='url(%23g)'/%3E%3C/svg%3E");
  --tt-shine: linear-gradient(180deg, rgb(255 255 255 / .28), rgb(255 255 255 / 0) 46%, rgb(0 0 0 / .05));
  --tt-fg: var(--table-ink);
  --tt-fg-soft: var(--table-ink-soft);
  --tt-depth: 5px;
  color-scheme: light;
}
[data-theme="dark"] { color-scheme: dark; --tt-cast: rgb(0 0 0 / .6); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--tt-fg);
  background-color: var(--table);
  /* birch table: planks + a static grain */
  background-image:
    repeating-linear-gradient(180deg, transparent 0 157px, rgb(110 74 36 / .13) 157px 158px, rgb(255 255 255 / .22) 158px 159px, transparent 159px 160px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='400'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0025 .07' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .29 0 0 0 0 .12 .5 0 0 0 -.21'/%3E%3C/filter%3E%3Crect width='1200' height='400' filter='url(%23g)'/%3E%3C/svg%3E");
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] body {
  /* game night: green baize with a felt nap under a warm lamp */
  background-image:
    radial-gradient(120% 70% at 50% -10%, rgb(255 226 160 / .10), rgb(255 226 160 / 0) 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 .9 .55 0 0 0 -.22'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23f)'/%3E%3C/svg%3E");
}

/* ---------- surfaces set the text colour for their children ---------- */
.tt-board { --tt-fg: var(--board-ink); --tt-fg-soft: var(--board-ink-soft); color: var(--board-ink); }
/* card stock is cream in both themes: re-map the board tokens to day values inside it */
.tt-on-card {
  --board: #fffaf0; --board-sunk: #f3e9d5; --board-ink: #2b1d14; --board-ink-soft: #6b5442;
  --line: #dfcca9; --accent-ink: #0a645d; --alert-ink: #a9321d;
  --shadow-inset: inset 0 2px 3px #2b1d1426; --shadow-piece: 0 2px 3px #2b1d1459;
  --tt-fg: #2b1d14; --tt-fg-soft: #6b5442; --tt-cast: rgb(43 29 20 / .42);
  color: #2b1d14; color-scheme: light;
}

/* piece tones: --tt-fill (face), --tt-side (turned edge), --tt-on (print) */
.tt-tone-wood    { --tt-fill: var(--tt-wood); --tt-side: var(--tt-wood-side); --tt-on: var(--ink); --tt-on-soft: var(--ink-soft); }
.tt-tone-teal    { --tt-fill: var(--teal); --tt-side: color-mix(in srgb, var(--teal) 62%, #06110f); --tt-on: var(--card); --tt-on-soft: rgb(255 250 240 / .86); }
.tt-tone-tomato  { --tt-fill: var(--tomato); --tt-side: color-mix(in srgb, var(--tomato) 68%, #2b0d05); --tt-on: var(--ink); --tt-on-soft: rgb(43 29 20 / .84); }
.tt-tone-mustard { --tt-fill: var(--mustard); --tt-side: color-mix(in srgb, var(--mustard) 70%, #3a2400); --tt-on: var(--ink); --tt-on-soft: rgb(43 29 20 / .84); }
.tt-tone-plum    { --tt-fill: var(--plum); --tt-side: color-mix(in srgb, var(--plum) 62%, #12030f); --tt-on: var(--card); --tt-on-soft: rgb(255 250 240 / .86); }
.tt-tone-forest  { --tt-fill: var(--forest); --tt-side: color-mix(in srgb, var(--forest) 62%, #04110a); --tt-on: var(--card); --tt-on-soft: rgb(255 250 240 / .86); }
.tt-tone-card    { --tt-fill: var(--card); --tt-side: #d9c7a4; --tt-on: var(--ink); --tt-on-soft: var(--ink-soft); }

/* ---------- type helpers ---------- */
.tt-display { font: 400 56px/56px var(--font-display); letter-spacing: .01em; margin: 0; padding-top: .08em; }
.tt-title { font: 400 32px/36px var(--font-display); letter-spacing: .01em; margin: 0; padding-top: .08em; }
.tt-score { font: 400 22px/24px var(--font-display); letter-spacing: .02em; }
.tt-h { font: 800 22px/28px var(--font-body); margin: 0; }
.tt-sub { font: 700 18px/24px var(--font-body); margin: 0; }
.tt-p { margin: 0; }
.tt-small { font-size: 14px; line-height: 20px; }
.tt-soft { color: var(--tt-fg-soft); }
.tt-label { font: 800 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--tt-fg-soft); }
.tt-link { color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; border-radius: 4px; }
.tt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tt-icon { width: 20px; height: 20px; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- preview stage (used by previews; handy for docs) ---------- */
.tt-stage { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-6); min-height: 100vh; align-content: center; }
.tt-stage--top { align-content: flex-start; }
.tt-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.tt-col { display: flex; flex-direction: column; gap: var(--space-3); }
.tt-cap { width: 100%; font: 800 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--tt-fg-soft); margin-top: var(--space-1); }

:where(.tt-btn, .tt-iconbtn, .tt-toggle, .tt-seg__opt, .tt-tab, .tt-select__trigger, .tt-pcard, .tt-die, .tt-tag__x, .tt-board--interactive, .tt-picker__opt):focus-visible,
.tt-link:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }

/* ==========================================================================
   Button — a wooden piece you push into the table
   ========================================================================== */
.tt-btn {
  --tt-depth: 5px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 44px; padding: 2px var(--space-4) 0; margin: 0 0 var(--tt-depth);
  border: 0; border-radius: var(--radius-md);
  font: 700 16px/1 var(--font-body); letter-spacing: .01em; white-space: nowrap; text-decoration: none;
  color: var(--tt-on); background-color: var(--tt-fill);
  background-image: var(--tt-shine), var(--tt-grain);
  background-size: auto, 240px 120px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 var(--tt-depth) 0 var(--tt-side), 0 calc(var(--tt-depth) + 3px) 7px -1px var(--tt-cast);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transform: translateY(0);
  transition: transform var(--dur-press) var(--ease-press), box-shadow var(--dur-press) var(--ease-press);
}
.tt-btn::after { content: ""; position: absolute; z-index: -1; left: -3px; right: -3px; top: -4px; bottom: calc(-1 * var(--tt-depth) - 4px); }
.tt-btn:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 calc(var(--tt-depth) + 2px) 0 var(--tt-side), 0 calc(var(--tt-depth) + 7px) 10px -2px var(--tt-cast); }
.tt-btn:active, .tt-btn.is-pressed { transform: translateY(calc(var(--tt-depth) - 1px)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 1px 0 var(--tt-side), 0 2px 2px var(--tt-cast); transition-duration: 60ms; }
.tt-btn > .tt-icon { width: 20px; height: 20px; margin-top: -2px; }
.tt-btn--sm { --tt-depth: 4px; height: 36px; padding: 2px var(--space-3) 0; font-size: 14px; border-radius: 10px; }
.tt-btn--sm > .tt-icon { width: 17px; height: 17px; }
.tt-btn--lg { --tt-depth: 6px; height: 56px; padding: 2px var(--space-6) 0; font-size: 18px; border-radius: 14px; }
.tt-btn--lg > .tt-icon { width: 22px; height: 22px; }
.tt-btn--block { display: flex; width: 100%; }
.tt-btn--ghost { --tt-depth: 0px; background: transparent; color: var(--tt-fg); box-shadow: none; }
.tt-btn--ghost:hover { transform: none; background: color-mix(in srgb, var(--tt-fg) 9%, transparent); box-shadow: none; }
.tt-btn--ghost:active { transform: translateY(1px); background: color-mix(in srgb, var(--tt-fg) 14%, transparent); box-shadow: none; }
.tt-btn__label { display: inline-flex; align-items: center; gap: var(--space-2); transition: opacity var(--dur-hover); }
.tt-btn.is-loading { pointer-events: none; }
.tt-btn.is-loading > :not(.tt-btn__spin) { opacity: 0; }
.tt-btn__spin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2.5px solid currentColor; border-radius: 5px; display: none; }
.tt-btn__spin::before { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: currentColor; box-shadow: -4px -4px 0 currentColor, 4px 4px 0 currentColor; }
.tt-btn.is-loading .tt-btn__spin { display: block; animation: tt-tumble 640ms var(--ease-hop) infinite; }
@keyframes tt-tumble { from { transform: rotate(0); } to { transform: rotate(90deg); } }
.tt-btn:disabled, .tt-btn[aria-disabled="true"] {
  --tt-depth: 2px; cursor: not-allowed; transform: translateY(2px);
  color: var(--board-ink-soft); background: var(--board-sunk); background-image: none;
  box-shadow: inset 0 0 0 2px var(--line);
}

/* ==========================================================================
   IconButton — a round token
   ========================================================================== */
.tt-iconbtn {
  --tt-depth: 4px; --s: 44px;
  position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); padding: 0; margin: 0 0 var(--tt-depth);
  border: 0; border-radius: 50%; color: var(--tt-on); background-color: var(--tt-fill);
  background-image: var(--tt-shine), var(--tt-grain); background-size: auto, 240px 120px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 var(--tt-depth) 0 var(--tt-side), 0 calc(var(--tt-depth) + 3px) 6px -1px var(--tt-cast);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-press) var(--ease-press), box-shadow var(--dur-press) var(--ease-press);
}
.tt-iconbtn::after { content: ""; position: absolute; z-index: -1; inset: -4px -4px calc(-1 * var(--tt-depth) - 4px); border-radius: 50%; }
.tt-iconbtn:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 calc(var(--tt-depth) + 2px) 0 var(--tt-side), 0 calc(var(--tt-depth) + 6px) 9px -2px var(--tt-cast); }
.tt-iconbtn:active, .tt-iconbtn[aria-pressed="true"] { transform: translateY(calc(var(--tt-depth) - 1px)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 1px 0 var(--tt-side), 0 2px 2px var(--tt-cast); }
.tt-iconbtn[aria-pressed="true"] { --tt-fill: var(--mustard); --tt-side: color-mix(in srgb, var(--mustard) 70%, #3a2400); --tt-on: var(--ink); }
.tt-iconbtn[aria-pressed="true"] .tt-icon { fill: currentColor; }
.tt-iconbtn--sm { --s: 36px; --tt-depth: 3px; }
.tt-iconbtn--sm .tt-icon { width: 17px; height: 17px; }
.tt-iconbtn--lg { --s: 56px; --tt-depth: 5px; }
.tt-iconbtn--lg .tt-icon { width: 24px; height: 24px; }
.tt-iconbtn--ghost { --tt-depth: 0px; background: transparent; color: var(--tt-fg); box-shadow: none; }
.tt-iconbtn--ghost:hover { transform: none; background: color-mix(in srgb, var(--tt-fg) 9%, transparent); box-shadow: none; }
.tt-iconbtn--ghost:active { transform: translateY(1px); box-shadow: none; }
.tt-iconbtn:disabled { --tt-depth: 1px; cursor: not-allowed; transform: translateY(2px); color: var(--board-ink-soft); background: var(--board-sunk); box-shadow: inset 0 0 0 2px var(--line); }
.tt-iconbtn__count { position: absolute; top: -6px; right: -6px; }

/* ==========================================================================
   Badge · Chip · Tag
   ========================================================================== */
.tt-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 1px 10px 0; border-radius: var(--radius-full);
  font: 800 12px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: var(--tt-on); background: var(--tt-fill); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 2px 0 var(--tt-side);
}
.tt-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-top: -1px; }
.tt-badge--count { min-width: 24px; justify-content: center; padding: 2px 6px 0; font: 400 13px/1 var(--font-display); letter-spacing: .03em; }
.tt-badge--soft { color: var(--tt-fg); background: color-mix(in srgb, var(--tt-fill) 22%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tt-fill) 60%, transparent); }
[data-theme="dark"] .tt-badge--soft:not(.tt-on-card *) { background: color-mix(in srgb, var(--tt-fill) 30%, transparent); }

/* poker chip: points, rewards */
.tt-chip {
  --s: 44px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; border-radius: 50%;
  color: var(--tt-on); background:
    radial-gradient(circle, var(--tt-fill) 0 55%, transparent 56%),
    repeating-conic-gradient(from 8deg, var(--card) 0 16deg, var(--tt-fill) 16deg 45deg);
  box-shadow: inset 0 0 0 2px var(--tt-side), 0 3px 0 var(--tt-side), 0 5px 6px -1px var(--tt-cast);
  font: 400 calc(var(--s) * .34)/1 var(--font-display); letter-spacing: .02em;
}
.tt-chip::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--tt-on) 55%, transparent); }
.tt-chip > span { position: relative; padding-top: .12em; }
.tt-chip--sm { --s: 32px; }
.tt-chip--lg { --s: 64px; }

.tt-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 2px 12px 0; border-radius: var(--radius-sm);
  font: 700 14px/1 var(--font-body); color: var(--tt-on); background-color: var(--tt-fill);
  background-image: var(--tt-shine), var(--tt-grain); background-size: auto, 240px 120px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 3px 0 var(--tt-side), 0 5px 6px -2px var(--tt-cast);
  margin-bottom: 3px;
}
.tt-tag .tt-icon { width: 16px; height: 16px; margin-top: -2px; }
.tt-tag__x { display: grid; place-items: center; width: 20px; height: 20px; margin: -2px -4px 0 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.tt-tag__x:hover { background: rgb(0 0 0 / .12); }
.tt-tag__x .tt-icon { width: 14px; height: 14px; stroke-width: 2.8; margin: 0; }
.tt-tag.is-leaving { transition: transform 260ms var(--ease-press), opacity 260ms; transform: translateY(-14px) rotate(-8deg); opacity: 0; }

/* ==========================================================================
   Avatar — a player token
   ========================================================================== */
.tt-avatar {
  --s: 44px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; border-radius: 50%;
  font: 800 calc(var(--s) * .38)/1 var(--font-body); color: var(--tt-on); background-color: var(--tt-fill);
  background-image: var(--tt-shine), var(--tt-grain); background-size: auto, 240px 120px;
  box-shadow: inset 0 0 0 3px var(--tt-side), inset 0 0 0 5px rgb(255 255 255 / .25), 0 3px 0 var(--tt-side), 0 5px 6px -1px var(--tt-cast);
}
.tt-avatar > span { padding-top: .1em; }
.tt-avatar img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; object-fit: cover; }
.tt-avatar--sm { --s: 32px; } .tt-avatar--lg { --s: 56px; } .tt-avatar--xl { --s: 80px; }
.tt-avatar__status { position: absolute; right: -2px; bottom: -2px; width: 34%; height: 34%; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 2.5px var(--board); }
.tt-avatar__status--turn { background: var(--mustard); }
.tt-avatar__status--away { background: var(--board-ink-soft); }
.tt-avatar__turn { position: absolute; top: -14px; left: 50%; width: 18px; height: 18px; margin-left: -9px; color: var(--mustard); animation: tt-bob 1.6s var(--ease-hop) infinite alternate; }
.tt-avatar__turn svg { width: 18px; height: 18px; fill: currentColor; stroke: var(--ink); stroke-width: 1.5; }
@keyframes tt-bob { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.tt-avatars { display: inline-flex; padding-left: 10px; }
.tt-avatars > * { margin-left: -10px; }
.tt-avatars > .tt-avatar { box-shadow: 0 0 0 2.5px var(--board), inset 0 0 0 3px var(--tt-side), 0 3px 0 var(--tt-side), 0 5px 6px -1px var(--tt-cast); }

/* ==========================================================================
   Board (Card) — a die-cut game board with a printed inner frame
   ========================================================================== */
.tt-board {
  position: relative; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6);
  background: var(--board); border-radius: var(--radius-board); box-shadow: var(--shadow-board);
}
.tt-board::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid var(--line); border-radius: calc(var(--radius-board) - 6px); pointer-events: none; }
.tt-board--flat::before { display: none; }
.tt-board--tone { background-color: var(--tt-fill); background-image: var(--tt-shine); color: var(--tt-on); --tt-fg: var(--tt-on); --tt-fg-soft: var(--tt-on-soft); }
.tt-board--tone::before { border-color: color-mix(in srgb, var(--tt-on) 30%, transparent); }
.tt-board--interactive { cursor: pointer; transition: transform var(--dur-hover) var(--ease-place), box-shadow var(--dur-hover) var(--ease-press); }
.tt-board--interactive::after { content: ""; position: absolute; z-index: -1; left: -4px; right: -6px; top: -4px; bottom: -8px; }
.tt-board--interactive:hover { transform: translateY(-3px) rotate(-.35deg); box-shadow: var(--shadow-lift); }
.tt-board--interactive:active { transform: translateY(0); transition-duration: var(--dur-press); }
.tt-board__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.tt-board__eyebrow { margin-bottom: 2px; }
.tt-board__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: auto; padding-top: var(--space-2); }
.tt-board__corner { position: absolute; top: -10px; right: 18px; }

/* entrance: boards dealt onto the table (first ~8 top-level blocks only) */
.tt-enter { animation: tt-enter 560ms var(--ease-deal) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes tt-enter { from { opacity: 0; transform: translateY(18px) rotate(-1.2deg); } }

/* ==========================================================================
   Toggle — a wooden disc that rolls along a groove
   ========================================================================== */
.tt-toggle { display: inline-flex; align-items: center; gap: var(--space-3); padding: 0; border: 0; background: none; color: var(--tt-fg); font: 600 16px/1.4 var(--font-body); cursor: pointer; text-align: left; border-radius: 18px; -webkit-tap-highlight-color: transparent; }
.tt-toggle__track {
  position: relative; flex: none; width: 56px; height: 32px; border-radius: var(--radius-full);
  background: var(--board-sunk); box-shadow: var(--shadow-inset), inset 0 0 0 1.5px var(--line);
  transition: background-color var(--dur-place) var(--ease-press), box-shadow var(--dur-place);
}
.tt-toggle__track::before { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px); opacity: .9; }
.tt-toggle__knob {
  position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%;
  background-color: var(--tt-wood); background-image: var(--tt-shine), var(--tt-grain); background-size: auto, 240px 120px;
  box-shadow: inset 0 0 0 2px var(--tt-wood-side), 0 2px 0 var(--tt-wood-side), 0 3px 4px -1px var(--tt-cast);
  transform: translateX(0) rotate(0);
  transition: transform var(--dur-place) var(--ease-place);
}
.tt-toggle__knob::after { content: ""; position: absolute; left: 50%; top: 4px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--tt-wood-side); }
.tt-toggle[aria-checked="true"] .tt-toggle__track { background: var(--teal); box-shadow: inset 0 2px 3px rgb(0 0 0 / .25), inset 0 0 0 1.5px color-mix(in srgb, var(--teal) 60%, #000); }
.tt-toggle[aria-checked="true"] .tt-toggle__track::before { background: repeating-linear-gradient(90deg, rgb(255 255 255 / .35) 0 4px, transparent 4px 8px); }
.tt-toggle[aria-checked="true"] .tt-toggle__knob { transform: translateX(24px) rotate(106deg); }
.tt-toggle:active .tt-toggle__knob { transition-duration: var(--dur-hover); }
.tt-toggle:hover .tt-toggle__track { box-shadow: var(--shadow-inset), inset 0 0 0 2px var(--accent-ink); }
.tt-toggle:disabled { cursor: not-allowed; opacity: .55; }
.tt-toggle__text { display: flex; flex-direction: column; }
.tt-toggle__hint { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--tt-fg-soft); }
.tt-toggle--sm .tt-toggle__track { width: 44px; height: 26px; }
.tt-toggle--sm .tt-toggle__knob { width: 20px; height: 20px; }
.tt-toggle--sm[aria-checked="true"] .tt-toggle__knob { transform: translateX(18px) rotate(103deg); }

/* ==========================================================================
   Checkbox + Radio — tokens dropped onto printed spaces
   ========================================================================== */
.tt-check { position: relative; display: inline-flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; color: var(--tt-fg); font-weight: 600; line-height: 24px; -webkit-tap-highlight-color: transparent; }
.tt-check input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; cursor: pointer; }
.tt-check__space {
  position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-top: -2px; border-radius: var(--radius-sm);
  background: var(--board); box-shadow: var(--shadow-inset), inset 0 0 0 1.5px var(--line);
}
.tt-check__space::before { content: ""; position: absolute; inset: 4px; border: 1.5px dashed color-mix(in srgb, var(--board-ink-soft) 55%, transparent); border-radius: 4px; transition: border-color var(--dur-hover); }
.tt-check--radio .tt-check__space::before { border-radius: 50%; }
[data-theme="dark"] .tt-check__space { background: var(--board-sunk); }
[data-theme="dark"] .tt-check__space::before { border-color: color-mix(in srgb, var(--board-ink-soft) 65%, transparent); }
.tt-check--radio .tt-check__space { border-radius: 50%; }
.tt-check:hover .tt-check__space::before { border-color: var(--accent-ink); }
.tt-check input:focus-visible + .tt-check__space { box-shadow: var(--shadow-inset), 0 0 0 3px var(--board), 0 0 0 6px var(--accent-ink); }
.tt-check__token {
  position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  color: var(--tt-on); background-color: var(--tt-fill); background-image: var(--tt-shine), var(--tt-grain); background-size: auto, 240px 120px;
  box-shadow: inset 0 0 0 1.5px var(--tt-side), 0 2px 0 var(--tt-side), 0 3px 3px -1px var(--tt-cast);
  opacity: 0; transform: translateY(-12px) scale(1.15);
  transition: opacity 180ms var(--ease-press), transform 220ms var(--ease-press);
}
.tt-check:not(.tt-check--radio) .tt-check__token { border-radius: 7px; }
.tt-check__token .tt-icon { width: 15px; height: 15px; stroke-width: 3; }
.tt-check--radio .tt-check__token { width: 18px; height: 18px; }
.tt-check--radio .tt-check__token::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgb(255 255 255 / .55); transform: translate(-2px, -2px); }
.tt-check input:checked + .tt-check__space .tt-check__token,
.tt-check input:indeterminate + .tt-check__space .tt-check__token { opacity: 1; transform: none; animation: tt-drop var(--dur-place) var(--ease-place) backwards; }
.tt-check input:checked + .tt-check__space::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--tt-fill); opacity: 0; animation: tt-thud 420ms var(--ease-deal) 140ms backwards; pointer-events: none; }
@keyframes tt-drop { 0% { opacity: 0; transform: translateY(-22px) scale(1.35); } 55% { opacity: 1; transform: translateY(2px) scale(.9, .86); } 100% { opacity: 1; transform: none; } }
@keyframes tt-thud { from { opacity: .8; transform: scale(.8); } to { opacity: 0; transform: scale(1.45); } }
.tt-check input:indeterminate + .tt-check__space .tt-icon { display: none; }
.tt-check input:indeterminate + .tt-check__space .tt-check__token::before { content: ""; width: 10px; height: 3px; border-radius: 2px; background: currentColor; }
.tt-check input:disabled ~ * { opacity: .5; }
.tt-check input:disabled { cursor: not-allowed; }
.tt-check__text { display: flex; flex-direction: column; }
.tt-check__hint { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--tt-fg-soft); }
.tt-radios { display: flex; flex-direction: column; gap: var(--space-3); border: 0; margin: 0; padding: 0; min-width: 0; }
.tt-radios--row { flex-direction: row; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
.tt-radios > legend { padding: 0; margin-bottom: var(--space-2); }

/* ==========================================================================
   TextField — a box printed on the board
   ========================================================================== */
.tt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tt-field__label { font: 800 12px/16px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--tt-fg-soft); }
.tt-field__box {
  position: relative; display: flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-3);
  background: var(--board); border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 2px var(--line), var(--shadow-inset);
  transition: box-shadow var(--dur-hover) var(--ease-press);
}
.tt-field__box > .tt-icon { color: var(--board-ink-soft); }
.tt-field__box:hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent-ink) 55%, var(--line)), var(--shadow-inset); }
.tt-field__box:focus-within { box-shadow: inset 0 0 0 2px var(--accent-ink), 0 0 0 3px color-mix(in srgb, var(--accent-ink) 28%, transparent); }
.tt-field__input { flex: 1; min-width: 0; height: 46px; padding: 3px 0 0; border: 0; outline: 0; background: transparent; color: var(--board-ink); font: 600 16px/1 var(--font-body); }
textarea.tt-field__input { height: auto; min-height: 96px; padding: 12px 0; line-height: 24px; resize: vertical; }
.tt-field__box--area { align-items: flex-start; }
.tt-field__input::placeholder { color: var(--board-ink-soft); opacity: .85; font-weight: 500; }
.tt-field__help { font-size: 14px; line-height: 20px; color: var(--tt-fg-soft); display: flex; gap: 6px; align-items: flex-start; }
.tt-field.is-error .tt-field__box { box-shadow: inset 0 0 0 2px var(--alert-ink), var(--shadow-inset); animation: tt-nudge 380ms var(--ease-press) backwards; }
.tt-field.is-error .tt-field__help { color: var(--alert-ink); font-weight: 700; }
.tt-field.is-error .tt-field__help::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--tomato); box-shadow: 0 1.5px 0 color-mix(in srgb, var(--tomato) 60%, #000); }
.tt-field__suffix { color: var(--board-ink-soft); font-weight: 700; font-size: 14px; }
@keyframes tt-nudge { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

/* ==========================================================================
   Select — a field that deals a hand of options
   ========================================================================== */
.tt-select { position: relative; }
.tt-select__trigger { width: 100%; cursor: pointer; text-align: left; border: 0; font: inherit; color: var(--board-ink); }
.tt-select__value { flex: 1; min-width: 0; padding-top: 3px; font: 600 16px/1.2 var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-select__value.is-placeholder { color: var(--board-ink-soft); font-weight: 500; }
.tt-select__chev { transition: transform var(--dur-place) var(--ease-place); color: var(--board-ink-soft); }
.tt-select.is-open .tt-select__chev { transform: rotate(180deg); }
.tt-select__list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-deal), inset 0 0 0 1.5px #e6d6b6;
  max-height: 300px; overflow: auto; outline: none; transform-origin: 50% 0;
  animation: tt-pop 220ms var(--ease-deal) backwards;
}
.tt-select__list[hidden] { display: none; }
.tt-select.is-up .tt-select__list { top: auto; bottom: calc(100% + 8px); transform-origin: 50% 100%; }
@keyframes tt-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.tt-select__opt { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: 4px 10px 2px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink); animation: tt-dealopt 300ms var(--ease-deal) backwards; animation-delay: calc(var(--i, 0) * 28ms); }
.tt-select__opt:nth-child(n+9) { animation: none; }
@keyframes tt-dealopt { from { opacity: 0; transform: translate(-10px, -6px) rotate(-3deg); } }
.tt-select__opt.is-active { background: #f1e5cd; }
.tt-select__opt[aria-selected="true"] { color: #0a645d; font-weight: 800; }
.tt-select__opt .tt-select__pip { width: 14px; height: 14px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px #dfcca9; }
.tt-select__opt[aria-selected="true"] .tt-select__pip { background: var(--teal); box-shadow: 0 2px 0 color-mix(in srgb, var(--teal) 60%, #000); animation: tt-drop var(--dur-place) var(--ease-place) backwards; }
.tt-select__opt .tt-select__meta { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* ==========================================================================
   Tabs — a pawn hops to the tab you pick
   ========================================================================== */
.tt-tabs { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.tt-tabs__list { position: relative; display: flex; gap: var(--space-1); padding-bottom: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tt-tabs__list::-webkit-scrollbar { display: none; }
.tt-tabs__list::before { content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 20px); }
.tt-tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 3px 14px 0; border: 0; border-radius: 10px; background: none; cursor: pointer; font: 700 16px/1 var(--font-body); color: var(--tt-fg-soft); transition: color var(--dur-hover); }
.tt-tab:hover { color: var(--tt-fg); background: color-mix(in srgb, var(--tt-fg) 7%, transparent); }
.tt-tab[aria-selected="true"] { color: var(--accent-ink); }
.tt-tab .tt-icon { width: 18px; height: 18px; margin-top: -2px; }
.tt-tab .tt-badge { height: 20px; min-width: 20px; margin-left: 2px; }
.tt-tabs__pawn { position: absolute; left: 0; bottom: 0; width: 0; height: 0; pointer-events: none; transition: transform 380ms var(--ease-hop); }
.tt-tabs__pawn > .tt-pawn { position: absolute; left: -9px; bottom: 1px; width: 18px; height: 24px; }
.tt-tabs__pawn.is-hop > .tt-pawn { animation: tt-hop 380ms var(--ease-hop); }
.tt-tabs__pawn.no-anim { transition: none; }
.tt-tabpanel:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 4px; border-radius: 8px; }
.tt-tabpanel[hidden] { display: none; }
.tt-tabpanel { animation: tt-fadeup 320ms var(--ease-deal) backwards; }
@keyframes tt-fadeup { from { opacity: 0; transform: translateY(6px); } }

/* the pawn used everywhere */
.tt-pawn { display: block; overflow: visible; }
.tt-pawn__body { fill: var(--pawn, var(--teal)); stroke: color-mix(in srgb, var(--pawn, var(--teal)) 55%, #000); stroke-width: 1.4; stroke-linejoin: round; }
.tt-pawn__shine { fill: #fff; opacity: .38; }
.tt-pawn__base { fill: rgb(0 0 0 / .28); }
@keyframes tt-hop { 0% { transform: translateY(0) scale(1); } 45% { transform: translateY(-14px) scale(1.04, .98); } 82% { transform: translateY(0) scale(1.06, .9); } 100% { transform: translateY(0) scale(1); } }

/* ==========================================================================
   SegmentedControl — a wooden block slides along a tray
   ========================================================================== */
.tt-seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; border-radius: 14px; background: var(--board-sunk); box-shadow: var(--shadow-inset), inset 0 0 0 1.5px var(--line); max-width: 100%; }
.tt-seg__thumb {
  position: absolute; left: 4px; top: 4px; height: 34px; width: calc((100% - 8px) / var(--n, 2)); border-radius: 10px;
  background-color: var(--tt-wood); background-image: var(--tt-shine), var(--tt-grain); background-size: auto, 240px 120px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 3px 0 var(--tt-wood-side), 0 5px 5px -2px var(--tt-cast);
  transition: transform var(--dur-place) var(--ease-place);
}
.tt-seg__opt { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 34px; margin-bottom: 3px; padding: 3px 16px 0; border: 0; border-radius: 10px; background: none; cursor: pointer; font: 700 15px/1 var(--font-body); color: var(--board-ink-soft); white-space: nowrap; transition: color var(--dur-hover); }
.tt-seg__opt:hover { color: var(--board-ink); }
.tt-seg__opt[aria-checked="true"] { color: var(--ink); }
.tt-seg__opt .tt-icon { width: 17px; height: 17px; margin-top: -2px; }
.tt-seg--block { display: grid; width: 100%; }

/* ==========================================================================
   Slider — move your pawn along the spaces
   ========================================================================== */
.tt-slider { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tt-slider__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.tt-slider__out { font: 400 22px/24px var(--font-display); color: var(--accent-ink); letter-spacing: .02em; }
.tt-slider__body { position: relative; height: 58px; touch-action: none; }
.tt-slider__track { position: absolute; left: 0; right: 0; bottom: 4px; height: 22px; display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--board-sunk); box-shadow: var(--shadow-inset), inset 0 0 0 1.5px var(--line); }
.tt-slider__sp { flex: 1; border-radius: 5px; background: color-mix(in srgb, var(--line) 70%, transparent); transition: background-color var(--dur-place); }
.tt-slider__sp.is-on { background: var(--teal); }
.tt-slider__sp.is-mark { box-shadow: inset 0 0 0 2px var(--mustard); }
.tt-slider__rail { position: absolute; left: 11px; right: 11px; bottom: 13px; height: 0; pointer-events: none; container-type: inline-size; }
.tt-slider__mover { width: 0; transform: translateX(calc(var(--p, 0) * 100cqw)); transition: transform var(--dur-hop) var(--ease-place); }
.tt-slider.is-drag .tt-slider__mover { transition-duration: 40ms; }
.tt-slider__pawn { position: absolute; left: -14px; bottom: 0; width: 28px; height: 38px; }
.tt-slider__pawn .tt-pawn { width: 28px; height: 38px; filter: none; }
.tt-slider__shadow { position: absolute; left: -12px; bottom: -4px; width: 24px; height: 7px; border-radius: 50%; background: var(--tt-cast); opacity: .55; }
.tt-slider__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: grab; }
.tt-slider__input:active { cursor: grabbing; }
.tt-slider__input:focus-visible ~ .tt-slider__track { box-shadow: var(--shadow-inset), inset 0 0 0 1.5px var(--line), 0 0 0 3px var(--board), 0 0 0 6px var(--accent-ink); }
.tt-slider__input:hover ~ .tt-slider__rail .tt-slider__pawn .tt-pawn,
.tt-slider.is-drag .tt-slider__pawn .tt-pawn { transform: translateY(-4px); }
.tt-slider__pawn .tt-pawn { transition: transform var(--dur-hover) var(--ease-place); }
.tt-slider__ends { display: flex; justify-content: space-between; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--tt-fg-soft); }

/* ==========================================================================
   Tooltip — a little card tipped up off the table
   ========================================================================== */
.tt-tip-wrap { position: relative; display: inline-flex; }
.tt-tip {
  position: absolute; z-index: 40; left: 50%; bottom: calc(100% + 12px); width: max-content; max-width: 240px; padding: 9px 12px 7px;
  border-radius: 12px; background: var(--card); color: var(--ink); font: 600 14px/20px var(--font-body); text-align: left;
  box-shadow: var(--shadow-deal), inset 0 0 0 1.5px #e6d6b6; pointer-events: none;
  opacity: 0; transform: translateX(calc(-50% + var(--tip-dx, 0px))) perspective(500px) rotateX(-70deg) translateY(6px); transform-origin: 50% 100%;
  transition: opacity 160ms var(--ease-press), transform 160ms var(--ease-press);
}
.tt-tip::after { content: ""; position: absolute; left: calc(50% - var(--tip-dx, 0px)); bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: var(--card); transform: rotate(45deg); border-radius: 0 0 3px 0; box-shadow: 1.5px 1.5px 0 #e6d6b6; }
.tt-tip--below { bottom: auto; top: calc(100% + 12px); transform-origin: 50% 0; transform: translateX(calc(-50% + var(--tip-dx, 0px))) perspective(500px) rotateX(70deg) translateY(-6px); }
.tt-tip--below::after { bottom: auto; top: -6px; border-radius: 3px 0 0 0; box-shadow: -1.5px -1.5px 0 #e6d6b6; }
.tt-tip-wrap.is-open .tt-tip { opacity: 1; transform: translateX(calc(-50% + var(--tip-dx, 0px))) perspective(500px) rotateX(0) translateY(0); transition: opacity 200ms var(--ease-deal), transform 320ms var(--ease-place); }
.tt-tip b { font-weight: 800; }
.tt-tip kbd { font: 700 12px/1 var(--font-body); padding: 3px 5px 1px; border-radius: 4px; background: #f1e5cd; box-shadow: 0 1.5px 0 #d9c7a4; }

/* ==========================================================================
   Toast — dealt in like a card
   ========================================================================== */
.tt-toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column-reverse; gap: var(--space-3); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.tt-toasts--inline { position: static; width: 100%; max-width: 380px; flex-direction: column; }
.tt-toast {
  --tilt: 0deg; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: start;
  padding: 14px 12px 12px 14px; border-radius: var(--radius-card); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-deal), inset 0 0 0 1.5px #e6d6b6; pointer-events: auto;
  transform: rotate(var(--tilt));
  animation: tt-deal-in var(--dur-deal) var(--ease-deal) backwards;
}
.tt-toast::before { content: ""; position: absolute; inset: 5px; border: 1.5px solid #ecdcbd; border-radius: 12px; pointer-events: none; }
.tt-toasts--inline .tt-toast { animation: none; }
@keyframes tt-deal-in { from { opacity: 0; transform: translate(110%, -70px) rotate(24deg); } 60% { opacity: 1; } }
.tt-toast.is-leaving { transition: transform 360ms var(--ease-press), opacity 300ms var(--ease-press); transform: translate(120%, 20px) rotate(16deg); opacity: 0; }
.tt-toast__suit { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--tt-on); background-color: var(--tt-fill); background-image: var(--tt-shine); box-shadow: 0 3px 0 var(--tt-side); }
.tt-toast__suit .tt-icon { width: 21px; height: 21px; }
.tt-toast__body { padding-top: 1px; min-width: 0; }
.tt-toast__title { font: 800 17px/22px var(--font-body); margin: 0; }
.tt-toast__msg { font-size: 14px; line-height: 20px; color: var(--ink-soft); margin: 2px 0 0; }
.tt-toast__act { margin-top: var(--space-2); }
.tt-toast__x { display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -2px 0 0; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer; }
.tt-toast__x:hover { background: #f1e5cd; color: var(--ink); }
.tt-toast__x:focus-visible { outline: 3px solid #0a645d; outline-offset: 1px; }
.tt-toast__x .tt-icon { width: 16px; height: 16px; stroke-width: 2.6; }

/* ==========================================================================
   Modal — a card dealt face down that flips over to face you
   ========================================================================== */
.tt-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: var(--space-4); perspective: 1400px; }
.tt-modal[hidden] { display: none; }
.tt-modal__scrim { position: absolute; inset: 0; background: rgb(24 14 7 / .58); animation: tt-fade 260ms ease backwards; }
@keyframes tt-fade { from { opacity: 0; } }
.tt-modal__card { position: relative; width: min(480px, 100%); transform-style: preserve-3d; animation: tt-modal-in 760ms var(--ease-flip) backwards; }
.tt-modal__card--wide { width: min(640px, 100%); }
@keyframes tt-modal-in {
  0% { opacity: 0; transform: translateY(70vh) rotateY(-180deg) rotateZ(-14deg) scale(.7); }
  20% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.tt-modal__front { position: relative; max-height: calc(100vh - 32px); overflow: auto; padding: var(--space-8); border-radius: var(--radius-board); background: var(--card); box-shadow: var(--shadow-deal); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tt-modal__front::before { content: ""; position: absolute; inset: 8px; border: 1.5px solid #e6d6b6; border-radius: 16px; pointer-events: none; }
.tt-modal__back { position: absolute; inset: 0; border-radius: var(--radius-board); transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tt-modal.is-closing .tt-modal__scrim { opacity: 0; transition: opacity 240ms ease; }
.tt-modal.is-closing .tt-modal__card { opacity: 0; transform: translateY(40px) rotate(4deg) scale(.94); transition: transform 260ms var(--ease-press), opacity 240ms ease; }
.tt-modal__head { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.tt-modal__title { flex: 1; font: 400 30px/34px var(--font-display); letter-spacing: .01em; margin: 0; padding-top: 4px; color: var(--ink); }
.tt-modal__body { color: var(--ink-soft); }
.tt-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }
.tt-modal .tt-iconbtn--ghost { margin: -6px -10px 0 0; }

/* card back — used by the modal's reverse and PlayingCard */
.tt-back {
  background-color: var(--plum);
  background-image:
    radial-gradient(circle at 50% 50%, rgb(255 250 240 / .0) 0 38%, rgb(0 0 0 / .18) 100%),
    repeating-linear-gradient(45deg, rgb(255 250 240 / .16) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, rgb(255 250 240 / .16) 0 2px, transparent 2px 14px);
  box-shadow: inset 0 0 0 6px var(--plum), inset 0 0 0 8px rgb(255 250 240 / .8), var(--shadow-card);
}
.tt-back.tt-tone-teal, .tt-back.tt-tone-tomato, .tt-back.tt-tone-forest, .tt-back.tt-tone-mustard { background-color: var(--tt-fill); box-shadow: inset 0 0 0 6px var(--tt-fill), inset 0 0 0 8px rgb(255 250 240 / .8), var(--shadow-card); }

/* ==========================================================================
   Progress — a pawn walking a track of spaces
   ========================================================================== */
.tt-progress { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tt-progress__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.tt-progress__val { font: 400 18px/20px var(--font-display); letter-spacing: .02em; color: var(--tt-fg); }
.tt-progress__body { position: relative; padding-top: 22px; }
.tt-progress__track { display: flex; gap: 3px; height: 16px; padding: 3px; border-radius: 8px; background: var(--board-sunk); box-shadow: var(--shadow-inset), inset 0 0 0 1.5px var(--line); }
.tt-progress__sp { flex: 1; border-radius: 4px; background: color-mix(in srgb, var(--line) 65%, transparent); transition: background-color 200ms var(--ease-press); }
.tt-progress__sp.is-on { background: var(--tt-fill, var(--teal)); }
.tt-progress__rail { position: absolute; left: 0; right: 0; bottom: 8px; height: 0; pointer-events: none; container-type: inline-size; }
.tt-progress__mover { width: 0; transform: translateX(calc(var(--p, 0) * 100cqw)); transition: transform var(--dur-hop) var(--ease-hop); }
.tt-progress__pawn { position: absolute; left: -10px; bottom: 0; width: 20px; height: 27px; }
.tt-progress__pawn.is-hop .tt-pawn { animation: tt-hop var(--dur-hop) var(--ease-hop); }
.tt-progress--sm .tt-progress__track { height: 12px; padding: 2px; }
.tt-progress--sm .tt-progress__body { padding-top: 18px; }
.tt-progress--sm .tt-progress__pawn { width: 16px; height: 22px; left: -8px; }
.tt-progress--nopawn .tt-progress__body { padding-top: 0; }
.tt-progress--nopawn .tt-progress__rail { display: none; }
.tt-progress.is-indeterminate .tt-progress__mover { animation: tt-pace 1.8s var(--ease-hop) infinite alternate; transition: none; }
.tt-progress.is-indeterminate .tt-progress__sp { background: color-mix(in srgb, var(--line) 65%, transparent); }
@keyframes tt-pace { from { transform: translateX(4cqw); } to { transform: translateX(96cqw); } }

/* ==========================================================================
   Die — a real 3D cube that tumbles and lands
   ========================================================================== */
.tt-die { --s: 64px; --face: var(--card); --pip: var(--ink); --edge: #d9c7a4; position: relative; display: inline-grid; place-items: center; width: calc(var(--s) * 1.5); height: calc(var(--s) * 1.62); padding: 0; border: 0; background: none; cursor: pointer; border-radius: 16px; -webkit-tap-highlight-color: transparent; flex: none; }
.tt-die--tomato { --face: var(--tomato); --pip: var(--card); --edge: color-mix(in srgb, var(--tomato) 68%, #2b0d05); }
.tt-die--teal { --face: var(--teal); --pip: var(--card); --edge: color-mix(in srgb, var(--teal) 60%, #06110f); }
.tt-die--mustard { --face: var(--mustard); --pip: var(--ink); --edge: color-mix(in srgb, var(--mustard) 70%, #3a2400); }
.tt-die--plum { --face: var(--plum); --pip: var(--card); --edge: color-mix(in srgb, var(--plum) 60%, #12030f); }
.tt-die--forest { --face: var(--forest); --pip: var(--card); --edge: color-mix(in srgb, var(--forest) 60%, #04110a); }
.tt-die__shadow { position: absolute; left: 50%; bottom: calc(var(--s) * .04); width: calc(var(--s) * 1.05); height: calc(var(--s) * .26); margin-left: calc(var(--s) * -.525); border-radius: 50%; background: radial-gradient(closest-side, var(--tt-cast), transparent); }
.tt-die__toss, .tt-die__view, .tt-die__cube, .tt-die__shadow { display: block; }
.tt-die__toss { position: relative; width: var(--s); height: var(--s); margin-top: calc(var(--s) * -.12); perspective: calc(var(--s) * 9); }
.tt-die__view { width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-32deg); }
.tt-die__cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform var(--dur-roll) var(--ease-roll); }
.tt-die__face, .tt-die__core { position: absolute; inset: 0; }
.tt-die__face {
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 15%; border-radius: 20%;
  background: var(--face); box-shadow: inset 0 0 0 calc(var(--s) * .025) rgb(0 0 0 / .05), inset 0 calc(var(--s) * -.06) calc(var(--s) * .1) rgb(0 0 0 / .1), inset 0 calc(var(--s) * .05) calc(var(--s) * .06) rgb(255 255 255 / .35);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.tt-die__core { background: var(--edge); inset: 3%; }
.tt-die__pip { width: 78%; height: 78%; align-self: center; justify-self: center; border-radius: 50%; background: var(--pip); box-shadow: inset 0 calc(var(--s) * .015) calc(var(--s) * .02) rgb(0 0 0 / .3); }
.tt-die__f1 { transform: translateZ(calc(var(--s) / 2)); }
.tt-die__f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.tt-die__f3 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.tt-die__f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.tt-die__f2 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.06); }
.tt-die__f5 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.tt-die__f3, .tt-die__f4 { filter: brightness(.93); }
.tt-die__c2 { transform: rotateX(90deg); } .tt-die__c3 { transform: rotateY(90deg); }
.tt-die.is-rolling .tt-die__toss { animation: tt-toss var(--dur-roll) linear; }
.tt-die.is-rolling .tt-die__shadow { animation: tt-toss-shadow var(--dur-roll) linear; }
@keyframes tt-toss {
  0% { transform: translateY(0); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  26% { transform: translateY(calc(var(--s) * -.85)); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  50% { transform: translateY(0) scale(1.04, .95); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  64% { transform: translateY(calc(var(--s) * -.24)); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  78% { transform: translateY(0) scale(1.02, .98); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  87% { transform: translateY(calc(var(--s) * -.05)); }
  100% { transform: translateY(0); }
}
@keyframes tt-toss-shadow { 0%, 50%, 78%, 100% { transform: scale(1); opacity: 1; } 26% { transform: scale(.55); opacity: .45; } 64% { transform: scale(.85); opacity: .8; } }
.tt-die:hover:not(.is-rolling) .tt-die__toss { transform: translateY(-3px); transition: transform var(--dur-hover) var(--ease-place); }
.tt-die:active:not(.is-rolling) .tt-die__toss { transform: translateY(1px) scale(.97); }
.tt-die__toss { transition: transform var(--dur-hover) var(--ease-place); }
.tt-die.is-landed .tt-die__view::after { content: ""; }
.tt-die--sm { --s: 40px; } .tt-die--lg { --s: 92px; }
.tt-die[disabled] { cursor: default; }
.tt-dice { display: inline-flex; align-items: flex-end; gap: 0; }

/* ==========================================================================
   PlayingCard — turns over on a 3D hinge
   ========================================================================== */
.tt-pcard { --w: 180px; position: relative; display: inline-block; width: var(--w); flex: none; aspect-ratio: 5 / 7; perspective: 1100px; cursor: pointer; border-radius: var(--radius-card); -webkit-tap-highlight-color: transparent; transition: transform var(--dur-hover) var(--ease-place); }
.tt-pcard::after { content: ""; position: absolute; z-index: -1; left: -4px; right: -6px; top: -4px; bottom: -10px; }
.tt-pcard:hover { transform: translateY(-6px) rotate(-1deg); }
.tt-pcard:active { transform: translateY(-2px); transition-duration: var(--dur-press); }
.tt-pcard.is-static { cursor: default; }
.tt-pcard.is-static:hover { transform: none; }
.tt-pcard__lift { width: 100%; height: 100%; transform-style: preserve-3d; }
.tt-pcard.is-flipping .tt-pcard__lift { animation: tt-cardlift var(--dur-flip) var(--ease-hop); }
@keyframes tt-cardlift { 0% { transform: none; } 45% { transform: translateY(-14px) scale(1.06); } 100% { transform: none; } }
.tt-pcard__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform var(--dur-flip) var(--ease-flip); }
.tt-pcard.is-down .tt-pcard__inner { transform: rotateY(180deg); }
.tt-pcard__face { position: absolute; inset: 0; border-radius: var(--radius-card); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.tt-pcard__front { display: flex; flex-direction: column; padding: calc(var(--w) * .085); background: var(--card); color: var(--ink); box-shadow: var(--shadow-card), inset 0 0 0 1.5px #e6d6b6; }
.tt-pcard__front::before { content: ""; position: absolute; inset: 6px; border: 1.5px solid #ecdcbd; border-radius: 11px; pointer-events: none; }
.tt-pcard__back { transform: rotateY(180deg); display: grid; place-items: center; }
.tt-pcard__emblem { width: 42%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 3px rgb(255 250 240 / .35), 0 3px 0 rgb(0 0 0 / .2); color: var(--plum); }
.tt-pcard__emblem svg { width: 70%; height: 70%; }
.tt-pcard__backlabel { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; font: 400 calc(var(--w) * .1)/1 var(--font-display); letter-spacing: .04em; color: var(--card); }
.tt-pcard__corner { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px; font: 400 calc(var(--w) * .13)/1 var(--font-display); color: var(--tt-fill, var(--ink)); }
.tt-pcard__corner .tt-icon { width: calc(var(--w) * .1); height: calc(var(--w) * .1); stroke-width: 2.6; }
.tt-pcard__corner--tl { top: calc(var(--w) * .06); left: calc(var(--w) * .07); }
.tt-pcard__corner--br { bottom: calc(var(--w) * .06); right: calc(var(--w) * .07); transform: rotate(180deg); }
.tt-pcard__corner span { padding-top: .1em; }
.tt-pcard__art { position: relative; flex: 1; min-height: 0; margin: calc(var(--w) * .2) calc(var(--w) * .1) calc(var(--w) * .06); border-radius: 12px; display: grid; place-items: center; color: var(--tt-on); background-color: var(--tt-fill); background-image: radial-gradient(circle, rgb(255 255 255 / .16) 1.5px, transparent 2px), var(--tt-shine); background-size: 12px 12px, auto; }
.tt-pcard__art .tt-icon { width: 42%; height: auto; aspect-ratio: 1; stroke-width: 1.8; }
.tt-pcard__title { font: 800 calc(var(--w) * .1)/1.15 var(--font-body); margin: 0 calc(var(--w) * .06); text-align: center; }
.tt-pcard__text { font: 500 calc(var(--w) * .074)/1.35 var(--font-body); color: var(--ink-soft); margin: 3px calc(var(--w) * .06) calc(var(--w) * .1); text-align: center; }
.tt-pcard.is-picked .tt-pcard__front { box-shadow: var(--shadow-card), inset 0 0 0 1.5px #e6d6b6, 0 0 0 3px var(--board), 0 0 0 6px var(--mustard); }
.tt-pcard__check { position: absolute; top: -10px; right: -10px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--mustard); box-shadow: 0 2px 0 color-mix(in srgb, var(--mustard) 65%, #000), 0 4px 6px -1px var(--tt-cast); transform: translateZ(2px); animation: tt-drop var(--dur-place) var(--ease-place) backwards; }
.tt-pcard__check .tt-icon { width: 16px; height: 16px; stroke-width: 3; }
.tt-hand { display: flex; justify-content: center; align-items: flex-end; flex-wrap: wrap; gap: var(--space-3); }
.tt-deal { animation: tt-deal-card 620ms var(--ease-deal) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes tt-deal-card { from { opacity: 0; transform: translate(var(--dx, -120px), var(--dy, -60px)) rotate(var(--dr, -24deg)); } 40% { opacity: 1; } }

/* ==========================================================================
   ScoreTrack — the board's scoring path, pawns hop space by space
   ========================================================================== */
.tt-track { position: relative; display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.tt-track__board { position: relative; display: grid; gap: 6px; padding: 10px; border-radius: 16px; background: var(--board-sunk); box-shadow: var(--shadow-inset), inset 0 0 0 1.5px var(--line); }
.tt-track__sp { position: relative; aspect-ratio: 1; min-width: 0; display: grid; place-items: end start; padding: 3px 5px; border-radius: 9px; background: var(--board); box-shadow: inset 0 0 0 1.5px var(--line), 0 1.5px 0 var(--line); font: 800 12px/1 var(--font-body); color: var(--board-ink-soft); }
.tt-track__sp:nth-child(5n) { background: color-mix(in srgb, var(--board-sunk) 50%, var(--board)); }
.tt-track__sp > span { padding-top: 2px; }
.tt-track__sp.is-mile { background: var(--mustard); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--mustard) 65%, #000), 0 2px 0 color-mix(in srgb, var(--mustard) 60%, #000); }
.tt-track__sp.is-mile .tt-icon { position: absolute; top: 18%; left: 50%; width: 46%; height: 46%; margin-left: -23%; stroke-width: 2.4; }
.tt-track__sp.is-end { background: var(--teal); color: var(--card); box-shadow: 0 2px 0 color-mix(in srgb, var(--teal) 60%, #000); }
.tt-track__sp.is-end .tt-icon { position: absolute; top: 18%; left: 50%; width: 46%; height: 46%; margin-left: -23%; }
.tt-track__sp.is-start { background: var(--board-ink); color: var(--board); box-shadow: none; }
.tt-track__sp.is-flash { animation: tt-flash 520ms var(--ease-place); }
@keyframes tt-flash { 0% { transform: scale(1); } 35% { transform: scale(1.14) rotate(-3deg); } 100% { transform: scale(1); } }
.tt-track__pawns { position: absolute; inset: 0; pointer-events: none; }
.tt-track__pawn { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: transform var(--dur-hop) var(--ease-hop); }
.tt-track__pawn.no-anim { transition: none; }
.tt-track__pawn .tt-pawn { position: absolute; left: calc(var(--ps, 26px) * -.5); bottom: calc(var(--ps, 26px) * -.36); width: var(--ps, 26px); height: calc(var(--ps, 26px) * 1.34); }
.tt-track__pawn.is-hop .tt-pawn { animation: tt-hop var(--dur-hop) var(--ease-hop); }
.tt-track__pawn.is-lead::before { content: ""; position: absolute; z-index: 1; left: -8px; top: calc(var(--ps, 26px) * -.98 - 8px); width: 16px; height: 11px; background: var(--mustard); clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); }
.tt-track__legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: 0; padding: 0; list-style: none; }
.tt-track__who { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--tt-fg); }
.tt-track__who .tt-pawn { width: 16px; height: 22px; }
.tt-track__who b { font: 400 18px/1 var(--font-display); letter-spacing: .02em; padding-top: 3px; color: var(--tt-fg); }

/* ==========================================================================
   Widgets
   ========================================================================== */
/* Leaderboard */
.tt-lb { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tt-lb__row { display: grid; grid-template-columns: 36px auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); padding: 8px 10px 8px 8px; border-radius: 14px; background: color-mix(in srgb, var(--board-sunk) 70%, transparent); transition: transform 520ms var(--ease-deal); }
.tt-lb__row.is-me { background: color-mix(in srgb, var(--mustard) 22%, var(--board)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mustard) 70%, transparent); }
.tt-lb__rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 800 15px/1 var(--font-body); color: var(--board-ink-soft); background: var(--board); box-shadow: inset 0 0 0 1.5px var(--line); }
.tt-lb__rank > span { padding-top: 2px; }
.tt-lb__rank.r1 { background: var(--mustard); color: var(--ink); box-shadow: 0 2px 0 color-mix(in srgb, var(--mustard) 65%, #000); }
.tt-lb__rank.r2 { background: #d8d2c6; color: var(--ink); box-shadow: 0 2px 0 #a39a8a; }
.tt-lb__rank.r3 { background: #d9a271; color: var(--ink); box-shadow: 0 2px 0 #9c6a3f; }
.tt-lb__name { min-width: 0; }
.tt-lb__name b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--board-ink); }
.tt-lb__name small { display: block; font-size: 13px; line-height: 18px; color: var(--board-ink-soft); font-weight: 600; }
.tt-lb__score { font: 400 20px/1 var(--font-display); letter-spacing: .02em; padding-top: 3px; color: var(--board-ink); text-align: right; min-width: 48px; }
.tt-lb__delta { font: 800 12px/1 var(--font-body); padding: 5px 7px 3px; border-radius: 8px; min-width: 40px; text-align: center; }
.tt-lb__delta.up { color: var(--card); background: var(--forest); }
.tt-lb__delta.down { color: var(--ink); background: var(--tomato); }
.tt-lb__delta.flat { color: var(--board-ink-soft); background: var(--board-sunk); }

/* QuestCard */
.tt-quest { overflow: hidden; }
.tt-quest__top { display: flex; align-items: flex-start; gap: var(--space-3); }
.tt-quest__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--tt-on); background-color: var(--tt-fill); background-image: var(--tt-shine), var(--tt-grain); background-size: auto, 240px 120px; box-shadow: 0 4px 0 var(--tt-side), 0 6px 6px -2px var(--tt-cast); }
.tt-quest__icon .tt-icon { width: 24px; height: 24px; }
.tt-quest__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 2px; }
.tt-quest__reward { margin-left: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tt-quest__reward.is-claimed .tt-chip { animation: tt-claim 700ms var(--ease-place); }
@keyframes tt-claim { 0% { transform: none; } 30% { transform: translateY(-26px) rotate(200deg) scale(1.15); } 60% { transform: translateY(0) rotate(360deg) scale(.92); } 100% { transform: rotate(360deg); } }
.tt-quest.is-done .tt-quest__claimed { display: inline-flex; }
.tt-quest__claimed { display: none; }

/* RandomPicker (roll for it) */
.tt-picker { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-6); align-items: center; }
.tt-picker__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.tt-picker__opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 10px 2px 6px; border-radius: 12px; background: var(--board-sunk); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; color: var(--board-ink); transition: background-color var(--dur-place), box-shadow var(--dur-place); }
.tt-picker__face { flex: none; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 28px; height: 28px; padding: 4px; border-radius: 7px; background: var(--board); box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 0 var(--line); }
.tt-picker__face i { width: 5px; height: 5px; border-radius: 50%; background: var(--board-ink); align-self: center; justify-self: center; }
.tt-picker__opt.is-picked { background: var(--mustard); color: var(--ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--mustard) 65%, #000); animation: tt-flash 520ms var(--ease-place); }
.tt-picker__opt.is-picked .tt-picker__face { background: var(--card); box-shadow: 0 2px 0 rgb(0 0 0 / .2); }
.tt-picker__opt.is-picked .tt-picker__face i { background: var(--ink); }
.tt-picker__opt.is-dim { opacity: .55; }
.tt-picker__side { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.tt-picker__result { min-height: 24px; font-weight: 800; text-align: center; }

/* StatTile */
.tt-stat { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4) var(--space-6) var(--space-6); }
.tt-stat__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.tt-stat__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--tt-on); background-color: var(--tt-fill); background-image: var(--tt-shine); box-shadow: 0 3px 0 var(--tt-side); }
.tt-stat__icon .tt-icon { width: 19px; height: 19px; }
.tt-stat__num { font: 400 40px/40px var(--font-display); letter-spacing: .01em; padding-top: 6px; color: var(--tt-fg); font-variant-numeric: tabular-nums; }
.tt-stat__foot { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--tt-fg-soft); }
.tt-stat__delta { font: 800 12px/1 var(--font-body); padding: 5px 7px 3px; border-radius: 8px; color: var(--card); background: var(--forest); }
.tt-stat__delta.down { color: var(--ink); background: var(--tomato); }
.tt-stat__pips { display: flex; gap: 4px; margin-top: 4px; }
.tt-stat__pips i { flex: 1; height: 6px; border-radius: 3px; background: var(--board-sunk); box-shadow: inset 0 0 0 1px var(--line); }
.tt-stat__pips i.on { background: var(--tt-fill); box-shadow: none; }

/* ==========================================================================
   Reduced motion: no travel, keep the state changes
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .tt-avatar__turn { animation: none !important; }
  .tt-progress.is-indeterminate .tt-progress__mover { transform: translateX(50cqw); }
}
@media (max-width: 520px) {
  .tt-board { padding: var(--space-4); }
  .tt-board::before { inset: 5px; }
  .tt-picker { grid-template-columns: 1fr; justify-items: center; }
  .tt-picker__opts { width: 100%; }
  .tt-modal__front { padding: var(--space-6) var(--space-4) var(--space-4); }
  .tt-display { font-size: 42px; line-height: 44px; }
}
