@font-face {
  font-family: "Noto Serif TC Interface";
  src: url("assets/fonts/NotoSerifTC-Interface.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
}

@font-face {
  font-family: "Noto Serif TC Full";
  src: url("assets/fonts/NotoSerifTC-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
}

@font-face {
  font-family: "Saint Local";
  src: url("assets/fonts/saint.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

:root {
  color-scheme: dark;
  --black: #050505;
  --ink: #11110d;
  --white: #f4f1e8;
  --muted: #a4a199;
  --yellow: #ffd400;
  --yellow-soft: #ffe66a;
  --danger: #ff453a;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  --site-font: "Noto Serif TC Interface", "Noto Serif TC Full", "Noto Serif TC", "Microsoft JhengHei", serif;
  font-family: var(--site-font);
}

html[data-language="en"] {
  --site-font: "Saint Local", "Noto Serif TC Interface", "Noto Serif TC Full", "Times New Roman", serif;
}

html.font-loading body {
  visibility: hidden;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 280px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--black);
  overscroll-behavior: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.experience,
.video-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
}

.ambient-light {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 35% 30%, rgba(164, 22, 8, 0.24), transparent 37%),
    radial-gradient(circle at 68% 66%, rgba(255, 212, 0, 0.1), transparent 30%),
    #050505;
  filter: blur(26px) saturate(1.2);
  transform: scale(1.08);
}

.ad-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  pointer-events: none;
  transition: filter 180ms ease, transform 180ms ease;
  will-change: filter, transform;
}

.vhs-frame-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  transform: scale(1.018);
  transform-origin: center;
  will-change: filter;
}

.vhs-frame-canvas[hidden] {
  display: none !important;
}

.video-filter-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.video-filter-layer::before,
.video-filter-layer::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.video-stage[data-video-filter="vhs"] .ad-video {
  filter:
    saturate(var(--vhs-saturation, 0.93))
    contrast(var(--vhs-contrast, 0.95))
    brightness(var(--vhs-brightness, 0.97));
  transform: scale(1.018);
}

.video-stage[data-video-filter="vhs"] .vhs-frame-canvas {
  filter: none;
}

.video-stage[data-video-filter="vhs"].has-vhs-frame .ad-video {
  opacity: 0;
}

.video-stage[data-video-filter="vhs"].has-vhs-frame .video-filter-layer {
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, rgba(0, 0, 0, 0.13) 2px 4px, transparent 4px 6px);
}

.video-stage[data-video-filter="vhs"].has-vhs-frame .video-filter-layer::before {
  display: none;
}

.video-stage[data-video-filter="vhs"] .video-filter-layer {
  opacity: 1;
  background:
    linear-gradient(var(--vhs-tint-color, rgba(48, 255, 136, 0.06)), var(--vhs-tint-color, rgba(48, 255, 136, 0.06))),
    linear-gradient(rgba(255, 255, 255, var(--vhs-level-lift, 0.03)), rgba(0, 0, 0, var(--vhs-level-lift, 0.03))),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, rgba(0, 0, 0, 0.13) 2px 4px, transparent 4px 6px);
  mix-blend-mode: screen;
}

.video-stage[data-video-filter="vhs"] .video-filter-layer::before {
  inset: -42%;
  opacity: var(--vhs-grain-opacity, 0.28);
  background:
    repeating-conic-gradient(from 17deg, rgba(255, 255, 255, 0.78) 0 1.1deg, rgba(0, 0, 0, 0.72) 1.2deg 2.7deg, transparent 2.8deg 5deg),
    repeating-radial-gradient(circle at 31% 27%, rgba(255, 255, 255, 0.78) 0 2px, rgba(0, 0, 0, 0.65) 3px 5px, transparent 6px 11px);
  background-size: var(--vhs-grain-size, 23px) var(--vhs-grain-size-y, 19px), var(--vhs-grain-size-large, 31px) var(--vhs-grain-size, 23px);
  filter: grayscale(1) contrast(2.7);
  mix-blend-mode: soft-light;
  animation: vhs-noise-shift 0.12s steps(2, end) infinite;
}

.video-stage[data-video-filter="vhs"] .video-filter-layer::after {
  inset: -12% -8%;
  opacity: var(--vhs-tracking-opacity, 0.38);
  background: linear-gradient(to bottom, transparent 0 61%, rgba(255, 255, 255, 0.88) 63%, rgba(6, 6, 6, 0.86) 64.3%, rgba(255, 255, 255, 0.35) 66%, transparent 70%);
  background-size: 100% 190%;
  mix-blend-mode: screen;
  animation: vhs-tracking-band var(--vhs-tracking-speed, 2.4s) steps(8, end) infinite;
}

.video-stage[data-video-filter="dreamcore"] .ad-video {
  filter:
    brightness(var(--dream-brightness, 1.14))
    contrast(var(--dream-contrast, 0.89))
    saturate(var(--dream-saturation, 0.92))
    hue-rotate(var(--dream-hue, 18deg));
  transform: scale(1.018);
}

.video-stage[data-video-filter="dreamcore"] .video-filter-layer {
  opacity: 1;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 250, 219, var(--dream-bloom-opacity, 0.36)), transparent 33%),
    radial-gradient(circle at 83% 65%, rgba(247, 173, 224, var(--dream-bloom-pink-opacity, 0.26)), transparent 39%),
    linear-gradient(135deg, rgba(172, 226, 255, var(--dream-haze-opacity, 0.21)), rgba(255, 220, 232, var(--dream-fade-opacity, 0.12)));
  mix-blend-mode: screen;
  animation: dream-filter-drift 8s ease-in-out infinite alternate;
}

.video-stage[data-video-filter="dreamcore"] .video-filter-layer::before {
  inset: -12%;
  opacity: var(--dream-haze-opacity, 0.21);
  background:
    radial-gradient(ellipse at 18% 72%, rgba(255, 255, 255, 0.78), transparent 38%),
    radial-gradient(ellipse at 82% 31%, rgba(225, 208, 255, 0.68), transparent 35%),
    radial-gradient(ellipse at 50% 98%, rgba(255, 231, 239, 0.72), transparent 46%);
  filter: blur(18px);
  transform: scale(1.08);
}

.video-stage[data-video-filter="dreamcore"] .video-filter-layer::after {
  inset: 0;
  background: rgba(255, 244, 232, var(--dream-fade-opacity, 0.12));
  box-shadow: inset 0 0 92px rgba(79, 72, 130, var(--dream-vignette-opacity, 0.17));
  backdrop-filter: blur(var(--dream-haze, 1.5px));
  -webkit-backdrop-filter: blur(var(--dream-haze, 1.5px));
  mix-blend-mode: soft-light;
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.12;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.08) 4px
  );
  mix-blend-mode: overlay;
}

.fade-curtain {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: #000;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.55, 0, 1, 0.45);
}

.fade-curtain.is-dark {
  opacity: 1;
}

.effect-layer {
  position: absolute;
  inset: 0;
  z-index: 24;
  overflow: hidden;
  pointer-events: none;
}

.effect-particle {
  position: absolute;
  left: var(--x, 50%);
  bottom: var(--start-bottom, -12%);
  color: var(--particle-color, #ff4d73);
  font-family: var(--site-font);
  font-size: var(--size, 28px);
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 12px currentColor, 0 2px 2px rgba(0, 0, 0, 0.4);
  transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg)) scale(0.45);
  animation: effect-rise var(--duration, 3s) cubic-bezier(0.16, 0.68, 0.3, 1) var(--delay, 0s) forwards;
  will-change: transform, opacity;
}

.effect-hearts {
  filter: drop-shadow(0 0 11px rgba(255, 63, 112, 0.95));
  text-shadow: 0 0 7px #fff, 0 0 18px currentColor, 0 3px 3px rgba(0, 0, 0, 0.45);
}

.effect-stars {
  color: #ffd400;
  text-shadow: 0 0 8px #fff4a3, 0 0 18px #ffd400;
}

.effect-petals {
  color: var(--particle-color, #ff6b91);
  animation-name: effect-petal;
}

.effect-feathers {
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--site-font);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  animation-name: effect-feather;
}

.effect-bubbles {
  width: var(--size, 28px);
  height: var(--size, 28px);
  border: 2px solid rgba(255, 244, 164, 0.9);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, rgba(255, 212, 0, 0.12) 25%, rgba(255, 212, 0, 0.02) 65%);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.5), 0 0 14px rgba(255, 212, 0, 0.72);
  animation-name: effect-bubble;
}

.effect-halos {
  bottom: 50%;
  left: 50%;
  width: var(--size, 90px);
  height: var(--size, 90px);
  border: 3px solid rgba(255, 225, 74, 0.95);
  border-radius: 50%;
  box-shadow: 0 0 16px #ffd400, inset 0 0 14px rgba(255, 212, 0, 0.62);
  animation: effect-halo var(--duration, 3s) ease-out var(--delay, 0s) forwards;
}

.effect-rays {
  bottom: 44%;
  left: 50%;
  width: var(--size, 6px);
  height: 45vh;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(255, 212, 0, 0), #fff8b9 48%, rgba(255, 212, 0, 0));
  box-shadow: 0 0 18px #ffd400;
  transform-origin: 50% 100%;
  animation: effect-ray var(--duration, 3s) ease-out var(--delay, 0s) forwards;
}

