/* ==========================================================================
   Color Rush — styles
   Sections: 1 tokens · 2 base · 3 layout · 4 cards · 5 table · 6 seats
             7 hand & controls · 8 effects · 9 dialogs · 10 responsive · 11 a11y
             12 page sections (hero, about, FAQ, related tools)
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  --night-950: #060919;
  --night-900: #0a0e27;
  --night-800: #111744;
  --night-700: #1b2260;

  --violet: #8b6cff;
  --violet-deep: #5b3df5;
  --azure: #4c8dff;

  --ink: #f1f3ff;
  --ink-dim: #b0b8ea;
  --ink-faint: #8790c6;

  --glass: rgba(255, 255, 255, 0.065);
  --glass-strong: rgba(255, 255, 255, 0.115);
  --glass-line: rgba(255, 255, 255, 0.17);

  --red: #e5364b;
  --blue: #2563eb;
  --green: #0f9d58;
  --yellow: #ffc21a;

  --font-ui: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: "Avenir Next Heavy", "Arial Rounded MT Bold", "Segoe UI Black", "Trebuchet MS", "Arial Black", system-ui, sans-serif;

  --cw: 42px;             /* card width; every card dimension derives from it */
  --card-ratio: 1.45;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.3, 1.25);
  --ease-out: cubic-bezier(0.22, 0.8, 0.24, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.4;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(139, 108, 255, 0.38), transparent 62%),
    radial-gradient(900px 560px at 100% 4%, rgba(76, 141, 255, 0.28), transparent 58%),
    radial-gradient(800px 500px at 50% 115%, rgba(91, 61, 245, 0.25), transparent 60%),
    linear-gradient(180deg, var(--night-900), var(--night-950));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin: 0; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 14px; border-radius: 10px;
  background: #fff; color: #0a0e27; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(139, 108, 255, 0.85);
}

.glass, .glass-solid {
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 50px rgba(0, 0, 0, 0.35);
}
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.glass-solid {
  background: linear-gradient(160deg, rgba(38, 44, 112, 0.92), rgba(14, 18, 54, 0.96));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

/* 3. LAYOUT ---------------------------------------------------------------- */
.app, .topbar, .table, .center, .seats, .scoreboard, .dock, .controls, .handzone, .hand__inner {
  min-width: 0;
}
.app {
  width: min(100%, 600px);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(3px, 0.6vh, 6px);
  padding:
    max(4px, env(safe-area-inset-top))
    max(clamp(3px, 0.8vw, 10px), env(safe-area-inset-right))
    max(4px, env(safe-area-inset-bottom))
    max(clamp(3px, 0.8vw, 10px), env(safe-area-inset-left));
}

/* --- top bar --- */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
}
.brand { display: flex; align-items: center; gap: 4px; min-width: 0; }
.brand__logo { width: 18px; height: 18px; flex: none; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)); }
.brand__logo--lg { width: 32px; height: 32px; }
.logo-red { fill: var(--red); } .logo-blue { fill: var(--blue); }
.logo-green { fill: var(--green); } .logo-yellow { fill: var(--yellow); }
.brand__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.turn {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 0; max-width: 100%;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--glass-line);
  font-weight: 700;
  font-size: 0.7rem;
}
.turn__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dot, var(--red));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 6px var(--dot, var(--red));
  transition: background 0.35s, box-shadow 0.35s;
}
.turn[data-color="red"] { --dot: var(--red); }
.turn[data-color="blue"] { --dot: var(--blue); }
.turn[data-color="green"] { --dot: var(--green); }
.turn[data-color="yellow"] { --dot: var(--yellow); }
.turn__dir { width: 18px; height: 18px; flex: none; color: var(--ink-dim); transition: transform 0.5s var(--ease-out); }
.turn__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn__dot { flex: none; }
.turn__dir.is-ccw { transform: scaleX(-1); }
.turn.pop { animation: pill-pop 0.45s var(--ease-pop); }

