:root {
  --bg: #05080d;
  --ink: #f7f2e8;
  --muted: #aeb9c7;
  --gold: #f6c85f;
  --ember: #ff6b45;
  --teal: #6cf2d8;
  --glass: rgba(10, 17, 28, 0.58);
  --glass-strong: rgba(8, 13, 22, 0.82);
  --line: rgba(255, 255, 255, 0.16);
  --shadow: rgba(0, 0, 0, 0.46);
  --body-font: "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
    sans-serif;
  --display-font: Georgia, "Times New Roman", serif;
  --title-font: "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
    sans-serif;
  --finish-font: "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
    sans-serif;
  --body-bg:
    radial-gradient(circle at 18% 22%, rgba(108, 242, 216, 0.18), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(246, 200, 95, 0.22), transparent 30%),
    radial-gradient(circle at 55% 82%, rgba(255, 107, 69, 0.22), transparent 36%),
    linear-gradient(135deg, #030508 0%, #0a1422 44%, #160b14 100%);
  --card-bg:
    linear-gradient(150deg, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--glass);
  --glow-bg:
    conic-gradient(from 210deg, transparent, rgba(246, 200, 95, 0.14), transparent 34%),
    linear-gradient(90deg, transparent 0 17%, rgba(255, 255, 255, 0.08) 18%, transparent 19% 100%);
  --grid-opacity: 0.18;
  --progress-bg: linear-gradient(90deg, var(--teal), var(--gold), var(--ember));
  --primary-bg: linear-gradient(120deg, var(--gold), var(--ember));
  --primary-ink: #1b0c05;
  --time-shadow:
    0 0 22px rgba(246, 200, 95, 0.22),
    0 18px 52px rgba(0, 0, 0, 0.48);
  --finish-shadow: 0 0 36px rgba(246, 200, 95, 0.45);
}

@property --beam-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

body[data-theme="gala"] {
  --bg: #090604;
  --ink: #fff7e2;
  --muted: #cdbb96;
  --gold: #ffd36b;
  --ember: #b86a2a;
  --teal: #f8e7a0;
  --glass: rgba(37, 20, 10, 0.58);
  --glass-strong: rgba(31, 18, 10, 0.86);
  --line: rgba(255, 224, 151, 0.24);
  --body-font: "Optima", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --display-font: "Didot", "Bodoni 72", Georgia, serif;
  --title-font: "Optima", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --finish-font: "Hiragino Mincho ProN", "Yu Mincho", serif;
  --body-bg:
    radial-gradient(circle at 22% 24%, rgba(255, 211, 107, 0.2), transparent 32%),
    radial-gradient(circle at 82% 16%, rgba(184, 106, 42, 0.28), transparent 34%),
    linear-gradient(135deg, #080402 0%, #241409 46%, #080604 100%);
  --card-bg:
    linear-gradient(140deg, rgba(255, 236, 177, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255, 211, 107, 0.12), rgba(255, 255, 255, 0.03)),
    var(--glass);
  --glow-bg: conic-gradient(from 180deg, transparent, rgba(255, 211, 107, 0.2), transparent 38%);
  --progress-bg: linear-gradient(90deg, #fff0b3, #ffd36b, #b86a2a);
  --primary-bg: linear-gradient(120deg, #fff0b3, #ffd36b);
  --primary-ink: #2a1605;
}

body[data-theme="neon"] {
  --bg: #04020d;
  --ink: #f2f6ff;
  --muted: #9fabd2;
  --gold: #ff4fd8;
  --ember: #7b5cff;
  --teal: #39f7ff;
  --glass: rgba(7, 8, 29, 0.58);
  --glass-strong: rgba(5, 6, 25, 0.88);
  --line: rgba(57, 247, 255, 0.24);
  --body-font: "Trebuchet MS", "Hiragino Kaku Gothic ProN", sans-serif;
  --display-font: "Impact", "Arial Black", sans-serif;
  --title-font: "Trebuchet MS", "Hiragino Kaku Gothic ProN", sans-serif;
  --finish-font: "Impact", "Arial Black", "Hiragino Kaku Gothic ProN", sans-serif;
  --body-bg:
    radial-gradient(circle at 18% 20%, rgba(57, 247, 255, 0.2), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 79, 216, 0.28), transparent 32%),
    linear-gradient(135deg, #03020a 0%, #101342 50%, #1d0928 100%);
  --card-bg:
    linear-gradient(130deg, rgba(57, 247, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 79, 216, 0.09), rgba(255, 255, 255, 0.03)),
    var(--glass);
  --glow-bg:
    linear-gradient(100deg, transparent 0 12%, rgba(57, 247, 255, 0.14) 13%, transparent 18% 58%, rgba(255, 79, 216, 0.14) 59%, transparent 64% 100%);
  --progress-bg: linear-gradient(90deg, #39f7ff, #7b5cff, #ff4fd8);
  --primary-bg: linear-gradient(120deg, #39f7ff, #ff4fd8);
  --primary-ink: #06020d;
  --time-shadow:
    0 0 20px rgba(57, 247, 255, 0.42),
    0 0 54px rgba(255, 79, 216, 0.28);
  --finish-shadow: 0 0 42px rgba(255, 79, 216, 0.56);
}

body[data-theme="daylight"] {
  --bg: #edf4f1;
  --ink: #13211d;
  --muted: #5f716d;
  --gold: #f2b950;
  --ember: #e46d48;
  --teal: #217c72;
  --glass: rgba(255, 252, 244, 0.68);
  --glass-strong: rgba(255, 252, 244, 0.92);
  --line: rgba(19, 33, 29, 0.16);
  --shadow: rgba(36, 48, 45, 0.2);
  --body-font: "Gill Sans", "Hiragino Sans", "Yu Gothic", sans-serif;
  --display-font: "Palatino", "Hiragino Mincho ProN", serif;
  --title-font: "Gill Sans", "Hiragino Sans", "Yu Gothic", sans-serif;
  --finish-font: "Hiragino Sans", "Yu Gothic", sans-serif;
  --body-bg:
    radial-gradient(circle at 18% 18%, rgba(33, 124, 114, 0.18), transparent 32%),
    radial-gradient(circle at 86% 20%, rgba(242, 185, 80, 0.3), transparent 34%),
    linear-gradient(135deg, #f7f0df 0%, #e8f4f0 50%, #dbe5f3 100%);
  --card-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), transparent 42%),
    var(--glass);
  --glow-bg: radial-gradient(circle at 58% 18%, rgba(242, 185, 80, 0.26), transparent 38%);
  --grid-opacity: 0.26;
  --progress-bg: linear-gradient(90deg, #217c72, #f2b950, #e46d48);
  --primary-bg: linear-gradient(120deg, #217c72, #f2b950);
  --primary-ink: #fffdf4;
  --time-shadow: 0 12px 34px rgba(36, 48, 45, 0.16);
  --finish-shadow: 0 12px 34px rgba(228, 109, 72, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--body-font);
  background: var(--body-bg);
  transition: background 600ms ease, color 360ms ease;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.18), transparent 8%),
    repeating-conic-gradient(from 0deg, transparent 0deg 14deg, rgba(255, 255, 255, 0.08) 15deg 16deg);
  mix-blend-mode: screen;
  mask-image: radial-gradient(circle at center, transparent 0 22%, black 23% 36%, transparent 37%);
}

body::after {
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.18) 45%,
    transparent 52%,
    transparent 100%
  );
  transform: translateX(-120%);
}

body.is-running::before {
  opacity: 0.45;
  animation: haloSpin 10s linear infinite;
}

body.is-running::after {
  opacity: 1;
  animation: stageSweep 4.8s ease-in-out infinite;
}

body.is-finished::after {
  opacity: 1;
  animation: finishFlash 1.1s ease-out both;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.stage-glow {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background: var(--glow-bg);
  filter: blur(10px);
  opacity: 0.9;
  animation: drift 14s ease-in-out infinite alternate, glowBreathe 5s ease-in-out infinite;
}

body.is-running .stage-glow {
  animation: drift 8s ease-in-out infinite alternate, glowBreathe 2.2s ease-in-out infinite;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--grid-opacity);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle, black 0%, transparent 78%);
  animation: gridSlide 16s linear infinite;
}

body.is-running .noise {
  animation-duration: 5s;
}

.app-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(18px, 3vw, 42px);
}

.countdown-card {
  position: relative;
  overflow: hidden;
  width: min(1480px, 96vw);
  padding: clamp(30px, 6vw, 78px);
  border: 1px solid var(--line);
  border-radius: clamp(28px, 4vw, 56px);
  background: var(--card-bg);
  box-shadow: 0 36px 120px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px);
  animation: cardIn 800ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.countdown-card::before,
.countdown-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.countdown-card::before {
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--beam-angle, 0deg),
    transparent,
    color-mix(in srgb, var(--teal), transparent 30%),
    transparent 28%,
    color-mix(in srgb, var(--gold), transparent 35%),
    transparent 58%
  );
  opacity: 0;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 2px;
}