.effect-confetti,
.effect-pixels {
  width: var(--size, 10px);
  height: calc(var(--size, 10px) * 1.7);
  background: var(--particle-color, #ffd400);
  box-shadow: 0 0 8px color-mix(in srgb, var(--particle-color, #ffd400) 80%, white);
}

.effect-pixels {
  height: var(--size, 10px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  animation-name: effect-pixel;
}

.effect-blessings {
  min-width: max-content;
  color: #fff4a3;
  font-family: var(--site-font);
  font-size: var(--size, 18px);
  letter-spacing: 0.08em;
  text-shadow: 0 0 9px #ffd400, 0 0 20px #ffd400;
}

.watch-hud {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 32px;
  align-items: start;
  gap: clamp(12px, 2.4vw, 34px);
  width: 100%;
  min-height: 112px;
  padding: calc(var(--safe-top) + 14px) clamp(16px, 3.4vw, 52px) 22px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0));
}

.hud-left {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.language-button {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 212, 0, 0.72);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: -0.04em;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  touch-action: manipulation;
}

.language-button:hover,
.language-button:focus-visible {
  border-color: #fff;
  background: var(--yellow);
  color: #050505;
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.timer-panel {
  grid-column: 2;
  min-width: 0;
}

.timer-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 0;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px #000;
}

.timer-value {
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: clamp(22px, 2.5vw, 34px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.progress-track {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.5);
}

.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
  box-shadow: 0 0 16px rgba(255, 212, 0, 0.72);
  transition: width 120ms linear;
}

.skip-button {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.68);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.skip-button {
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  color: var(--yellow);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.skip-x {
  font-family: var(--site-font);
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

.skip-button.is-ready {
  color: var(--yellow);
  border-color: var(--yellow);
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
  animation: ready-pulse 1.4s ease-in-out infinite;
}

.skip-button.is-ready:hover,
.skip-button.is-ready:focus-visible {
  color: #000;
  background: var(--yellow);
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.leaderboard-button {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 212, 0, 0.72);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--yellow);
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  touch-action: manipulation;
}

.leaderboard-icon {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 17px;
  height: 16px;
}

.leaderboard-icon span {
  display: block;
  width: 4px;
  border: 1px solid currentColor;
  background: currentColor;
}

.leaderboard-icon span:nth-child(1) {
  height: 8px;
}

.leaderboard-icon span:nth-child(2) {
  height: 15px;
}

.leaderboard-icon span:nth-child(3) {
  height: 11px;
}

.leaderboard-button:hover,
.leaderboard-button:focus-visible {
  border-color: #fff;
  background: var(--yellow);
  color: #050505;
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.playback-error {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 12;
  transform: translate(-50%, -50%);
  width: min(86vw, 390px);
  padding: 20px 24px;
  border: 1px solid var(--yellow);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.88);
  color: var(--white);
  text-align: center;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.7);
}

.start-prompt {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  cursor: pointer;
  touch-action: manipulation;
}

.start-prompt-card {
  display: block;
  width: min(44vw, 165px);
  min-width: 142px;
  padding: 10px 11px;
  border: 1px solid var(--yellow);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.start-prompt strong {
  display: block;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.start-prompt-card small {
  display: block;
  margin-top: 4px;
  color: #c9c5bb;
  font-size: 9px;
}

.playback-error strong {
  display: block;
  color: var(--yellow);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.playback-error span {
  display: block;
  margin-top: 8px;
  color: #c9c5bb;
  font-size: 12px;
}

.ticker {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
  border-top: 2px solid var(--yellow);
  background: rgba(3, 3, 3, 0.94);
  color: var(--yellow);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.48);
}

.ticker-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
  visibility: hidden;
}

.ticker-track.is-entering,
.ticker-track.is-running {
  visibility: visible;
}

.ticker-track.is-entering {
  animation: ticker-enter var(--ticker-enter-duration, 6s) linear 1 forwards;
}

.ticker-track.is-running {
  animation: ticker-loop var(--ticker-duration, 22s) linear infinite;
}

.ticker-group {
  display: flex;
  flex: none;
  align-items: center;
}

.ticker-copy {
  display: block;
  padding: 13px 0 11px;
  font-size: clamp(15px, 1.7vw, 23px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.ticker-separator {
  flex: none;
  padding: 0 3.25rem;
}

.work-mark {
  position: absolute;
  right: clamp(16px, 3.4vw, 52px);
  bottom: calc(58px + var(--safe-bottom));
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--site-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.35;
  pointer-events: none;
  text-shadow: 0 1px 5px #000;
}

.leaderboard {
  width: min(94vw, 480px);
  height: min(88dvh, 720px);
  max-height: 88dvh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 0, 0.72);
  border-radius: 4px;
  background: #0b0b09;
  color: var(--white);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.86), 0 0 40px rgba(255, 212, 0, 0.08);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.leaderboard::backdrop {
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(9px);
}

.leaderboard-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.leaderboard-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #3a392f;
  background: linear-gradient(135deg, rgba(255, 212, 0, 0.08), transparent 58%);
}

.leaderboard-kicker {
  margin: 0 0 5px;
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.leaderboard h1,
.leaderboard p {
  margin-top: 0;
}

.leaderboard h1 {
  margin-bottom: 0;
  font-size: 23px;
}

.leaderboard-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aaa69b;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.leaderboard-close:hover,
.leaderboard-close:focus-visible {
  color: var(--yellow);
  outline: none;
}

.leaderboard-total {
  display: flex;
  flex: none;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid #292921;
  color: #b7b4aa;
  font-size: 12px;
}

.leaderboard-total strong {
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.profile-form {
  flex: none;
  padding: 17px 20px 16px;
  border-bottom: 1px solid #343329;
  background: #10100d;
}

.profile-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
}

.profile-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.profile-input-row input {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #535147;
  border-radius: 2px;
  outline: none;
  background: #050505;
  color: var(--white);
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}

.profile-input-row input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.12);
}

.profile-input-row button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--yellow);
  border-radius: 2px;
  background: var(--yellow);
  color: #050505;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.profile-input-row button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.profile-help {
  margin: 7px 0 0;
  color: #8f8c83;
  font-size: 10px;
  line-height: 1.45;
}

.profile-contribution {
  margin: 11px 0 0;
  color: #c7c4b9;
  font-size: 12px;
}

.profile-contribution strong {
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 17px;
}

.profile-status {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  color: #aaa79e;
  font-size: 10px;
  line-height: 1.4;
}

.profile-status.is-error {
  color: #ff8f87;
}

.profile-status.is-success {
  color: var(--yellow-soft);
}

.leaderboard-list-wrap {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px calc(14px + var(--safe-bottom));
}

.leaderboard-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 9px;
  border-bottom: 1px solid #282820;
}

.leaderboard-list li.is-me {
  border-color: rgba(255, 212, 0, 0.45);
  background: rgba(255, 212, 0, 0.07);
}

.leaderboard-rank {
  color: #88857c;
  font-family: var(--site-font);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.leaderboard-list li:nth-child(-n + 3) .leaderboard-rank {
  color: var(--yellow);
  font-size: 16px;
}

.leaderboard-name {
  overflow: hidden;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.leaderboard-empty {
  margin: 0;
  padding: 32px 16px;
  color: #8f8c83;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.editor {
  width: min(92vw, 650px);
  max-height: min(88vh, 780px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #4b4a43;
  border-radius: 4px;
  background: #12120f;
  color: var(--white);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.78);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.editor input,
.editor textarea {
  -webkit-user-select: text;
  user-select: text;
}

.editor::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(9px);
}

.editor-card {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 780px);
}

.editor-header,
.editor-actions,
.repo-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.editor-header {
  padding: 24px 26px 18px;
  border-bottom: 1px solid #383831;
}

.editor-kicker {
  margin: 0 0 5px;
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.editor h1,
.editor h2,
.editor p {
  margin-top: 0;
}

.editor h1 {
  margin-bottom: 0;
  font-size: 25px;
}

.editor h2 {
  margin-bottom: 5px;
  font-size: 15px;
}

.editor-window-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
}

.editor-minimize,
.editor-close {
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.editor-minimize {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aaa69b;
  cursor: pointer;
}

.editor-minimize span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 color-mix(in srgb, currentColor 25%, transparent);
  transition: width 180ms ease, height 180ms ease, border 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.editor-minimize:hover,
.editor-minimize:focus-visible {
  color: var(--yellow);
  outline: none;
}

.editor-minimized-status {
  display: none;
  margin-top: 3px;
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.editor-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aaa69b;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.editor-close:hover,
.editor-close:focus-visible {
  color: var(--yellow);
  outline: none;
}

.editor.is-minimized {
  position: fixed;
  inset: auto 14px calc(64px + var(--safe-bottom)) auto;
  width: min(82vw, 292px);
  max-height: none;
  margin: 0;
  overflow: visible;
}

.editor.is-minimized::backdrop {
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
}

.editor.is-minimized .editor-card {
  max-height: none;
}

.editor.is-minimized .editor-header {
  min-height: 68px;
  padding: 12px 13px 11px 16px;
  border-bottom: 0;
}

.editor.is-minimized .editor-kicker,
.editor.is-minimized .editor-body,
.editor.is-minimized .editor-actions,
.editor.is-minimized .editor-close {
  display: none;
}

.editor.is-minimized .editor-header h1 {
  font-size: 14px;
  line-height: 1.15;
}

.editor.is-minimized .editor-minimized-status {
  display: block;
}

.editor.is-minimized .editor-minimize {
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
}

.editor.is-minimized .editor-minimize span {
  width: 14px;
  height: 11px;
  border: 1px solid currentColor;
  background: transparent;
  box-shadow: inset 0 3px 0 color-mix(in srgb, currentColor 28%, transparent);
}

.editor-body {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px 26px;
}

.editor-section + .editor-section {
  margin-top: 26px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 800;
}

.ticker-controls textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid #4c4b44;
  border-radius: 2px;
  outline: none;
  background: #090909;
  color: var(--white);
  font-size: 13px;
  line-height: 1.55;
  touch-action: manipulation;
}

.ticker-controls textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.12);
}

.ticker-english-label {
  margin-top: 20px;
}

.database-note {
  padding: 16px;
  border: 1px solid rgba(255, 212, 0, 0.38);
  background: rgba(255, 212, 0, 0.04);
}

.database-note span,
.database-note strong {
  display: block;
}

