/* The default values here are the "classic" theme. Each named theme below
   overrides these variables; anything a theme doesn't override falls back to
   classic, so a partial theme still renders correctly. */
:root {
  --bg: #0d1017;
  --bg-raised: #151a24;
  --bg-input: #1c2230;
  --bg-blur: rgba(13, 16, 23, 0.88);
  --line: #262e3d;
  --text: #e8edf5;
  --text-dim: #8b97ab;
  --accent: #5b9cff;
  --good: #35d07f;
  --bad: #ff5f6d;
  --warn: #ffb84d;
  --kevin: #5b9cff;
  --emily: #ff7ab8;
  --radius: 14px;
  --card-shadow: none;
  --glow: none;
  --brand-fill: none;
  --heading-spacing: normal;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}

.hidden {
  display: none !important;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* ---------- Login ---------- */

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  /* Own stacking context, so the artwork covers the retro grid horizon rather
     than having the grid draw on top of it. */
  position: relative;
  z-index: 1;
}

/* The graffiti wall, shown only while picking a profile — the class comes off
   once the PIN pad opens. The scrim is what keeps the cream logos legible over
   all that colour; without it the artwork wins and nothing reads. */
.login.art {
  background-image:
    linear-gradient(rgba(11, 2, 28, 0.58), rgba(11, 2, 28, 0.76)),
    url('/login-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Frosted tiles rather than flat ones, so the wall reads through the buttons
   without competing with the logos sitting on them. */
.login.art .profile-btn {
  background: rgba(11, 2, 28, 0.5);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.login.art .brand,
.login.art .tagline {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.login-box {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.brand {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0;
}

.brand span {
  color: var(--accent);
}

.brand.small {
  font-size: 18px;
  letter-spacing: 1px;
}

.tagline {
  color: var(--text-dim);
  margin: 6px 0 32px;
  font-size: 14px;
}

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-btn {
  width: 100%;
  padding: 20px 18px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: var(--heading-spacing);
  transition: transform 0.12s ease;
}

.profile-btn:active {
  transform: scale(0.98);
}

.pin-prompt {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: var(--heading-spacing);
  margin-bottom: 14px;
}

.pin-prompt.hint {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--text-dim);
}

.pin-input {
  width: 100%;
  padding: 16px;
  font-size: 28px;
  letter-spacing: 10px;
  text-align: center;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
}

.pin-input:focus {
  border-color: var(--accent);
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font-weight: 600;
}

/* Downloads are real links so the browser saves the file directly, but they
   should look and size like the buttons around them. */
.btn.block {
  display: block;
  width: 100%;
  flex: none;
  text-align: center;
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #08101f;
}

.btn.danger {
  background: transparent;
  border-color: var(--bad);
  color: var(--bad);
}

.btn.ghost {
  background: transparent;
}

.btn:active {
  opacity: 0.8;
}

.error {
  color: var(--bad);
  font-size: 14px;
  min-height: 20px;
  margin: 10px 0 0;
}

/* ---------- Shell ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-blur);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.whoami {
  font-size: 13px;
  color: var(--text-dim);
}

.view {
  padding: 18px 18px calc(96px + var(--safe-bottom));
  max-width: 620px;
  margin: 0 auto;
  position: relative; /* keeps content above the themed background decoration */
  z-index: 1;
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--bg-blur);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
  z-index: 10;
}

.tab {
  flex: 1;
  background: none;
  border: 0;
  color: var(--text-dim);
  padding: 10px 4px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
}

.tab.active {
  color: var(--accent);
}

.tab-icon {
  font-size: 18px;
  line-height: 1;
}

/* ---------- Cards ---------- */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}

.card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: var(--heading-spacing);
}

.card .sub {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 14px;
}