.countdown-card::after {
  inset: 0;
  background:
    radial-gradient(circle at var(--spark-x, 20%) var(--spark-y, 20%), rgba(255, 255, 255, 0.18), transparent 10%),
    linear-gradient(120deg, transparent 0 32%, rgba(255, 255, 255, 0.1) 42%, transparent 52% 100%);
  opacity: 0;
  transform: translateX(-30%);
}

body.is-running .countdown-card {
  animation: cardIn 800ms cubic-bezier(0.2, 0.9, 0.2, 1) both, cardPulse 2.4s ease-in-out infinite;
}

body.is-running .countdown-card::before {
  opacity: 0.85;
  animation: borderOrbit 4.2s linear infinite;
}

body.is-running .countdown-card::after {
  opacity: 0.7;
  animation: cardShimmer 3.2s ease-in-out infinite;
}

.event-meta {
  text-align: center;
}

.kicker,
.panel-kicker {
  margin: 0;
  color: var(--teal);
  font-size: clamp(0.78rem, 1.4vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

body.is-running .kicker {
  animation: signalBlink 1.2s ease-in-out infinite;
}

h1 {
  font-family: var(--title-font);
  margin: 10px 0 0;
  font-size: clamp(2rem, 5vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: balance;
  transition: transform 360ms ease, text-shadow 360ms ease;
}

body.is-running h1 {
  text-shadow: 0 0 28px color-mix(in srgb, var(--teal), transparent 48%);
  animation: titleFloat 3s ease-in-out infinite;
}

.time-wrap {
  position: relative;
  margin: clamp(30px, 6vw, 74px) 0 clamp(26px, 4vw, 48px);
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: end;
  gap: clamp(8px, 2vw, 28px);
}

.time-unit {
  display: grid;
  justify-items: center;
  gap: 10px;
  transition: transform 260ms ease;
}

body.is-running .time-unit {
  animation: unitLift 2.7s ease-in-out infinite;
}

body.is-running .time-unit:nth-child(3) {
  animation-delay: 120ms;
}

body.is-running .time-unit:nth-child(5) {
  animation-delay: 240ms;
}

.time-value,
.separator {
  font-family: var(--display-font);
  font-size: clamp(4.6rem, 15.5vw, 18rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.08em;
  text-shadow: var(--time-shadow);
  transition: color 220ms ease, filter 220ms ease, transform 220ms ease;
}

.time-value {
  display: inline-block;
}

.time-value.digit-pop {
  animation: digitPop 420ms cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

body.is-running .separator {
  animation: colonBeat 1s ease-in-out infinite;
}

.separator {
  padding-bottom: clamp(24px, 4vw, 54px);
  color: rgba(247, 242, 232, 0.62);
}

.time-label {
  color: var(--muted);
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.finished-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  color: var(--gold);
  font-family: var(--finish-font);
  font-size: clamp(2.8rem, 8vw, 9rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: var(--finish-shadow);
  pointer-events: none;
}

.is-finished .time-grid {
  opacity: 0.12;
  filter: blur(5px);
}

.is-finished .finished-message {
  animation: finale 850ms cubic-bezier(0.2, 0.9, 0.2, 1) both, finishGlow 1.8s ease-in-out 900ms infinite;
}

.is-warning .time-value,
.is-warning .separator {
  color: #ffe2b8;
  text-shadow: 0 0 28px rgba(255, 107, 69, 0.38), 0 18px 52px rgba(0, 0, 0, 0.48);
}

.progress-frame {
  position: relative;
  overflow: hidden;
  height: clamp(10px, 1.1vw, 18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-120%);
  opacity: 0;
}

body.is-running .progress-frame::after {
  opacity: 1;
  animation: progressSweep 1.8s ease-in-out infinite;
}

.progress-bar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--progress-bg);
  box-shadow: 0 0 28px rgba(246, 200, 95, 0.32);
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 260ms linear;
  background-size: 220% 100%;
}

body.is-running .progress-bar {
  animation: progressFlow 1.4s linear infinite, progressGlow 1.8s ease-in-out infinite;
}

.ambient-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(0.82rem, 1.3vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.is-running .ambient-row {
  animation: ambientPulse 2s ease-in-out infinite;
}

.control-panel,
.panel-peek {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  z-index: 5;
}

.control-panel {
  top: clamp(14px, 2vw, 28px);
  width: min(380px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--glass-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  transition: opacity 220ms ease, transform 220ms ease;
  animation: panelIn 280ms ease both;
}

.control-panel.is-hidden {
  opacity: 0;
  transform: translateX(22px);
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h2 {
  margin: 3px 0 0;
  font-size: 1.25rem;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 12px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

input:focus,
select:focus {
  border-color: rgba(108, 242, 216, 0.65);
  box-shadow: 0 0 0 4px rgba(108, 242, 216, 0.12);
}

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

.button-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 12px;
}

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

.preset-row button,
.button-grid button,
.ghost-button,
.panel-peek {
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.preset-row button:hover,
.button-grid button:hover,
.ghost-button:hover,
.panel-peek:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
}

.button-grid .primary {
  background: var(--primary-bg);
  color: var(--primary-ink);
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(255, 107, 69, 0.22);
}

.button-grid .primary:hover {
  animation: buttonCharge 900ms ease-in-out infinite;
}

.shortcut-hint {
  margin: 13px 0 0;
  color: rgba(247, 242, 232, 0.58);
  font-size: 0.78rem;
  line-height: 1.5;
}

.panel-peek {
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  opacity: 0;
  pointer-events: none;
  background: rgba(8, 13, 22, 0.76);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.panel-peek.is-visible {
  opacity: 1;
  pointer-events: auto;
  animation: peekPulse 2.2s ease-in-out infinite;
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100svh;
    align-content: center;
  }

  .time-grid {
    gap: 6px;
  }

  .time-value,
  .separator {
    font-size: clamp(3.1rem, 18vw, 7rem);
  }

  .separator {
    padding-bottom: 28px;
  }

  .ambient-row {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .control-panel {
    left: 14px;
    right: 14px;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) rotate(-3deg);
  }
  to {
    transform: translate3d(2%, 1%, 0) rotate(3deg);
  }
}

@keyframes finale {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glowBreathe {
  0%,
  100% {
    opacity: 0.66;
    filter: blur(12px) saturate(1);
  }
  50% {
    opacity: 1;
    filter: blur(18px) saturate(1.35);
  }
}

@keyframes gridSlide {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 72px 72px, 72px 72px;
  }
}

@keyframes haloSpin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes stageSweep {
  0%,
  48% {
    transform: translateX(-120%) skewX(-14deg);
  }
  100% {
    transform: translateX(120%) skewX(-14deg);
  }
}

@keyframes finishFlash {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  16% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes borderOrbit {
  to {
    --beam-angle: 360deg;
  }
}

@keyframes cardPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 36px 120px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  50% {
    transform: translateY(-3px) scale(1.005);
    box-shadow:
      0 42px 140px var(--shadow),
      0 0 46px color-mix(in srgb, var(--teal), transparent 68%),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

@keyframes cardShimmer {
  0% {
    --spark-x: 18%;
    --spark-y: 28%;
    transform: translateX(-36%);
  }
  50% {
    --spark-x: 74%;
    --spark-y: 38%;
  }
  100% {
    --spark-x: 48%;
    --spark-y: 72%;
    transform: translateX(36%);
  }
}

@keyframes signalBlink {
  0%,
  100% {
    opacity: 0.68;
    text-shadow: none;
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 18px color-mix(in srgb, var(--teal), transparent 20%);
  }
}

@keyframes titleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes unitLift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes digitPop {
  0% {
    transform: translateY(10px) scale(0.94);
    filter: blur(4px) brightness(1.4);
    opacity: 0.65;
  }
  58% {
    transform: translateY(-6px) scale(1.05);
    filter: blur(0) brightness(1.2);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    filter: blur(0) brightness(1);
  }
}

@keyframes colonBeat {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes finishGlow {
  0%,
  100% {
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }
  50% {
    filter: brightness(1.25);
    transform: translateY(-4px) scale(1.015);
  }
}

@keyframes progressSweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes progressFlow {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 220% 50%;
  }
}

@keyframes progressGlow {
  0%,
  100% {
    box-shadow: 0 0 20px color-mix(in srgb, var(--gold), transparent 62%);
  }
  50% {
    box-shadow: 0 0 42px color-mix(in srgb, var(--teal), transparent 44%);
  }
}

@keyframes ambientPulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateX(14px) scale(0.98);
  }
}

@keyframes buttonCharge {
  0%,
  100% {
    box-shadow: 0 12px 34px rgba(255, 107, 69, 0.22);
  }
  50% {
    box-shadow: 0 18px 44px color-mix(in srgb, var(--gold), transparent 40%);
  }
}

@keyframes peekPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 24px color-mix(in srgb, var(--teal), transparent 60%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