.database-note span {
  margin-bottom: 5px;
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.database-note strong {
  font-size: 14px;
}

.database-note p {
  margin: 7px 0 0;
  color: #aaa79d;
  font-size: 12px;
  line-height: 1.5;
}

#effectType {
  width: 100%;
  min-height: 48px;
  padding: 0 40px 0 14px;
  border: 1px solid #4c4b44;
  border-radius: 2px;
  outline: 0;
  background: #090909;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 800;
}

#effectType:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.12);
}

.intensity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  color: #d2cfc5;
  font-size: 12px;
  font-weight: 800;
}

#effectIntensityValue {
  color: var(--yellow);
  font-family: var(--site-font);
}

#effectIntensity {
  width: 100%;
  margin: 11px 0 0;
  accent-color: var(--yellow);
}

.field-help,
.repo-section p {
  margin: 8px 0 0;
  color: #9f9c93;
  font-size: 12px;
  line-height: 1.55;
}

.file-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px dashed #5a584f;
  border-radius: 2px;
  background: #0a0a09;
  cursor: pointer;
}

.file-picker:hover,
.file-picker:focus-within {
  border-color: var(--yellow);
  background: rgba(255, 212, 0, 0.035);
}

.file-picker-title {
  color: var(--yellow);
  font-size: 14px;
  font-weight: 800;
}

.file-picker-subtitle {
  overflow: hidden;
  color: #aaa79d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo-section {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #36362f;
  background: #0a0a09;
}

.repo-section p {
  margin-bottom: 0;
}

.repo-section code {
  color: var(--yellow-soft);
}

.secondary-button,
.save-button,
.text-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button {
  flex: none;
  border: 1px solid #656258;
  background: #20201c;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--yellow);
  outline: none;
}

.editor-status {
  display: block;
  min-height: 38px;
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid #55534a;
  background: #090909;
  color: #aaa79e;
  font-family: var(--site-font);
  font-size: 11px;
  line-height: 1.5;
}

.editor-status.is-success {
  border-color: var(--yellow);
  color: var(--yellow-soft);
}

.editor-status.is-error {
  border-color: var(--danger);
  color: #ff8f87;
}

.editor-actions {
  padding: 17px 26px;
  border-top: 1px solid #383831;
  background: #0b0b09;
}

.text-button {
  border: 0;
  background: transparent;
  color: #aaa79e;
}

.save-button {
  border: 1px solid var(--yellow);
  background: var(--yellow);
  color: #080806;
}

.save-button:hover,
.save-button:focus-visible {
  background: var(--yellow-soft);
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.save-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.save-toast {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 14px 17px;
  border: 1px solid var(--yellow);
  background: #0a0a08;
  color: var(--white);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.62);
}

.save-toast strong {
  color: var(--yellow);
  font-size: 13px;
}

.save-toast span {
  font-size: 12px;
}

.save-toast[hidden],
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Live video filter controls -------------------------------------------- */

.filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.filter-heading h2 {
  margin-bottom: 4px;
}

.filter-heading p {
  margin-bottom: 0;
  color: #9f9c93;
  font-size: 12px;
  line-height: 1.5;
}

.filter-live-badge {
  flex: none;
  padding: 5px 8px;
  border: 1px solid currentColor;
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  animation: filter-live-pulse 1.8s ease-in-out infinite;
}

.filter-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.filter-preset {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid #484740;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  touch-action: manipulation;
}

.filter-preset:hover {
  transform: translateY(-1px);
}

.filter-preset:has(input:checked) {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--yellow) 22%, transparent), 0 0 19px color-mix(in srgb, var(--yellow) 13%, transparent);
}

.filter-preset input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.filter-preset strong {
  overflow: hidden;
  color: var(--white);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-preset-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.65;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(145deg, #45515d, #171b22);
}

.filter-preset[data-filter-preview="none"] .filter-preset-visual {
  background: linear-gradient(145deg, #768492, #202832);
}

.filter-preset[data-filter-preview="none"] .filter-preset-visual::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  content: "";
}

.filter-preset[data-filter-preview="vhs"] .filter-preset-visual {
  background:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.17) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(255, 0, 82, 0.5), #132329 25% 74%, rgba(0, 241, 255, 0.5));
}

.filter-preset[data-filter-preview="vhs"] .filter-preset-visual::after {
  position: absolute;
  right: -12px;
  bottom: 10px;
  left: -8px;
  height: 5px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.8);
  content: "";
  transform: skewX(-18deg);
}