/* ---------- Today ---------- */

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.day-number {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.day-big {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  margin: 4px 0;
}

.day-sub {
  color: var(--text-dim);
  font-size: 13px;
}

.ring {
  width: 88px;
  height: 88px;
  flex: none;
}

.ring circle {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}

.ring .track {
  stroke: var(--bg-input);
}

.ring .bar {
  stroke: var(--accent);
  transition: stroke-dashoffset 0.4s ease;
}

.ring text {
  fill: var(--text);
  font-size: 24px;
  font-weight: 700;
  text-anchor: middle;
}

.tasks {
  display: grid;
  gap: 10px;
}

.task {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.task.done {
  border-color: rgba(53, 208, 127, 0.5);
  background: rgba(53, 208, 127, 0.08);
}

.task.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.check {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--line);
  flex: none;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: transparent;
  margin-top: 1px;
}

.task.done .check {
  background: var(--good);
  border-color: var(--good);
  color: #08101f;
}

.task-label {
  font-weight: 600;
}

.task-detail {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 2px;
}

textarea {
  width: 100%;
  min-height: 84px;
  padding: 14px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  outline: none;
}

textarea:focus,
input[type='text']:focus,
input[type='date']:focus,
input[type='number']:focus,
input[type='password']:not(.pin-input):focus {
  border-color: var(--accent);
}

input[type='text'],
input[type='date'],
input[type='number'],
input[type='password']:not(.pin-input) {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}

label.field {
  display: block;
  margin-bottom: 14px;
}

label.field span {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.banner {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid;
}

.banner.good {
  border-color: rgba(53, 208, 127, 0.5);
  background: rgba(53, 208, 127, 0.1);
  color: #8ff0c0;
}

.banner.bad {
  border-color: rgba(255, 95, 109, 0.5);
  background: rgba(255, 95, 109, 0.1);
  color: #ffb0b6;
}

.banner.warn {
  border-color: rgba(255, 184, 77, 0.5);
  background: rgba(255, 184, 77, 0.1);
  color: #ffd79a;
}

.photo-preview {
  width: 100%;
  border-radius: var(--radius);
  margin-top: 12px;
  display: block;
}

/* ---------- Calendar ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 7px;
}

.cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 2px;
}

.cell.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.cell .dots {
  display: flex;
  gap: 3px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39435a;
}

.dot.complete {
  background: var(--good);
}

.dot.missed {
  background: var(--bad);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 14px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Us ---------- */

.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.vs-name {
  font-weight: 700;
  margin-bottom: 8px;
}

.vs-stat {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
}

.vs-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vs-divider {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}

.statline {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.statline:last-child {
  border-bottom: 0;
}

.statline .k {
  color: var(--text-dim);
}

.bar-track {
  height: 8px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom));
  transform: translate(-50%, 20px);
  background: var(--bg-input);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.bad {
  border-color: var(--bad);
  color: #ffb0b6;
}

.muted {
  color: var(--text-dim);
  font-size: 13px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

input[type='checkbox'] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

/* ==========================================================================
   THEMES
   Set with data-theme on <html>. The login screen is always "retro" — that's
   the app's own identity — and the theme switches to the user's own once they
   sign in.
   ========================================================================== */

/* ---------- 1980s retro / synthwave ---------- */

[data-theme='retro'] {
  --bg: #0d0221;
  --bg-raised: #1a0b2e;
  --bg-input: #241040;
  --bg-blur: rgba(13, 2, 33, 0.9);
  --line: #47216e;
  --text: #f6e9ff;
  --text-dim: #a98fd0;
  --accent: #ff2e97;
  --good: #00ffa3;
  --bad: #ff3860;
  --warn: #ffd230;
  --radius: 6px;
  --card-shadow:
    0 0 0 1px rgba(255, 46, 151, 0.16),
    0 8px 30px rgba(0, 0, 0, 0.5);
  --glow: 0 0 14px rgba(255, 46, 151, 0.6);
  --heading-spacing: 1.6px;
}

[data-theme='retro'] body {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 46, 151, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse at 50% -10%, rgba(0, 240, 255, 0.14) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* The horizon grid. Decorative only — never intercepts taps. */
[data-theme='retro'] body::before {
  content: '';
  position: fixed;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: 42vh;
  background-image:
    repeating-linear-gradient(90deg, rgba(0, 240, 255, 0.5) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(255, 46, 151, 0.45) 0 1px, transparent 1px 56px);
  transform: perspective(280px) rotateX(62deg);
  transform-origin: bottom center;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

[data-theme='retro'] .card h2,
[data-theme='retro'] .day-number,
[data-theme='retro'] .vs-label {
  text-transform: uppercase;
}

[data-theme='retro'] .brand {
  background: linear-gradient(180deg, #ffffff 0%, #ffd230 42%, #ff2e97 58%, #a12ee0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 46, 151, 0.55));
}

[data-theme='retro'] .brand span {
  color: transparent;
}

[data-theme='retro'] .tagline {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  color: #00f0ff;
}

[data-theme='retro'] .day-big {
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 46, 151, 0.9),
    0 0 30px rgba(255, 46, 151, 0.5);
}

[data-theme='retro'] .btn.primary,
[data-theme='retro'] .task.done .check {
  box-shadow: var(--glow);
}

[data-theme='retro'] .tab.active {
  text-shadow: 0 0 10px rgba(255, 46, 151, 0.8);
}

[data-theme='retro'] .cell.today {
  box-shadow: 0 0 10px rgba(255, 46, 151, 0.7);
}

[data-theme='retro'] .dot.complete {
  box-shadow: 0 0 6px var(--good);
}

/* ---------- Lisa Frank ---------- */

[data-theme='lisafrank'] {
  --bg: #ffeafa;
  --bg-raised: rgba(255, 255, 255, 0.9);
  --bg-input: #ffffff;
  --bg-blur: rgba(255, 240, 252, 0.92);
  --line: #ffb3ec;
  --text: #45146b;
  --text-dim: #9560b8;
  --accent: #ff2ec4;
  --good: #00bd97;
  --bad: #ff3d7f;
  --warn: #ff8a3d;
  --radius: 20px;
  --card-shadow: 0 6px 22px rgba(197, 77, 214, 0.18);
  --heading-spacing: 0.3px;
}

[data-theme='lisafrank'] body {
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 190, 240, 0.95) 0%, transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(180, 225, 255, 0.9) 0%, transparent 42%),
    radial-gradient(circle at 20% 96%, rgba(190, 255, 230, 0.9) 0%, transparent 45%),
    radial-gradient(circle at 85% 88%, rgba(255, 235, 165, 0.85) 0%, transparent 42%),
    linear-gradient(160deg, #ffeafa 0%, #f3e8ff 48%, #e6fffa 100%);
  background-attachment: fixed;
}

/* Sparkle field. Decorative only — never intercepts taps. */
[data-theme='lisafrank'] body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 1.6px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 46, 196, 0.42) 1.3px, transparent 1.5px);
  background-size:
    120px 120px,
    170px 170px;
  background-position:
    0 0,
    60px 85px;
  pointer-events: none;
  z-index: 0;
}

/* Rainbow border, drawn with two backgrounds clipped to padding and border box. */
[data-theme='lisafrank'] .card,
[data-theme='lisafrank'] .task {
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(100deg, #ff2ec4, #a24bff, #00c9ff, #00e5a0, #ffe14f, #ff8a3d) border-box;
}

[data-theme='lisafrank'] .task.done {
  background:
    linear-gradient(#f2fffb, #f2fffb) padding-box,
    linear-gradient(100deg, #00e5a0, #00c9ff, #a24bff) border-box;
}

[data-theme='lisafrank'] .brand,
[data-theme='lisafrank'] .day-big,
[data-theme='lisafrank'] .vs-stat {
  background: linear-gradient(100deg, #ff2ec4, #a24bff, #00c9ff, #00c9a0, #ffb01f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme='lisafrank'] .brand span {
  color: transparent;
}

[data-theme='lisafrank'] .tagline::after {
  content: ' ✨';
}

[data-theme='lisafrank'] .btn.primary {
  background: linear-gradient(100deg, #ff2ec4, #a24bff);
  border-color: transparent;
  color: #fff;
}

[data-theme='lisafrank'] .check {
  border-color: #ffb3ec;
}

[data-theme='lisafrank'] .task.done .check {
  background: linear-gradient(140deg, #00e5a0, #00c9ff);
  border-color: transparent;
  color: #fff;
}

[data-theme='lisafrank'] .ring .track {
  stroke: #ffdff6;
}

[data-theme='lisafrank'] .ring .bar {
  stroke: url(#lfGradient);
}

[data-theme='lisafrank'] .ring text {
  fill: #45146b;
}

[data-theme='lisafrank'] .cell {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme='lisafrank'] .dot {
  background: #e9d3f5;
}

[data-theme='lisafrank'] .pin-input,
[data-theme='lisafrank'] textarea {
  background: #fff;
}

/* ---------- Theme picker ---------- */

/* ---------- Profile icon ---------- */

/* The two logos have very different proportions — one is a compact badge, the
   other a wide signature. Scaling both to a fixed HEIGHT inside an identical
   box is what makes the two buttons match: same button size, same optical
   weight, each logo scaled to fit rather than stretched. */
.profile-btn.has-logo {
  padding: 16px 18px;
  min-height: 124px;
  display: grid;
  place-items: center;
}

.profile-logo {
  display: block;
  height: 88px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.profile-logo.small {
  height: 62px;
  margin-bottom: 6px;
}

.profile-btn .profile-icon {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 2px;
}

.icon-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.icon-opt {
  min-width: 46px;
  height: 46px;
  font-size: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  padding: 0 8px;
}

.icon-opt .muted {
  font-size: 12px;
}

/* ---------- Segmented task (the gallon, in quarters) ---------- */

.task.segmented {
  display: block;
  cursor: default;
}

.task.segmented .task-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.seg-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.seg {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: var(--bg-input);
  color: var(--text-dim);
  padding: 26px 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

/* Fills bottom-up as each quarter is logged. */
.seg-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: linear-gradient(180deg, rgba(91, 156, 255, 0.35), var(--accent));
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.seg.on {
  border-color: var(--good);
  color: var(--text);
}

.seg.on .seg-fill {
  height: 100%;
  background: linear-gradient(180deg, rgba(53, 208, 127, 0.4), var(--good));
}

.seg-label {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1.15;
}

.task.segmented.done .seg {
  border-color: var(--good);
}

/* ---------- Countdown ---------- */

.card.countdown {
  text-align: center;
  border-color: var(--accent);
}

.cd-kicker {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cd-date {
  margin: 6px 0 18px !important;
  font-size: 20px;
}

.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cd-cell {
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 4px;
}

.cd-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  /* Tabular figures stop the digits jittering as the seconds tick over. */
  font-variant-numeric: tabular-nums;
}

.cd-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* The task list shown before day 1 is a preview, not something you can tick. */
.task.preview {
  opacity: 0.72;
  cursor: default;
}

.task.preview .check {
  opacity: 0.5;
}

[data-theme='retro'] .cd-num {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 46, 151, 0.8);
}

[data-theme='lisafrank'] .cd-num {
  background: linear-gradient(100deg, #ff2ec4, #a24bff, #00c9ff, #00c9a0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Victory box ---------- */

.card.victory {
  border-color: var(--warn);
}

.brag {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.brag:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.brag-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.brag-text {
  margin: 0;
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.brag-audio {
  width: 100%;
  margin-top: 10px;
  border-radius: 999px;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-swatch {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 6px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.theme-swatch.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.swatch-strip {
  width: 100%;
  height: 26px;
  border-radius: 6px;
}

.swatch-retro {
  background: linear-gradient(100deg, #0d0221 0%, #ff2e97 50%, #00f0ff 100%);
}

.swatch-lisafrank {
  background: linear-gradient(100deg, #ff2ec4, #a24bff, #00c9ff, #00e5a0, #ffe14f);
}

.swatch-classic {
  background: linear-gradient(100deg, #0d1017 0%, #5b9cff 100%);
}