.scoreboard { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.85rem; color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
}
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chip.is-current { border-color: rgba(139, 108, 255, 0.9); color: var(--ink); background: rgba(139, 108, 255, 0.2); }
.chip--best { color: #ffe27a; background: rgba(255, 194, 26, 0.12); }
.chip--best b { color: #ffe27a; }

/* 4. CARDS ----------------------------------------------------------------- *
 * Every measurement is in em. font-size = half the card width, so setting
 * --cw on any card (mini cards, flying ghosts) scales the whole design.
 * Motif: a prism gem in a framed card with fine speed lines — original art.
 * -------------------------------------------------------------------------- */
.card {
  --card-bg: #444;
  position: relative;
  display: block;
  flex: none;
  width: var(--cw);
  height: calc(var(--cw) * var(--card-ratio));
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.26em;
  font-size: calc(var(--cw) * 0.5);
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: #fff;
  background: var(--card-bg);
  box-shadow:
    0 0.08em 0.2em rgba(0, 0, 0, 0.5),
    inset 0 0 0 0.05em rgba(255, 255, 255, 0.6),
    inset 0 -0.14em 0.34em rgba(0, 0, 0, 0.28);
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  text-shadow: 0 0.04em 0.08em rgba(0, 0, 0, 0.4);
}
.card::before {         /* speed lines */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.11) 0 0.045em, transparent 0.045em 0.32em);
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 78%);
}
.card::after {          /* inner frame */
  content: "";
  position: absolute; inset: 0.15em; z-index: -1;
  border-radius: 0.16em;
  border: 0.02em solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.card--red    { --card-bg: linear-gradient(155deg, #f5566a 0%, #e5364b 46%, #a51a2f 100%); }
.card--blue   { --card-bg: linear-gradient(155deg, #5f95ff 0%, #2563eb 50%, #1636a5 100%); }
.card--green  { --card-bg: linear-gradient(155deg, #2fcf85 0%, #0f9d58 50%, #086339 100%); }
.card--yellow { --card-bg: linear-gradient(155deg, #ffe07a 0%, #ffc21a 48%, #e59700 100%); color: #2e1f00; text-shadow: 0 0.03em 0.06em rgba(255, 255, 255, 0.35); }

.card__gem {
  position: absolute; left: 50%; top: 50%;
  width: 1.2em; height: 1.2em;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 0.24em;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 0.04em rgba(255, 255, 255, 0.55), 0 0.06em 0.14em rgba(0, 0, 0, 0.3);
  display: grid; place-items: center;
}
.card__glyph {
  transform: rotate(-45deg);
  display: grid; place-items: center;
  font-size: 1em;
  padding-right: 0.06em;          /* optical centre for italics */
}
.card__glyph .num { font-size: 1.02em; letter-spacing: -0.03em; }
.card__glyph .num--u, .card__corner .num--u { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.09em; }
.card__glyph .txt { font-size: 0.78em; letter-spacing: -0.04em; }
.card__glyph svg { width: 0.82em; height: 0.82em; display: block; }

.card__corner {
  position: absolute;
  display: grid; place-items: center;
  min-width: 1em;
  font-size: 0.34em;
  letter-spacing: -0.03em;
}
.card__corner svg { width: 1.05em; height: 1.05em; display: block; }
.card__corner--tl { left: 0.72em; top: 0.62em; }
.card__corner--br { right: 0.72em; bottom: 0.62em; transform: rotate(180deg); }

/* Wild — dark body, four-color prism and a rainbow rim */
.card--wild {
  --card-bg: linear-gradient(160deg, #222a66 0%, #0c1030 100%);
  border: 0.07em solid transparent;
  background:
    linear-gradient(160deg, #222a66 0%, #0c1030 100%) padding-box,
    conic-gradient(from 45deg, var(--red) 0 25%, var(--blue) 0 50%, var(--green) 0 75%, var(--yellow) 0) border-box;
  box-shadow: 0 0.08em 0.2em rgba(0, 0, 0, 0.5), inset 0 -0.14em 0.34em rgba(0, 0, 0, 0.35);
}
.card--wild .card__gem,
.card--back .card__gem {
  background: conic-gradient(from 0deg, var(--blue) 0 25%, var(--green) 0 50%, var(--yellow) 0 75%, var(--red) 0);
  box-shadow: inset 0 0 0 0.05em rgba(255, 255, 255, 0.7), 0 0.06em 0.16em rgba(0, 0, 0, 0.4);
}
.card--wild .card__glyph .txt {
  background: rgba(6, 9, 25, 0.86);
  padding: 0.08em 0.2em 0.08em 0.16em;
  border-radius: 0.2em;
  font-size: 0.62em;
  color: #fff;
}
.pip {
  display: inline-block;
  width: 0.95em; height: 0.95em;
  transform: rotate(45deg) scale(0.8);
  border-radius: 0.18em;
  background: conic-gradient(from 0deg, var(--blue) 0 25%, var(--green) 0 50%, var(--yellow) 0 75%, var(--red) 0);
  box-shadow: inset 0 0 0 0.09em rgba(255, 255, 255, 0.85);
}
.card--wild[data-chosen="red"]    { box-shadow: 0 0 0 0.06em var(--red), 0 0 0.9em var(--red); }
.card--wild[data-chosen="blue"]   { box-shadow: 0 0 0 0.06em var(--blue), 0 0 0.9em var(--blue); }
.card--wild[data-chosen="green"]  { box-shadow: 0 0 0 0.06em var(--green), 0 0 0.9em var(--green); }
.card--wild[data-chosen="yellow"] { box-shadow: 0 0 0 0.06em var(--yellow), 0 0 0.9em var(--yellow); }

/* Card back */
.card--back {
  --card-bg: radial-gradient(circle at 30% 18%, #4a3cc0 0%, #221c78 52%, #0d0f33 100%);
}
.card--back::before {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.09) 0 0.05em, transparent 0.05em 0.34em),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.09) 0 0.05em, transparent 0.05em 0.34em);
  -webkit-mask-image: none; mask-image: none;
}
.card--back .card__gem { width: 0.86em; height: 0.86em; }
.card--mini { --cw: 34px; }

/* Flying ghost (deal / draw / play animations) */
.card--ghost { position: fixed; margin: 0; pointer-events: none; will-change: transform; z-index: 1; }
.layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.layer--top { z-index: 70; }

/* 5. TABLE ----------------------------------------------------------------- */
.table {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(4px, 0.8vh, 8px);
  padding: clamp(6px, 1.2vw, 12px);
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 50% 48%, rgba(139, 108, 255, 0.24), rgba(24, 30, 92, 0.34) 55%, rgba(8, 11, 36, 0.55) 100%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 -20px 40px rgba(0, 0, 0, 0.28), 0 10px 30px rgba(0, 0, 0, 0.4);
  min-height: 0;
}

.center {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(20px, 7vw, 100px);
  padding-block: 6px;
}

/* Draw pile */
.pile {
  position: relative;
  width: var(--cw);
  height: calc(var(--cw) * var(--card-ratio));
  padding: 0; border: 0; background: none; border-radius: 0.26em;
  cursor: pointer;
  flex: none;
}
.pile__stack { position: absolute; inset: 0; }
.pile__stack .card { position: absolute; left: 0; top: 0; }
.pile__stack .card:nth-child(1) { transform: translate(-6px, 6px); opacity: 0.6; }
.pile__stack .card:nth-child(2) { transform: translate(-3px, 3px); opacity: 0.85; }
.pile__count {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  min-width: 42px; padding: 3px 10px; border-radius: 999px;
  background: #0a0e27; border: 1px solid var(--glass-line);
  font-size: 0.85rem; font-weight: 800; text-align: center;
  font-variant-numeric: tabular-nums;
}
.pile:hover .card:last-child, .pile:focus-visible .card:last-child { transform: translateY(-4px); }
.pile .card:last-child { transition: transform 0.2s var(--ease-out); }
.pile[aria-disabled="true"] { cursor: default; }
.pile[aria-disabled="true"]:hover .card:last-child { transform: none; }
.pile.is-hot .card:last-child { animation: hot-bob 1s ease-in-out infinite; box-shadow: 0 0 0 0.06em #fff, 0 0 1.2em rgba(139, 108, 255, 1); }
.pile.is-empty .card { opacity: 0.25; }
.pile.is-shuffling .pile__stack { animation: shuffle 0.7s ease-in-out; }

/* Discard + color ring — the signature element */
.discard-wrap { display: grid; justify-items: center; gap: 12px; }
.discard {
  --ring: var(--red);
  position: relative;
  width: calc(var(--cw) * var(--card-ratio) * 1.42);
  aspect-ratio: 1;
  display: grid; place-items: center;
}
.discard[data-color="red"] { --ring: var(--red); }
.discard[data-color="blue"] { --ring: #3d7bff; }
.discard[data-color="green"] { --ring: #22c176; }
.discard[data-color="yellow"] { --ring: var(--yellow); }

.ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible;
  transition: transform 0.6s var(--ease-out);
}
.discard[data-dir="-1"] .ring { transform: scaleX(-1); }
.ring__glow { fill: none; stroke: var(--ring); stroke-width: 14; opacity: 0.28; filter: blur(7px); transition: stroke 0.4s; }
.ring__track { fill: none; stroke: var(--ring); stroke-width: 3.2; stroke-dasharray: 1 9; stroke-linecap: round; transition: stroke 0.4s; }
.ring__arrow { fill: var(--ring); transition: fill 0.4s; }
.ring__spin { transform-origin: 100px 100px; animation: ring-spin 16s linear infinite; }

.discard__stack { position: relative; width: var(--cw); height: calc(var(--cw) * var(--card-ratio)); }
.discard__stack .card {
  position: absolute; inset: 0;
  transform: rotate(var(--tilt, 0deg));
}
.discard__stack .card:not(.is-top) { filter: brightness(0.62) saturate(0.85); }
.discard__stack .card.is-top { box-shadow: 0 0.14em 0.6em rgba(0, 0, 0, 0.55), inset 0 0 0 0.05em rgba(255, 255, 255, 0.6), inset 0 -0.14em 0.34em rgba(0, 0, 0, 0.28); }
.discard__stack .card--wild.is-top[data-chosen] { border-color: transparent; }
.discard__stack .card.is-landing { animation: land 0.42s var(--ease-pop); }

.colorchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 10px; border-radius: 999px;
  background: rgba(6, 9, 25, 0.6); border: 1px solid var(--glass-line);
  font-size: 0.9rem; color: var(--ink-dim);
}
.colorchip b { color: var(--ink); }
.colorchip__dot {
  width: 14px; height: 14px; border-radius: 4px; transform: rotate(45deg);
  background: var(--chip, var(--red));
  box-shadow: 0 0 10px var(--chip, var(--red)), inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  transition: background 0.35s, box-shadow 0.35s;
}
.colorchip[data-color="red"] { --chip: var(--red); }
.colorchip[data-color="blue"] { --chip: #3d7bff; }
.colorchip[data-color="green"] { --chip: #22c176; }
.colorchip[data-color="yellow"] { --chip: var(--yellow); }

.hint { text-align: center; color: var(--ink-dim); font-size: 0.95rem; min-height: 1.4em; }

/* 6. SEATS (opponents) ----------------------------------------------------- */
.seats { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.6vw, 18px); min-height: 92px; }
.seat {
  position: relative;
  flex: 1 1 150px; max-width: 230px;
  padding: 10px 12px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-line);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease-out), background 0.25s;
}
.seat.is-active {
  border-color: rgba(139, 108, 255, 0.95);
  background: rgba(139, 108, 255, 0.17);
  box-shadow: 0 0 0 3px rgba(139, 108, 255, 0.28), 0 12px 34px rgba(91, 61, 245, 0.35);
  transform: translateY(-2px);
}
.seat__top { display: flex; align-items: center; gap: 8px; }
.seat__avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800;
  background: linear-gradient(140deg, var(--violet), var(--azure));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.seat__name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat__count {
  flex: none; min-width: 30px; padding: 2px 8px; text-align: center;
  border-radius: 10px; background: rgba(0, 0, 0, 0.35);
  font-weight: 800; font-variant-numeric: tabular-nums;
}
.seat__fan { display: flex; justify-content: center; height: calc(34px * var(--card-ratio) * 0.72); margin: 8px 0 4px; overflow: hidden; padding-left: 20px; }
.seat__fan .card { --cw: 34px; margin-left: -20px; height: calc(34px * var(--card-ratio)); transform: translateY(2px); }
.seat__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; font-size: 0.8rem; color: var(--ink-dim); }
.seat__score { font-variant-numeric: tabular-nums; }
.seat__think { display: none; gap: 3px; }
.seat__think i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); animation: think 1s ease-in-out infinite; }
.seat__think i:nth-child(2) { animation-delay: 0.15s; }
.seat__think i:nth-child(3) { animation-delay: 0.3s; }
.seat.is-active.is-cpu .seat__think { display: inline-flex; }

/* One-card warning */
.badge-uno, .seat__uno {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: 0.78rem; color: #2e1f00;
  background: linear-gradient(90deg, #ffe07a, #ffc21a);
  animation: warn-pulse 0.9s ease-in-out infinite;
}
.seat.is-uno { border-color: #ffc21a; animation: warn-shake 1.6s ease-in-out infinite; }

/* Skip / +2 flag flashes */
.flag {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  padding: 6px 14px; border-radius: 12px;
  font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 1.25rem;
  white-space: nowrap; pointer-events: none;
  color: #fff; background: rgba(6, 9, 25, 0.88); border: 2px solid #fff;
  animation: flag 1.3s var(--ease-out) forwards;
}
.flag--draw { border-color: var(--yellow); color: #ffe07a; }
.flag--skip { border-color: #ff7385; color: #ffb3bc; }
.is-hit { animation: hit 0.5s ease-in-out; }

/* 7. HAND & CONTROLS ------------------------------------------------------- */
.dock { display: grid; gap: 10px; }
.handzone {
  position: relative;
  border-radius: 12px;
  padding: 4px clamp(2px, 0.6vw, 8px) 2px;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.handzone.is-turn { border-color: rgba(139, 108, 255, 0.85); box-shadow: 0 0 0 2px rgba(139, 108, 255, 0.25), 0 6px 20px rgba(91, 61, 245, 0.32); }
.handzone.is-uno { border-color: #ffc21a; }
.handzone__head { display: flex; align-items: center; gap: 4px; padding: 0 3px 1px; }
.handzone__title { font-size: 0.7rem; font-weight: 700; }
.handzone__count { color: var(--ink-dim); font-size: 0.65rem; }

.hand {
  overflow-x: auto; overflow-y: hidden;
  padding: 12px 4px 8px;
  min-height: calc(var(--cw) * var(--card-ratio) + 20px);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  -webkit-overflow-scrolling: touch;
}
.hand__inner {
  display: flex; align-items: flex-end; gap: 4px;
  width: max-content;            /* auto margins centre when it fits, scroll when it doesn't */
  margin-inline: auto;
}
.hand .card { scroll-snap-align: center; }
.hand--dense .hand__inner { gap: 0; }
.hand--dense .card + .card { margin-left: calc(var(--cw) * -0.5); }

button.card { cursor: pointer; transition: transform 0.2s var(--ease-pop), box-shadow 0.2s, filter 0.2s, opacity 0.2s; }
button.card[aria-disabled="true"] { cursor: default; }
button.card.is-playable {
  box-shadow: 0 0 0 0.05em rgba(255, 255, 255, 0.95), 0 0.2em 0.9em rgba(139, 108, 255, 0.65), inset 0 -0.14em 0.34em rgba(0, 0, 0, 0.28);
}
button.card.is-dim { filter: saturate(0.5) brightness(0.68); }
button.card.is-new { animation: new-glow 1.2s ease-in-out infinite; }
button.card:focus-visible { transform: translateY(-0.34em); z-index: 6; outline-offset: 0.06em; }
@media (hover: hover) {
  button.card.is-playable:hover { transform: translateY(-0.34em) scale(1.05); z-index: 5; }
}
button.card:active { transform: translateY(-0.1em) scale(0.96); transition-duration: 0.06s; }
button.card.is-arriving { animation: arrive 0.42s var(--ease-pop); }
button.card.is-shaking { animation: shake 0.4s ease-in-out; }
.hand.is-waiting .card { filter: brightness(0.86); }

.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.controls__main, .controls__game { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.controls__main { flex: 1 1 320px; justify-content: center; }
.controls__game { justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 34px; padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-weight: 700; font-size: 0.8rem; line-height: 1.1;
  cursor: pointer;
  transition: transform 0.15s var(--ease-pop), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn:hover { background: rgba(255, 255, 255, 0.17); }
.btn:active { transform: scale(0.96); }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.45; cursor: default; }
.btn[aria-disabled="true"]:hover { background: rgba(255, 255, 255, 0.1); }
.btn[aria-disabled="true"]:active { transform: none; }
.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--violet-deep), var(--azure));
  box-shadow: 0 8px 22px rgba(91, 61, 245, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--primary:hover { background: linear-gradient(135deg, #6c50ff, #6aa2ff); }
.btn--primary[aria-disabled="true"]:hover { background: linear-gradient(135deg, var(--violet-deep), var(--azure)); }
.btn--primary.is-hot { animation: hot-btn 1s ease-in-out infinite; opacity: 1; }
.btn--lg { min-height: 52px; padding-inline: 30px; font-size: 1.05rem; }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; }
.btn--ghost { background: transparent; }

.btn--uno {
  position: relative; overflow: hidden;
  min-width: 112px; min-height: 52px;
  border: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: 1.35rem; letter-spacing: -0.02em;
  color: #2e1f00;
  background: linear-gradient(135deg, #ffe07a, #ffc21a 55%, #ff9f1a);
  box-shadow: 0 8px 22px rgba(255, 170, 26, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn--uno:hover { background: linear-gradient(135deg, #ffe98f, #ffcb3a 55%, #ffab3a); }
.btn--uno::after {                         /* countdown bar during the UNO window */
  content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: 100%;
  background: #b3261e; transform-origin: left; transform: scaleX(0); opacity: 0;
}
.btn--uno.is-window { animation: uno-hot 0.5s ease-in-out infinite; }
.btn--uno.is-window::after { opacity: 1; animation: countdown var(--window-ms, 2600ms) linear forwards; }
.btn--uno.is-hot { animation: uno-hot 1s ease-in-out infinite; }
.btn--uno.is-called { filter: saturate(0.6) brightness(0.9); }

.btn .snd-off { display: inline; } .btn .snd-on { display: none; }
.btn[aria-pressed="true"] .snd-off { display: none; }
.btn[aria-pressed="true"] .snd-on { display: inline; }

/* 8. EFFECTS ---------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; top: max(76px, calc(env(safe-area-inset-top) + 64px)); z-index: 80;
  max-width: min(92vw, 460px);
  padding: 10px 20px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; text-align: center;
  background: rgba(10, 14, 39, 0.92); border: 1px solid var(--glass-line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transform: translate(-50%, -14px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease-pop);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast[data-kind="good"] { border-color: #35d58b; color: #a9f5cf; }
.toast[data-kind="warn"] { border-color: #ffc21a; color: #ffe07a; }
.toast[data-kind="bad"]  { border-color: #ff7385; color: #ffc0c7; }
.toast[data-kind="uno"]  { border-color: #ffc21a; color: #2e1f00; background: linear-gradient(90deg, #ffe07a, #ffc21a); font-family: var(--font-display); font-style: italic; font-size: 1.3rem; }

.burst {
  position: fixed; z-index: 2;
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: clamp(2.4rem, 8vw, 4.4rem); line-height: 1; letter-spacing: -0.03em;
  color: #fff; white-space: nowrap;
  text-shadow: 0 0 24px var(--burst, #8b6cff), 0 6px 0 rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  animation: burst 1.15s var(--ease-out) forwards;
}
.burst--skip { --burst: #ff7385; } .burst--reverse { --burst: #4c8dff; }
.burst--draw { --burst: #ffc21a; } .burst--wild { --burst: #22c176; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 65; }

.table.is-lost { animation: dim-lose 1.2s ease-out forwards; }

@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes pill-pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes think { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes land { 0% { transform: rotate(var(--tilt, 0deg)) scale(1.22); } 55% { transform: rotate(var(--tilt, 0deg)) scale(0.96); } 100% { transform: rotate(var(--tilt, 0deg)) scale(1); } }
@keyframes arrive { 0% { transform: translateY(-0.6em) scale(0.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-0.14em); } 40% { transform: translateX(0.14em); } 60% { transform: translateX(-0.1em); } 80% { transform: translateX(0.08em); } }
@keyframes new-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes hot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes hot-btn { 0%, 100% { box-shadow: 0 8px 22px rgba(91, 61, 245, 0.45), 0 0 0 0 rgba(139, 108, 255, 0.8); } 50% { box-shadow: 0 8px 22px rgba(91, 61, 245, 0.45), 0 0 0 10px rgba(139, 108, 255, 0); } }
@keyframes uno-hot { 0%, 100% { transform: scale(1); box-shadow: 0 8px 22px rgba(255, 170, 26, 0.35), 0 0 0 0 rgba(255, 194, 26, 0.9); } 50% { transform: scale(1.06); box-shadow: 0 8px 22px rgba(255, 170, 26, 0.35), 0 0 0 12px rgba(255, 194, 26, 0); } }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes warn-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes warn-shake { 0%, 86%, 100% { transform: translateX(0); } 88% { transform: translateX(-3px); } 92% { transform: translateX(3px); } 96% { transform: translateX(-2px); } }
@keyframes shuffle { 0%, 100% { transform: none; } 25% { transform: translateX(-10px) rotate(-3deg); } 75% { transform: translateX(10px) rotate(3deg); } }
@keyframes flag { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 70% { opacity: 1; transform: translate(-50%, -60%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -110%) scale(1); } }
@keyframes hit { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-8px); } 35% { transform: translateX(8px); } 55% { transform: translateX(-5px); } 75% { transform: translateX(4px); } }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-10deg); } 22% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(-3deg); } 60% { opacity: 1; transform: translate(-50%, -54%) scale(1) rotate(-3deg); } 100% { opacity: 0; transform: translate(-50%, -130%) scale(1) rotate(-3deg); } }
@keyframes dim-lose { to { filter: saturate(0.55) brightness(0.8); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(0.95); } to { opacity: 1; transform: none; } }

/* 9. DIALOGS ---------------------------------------------------------------- */
.dialog {
  width: min(420px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  margin: auto;
  padding: 0; border: 0; background: transparent; color: var(--ink);
  overflow: visible;
}
.dialog--narrow { width: min(360px, calc(100vw - 20px)); }
.dialog::backdrop { background: rgba(4, 6, 20, 0.66); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.dialog[open] .dialog__body { animation: dialog-in 0.3s var(--ease-pop); }
.dialog__body {
  display: grid; gap: 12px;
  max-height: calc(100dvh - 20px); overflow-y: auto;
  padding: clamp(14px, 3vw, 20px);
  border-radius: 20px;
}
.dialog__head { display: flex; align-items: center; gap: 10px; }
.dialog__title { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 1.3rem; letter-spacing: -0.03em; line-height: 1.05; }
.dialog__title--big { font-size: clamp(1.8rem, 6vw, 2.4rem); text-align: center; }
.dialog__sub { color: var(--ink-dim); font-size: 0.85rem; }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.dialog__actions--center { justify-content: center; }

.field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 6px; }
.field legend { padding: 0; margin-bottom: 6px; font-weight: 700; color: var(--ink); font-size: 0.85rem; }
.field__note { color: var(--ink-dim); font-size: 0.8rem; min-height: 2em; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input, .seg input, .switch input.sr { position: absolute; opacity: 0; pointer-events: none; }
.choice__body {
  display: grid; gap: 3px; height: 100%;
  padding: 10px; border-radius: 12px;
  border: 1.5px solid var(--glass-line); background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.choice__body small { color: var(--ink-dim); font-size: 0.85rem; }
.choice:hover .choice__body { background: rgba(255, 255, 255, 0.09); }
.choice input:checked + .choice__body { border-color: var(--violet); background: rgba(139, 108, 255, 0.22); box-shadow: 0 0 0 3px rgba(139, 108, 255, 0.25); }
.choice input:focus-visible + .choice__body, .seg input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); width: fit-content; max-width: 100%; }
.seg label { position: relative; cursor: pointer; }
.seg span {
  display: block; min-width: 50px; padding: 6px 12px; text-align: center;
  border-radius: 9px; font-weight: 700; color: var(--ink-dim); font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: linear-gradient(135deg, var(--violet-deep), var(--azure)); color: #fff; box-shadow: 0 3px 10px rgba(91, 61, 245, 0.45); }

.field--switches { gap: 8px; }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.85rem; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 38px; height: 24px; margin: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); position: relative; cursor: pointer; transition: background 0.2s; }
.switch input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease-pop); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.switch input:checked { background: linear-gradient(135deg, var(--violet-deep), var(--azure)); }
.switch input:checked::after { transform: translateX(14px); }

.howto { color: var(--ink-dim); font-size: 0.8rem; }
.howto summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 3px 0; }
.howto ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }

.colorgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swatch {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 72px; border: 0; border-radius: 20px; cursor: pointer;
  font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 1.35rem;
  color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -6px 12px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s var(--ease-pop), box-shadow 0.18s;
}
.swatch:hover { transform: translateY(-3px) scale(1.03); }
.swatch:active { transform: scale(0.96); }
.swatch__dot { width: 22px; height: 22px; border-radius: 6px; transform: rotate(45deg); background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }
.swatch--red { background: linear-gradient(150deg, #f5566a, #b81f35); }
.swatch--blue { background: linear-gradient(150deg, #5f95ff, #1e4fc4); }
.swatch--green { background: linear-gradient(150deg, #2fcf85, #0b7a45); }
.swatch--yellow { background: linear-gradient(150deg, #ffe07a, #f0a800); color: #2e1f00; text-shadow: none; }
.swatch--yellow .swatch__dot { background: rgba(46, 31, 0, 0.75); box-shadow: 0 0 0 3px rgba(46, 31, 0, 0.25); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.stats > div { padding: 12px 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.07); text-align: center; }
.stats dt { color: var(--ink-dim); font-size: 0.82rem; }
.stats dd { margin: 4px 0 0; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(1.2rem, 4.6vw, 1.7rem); overflow-wrap: anywhere; }
.stats > div:nth-child(2) dd { color: #ffe07a; }

.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.board caption { text-align: left; color: var(--ink-dim); padding-bottom: 6px; font-weight: 700; }
.board td { padding: 8px 10px; border-top: 1px solid var(--glass-line); }
.board td:last-child { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.board tr.is-winner td { color: #ffe07a; }
.round-best { color: var(--ink-dim); font-size: 0.92rem; text-align: center; }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--night-900); color: #fff; z-index: 300; padding: 24px; text-align: center; }

/* 10. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 1024px) {
  :root { --cw: 52px; }
  .seat__fan .card { --cw: 20px; margin-left: -12px; height: calc(20px * var(--card-ratio)); }
}

@media (max-width: 720px) {
  :root { --cw: 48px; }
  .topbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 4px 8px; row-gap: 4px; }
  .turn { justify-content: flex-end; }
  .scoreboard { grid-column: 1 / -1; justify-content: flex-start; }
  .brand__logo { width: 18px; height: 18px; }
  .turn { padding: 3px 8px 3px 6px; font-size: 0.75rem; }
  .table { border-radius: 16px; padding: 8px 6px 10px; }
  .center { gap: 14px; }
  .seat { flex-basis: 30%; min-width: 70px; padding: 4px 6px; border-radius: 10px; }
  .seat__fan { padding-left: 10px; }
  .seat__fan .card { --cw: 18px; margin-left: -11px; height: calc(18px * var(--card-ratio)); }
  .seat__avatar { width: 16px; height: 16px; font-size: 0.5rem; }
  .seat__name { font-size: 0.7rem; }
  .seat__meta { font-size: 0.6rem; }
  .handzone { border-radius: 14px; padding-inline: 2px; }
  .hand { padding: 10px 3px 6px; min-height: calc(var(--cw) * var(--card-ratio) + 18px); }
  .hand--dense .hand__inner { gap: 0; }              /* scroll instead of overlap on phones */
  .hand--dense .card + .card { margin-left: calc(var(--cw) * -0.55); }
  .controls { justify-content: center; gap: 6px; }
  .controls__main .btn { flex: 1 1 0; min-width: 0; padding: 5px 8px; font-size: 0.75rem; min-height: 32px; }
  .btn--uno { min-width: 70px; font-size: 1rem; min-height: 38px; }
  .choice-grid { grid-template-columns: 1fr; }
  .toast { font-size: 0.85rem; }
}

@media (max-width: 400px) {
  :root { --cw: 42px; }
  .center { gap: 10px; }
  .seat { flex-basis: 45%; min-width: 65px; }
  .btn--sm { padding-inline: 6px; font-size: 0.75rem; }
  .stats { grid-template-columns: 1fr; }
  .hand { padding: 8px 2px 5px; min-height: calc(var(--cw) * var(--card-ratio) + 16px); }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root { --cw: 70px; }
  .topbar { padding-block: 6px; }
  .seat__fan { display: none; }
  .hand { padding-top: 18px; }
}

/* 11. ACCESSIBILITY --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ring__spin { animation: none !important; }
  .seat.is-uno { animation: none !important; }
}

@media (forced-colors: active) {
  .card, .btn, .seat, .chip { border: 1px solid CanvasText; }
  .card--wild { background: Canvas; }
}

/* 12. PAGE SECTIONS (Hero, About, FAQ, Related Tools) ------------------------- */
/* Override body background for page sections */
body {
  background: #ffffff;
}

.color-rush-game-section {
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(139, 108, 255, 0.38), transparent 62%),
    radial-gradient(900px 560px at 100% 4%, rgba(76, 141, 255, 0.28), transparent 58%),
    radial-gradient(800px 500px at 50% 115%, rgba(91, 61, 245, 0.25), transparent 60%),
    linear-gradient(180deg, var(--night-900), var(--night-950));
  background-attachment: fixed;
  padding: 1.5rem 0 2rem;
}

.color-rush-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem 2rem;
  align-items: center;
}

.color-rush-hero-copy .section-kicker {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.color-rush-hero-copy h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--purple-navy);
  margin-bottom: 0.75rem;
}

.color-rush-hero-copy h1 span {
  color: var(--lime-text);
}

.color-rush-hero-copy > p {
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: 1rem;
  font-size: 1.02rem;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  list-style: none;
  margin-top: 1.2rem;
  padding: 0;
}

.trust-strip li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--purple-navy);
}

.trust-strip i {
  color: var(--purple);
  font-size: 1rem;
}

.color-rush-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-rush-hero-visual img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* About Section */
.tool-about {
  padding: 3.2rem 0;
  background: #ffffff;
}

.tool-about-story {
  max-width: 72ch;
}

.tool-about-story h3 {
  font-size: 1.35rem;
  color: var(--purple-navy);
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
}

.tool-about-story h3:first-child {
  margin-top: 0;
}

.tool-about-story p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

.tool-about-story ul {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0;
}

.tool-about-story li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.5rem;
  color: var(--muted);
  line-height: 1.65;
}

.tool-about-story li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.85rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

.tool-about-highlight {
  background: var(--purple-soft);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--purple-navy);
}

.tool-about-highlight a {
  color: var(--purple);
  font-weight: 700;
}

/* FAQ Section */
.faq-section {
  padding: 0 0 3.2rem;
  background: var(--white);
}

.faq-section .section__title {
  font-size: 1.65rem;
  color: var(--purple-navy);
  margin-bottom: 1.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.faq-item__question {
  width: 100%;
  padding: 1.1rem 1.3rem;
  background: none;
  border: 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.2s ease;
}

.faq-item__question:hover {
  background: var(--purple-soft);
}

.faq-item__question::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--purple);
  transition: transform 0.3s ease;
}

.faq-item__question[aria-expanded="true"]::after {
  content: "−";
  transform: rotate(180deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item__answer p {
  padding: 0 1.3rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item__question[aria-expanded="true"] + .faq-item__answer {
  max-height: 500px;
  padding-bottom: 1.1rem;
}

/* Related Tools */
.related-tools-block {
  padding: 0 0 3.2rem;
  background: var(--white);
}

.color-rush-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.3rem;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  color: var(--text);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: #d9cff8;
  box-shadow: 0 16px 32px rgba(98, 54, 255, 0.14);
}

.tool-card-media {
  display: block;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--purple-soft);
}

.tool-card-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.tool-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--purple-navy);
  margin-bottom: 0.4rem;
}

.tool-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.tool-card .btn-lime {
  align-self: flex-start;
  font-size: 0.88rem;
  padding: 0.7rem 1.2rem;
}

/* Responsive */
@media (max-width: 900px) {
  .color-rush-hero-inner {
    grid-template-columns: 1fr;
  }

  .color-rush-hero-copy > p {
    max-width: 72ch;
  }

  .color-rush-hero-visual img {
    max-width: 420px;
    margin: 0 auto;
  }

  .color-rush-related-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 600px) {
  .color-rush-related-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    flex-direction: column;
    gap: 0.5rem;
  }
}