.filter-preset[data-filter-preview="dreamcore"] .filter-preset-visual {
  background:
    radial-gradient(circle at 27% 34%, rgba(255, 255, 223, 0.92), transparent 23%),
    radial-gradient(circle at 75% 68%, #f2a9d7, transparent 34%),
    linear-gradient(145deg, #a8e8ff, #c8b7ed 58%, #ffe2c2);
  filter: saturate(0.78);
}

.filter-preset[data-filter-preview="dreamcore"] .filter-preset-visual::after {
  position: absolute;
  inset: 12% 20%;
  border: 1px solid rgba(255, 255, 238, 0.78);
  border-radius: 50% 50% 8px 8px;
  box-shadow: 0 0 13px #fff;
  content: "";
}

.filter-parameter-panel {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid #3d3c36;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 90%, transparent);
}

.filter-parameter + .filter-parameter {
  margin-top: 14px;
}

.filter-parameter > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.filter-parameter label {
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
}

.filter-parameter output {
  flex: none;
  min-width: 4ch;
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.filter-parameter input[type="range"] {
  width: 100%;
  margin: 8px 0 0;
  accent-color: var(--yellow);
  touch-action: pan-x;
}

.filter-parameter small {
  display: block;
  margin-top: 5px;
  color: #85877f;
  font-size: 9px;
  line-height: 1.45;
}

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

.theme-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.theme-heading h2 {
  margin-bottom: 4px;
}

.theme-heading p {
  margin-bottom: 0;
  color: #aaa79d;
  font-size: 12px;
  line-height: 1.5;
}

.theme-count {
  flex: none;
  padding: 5px 8px;
  border: 1px solid currentColor;
  color: var(--yellow);
  font-family: var(--site-font);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

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

.theme-option {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 82px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid #46453f;
  border-radius: 8px;
  background: #090909;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  touch-action: manipulation;
}

.theme-option:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.theme-option:hover {
  transform: translateY(-1px);
  border-color: #77736a;
}

.theme-option:has(input:checked) {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--yellow) 22%, transparent);
}

.theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.theme-swatch {
  position: relative;
  display: block;
  width: 68px;
  height: 60px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: #222;
}

.theme-swatch i {
  position: absolute;
  display: block;
}

.theme-copy {
  min-width: 0;
}

.theme-copy strong,
.theme-copy small {
  display: block;
}

.theme-copy strong {
  margin-bottom: 4px;
  color: var(--white);
  font-size: 12px;
  line-height: 1.25;
}

.theme-copy small {
  color: #96938a;
  font-size: 9px;
  line-height: 1.4;
}

.theme-option[data-theme-preview="chrome-angel"] .theme-swatch {
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0 12%, #8ddfed 35%, #f5b6ff 66%, #8795b7 100%);
  box-shadow: inset 0 0 12px #fff;
}

.theme-option[data-theme-preview="chrome-angel"] .theme-swatch i:nth-child(1) {
  inset: 8px 9px 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 0 rgba(17, 51, 70, 0.26);
}

.theme-option[data-theme-preview="chrome-angel"] .theme-swatch i:nth-child(2) {
  right: 9px;
  bottom: 8px;
  width: 25px;
  height: 16px;
  border-radius: 50%;
  background: #ff90df;
}

.theme-option[data-theme-preview="chrome-angel"] .theme-swatch i:nth-child(3) {
  bottom: 9px;
  left: 9px;
  width: 20px;
  height: 12px;
  border-radius: 999px;
  background: #c5fff7;
}

.theme-option[data-theme-preview="bubble-os"] .theme-swatch {
  border: 2px solid #2d073b;
  border-radius: 18px 8px 20px 7px;
  background: #ff7fd1;
  box-shadow: inset 0 -13px 0 #c7ff2f;
}

.theme-option[data-theme-preview="bubble-os"] .theme-swatch i:nth-child(1) {
  top: 7px;
  left: 8px;
  width: 42px;
  height: 18px;
  border: 2px solid #2d073b;
  border-radius: 999px;
  background: #f8f0ff;
}

.theme-option[data-theme-preview="bubble-os"] .theme-swatch i:nth-child(2),
.theme-option[data-theme-preview="bubble-os"] .theme-swatch i:nth-child(3) {
  border: 2px solid #2d073b;
  border-radius: 50%;
  background: #61edff;
}

.theme-option[data-theme-preview="bubble-os"] .theme-swatch i:nth-child(2) {
  right: 5px;
  top: 24px;
  width: 21px;
  height: 21px;
}

.theme-option[data-theme-preview="bubble-os"] .theme-swatch i:nth-child(3) {
  left: 10px;
  bottom: 4px;
  width: 15px;
  height: 15px;
}

.theme-option[data-theme-preview="empty-pool"] .theme-swatch {
  background:
    linear-gradient(rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    linear-gradient(#a8edff 0 56%, #3cadd1 56%);
  background-size: 12px 12px, 12px 12px, 100% 100%;
}

.theme-option[data-theme-preview="empty-pool"] .theme-swatch i:nth-child(1) {
  inset: 8px 10px auto;
  height: 17px;
  border-radius: 3px 12px 4px 11px;
  background: rgba(255, 252, 225, 0.88);
  box-shadow: 0 5px 12px rgba(0, 89, 130, 0.22);
}

.theme-option[data-theme-preview="empty-pool"] .theme-swatch i:nth-child(2) {
  bottom: 7px;
  left: 8px;
  width: 50px;
  height: 8px;
  border-top: 2px solid #fff;
  border-radius: 50%;
}

.theme-option[data-theme-preview="empty-pool"] .theme-swatch i:nth-child(3) {
  top: 32px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffb7d9;
  box-shadow: 0 0 7px #fff;
}

.theme-option[data-theme-preview="dream-shrine"] .theme-swatch {
  border-radius: 34px 34px 7px 7px;
  background: radial-gradient(circle at 50% 45%, #fffbdc 0 9%, transparent 10%), linear-gradient(145deg, #e8ddff, #bda9e7 52%, #f2a7ca);
}

.theme-option[data-theme-preview="dream-shrine"] .theme-swatch i:nth-child(1) {
  inset: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px 28px 4px 4px;
  box-shadow: 0 0 12px #fff;
}

.theme-option[data-theme-preview="dream-shrine"] .theme-swatch i:nth-child(2) {
  top: 27px;
  left: 17px;
  width: 34px;
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
}

.theme-option[data-theme-preview="dream-shrine"] .theme-swatch i:nth-child(3) {
  top: 18px;
  left: 33px;
  width: 1px;
  height: 23px;
  background: rgba(255, 255, 255, 0.8);
}

.theme-option[data-theme-preview="green-rain"] .theme-swatch {
  border-color: #00ff66;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(0, 255, 102, 0.18) 9px 10px),
    linear-gradient(#00150a, #000);
  box-shadow: inset 0 0 13px rgba(0, 255, 102, 0.28);
}

.theme-option[data-theme-preview="green-rain"] .theme-swatch i:nth-child(1) {
  inset: 7px;
  border: 1px solid #00ff66;
}

.theme-option[data-theme-preview="green-rain"] .theme-swatch i:nth-child(2) {
  top: 13px;
  left: 14px;
  width: 34px;
  height: 2px;
  background: #00ff66;
  box-shadow: 0 8px 0 rgba(0, 255, 102, 0.62), 0 16px 0 rgba(0, 255, 102, 0.34);
}

.theme-option[data-theme-preview="green-rain"] .theme-swatch i:nth-child(3) {
  right: 13px;
  bottom: 10px;
  width: 6px;
  height: 6px;
  background: #00ff66;
  box-shadow: 0 0 9px #00ff66;
}

/* Shared themed surface behavior ---------------------------------------- */

html[data-ui-theme] .video-stage::before,
html[data-ui-theme] .video-stage::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  content: "";
  pointer-events: none;
}

html[data-ui-theme] .language-button,
html[data-ui-theme] .leaderboard-button,
html[data-ui-theme] .skip-button,
html[data-ui-theme] .start-prompt-card,
html[data-ui-theme] .playback-error,
html[data-ui-theme] .ticker,
html[data-ui-theme] .leaderboard,
html[data-ui-theme] .editor {
  transition: border-color 220ms ease, border-radius 220ms ease, background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

/* 01 — Chrome Angel / Y2K ----------------------------------------------- */

html[data-ui-theme="chrome-angel"] {
  --black: #061216;
  --ink: #123443;
  --white: #f7ffff;
  --muted: #b3d4da;
  --yellow: #b9f7ff;
  --yellow-soft: #f2c5ff;
}

html[data-ui-theme="chrome-angel"] body {
  background: radial-gradient(circle at 50% 0, #a1f2ff, #152d48 46%, #05080e 100%);
}

html[data-ui-theme="chrome-angel"] .experience {
  border-right: 1px solid rgba(203, 252, 255, 0.46);
  border-left: 1px solid rgba(255, 183, 241, 0.36);
  box-shadow: 0 0 80px rgba(155, 235, 255, 0.24);
}

html[data-ui-theme="chrome-angel"] .ambient-light {
  background:
    radial-gradient(circle at 18% 18%, rgba(185, 247, 255, 0.34), transparent 28%),
    radial-gradient(circle at 83% 73%, rgba(250, 155, 229, 0.27), transparent 31%),
    #07151d;
  filter: blur(24px) saturate(1.3);
}

html[data-ui-theme="chrome-angel"] .video-stage::before {
  opacity: 0.32;
  background:
    radial-gradient(circle at 9% 44%, transparent 0 21px, rgba(208, 251, 255, 0.8) 22px 23px, transparent 24px),
    radial-gradient(circle at 90% 61%, transparent 0 36px, rgba(255, 186, 238, 0.62) 37px 38px, transparent 39px),
    linear-gradient(125deg, rgba(255, 255, 255, 0.1), transparent 38% 62%, rgba(151, 231, 255, 0.08));
  mix-blend-mode: screen;
  animation: theme-float 9s ease-in-out infinite alternate;
}

html[data-ui-theme="chrome-angel"] .video-stage::after {
  inset: 10px;
  border: 1px solid rgba(207, 250, 255, 0.28);
  border-radius: 28px;
  box-shadow: inset 0 0 30px rgba(183, 247, 255, 0.08);
}

html[data-ui-theme="chrome-angel"] .scanlines {
  opacity: 0.05;
}

html[data-ui-theme="chrome-angel"] .watch-hud {
  background: linear-gradient(to bottom, rgba(4, 18, 27, 0.74), transparent);
}

html[data-ui-theme="chrome-angel"] .language-button,
html[data-ui-theme="chrome-angel"] .leaderboard-button,
html[data-ui-theme="chrome-angel"] .skip-button {
  border: 1px solid rgba(231, 255, 255, 0.86);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(143, 212, 230, 0.55) 42%, rgba(225, 163, 241, 0.48));
  color: #17364b;
  box-shadow: inset 0 1px 2px #fff, 0 5px 18px rgba(0, 17, 32, 0.38), 0 0 11px rgba(181, 245, 255, 0.45);
}

html[data-ui-theme="chrome-angel"] .timer-value {
  color: #eaffff;
  text-shadow: 0 0 7px #5fe7ff, 1px 2px 0 #8f4f9e;
}

html[data-ui-theme="chrome-angel"] .progress-track {
  height: 7px;
  background: rgba(219, 250, 255, 0.22);
  box-shadow: inset 0 -1px 2px rgba(10, 40, 52, 0.65), 0 0 9px rgba(157, 239, 255, 0.38);
}

html[data-ui-theme="chrome-angel"] .progress-fill {
  background: linear-gradient(90deg, #7eeeff, #fff 56%, #ff9be3);
  box-shadow: 0 0 14px #94efff;
}

html[data-ui-theme="chrome-angel"] .start-prompt {
  background: rgba(8, 29, 42, 0.12);
}

html[data-ui-theme="chrome-angel"] .start-prompt-card,
html[data-ui-theme="chrome-angel"] .playback-error {
  border: 1px solid rgba(236, 255, 255, 0.86);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(231, 255, 255, 0.84), rgba(169, 218, 237, 0.68) 56%, rgba(249, 180, 238, 0.58));
  color: #143143;
  box-shadow: inset 0 2px 3px #fff, 0 16px 42px rgba(4, 24, 40, 0.44), 0 0 24px rgba(164, 240, 255, 0.36);
  backdrop-filter: blur(16px) saturate(1.3);
}

html[data-ui-theme="chrome-angel"] .start-prompt strong,
html[data-ui-theme="chrome-angel"] .playback-error strong {
  color: #164663;
  text-shadow: 0 1px #fff;
}

html[data-ui-theme="chrome-angel"] .start-prompt-card small,
html[data-ui-theme="chrome-angel"] .playback-error span {
  color: #4a6170;
}

html[data-ui-theme="chrome-angel"] .ticker {
  border-top: 1px solid rgba(235, 255, 255, 0.88);
  background: linear-gradient(90deg, rgba(198, 246, 255, 0.91), rgba(242, 202, 255, 0.91), rgba(184, 238, 255, 0.91));
  color: #183e52;
  box-shadow: 0 -8px 28px rgba(111, 228, 255, 0.26), inset 0 1px #fff;
  backdrop-filter: blur(16px);
}

html[data-ui-theme="chrome-angel"] .leaderboard,
html[data-ui-theme="chrome-angel"] .editor {
  border: 1px solid rgba(231, 255, 255, 0.92);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(226, 249, 255, 0.96), rgba(163, 213, 230, 0.94) 52%, rgba(238, 193, 239, 0.94));
  color: #102f40;
  box-shadow: inset 0 2px 3px #fff, 0 32px 90px rgba(0, 13, 26, 0.7), 0 0 34px rgba(181, 244, 255, 0.32);
}

html[data-ui-theme="chrome-angel"] .leaderboard::backdrop,
html[data-ui-theme="chrome-angel"] .editor::backdrop {
  background: rgba(5, 20, 33, 0.72);
}

html[data-ui-theme="chrome-angel"] .leaderboard-header,
html[data-ui-theme="chrome-angel"] .editor-header,
html[data-ui-theme="chrome-angel"] .editor-actions {
  border-color: rgba(32, 86, 104, 0.22);
  background: rgba(255, 255, 255, 0.24);
}

html[data-ui-theme="chrome-angel"] .leaderboard-kicker,
html[data-ui-theme="chrome-angel"] .editor-kicker,
html[data-ui-theme="chrome-angel"] .leaderboard-total strong,
html[data-ui-theme="chrome-angel"] .leaderboard-score,
html[data-ui-theme="chrome-angel"] .profile-contribution strong,
html[data-ui-theme="chrome-angel"] .file-picker-title,
html[data-ui-theme="chrome-angel"] #effectType,
html[data-ui-theme="chrome-angel"] #effectIntensityValue {
  color: #155675;
}

html[data-ui-theme="chrome-angel"] .leaderboard-total,
html[data-ui-theme="chrome-angel"] .profile-form,
html[data-ui-theme="chrome-angel"] .leaderboard-list li,
html[data-ui-theme="chrome-angel"] .editor-section,
html[data-ui-theme="chrome-angel"] .repo-section {
  border-color: rgba(25, 70, 88, 0.2);
}

html[data-ui-theme="chrome-angel"] .profile-form,
html[data-ui-theme="chrome-angel"] .repo-section,
html[data-ui-theme="chrome-angel"] .database-note,
html[data-ui-theme="chrome-angel"] .file-picker,
html[data-ui-theme="chrome-angel"] .editor-status {
  background: rgba(255, 255, 255, 0.24);
}

html[data-ui-theme="chrome-angel"] .profile-input-row input,
html[data-ui-theme="chrome-angel"] .ticker-controls textarea,
html[data-ui-theme="chrome-angel"] #effectType {
  border-color: rgba(24, 75, 94, 0.34);
  background: rgba(249, 255, 255, 0.7);
  color: #102f40;
}

html[data-ui-theme="chrome-angel"] .profile-input-row button,
html[data-ui-theme="chrome-angel"] .save-button {
  border-color: #1e657e;
  background: linear-gradient(#e8ffff, #91dce8);
  color: #103345;
}

html[data-ui-theme="chrome-angel"] .theme-option {
  border-color: rgba(25, 74, 92, 0.28);
  background: rgba(255, 255, 255, 0.42);
}

html[data-ui-theme="chrome-angel"] .theme-copy strong,
html[data-ui-theme="chrome-angel"] .leaderboard-name {
  color: #103345;
}

html[data-ui-theme="chrome-angel"] .theme-copy small,
html[data-ui-theme="chrome-angel"] .theme-heading p,
html[data-ui-theme="chrome-angel"] .field-help,
html[data-ui-theme="chrome-angel"] .repo-section p,
html[data-ui-theme="chrome-angel"] .database-note p,
html[data-ui-theme="chrome-angel"] .profile-help,
html[data-ui-theme="chrome-angel"] .profile-contribution,
html[data-ui-theme="chrome-angel"] .leaderboard-total {
  color: #496675;
}

/* 02 — Bubble OS / Y2K -------------------------------------------------- */

html[data-ui-theme="bubble-os"] {
  --black: #1d0924;
  --ink: #33103f;
  --white: #fff8ec;
  --muted: #d8b7d5;
  --yellow: #c7ff2f;
  --yellow-soft: #64f4ff;
}

html[data-ui-theme="bubble-os"] body {
  background: #2d073b;
}

html[data-ui-theme="bubble-os"] .ambient-light {
  background: radial-gradient(circle at 22% 26%, rgba(255, 70, 186, 0.45), transparent 31%), radial-gradient(circle at 78% 67%, rgba(93, 239, 255, 0.34), transparent 33%), #24082f;
  filter: blur(17px) saturate(1.55);
}

html[data-ui-theme="bubble-os"] .video-stage::before {
  opacity: 0.52;
  background:
    radial-gradient(circle at 12% 35%, transparent 0 16px, #c7ff2f 17px 19px, transparent 20px),
    radial-gradient(circle at 89% 46%, rgba(101, 239, 255, 0.38) 0 25px, #ff78c8 26px 29px, transparent 30px),
    radial-gradient(circle at 74% 82%, rgba(199, 255, 47, 0.22) 0 38px, transparent 39px);
  mix-blend-mode: screen;
  animation: theme-bob 6s ease-in-out infinite alternate;
}

html[data-ui-theme="bubble-os"] .video-stage::after {
  inset: 9px;
  border: 3px solid rgba(255, 118, 203, 0.55);
  border-radius: 34px 13px 38px 15px;
  box-shadow: inset 0 0 0 2px rgba(199, 255, 47, 0.3);
}

html[data-ui-theme="bubble-os"] .watch-hud {
  background: linear-gradient(to bottom, rgba(42, 4, 54, 0.84), transparent);
}

html[data-ui-theme="bubble-os"] .language-button,
html[data-ui-theme="bubble-os"] .leaderboard-button,
html[data-ui-theme="bubble-os"] .skip-button {
  border: 2px solid #2c0738;
  border-radius: 50% 44% 56% 40%;
  background: #c7ff2f;
  color: #32103d;
  box-shadow: 3px 4px 0 #ff76c8, 0 0 0 1px #fff;
}

html[data-ui-theme="bubble-os"] .timer-value {
  color: #c7ff2f;
  text-shadow: 2px 2px 0 #7f1268, -1px -1px 0 #fff;
}

html[data-ui-theme="bubble-os"] .progress-track {
  height: 9px;
  border-bottom: 2px solid #2d073b;
  background: #ff76c8;
}

html[data-ui-theme="bubble-os"] .progress-fill {
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #c7ff2f, #62f0ff);
  box-shadow: 0 0 11px #c7ff2f;
}

html[data-ui-theme="bubble-os"] .start-prompt {
  background: rgba(65, 5, 71, 0.18);
}

html[data-ui-theme="bubble-os"] .start-prompt-card,
html[data-ui-theme="bubble-os"] .playback-error {
  border: 3px solid #2d073b;
  border-radius: 28px 10px 30px 12px;
  background: #ff84d2;
  color: #2e073a;
  box-shadow: 7px 8px 0 #c7ff2f, 0 0 0 2px #fff, 0 18px 42px rgba(23, 0, 31, 0.55);
}

html[data-ui-theme="bubble-os"] .start-prompt strong,
html[data-ui-theme="bubble-os"] .playback-error strong {
  color: #2e073a;
}

html[data-ui-theme="bubble-os"] .start-prompt-card small,
html[data-ui-theme="bubble-os"] .playback-error span {
  color: #5e1c63;
}

html[data-ui-theme="bubble-os"] .ticker {
  border-top: 3px solid #2d073b;
  background: #c7ff2f;
  color: #34103e;
  box-shadow: 0 -5px 0 #ff76c8, 0 -14px 32px rgba(30, 0, 37, 0.36);
}

html[data-ui-theme="bubble-os"] .leaderboard,
html[data-ui-theme="bubble-os"] .editor {
  border: 3px solid #2d073b;
  border-radius: 30px 13px 32px 14px;
  background: #fff0dc;
  color: #31093b;
  box-shadow: 10px 12px 0 #ff74c8, 16px 19px 0 #c7ff2f, 0 32px 90px rgba(15, 0, 20, 0.74);
}

html[data-ui-theme="bubble-os"] .leaderboard::backdrop,
html[data-ui-theme="bubble-os"] .editor::backdrop {
  background: rgba(40, 2, 51, 0.78);
}

html[data-ui-theme="bubble-os"] .leaderboard-header,
html[data-ui-theme="bubble-os"] .editor-header {
  border-color: #2d073b;
  background: #ff83d0;
}

html[data-ui-theme="bubble-os"] .editor-actions {
  border-color: #2d073b;
  background: #8cefff;
}

html[data-ui-theme="bubble-os"] .leaderboard-kicker,
html[data-ui-theme="bubble-os"] .editor-kicker,
html[data-ui-theme="bubble-os"] .leaderboard-total strong,
html[data-ui-theme="bubble-os"] .leaderboard-score,
html[data-ui-theme="bubble-os"] .profile-contribution strong,
html[data-ui-theme="bubble-os"] .file-picker-title,
html[data-ui-theme="bubble-os"] #effectType,
html[data-ui-theme="bubble-os"] #effectIntensityValue {
  color: #75105f;
}

html[data-ui-theme="bubble-os"] .profile-form,
html[data-ui-theme="bubble-os"] .repo-section,
html[data-ui-theme="bubble-os"] .database-note,
html[data-ui-theme="bubble-os"] .file-picker,
html[data-ui-theme="bubble-os"] .editor-status {
  border-color: #5c2462;
  border-radius: 18px 7px 20px 8px;
  background: rgba(255, 255, 255, 0.5);
}

html[data-ui-theme="bubble-os"] .leaderboard-total,
html[data-ui-theme="bubble-os"] .profile-form,
html[data-ui-theme="bubble-os"] .leaderboard-list li,
html[data-ui-theme="bubble-os"] .editor-section {
  border-color: rgba(72, 14, 79, 0.28);
}

html[data-ui-theme="bubble-os"] .profile-input-row input,
html[data-ui-theme="bubble-os"] .ticker-controls textarea,
html[data-ui-theme="bubble-os"] #effectType {
  border: 2px solid #5c2462;
  border-radius: 14px 5px 15px 6px;
  background: #fffaf0;
  color: #31093b;
}

html[data-ui-theme="bubble-os"] .profile-input-row button,
html[data-ui-theme="bubble-os"] .save-button,
html[data-ui-theme="bubble-os"] .secondary-button {
  border: 2px solid #2d073b;
  border-radius: 999px;
  background: #c7ff2f;
  color: #2d073b;
  box-shadow: 3px 3px 0 #ff76c8;
}

html[data-ui-theme="bubble-os"] .theme-option {
  border: 2px solid rgba(57, 9, 66, 0.38);
  border-radius: 18px 7px 20px 8px;
  background: rgba(255, 255, 255, 0.58);
}

html[data-ui-theme="bubble-os"] .theme-copy strong,
html[data-ui-theme="bubble-os"] .leaderboard-name {
  color: #31093b;
}

html[data-ui-theme="bubble-os"] .theme-copy small,
html[data-ui-theme="bubble-os"] .theme-heading p,
html[data-ui-theme="bubble-os"] .field-help,
html[data-ui-theme="bubble-os"] .repo-section p,
html[data-ui-theme="bubble-os"] .database-note p,
html[data-ui-theme="bubble-os"] .profile-help,
html[data-ui-theme="bubble-os"] .profile-contribution,
html[data-ui-theme="bubble-os"] .leaderboard-total {
  color: #70446f;
}

/* 03 — Empty Pool / Dreamcore ------------------------------------------- */

html[data-ui-theme="empty-pool"] {
  --black: #0c4b70;
  --ink: #124b6d;
  --white: #fffdf1;
  --muted: #bde3ed;
  --yellow: #9deaff;
  --yellow-soft: #ffe3a9;
}

html[data-ui-theme="empty-pool"] body {
  background: linear-gradient(#a9edff, #4aa7cd 60%, #226b96);
}

html[data-ui-theme="empty-pool"] .ambient-light {
  background: linear-gradient(180deg, rgba(154, 230, 255, 0.42), rgba(25, 112, 155, 0.18) 55%, rgba(255, 217, 171, 0.13)), #0b466b;
  filter: blur(18px) saturate(0.92);
}

html[data-ui-theme="empty-pool"] .video-stage::before {
  opacity: 0.38;
  background:
    linear-gradient(rgba(255, 255, 255, 0.19) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.19) 1px, transparent 1px);
  background-size: 42px 42px;
  perspective: 400px;
  mix-blend-mode: screen;
}

html[data-ui-theme="empty-pool"] .video-stage::after {
  inset: auto -12% 7% -12%;
  height: 24%;
  border-top: 2px solid rgba(255, 255, 255, 0.54);
  border-radius: 50% 50% 0 0;
  background: repeating-radial-gradient(ellipse at 50% 100%, transparent 0 13px, rgba(210, 249, 255, 0.18) 14px 16px);
  animation: pool-ripple 7s ease-in-out infinite alternate;
}

html[data-ui-theme="empty-pool"] .scanlines {
  opacity: 0.03;
}

html[data-ui-theme="empty-pool"] .watch-hud {
  background: linear-gradient(to bottom, rgba(9, 69, 104, 0.66), transparent);
}

html[data-ui-theme="empty-pool"] .language-button,
html[data-ui-theme="empty-pool"] .leaderboard-button,
html[data-ui-theme="empty-pool"] .skip-button {
  border: 1px solid rgba(255, 255, 243, 0.92);
  border-radius: 5px 14px 6px 13px;
  background: rgba(238, 253, 250, 0.78);
  color: #145878;
  box-shadow: 0 6px 16px rgba(2, 61, 96, 0.28), inset 0 0 0 1px rgba(87, 177, 209, 0.22);
  backdrop-filter: blur(10px);
}

html[data-ui-theme="empty-pool"] .timer-value {
  color: #fffdea;
  text-shadow: 0 2px 0 #237fa7, 0 0 13px rgba(180, 241, 255, 0.78);
}

html[data-ui-theme="empty-pool"] .progress-track {
  height: 8px;
  background: rgba(247, 255, 244, 0.28);
  box-shadow: 0 2px 10px rgba(2, 60, 94, 0.32);
}

html[data-ui-theme="empty-pool"] .progress-fill {
  background: linear-gradient(90deg, #fff3bc, #a8f0ff, #6dc9e8);
  box-shadow: 0 0 14px rgba(184, 245, 255, 0.85);
}

html[data-ui-theme="empty-pool"] .start-prompt {
  background: rgba(65, 151, 187, 0.08);
}

html[data-ui-theme="empty-pool"] .start-prompt-card,
html[data-ui-theme="empty-pool"] .playback-error {
  border: 1px solid rgba(255, 255, 237, 0.92);
  border-radius: 7px 28px 9px 26px;
  background: rgba(255, 252, 224, 0.84);
  color: #174d67;
  box-shadow: 0 15px 35px rgba(8, 73, 106, 0.32), 0 0 28px rgba(198, 246, 255, 0.28);
  backdrop-filter: blur(13px);
}

html[data-ui-theme="empty-pool"] .start-prompt strong,
html[data-ui-theme="empty-pool"] .playback-error strong {
  color: #145a7d;
}

html[data-ui-theme="empty-pool"] .start-prompt-card small,
html[data-ui-theme="empty-pool"] .playback-error span {
  color: #54798a;
}

html[data-ui-theme="empty-pool"] .ticker {
  border-top: 1px solid rgba(255, 255, 239, 0.92);
  background: rgba(228, 249, 247, 0.88);
  color: #155476;
  box-shadow: 0 -8px 30px rgba(34, 136, 177, 0.22), inset 0 5px 14px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(13px);
}

html[data-ui-theme="empty-pool"] .leaderboard,
html[data-ui-theme="empty-pool"] .editor {
  border: 1px solid #fffce5;
  border-radius: 8px 32px 10px 30px;
  background: rgba(240, 251, 238, 0.96);
  color: #174f6b;
  box-shadow: 0 30px 90px rgba(4, 56, 90, 0.58), 0 0 35px rgba(184, 240, 255, 0.28);
}

html[data-ui-theme="empty-pool"] .leaderboard::backdrop,
html[data-ui-theme="empty-pool"] .editor::backdrop {
  background: rgba(25, 91, 125, 0.64);
}

html[data-ui-theme="empty-pool"] .leaderboard-header,
html[data-ui-theme="empty-pool"] .editor-header,
html[data-ui-theme="empty-pool"] .editor-actions {
  border-color: rgba(30, 106, 135, 0.18);
  background: linear-gradient(90deg, rgba(170, 232, 246, 0.45), rgba(255, 244, 199, 0.38));
}

html[data-ui-theme="empty-pool"] .leaderboard-kicker,
html[data-ui-theme="empty-pool"] .editor-kicker,
html[data-ui-theme="empty-pool"] .leaderboard-total strong,
html[data-ui-theme="empty-pool"] .leaderboard-score,
html[data-ui-theme="empty-pool"] .profile-contribution strong,
html[data-ui-theme="empty-pool"] .file-picker-title,
html[data-ui-theme="empty-pool"] #effectType,
html[data-ui-theme="empty-pool"] #effectIntensityValue {
  color: #167299;
}

html[data-ui-theme="empty-pool"] .profile-form,
html[data-ui-theme="empty-pool"] .repo-section,
html[data-ui-theme="empty-pool"] .database-note,
html[data-ui-theme="empty-pool"] .file-picker,
html[data-ui-theme="empty-pool"] .editor-status {
  border-color: rgba(29, 105, 135, 0.25);
  border-radius: 5px 18px 6px 17px;
  background: rgba(191, 231, 238, 0.25);
}

html[data-ui-theme="empty-pool"] .leaderboard-total,
html[data-ui-theme="empty-pool"] .profile-form,
html[data-ui-theme="empty-pool"] .leaderboard-list li,
html[data-ui-theme="empty-pool"] .editor-section {
  border-color: rgba(27, 102, 132, 0.2);
}

html[data-ui-theme="empty-pool"] .profile-input-row input,
html[data-ui-theme="empty-pool"] .ticker-controls textarea,
html[data-ui-theme="empty-pool"] #effectType {
  border-color: rgba(23, 103, 137, 0.3);
  border-radius: 5px 14px 6px 13px;
  background: rgba(255, 255, 247, 0.78);
  color: #174f6b;
}

html[data-ui-theme="empty-pool"] .profile-input-row button,
html[data-ui-theme="empty-pool"] .save-button,
html[data-ui-theme="empty-pool"] .secondary-button {
  border-color: #348cab;
  border-radius: 5px 14px 6px 13px;
  background: #fff0b7;
  color: #17526d;
}

html[data-ui-theme="empty-pool"] .theme-option {
  border-color: rgba(28, 104, 135, 0.25);
  border-radius: 5px 18px 6px 17px;
  background: rgba(255, 255, 245, 0.58);
}

html[data-ui-theme="empty-pool"] .theme-copy strong,
html[data-ui-theme="empty-pool"] .leaderboard-name {
  color: #174f6b;
}

html[data-ui-theme="empty-pool"] .theme-copy small,
html[data-ui-theme="empty-pool"] .theme-heading p,
html[data-ui-theme="empty-pool"] .field-help,
html[data-ui-theme="empty-pool"] .repo-section p,
html[data-ui-theme="empty-pool"] .database-note p,
html[data-ui-theme="empty-pool"] .profile-help,
html[data-ui-theme="empty-pool"] .profile-contribution,
html[data-ui-theme="empty-pool"] .leaderboard-total {
  color: #587b8a;
}

/* 04 — Dream Shrine / Dreamcore ----------------------------------------- */

html[data-ui-theme="dream-shrine"] {
  --black: #241c3c;
  --ink: #3b2d59;
  --white: #fff9ed;
  --muted: #d1c2df;
  --yellow: #dcc6ff;
  --yellow-soft: #ffd2e6;
}

html[data-ui-theme="dream-shrine"] body {
  background: radial-gradient(circle at 50% 20%, #f2d7f5, #74669d 50%, #251d3c);
}

html[data-ui-theme="dream-shrine"] .ambient-light {
  background: radial-gradient(ellipse at 50% 32%, rgba(255, 247, 202, 0.34), transparent 19%), radial-gradient(circle at 23% 67%, rgba(232, 168, 214, 0.31), transparent 28%), radial-gradient(circle at 79% 72%, rgba(181, 205, 255, 0.29), transparent 31%), #241d3a;
  filter: blur(26px) saturate(0.88);
}

html[data-ui-theme="dream-shrine"] .video-stage::before {
  inset: 7% 11% 14%;
  border: 1px solid rgba(255, 249, 221, 0.27);
  border-radius: 48% 48% 14px 14px;
  box-shadow: 0 0 42px rgba(237, 214, 255, 0.18), inset 0 0 55px rgba(255, 218, 239, 0.1);
  animation: dream-breathe 8s ease-in-out infinite;
}

html[data-ui-theme="dream-shrine"] .video-stage::after {
  opacity: 0.38;
  background: radial-gradient(circle at 18% 27%, #fff 0 1px, transparent 2px), radial-gradient(circle at 82% 33%, #fff 0 1px, transparent 2px), radial-gradient(circle at 68% 76%, #fff5c5 0 2px, transparent 3px), linear-gradient(110deg, transparent 20%, rgba(245, 225, 255, 0.12) 45%, transparent 66%);
  background-size: 93px 119px, 131px 101px, 167px 151px, 100% 100%;
}

html[data-ui-theme="dream-shrine"] .scanlines {
  opacity: 0.07;
  filter: blur(0.3px);
}

html[data-ui-theme="dream-shrine"] .watch-hud {
  background: linear-gradient(to bottom, rgba(35, 26, 59, 0.76), transparent);
}

html[data-ui-theme="dream-shrine"] .language-button,
html[data-ui-theme="dream-shrine"] .leaderboard-button,
html[data-ui-theme="dream-shrine"] .skip-button {
  border: 1px solid rgba(255, 246, 222, 0.74);
  border-radius: 50% 50% 45% 55%;
  background: rgba(218, 197, 245, 0.64);
  color: #4b3769;
  box-shadow: 0 0 18px rgba(229, 205, 255, 0.42), inset 0 0 10px rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
}

html[data-ui-theme="dream-shrine"] .timer-value {
  color: #fff5c9;
  text-shadow: 0 0 12px rgba(255, 238, 174, 0.9), 0 2px 4px #3f315a;
}

html[data-ui-theme="dream-shrine"] .progress-track {
  height: 6px;
  background: rgba(236, 218, 255, 0.2);
}

html[data-ui-theme="dream-shrine"] .progress-fill {
  background: linear-gradient(90deg, #d3c1ff, #fff6c3, #f5b5d6);
  box-shadow: 0 0 17px rgba(255, 232, 183, 0.8);
}

html[data-ui-theme="dream-shrine"] .start-prompt {
  background: rgba(44, 32, 69, 0.11);
}

html[data-ui-theme="dream-shrine"] .start-prompt-card,
html[data-ui-theme="dream-shrine"] .playback-error {
  border: 1px solid rgba(255, 248, 219, 0.72);
  border-radius: 74px 74px 12px 12px;
  background: linear-gradient(160deg, rgba(239, 226, 255, 0.8), rgba(232, 190, 222, 0.72));
  color: #493661;
  box-shadow: 0 0 38px rgba(236, 208, 255, 0.38), inset 0 0 30px rgba(255, 250, 225, 0.28), 0 20px 48px rgba(28, 18, 52, 0.48);
  backdrop-filter: blur(15px);
}

html[data-ui-theme="dream-shrine"] .start-prompt strong,
html[data-ui-theme="dream-shrine"] .playback-error strong {
  color: #4d3869;
}

html[data-ui-theme="dream-shrine"] .start-prompt-card small,
html[data-ui-theme="dream-shrine"] .playback-error span {
  color: #726180;
}

html[data-ui-theme="dream-shrine"] .ticker {
  border-top: 1px solid rgba(255, 246, 218, 0.58);
  background: rgba(216, 198, 240, 0.87);
  color: #46335f;
  box-shadow: 0 -10px 35px rgba(216, 186, 238, 0.25), inset 0 1px 15px rgba(255, 252, 227, 0.3);
  backdrop-filter: blur(15px);
}

html[data-ui-theme="dream-shrine"] .leaderboard,
html[data-ui-theme="dream-shrine"] .editor {
  border: 1px solid rgba(255, 249, 222, 0.72);
  border-radius: 72px 72px 16px 16px;
  background: linear-gradient(165deg, rgba(238, 228, 252, 0.97), rgba(221, 201, 236, 0.97) 52%, rgba(244, 207, 226, 0.96));
  color: #45345d;
  box-shadow: 0 0 55px rgba(232, 206, 255, 0.28), 0 32px 90px rgba(29, 19, 51, 0.68);
}

html[data-ui-theme="dream-shrine"] .leaderboard::backdrop,
html[data-ui-theme="dream-shrine"] .editor::backdrop {
  background: rgba(37, 27, 59, 0.74);
}

html[data-ui-theme="dream-shrine"] .leaderboard-header,
html[data-ui-theme="dream-shrine"] .editor-header,
html[data-ui-theme="dream-shrine"] .editor-actions {
  border-color: rgba(86, 62, 108, 0.18);
  background: rgba(255, 246, 222, 0.15);
}

html[data-ui-theme="dream-shrine"] .leaderboard-kicker,
html[data-ui-theme="dream-shrine"] .editor-kicker,
html[data-ui-theme="dream-shrine"] .leaderboard-total strong,
html[data-ui-theme="dream-shrine"] .leaderboard-score,
html[data-ui-theme="dream-shrine"] .profile-contribution strong,
html[data-ui-theme="dream-shrine"] .file-picker-title,
html[data-ui-theme="dream-shrine"] #effectType,
html[data-ui-theme="dream-shrine"] #effectIntensityValue {
  color: #68478a;
}

html[data-ui-theme="dream-shrine"] .profile-form,
html[data-ui-theme="dream-shrine"] .repo-section,
html[data-ui-theme="dream-shrine"] .database-note,
html[data-ui-theme="dream-shrine"] .file-picker,
html[data-ui-theme="dream-shrine"] .editor-status {
  border-color: rgba(83, 62, 106, 0.24);
  border-radius: 28px 28px 8px 8px;
  background: rgba(255, 250, 232, 0.2);
}

html[data-ui-theme="dream-shrine"] .leaderboard-total,
html[data-ui-theme="dream-shrine"] .profile-form,
html[data-ui-theme="dream-shrine"] .leaderboard-list li,
html[data-ui-theme="dream-shrine"] .editor-section {
  border-color: rgba(84, 62, 106, 0.18);
}

html[data-ui-theme="dream-shrine"] .profile-input-row input,
html[data-ui-theme="dream-shrine"] .ticker-controls textarea,
html[data-ui-theme="dream-shrine"] #effectType {
  border-color: rgba(79, 57, 101, 0.28);
  border-radius: 24px 24px 7px 7px;
  background: rgba(255, 252, 239, 0.65);
  color: #45345d;
}

html[data-ui-theme="dream-shrine"] .profile-input-row button,
html[data-ui-theme="dream-shrine"] .save-button,
html[data-ui-theme="dream-shrine"] .secondary-button {
  border-color: #6a4e84;
  border-radius: 999px 999px 12px 12px;
  background: #fff0c8;
  color: #4a3762;
}

html[data-ui-theme="dream-shrine"] .theme-option {
  border-color: rgba(81, 59, 105, 0.22);
  border-radius: 28px 28px 8px 8px;
  background: rgba(255, 250, 236, 0.32);
}

html[data-ui-theme="dream-shrine"] .theme-copy strong,
html[data-ui-theme="dream-shrine"] .leaderboard-name {
  color: #45345d;
}

html[data-ui-theme="dream-shrine"] .theme-copy small,
html[data-ui-theme="dream-shrine"] .theme-heading p,
html[data-ui-theme="dream-shrine"] .field-help,
html[data-ui-theme="dream-shrine"] .repo-section p,
html[data-ui-theme="dream-shrine"] .database-note p,
html[data-ui-theme="dream-shrine"] .profile-help,
html[data-ui-theme="dream-shrine"] .profile-contribution,
html[data-ui-theme="dream-shrine"] .leaderboard-total {
  color: #746482;
}

/* 05 — Green Rain / Matrix ---------------------------------------------- */

html[data-ui-theme="green-rain"] {
  --black: #000604;
  --ink: #00170c;
  --white: #d8ffe5;
  --muted: #6bb98a;
  --yellow: #00ff66;
  --yellow-soft: #9dffc3;
}

html[data-ui-theme="green-rain"] body {
  background: #000;
}

html[data-ui-theme="green-rain"] .experience {
  border-right: 1px solid rgba(0, 255, 102, 0.28);
  border-left: 1px solid rgba(0, 255, 102, 0.28);
  box-shadow: 0 0 70px rgba(0, 255, 94, 0.12);
}

html[data-ui-theme="green-rain"] .ambient-light {
  background: radial-gradient(circle at 50% 45%, rgba(0, 108, 46, 0.2), transparent 50%), #000;
  filter: none;
}

html[data-ui-theme="green-rain"] .video-stage::before {
  opacity: 0.23;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 255, 102, 0.15) 19px, transparent 20px 31px),
    repeating-linear-gradient(180deg, rgba(0, 255, 102, 0.02) 0 5px, rgba(0, 255, 102, 0.19) 6px, transparent 7px 21px);
  background-size: 160px 100%, 100% 240px;
  mix-blend-mode: screen;
  animation: matrix-rain 4.5s linear infinite;
}

html[data-ui-theme="green-rain"] .video-stage::after {
  inset: 8px;
  border: 1px solid rgba(0, 255, 102, 0.33);
  box-shadow: inset 0 0 30px rgba(0, 255, 102, 0.08);
}

html[data-ui-theme="green-rain"] .scanlines {
  opacity: 0.18;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0, 255, 102, 0.13) 3px);
  mix-blend-mode: screen;
}

html[data-ui-theme="green-rain"] .watch-hud {
  background: linear-gradient(to bottom, rgba(0, 8, 4, 0.94), transparent);
}

html[data-ui-theme="green-rain"] .language-button,
html[data-ui-theme="green-rain"] .leaderboard-button,
html[data-ui-theme="green-rain"] .skip-button {
  border: 1px solid #00ff66;
  border-radius: 0;
  background: rgba(0, 15, 7, 0.88);
  color: #00ff66;
  box-shadow: inset 0 0 9px rgba(0, 255, 102, 0.1), 0 0 8px rgba(0, 255, 102, 0.24);
  backdrop-filter: none;
}

html[data-ui-theme="green-rain"] .timer-value {
  color: #00ff66;
  text-shadow: 0 0 9px rgba(0, 255, 102, 0.8);
  letter-spacing: 0.02em;
}

html[data-ui-theme="green-rain"] .progress-track {
  height: 6px;
  border-bottom: 1px solid rgba(0, 255, 102, 0.6);
  background: #001108;
}

html[data-ui-theme="green-rain"] .progress-fill {
  border-radius: 0;
  background: #00ff66;
  box-shadow: 0 0 13px #00ff66;
}

html[data-ui-theme="green-rain"] .start-prompt {
  background: rgba(0, 8, 4, 0.38);
}

html[data-ui-theme="green-rain"] .start-prompt-card,
html[data-ui-theme="green-rain"] .playback-error {
  border: 1px solid #00ff66;
  border-radius: 0;
  background: rgba(0, 13, 6, 0.92);
  color: #aaffc8;
  box-shadow: 8px 8px 0 rgba(0, 84, 34, 0.58), 0 0 25px rgba(0, 255, 102, 0.16);
}

html[data-ui-theme="green-rain"] .start-prompt strong,
html[data-ui-theme="green-rain"] .playback-error strong {
  color: #00ff66;
}

html[data-ui-theme="green-rain"] .start-prompt-card small,
html[data-ui-theme="green-rain"] .playback-error span {
  color: #71c990;
}

html[data-ui-theme="green-rain"] .ticker {
  border-top: 1px solid #00ff66;
  background: rgba(0, 10, 5, 0.95);
  color: #00ff66;
  box-shadow: 0 -7px 22px rgba(0, 255, 102, 0.13);
}

html[data-ui-theme="green-rain"] .leaderboard,
html[data-ui-theme="green-rain"] .editor {
  border: 1px solid #00ff66;
  border-radius: 0;
  background: rgba(0, 12, 6, 0.98);
  color: #c7ffda;
  box-shadow: 10px 10px 0 rgba(0, 87, 35, 0.42), 0 30px 90px rgba(0, 0, 0, 0.86), 0 0 30px rgba(0, 255, 102, 0.12);
}

html[data-ui-theme="green-rain"] .leaderboard::backdrop,
html[data-ui-theme="green-rain"] .editor::backdrop {
  background: rgba(0, 5, 2, 0.9);
  backdrop-filter: blur(3px);
}

html[data-ui-theme="green-rain"] .leaderboard-header,
html[data-ui-theme="green-rain"] .editor-header,
html[data-ui-theme="green-rain"] .editor-actions {
  border-color: rgba(0, 255, 102, 0.42);
  background: rgba(0, 45, 18, 0.32);
}

html[data-ui-theme="green-rain"] .leaderboard-kicker,
html[data-ui-theme="green-rain"] .editor-kicker,
html[data-ui-theme="green-rain"] .leaderboard-total strong,
html[data-ui-theme="green-rain"] .leaderboard-score,
html[data-ui-theme="green-rain"] .profile-contribution strong,
html[data-ui-theme="green-rain"] .file-picker-title,
html[data-ui-theme="green-rain"] #effectType,
html[data-ui-theme="green-rain"] #effectIntensityValue {
  color: #00ff66;
}

html[data-ui-theme="green-rain"] .profile-form,
html[data-ui-theme="green-rain"] .repo-section,
html[data-ui-theme="green-rain"] .database-note,
html[data-ui-theme="green-rain"] .file-picker,
html[data-ui-theme="green-rain"] .editor-status {
  border-color: rgba(0, 255, 102, 0.42);
  border-radius: 0;
  background: rgba(0, 31, 12, 0.34);
}

html[data-ui-theme="green-rain"] .leaderboard-total,
html[data-ui-theme="green-rain"] .profile-form,
html[data-ui-theme="green-rain"] .leaderboard-list li,
html[data-ui-theme="green-rain"] .editor-section {
  border-color: rgba(0, 255, 102, 0.27);
}

html[data-ui-theme="green-rain"] .profile-input-row input,
html[data-ui-theme="green-rain"] .ticker-controls textarea,
html[data-ui-theme="green-rain"] #effectType {
  border-color: rgba(0, 255, 102, 0.48);
  border-radius: 0;
  background: #000804;
  color: #b7ffce;
}

html[data-ui-theme="green-rain"] .profile-input-row button,
html[data-ui-theme="green-rain"] .save-button,
html[data-ui-theme="green-rain"] .secondary-button {
  border-color: #00ff66;
  border-radius: 0;
  background: #00ff66;
  color: #001307;
  box-shadow: 4px 4px 0 #005e26;
}

html[data-ui-theme="green-rain"] .theme-option {
  border-color: rgba(0, 255, 102, 0.35);
  border-radius: 0;
  background: rgba(0, 26, 10, 0.62);
}

html[data-ui-theme="green-rain"] .theme-copy strong,
html[data-ui-theme="green-rain"] .leaderboard-name {
  color: #bdffd2;
}

html[data-ui-theme="green-rain"] .theme-copy small,
html[data-ui-theme="green-rain"] .theme-heading p,
html[data-ui-theme="green-rain"] .field-help,
html[data-ui-theme="green-rain"] .repo-section p,
html[data-ui-theme="green-rain"] .database-note p,
html[data-ui-theme="green-rain"] .profile-help,
html[data-ui-theme="green-rain"] .profile-contribution,
html[data-ui-theme="green-rain"] .leaderboard-total {
  color: #72bf8d;
}

html[data-ui-theme="green-rain"] .work-mark,
html[data-ui-theme="green-rain"] .editor,
html[data-ui-theme="green-rain"] .leaderboard {
  letter-spacing: 0.05em;
}

html[data-ui-theme] .editor.is-minimized::backdrop {
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@keyframes ticker-enter {
  from {
    transform: translate3d(var(--ticker-start, 100vw), 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes filter-live-pulse {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 1; }
}

@keyframes vhs-noise-shift {
  0% { transform: translate3d(-2%, -1%, 0) rotate(0.01deg); }
  33% { transform: translate3d(2%, 1%, 0) rotate(-0.01deg); }
  66% { transform: translate3d(1%, -2%, 0) rotate(0.01deg); }
  100% { transform: translate3d(-1%, 2%, 0) rotate(-0.01deg); }
}

@keyframes vhs-tracking-band {
  0% { background-position: 0 -130%; transform: translate3d(var(--vhs-tracking-offset-neg, -4px), 0, 0); }
  34% { transform: translate3d(var(--vhs-tracking-offset, 4px), 0, 0); }
  67% { transform: translate3d(var(--vhs-tracking-offset-neg, -4px), 0, 0); }
  100% { background-position: 0 220%; transform: translate3d(var(--vhs-tracking-offset, 4px), 0, 0); }
}

@keyframes dream-filter-drift {
  from { transform: translate3d(-1.5%, -0.8%, 0) scale(1.03); }
  to { transform: translate3d(1.2%, 1%, 0) scale(1.07); }
}

@keyframes theme-float {
  from { transform: translate3d(-5px, -7px, 0) scale(1); }
  to { transform: translate3d(7px, 9px, 0) scale(1.035); }
}

@keyframes theme-bob {
  from { transform: translate3d(-4px, -8px, 0) rotate(-0.5deg); }
  to { transform: translate3d(8px, 7px, 0) rotate(0.8deg); }
}

@keyframes pool-ripple {
  from { transform: scaleX(0.96) translateY(2px); opacity: 0.28; }
  to { transform: scaleX(1.04) translateY(-4px); opacity: 0.5; }
}

@keyframes dream-breathe {
  0%, 100% { transform: scale(0.985); opacity: 0.58; }
  50% { transform: scale(1.018); opacity: 0.92; }
}

@keyframes matrix-rain {
  from { background-position: 0 -240px, 0 -240px; }
  to { background-position: 0 240px, 0 240px; }
}

@keyframes ticker-loop {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(var(--ticker-end, -600px), 0, 0);
  }
}

@keyframes effect-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--rotate, 0deg)) scale(0.45);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0px), -112vh, 0) rotate(calc(var(--rotate, 0deg) + 160deg)) scale(1.35);
  }
}

@keyframes effect-petal {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg) scale(0.5); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift, 0px), -105vh, 0) rotate(620deg) scale(1.15); }
}

@keyframes effect-feather {
  0% { opacity: 0; transform: translate3d(0, -10vh, 0) rotate(-25deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift, 0px), -105vh, 0) rotate(95deg); }
}

@keyframes effect-bubble {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.25); }
  15% { opacity: 1; }
  85% { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(var(--drift, 0px), -108vh, 0) scale(1.45); }
}

@keyframes effect-halo {
  0% { opacity: 0; transform: translate(-50%, 50%) scale(0.1); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 50%) scale(5.6); }
}

@keyframes effect-ray {
  0% { opacity: 0; transform: translateX(-50%) rotate(var(--angle, 0deg)) scaleY(0.08); }
  25% { opacity: 0.92; }
  100% { opacity: 0; transform: translateX(-50%) rotate(var(--angle, 0deg)) scaleY(1.25); }
}

@keyframes effect-pixel {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0); }
  14% { opacity: 1; transform: translate3d(0, -12vh, 0) scale(1.7); }
  100% { opacity: 0; transform: translate3d(var(--drift, 0px), -108vh, 0) scale(0.35); }
}

@keyframes ready-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 212, 0, 0);
  }
  50% {
    box-shadow: 0 0 20px 2px rgba(255, 212, 0, 0.25);
  }
}

@media (max-width: 700px) {
  .watch-hud {
    grid-template-columns: 54px 1fr 54px;
    gap: 10px;
    min-height: 104px;
    padding-top: calc(var(--safe-top) + 13px);
    padding-right: 12px;
    padding-left: 12px;
  }

  .skip-x {
    font-size: 36px;
  }

  .timer-value {
    font-size: 22px;
  }

  .progress-track {
    height: 8px;
  }

  .ticker-copy {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .work-mark {
    bottom: calc(54px + var(--safe-bottom));
  }

  .editor-header,
  .editor-body,
  .editor-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .repo-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }

  .theme-option:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (min-width: 521px) {
  .experience {
    box-shadow: 0 0 80px rgba(255, 212, 0, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    --ticker-duration: 55s !important;
  }

  .skip-button.is-ready {
    animation: none;
  }

  html[data-ui-theme] .video-stage::before,
  html[data-ui-theme] .video-stage::after {
    animation: none !important;
  }

  .video-stage[data-video-filter] .ad-video,
  .video-stage[data-video-filter] .video-filter-layer,
  .video-stage[data-video-filter] .video-filter-layer::before,
  .video-stage[data-video-filter] .video-filter-layer::after,
  .filter-live-badge {
    animation: none !important;
  }
}
