:root {
  --font-display: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --ink: #e9edf8;
  --muted: #e9edf8ad;
  --accent: #e8b25c;
  --accent-bright: #f4c97a;
  --research: #7fd6e8;
  --scroll-track: #070a14;
  --scroll-thumb: #e9edf838;
  --scroll-thumb-hover: #e8b25c8c;
  color: var(--ink);
  color-scheme: dark;
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
:before,
:after {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
  margin: 0;
}

body {
  background: #070a14;
}

::selection {
  background: #e8b25c66;
  color: #fff7ea;
}

[hidden] {
  display: none !important;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid var(--scroll-track);
  background-clip: padding-box;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  border: 2px solid var(--scroll-track);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: var(--scroll-track);
}

.page {
  min-height: 100svh;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px))
    max(2.5rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  display: flex;
  position: relative;
  overflow: hidden auto;
}

.page::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(3, 5, 12, 0.6) 100%);
}

.atmosphere {
  z-index: -1;
  background: radial-gradient(90% 70% at 15% 10%, #e8b25c47, #0000 55%),
    radial-gradient(70% 60% at 85% 20%, #1b5e7859, #0000 50%),
    radial-gradient(80% 50% at 50% 100%, #24356e8c, #0000 60%),
    linear-gradient(165deg, #0d1730 0%, #070a14 45%, #080b18 100%);
  position: fixed;
  inset: 0;
}

.atmosphere::before {
  content: "";
  position: absolute;
  inset: -18%;
  pointer-events: none;
  background: radial-gradient(28% 24% at 22% 18%, rgba(232, 178, 92, 0.14), transparent 60%),
    radial-gradient(26% 22% at 78% 30%, rgba(52, 120, 170, 0.12), transparent 60%),
    radial-gradient(34% 26% at 55% 92%, rgba(46, 64, 140, 0.2), transparent 60%);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 1.5%, 0) scale(1.07);
  }
}

.atmosphere:after {
  content: "";
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  position: absolute;
  inset: 0;
}

.stars {
  z-index: -1;
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #eaf2ff;
  opacity: var(--base, 0.6);
  box-shadow: 0 0 6px 1px rgba(190, 215, 255, 0.5);
  animation-name: twinkle;
  animation-duration: var(--tw, 3s);
  animation-timing-function: ease-in-out;
  animation-delay: var(--delay, 0s);
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.star.is-static {
  animation: none;
}

@keyframes twinkle {
  from {
    opacity: calc(var(--base, 0.6) * 0.3);
  }
  to {
    opacity: var(--base, 0.6);
  }
}

.shooting-stars {
  z-index: -1;
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.shooting-star {
  position: absolute;
  width: 130px;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(270deg, transparent, rgba(210, 230, 255, 0.35) 60%, #ffffff);
  filter: drop-shadow(0 0 6px rgba(180, 215, 255, 0.7));
  opacity: 0;
  transform: rotate(-28deg);
  animation-name: shoot;
  animation-duration: var(--dur, 6s);
  animation-timing-function: linear;
  animation-delay: var(--delay, 0s);
  animation-iteration-count: infinite;
}

@keyframes shoot {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-28deg);
  }
  1.5% {
    opacity: 1;
  }
  24% {
    opacity: 0;
    transform: translate3d(var(--tx, -50vw), var(--ty, 25vh), 0) rotate(-28deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--tx, -50vw), var(--ty, 25vh), 0) rotate(-28deg);
  }
}


.brand {
  text-align: center;
  margin-bottom: clamp(3.25rem, 9vh, 5.5rem);
  animation: 0.9s cubic-bezier(0.22, 1, 0.36, 1) both rise;
}

.brand-mark {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
  font-size: clamp(1.65rem, 4.5vw, 2.15rem);
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 0 34px rgba(232, 178, 92, 0.3);
}

.brand-line {
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 0.3rem 0 0;
  font-size: clamp(0.82rem, 1.6vw, 0.95rem);
  font-weight: 400;
}

.brand-link {
  appearance: none;
  vertical-align: middle;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  background: #e9edf80f;
  border: none;
  border-radius: 999px;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0 0.15rem;
  padding: 0.28rem 0.7rem 0.28rem 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  display: inline-flex;
  box-shadow: inset 0 0 0 1px #e9edf82e;
}

.brand-link:hover {
  color: var(--ink);
  background: #e8b25c24;
  box-shadow: inset 0 0 0 1px #e8b25c8c;
  transform: translateY(-1px);
}

.brand-link:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.brand-link-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7px;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
}

.stage {
  text-align: center;
  flex-direction: column;
  flex: 1;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  width: min(720px, 100%);
  animation: 1s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both rise;
  display: flex;
}

.stage-body {
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  width: 100%;
  display: flex;
}

.controls {
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  display: flex;
}

.controls-row {
  align-items: center;
  gap: 0.5rem;
  display: flex;
}

.mode-switch {
  background: #e9edf80d;
  border-radius: 999px;
  padding: 0.25rem;
  display: flex;
  position: relative;
  box-shadow: inset 0 0 0 1px #e9edf82e;
}

.mode-switch.is-disabled {
  opacity: 0.45;
}

.mode-thumb {
  width: calc(50% - 0.25rem);
  transform: translateX(calc(var(--i, 0) * 100%));
  background: linear-gradient(135deg, #f7cf8a, #e8b25c 60%, #c98f3f);
  border-radius: 999px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  box-shadow: 0 6px 18px #e8b25c55, inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.mode-option {
  z-index: 1;
  appearance: none;
  white-space: nowrap;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  background: 0 0;
  border: none;
  border-radius: 999px;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.05rem;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
  display: flex;
  position: relative;
}

.mode-option:disabled {
  cursor: not-allowed;
}

.mode-option.is-active {
  color: #1a1612;
}

.mode-option:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.mode-emoji {
  font-size: 1rem;
  line-height: 1;
}

.mode-blurb {
  max-width: 42ch;
  font-family: var(--font-body);
  color: var(--muted);
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.settings {
  z-index: 6;
  position: relative;
}

.settings-trigger {
  appearance: none;
  cursor: pointer;
  width: 2.55rem;
  height: 2.55rem;
  color: var(--muted);
  background: #e9edf80d;
  border: none;
  border-radius: 999px;
  place-items: center;
  padding: 0;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  display: grid;
  box-shadow: inset 0 0 0 1px #e9edf82e;
}

.settings-trigger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.settings-trigger:not(:disabled):hover,
.settings.is-open .settings-trigger {
  color: var(--ink);
  background: #e8b25c1a;
  box-shadow: inset 0 0 0 1px #e8b25c80;
}

.settings-trigger:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.settings-trigger svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55px;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
}

.settings-overlay {
  z-index: 40;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  background: radial-gradient(70% 55% at 50% 45%, #e8b25c1a, #0000 60%),
    radial-gradient(90% 80% at 50% 100%, #24356e47, #0000 55%), #0609138c;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  animation: 0.35s cubic-bezier(0.22, 1, 0.36, 1) both overlay-in;
  display: grid;
  position: fixed;
  inset: 0;
}

.settings-panel {
  z-index: 1;
  text-align: left;
  background: linear-gradient(160deg, #131b33, #0b1120 60%);
  border-radius: 1.25rem;
  width: min(420px, 100%);
  padding: 1.35rem 1.4rem 1.25rem;
  animation: 0.4s cubic-bezier(0.22, 1, 0.36, 1) both rise;
  position: relative;
  box-shadow: inset 0 0 0 1px #e9edf81f, 0 24px 60px #0000008c;
}

.settings-panel-head {
  margin-bottom: 1.15rem;
}

.settings-panel-title {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
  font-size: 1.55rem;
  font-weight: 500;
}

.settings-panel-blurb {
  font-family: var(--font-body);
  color: var(--muted);
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.duration-field + .duration-field {
  margin-top: 1.25rem;
}

.duration-head {
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  display: flex;
}

.duration-label {
  font-family: var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 650;
}

.duration-value {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 500;
}

.duration-slider {
  appearance: none;
  cursor: pointer;
  background: #e9edf81f;
  border-radius: 999px;
  outline: none;
  width: 100%;
  height: 0.35rem;
  margin: 0;
}

.duration-slider::-webkit-slider-runnable-track {
  background: #e9edf81f;
  border-radius: 999px;
  height: 0.35rem;
}

.duration-slider::-webkit-slider-thumb {
  appearance: none;
  background: var(--accent);
  cursor: pointer;
  border: none;
  border-radius: 50%;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: -0.4rem;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 0 4px #e8b25c2e;
}

.duration-slider::-moz-range-track {
  background: #e9edf81f;
  border-radius: 999px;
  height: 0.35rem;
}

.duration-slider::-moz-range-thumb {
  background: var(--accent);
  cursor: pointer;
  border: none;
  border-radius: 50%;
  width: 1.15rem;
  height: 1.15rem;
  box-shadow: 0 0 0 4px #e8b25c2e;
}

.duration-slider:hover::-webkit-slider-thumb {
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px #e8b25c47;
}

.duration-slider:focus-visible::-webkit-slider-thumb {
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px #e8b25c47;
}

.duration-slider:hover::-moz-range-thumb {
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px #e8b25c47;
}

.duration-slider:focus-visible::-moz-range-thumb {
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px #e8b25c47;
}

.duration-slider:focus-visible {
  outline: none;
}

.duration-ends {
  font-family: var(--font-body);
  color: var(--muted);
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  display: flex;
}

.duration-hint,
.settings-note {
  font-family: var(--font-body);
  color: var(--muted);
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.settings-note {
  border-top: 1px solid #e9edf81a;
  margin-top: 1.1rem;
  padding-top: 0.7rem;
}

.settings-mute {
  font-family: var(--font-body);
  color: var(--ink);
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.15rem;
  font-size: 0.92rem;
  display: flex;
}

.settings-mute input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.settings-mute label {
  cursor: pointer;
}

.settings-done {
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
}


.niche-select {
  z-index: 5;
  width: min(100%, 280px);
  position: relative;
}

.niche-trigger {
  appearance: none;
  cursor: pointer;
  width: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  background: #e9edf80d;
  border: none;
  border-radius: 999px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 550;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  display: flex;
  box-shadow: inset 0 0 0 1px #e9edf82e;
}

.niche-trigger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.niche-trigger:not(:disabled):hover {
  background: #e9edf814;
  box-shadow: inset 0 0 0 1px #e9edf852;
}

.niche-select.is-open .niche-trigger {
  background: #e8b25c14;
  box-shadow: inset 0 0 0 1px #e8b25c8c;
}

.niche-emoji {
  text-align: center;
  flex-shrink: 0;
  width: 1.35rem;
  font-size: 1.05rem;
  line-height: 1;
}

.niche-label {
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
  overflow: hidden;
}

.niche-caret {
  border-left: 5px solid #0000;
  border-right: 5px solid #0000;
  border-top: 6px solid var(--muted);
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  transition: transform 0.2s;
}

.niche-select.is-open .niche-caret {
  transform: rotate(180deg);
}

.niche-menu {
  scrollbar-color: #e9edf838 #101528;
  background: #101528;
  border-radius: 1rem;
  max-height: min(50vh, 360px);
  margin: 0;
  padding: 0.35rem;
  animation: 0.22s cubic-bezier(0.22, 1, 0.36, 1) both menu-in;
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  overflow-y: auto;
  box-shadow: inset 0 0 0 1px #e9edf81f, 0 18px 40px #0000008c;
}

.niche-menu::-webkit-scrollbar-track {
  background: #101528;
}

.niche-menu::-webkit-scrollbar-thumb {
  border-color: #101528;
}

.niche-option {
  color: var(--ink);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--font-body);
  text-align: left;
  background: 0 0;
  border-radius: 0.7rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, transform 0.15s, color 0.15s;
  display: flex;
}

.niche-option:hover {
  background: #e9edf812;
  transform: translateX(3px);
}

.niche-option:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: -2px;
}

.niche-option.is-active {
  color: var(--accent-bright);
  background: #e8b25c29;
}

.niche-option.is-active::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent-bright);
  margin-left: auto;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(244, 201, 122, 0.6);
}

.niche-option + .niche-option {
  margin-top: 0.1rem;
}

@keyframes menu-in {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reel {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: clamp(10rem, 26vw, 14rem);
  display: flex;
  position: relative;
}

.reel::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72%, 440px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232, 178, 92, 0.12), transparent 62%);
  filter: blur(14px);
  pointer-events: none;
}

.reel-eyebrow {
  font-family: var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
}

.reel-phrase {
  max-width: 14ch;
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
  font-size: clamp(3.4rem, 11vw, 5.75rem);
  font-weight: 500;
  line-height: 1.02;
  position: relative;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.5);
}

body[data-lang="zh"] .reel-phrase {
  max-width: 8em;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.reel.is-spinning .reel-phrase {
  opacity: 0.88;
  animation: 80ms tick-flash;
}

.reel.is-landed .reel-phrase {
  color: var(--ink);
  animation: 0.55s cubic-bezier(0.22, 1, 0.36, 1) both topic-in;
  text-shadow: 0 0 44px rgba(244, 201, 122, 0.3), 0 6px 40px rgba(0, 0, 0, 0.5);
}

.sr-only {
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

.actions,
.actions-main {
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  display: flex;
}

.btn {
  appearance: none;
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s, background 0.2s, color 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, #f7cf8a, #e8b25c 60%, #c98f3f);
  color: #1a1612;
  box-shadow: 0 10px 28px #e8b25c55, inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn.primary:not(:disabled):hover {
  background: linear-gradient(135deg, #ffdc9e, #edbe6e 60%, #d19a4d);
  box-shadow: 0 14px 34px #e8b25c66, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn.secondary {
  color: var(--ink);
  background: 0 0;
  box-shadow: inset 0 0 0 1.5px #e9edf847;
}

.btn.secondary:not(:disabled):hover {
  background: #e9edf80a;
  box-shadow: inset 0 0 0 1.5px #e9edf88c, 0 0 24px #e9edf80f;
}

.btn.ghost {
  color: var(--muted);
  text-underline-offset: 3px;
  background: 0 0;
  border-radius: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: underline;
}

.timer-overlay {
  z-index: 20;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: radial-gradient(70% 55% at 50% 45%, #e8b25c29, #0000 60%),
    radial-gradient(90% 80% at 50% 100%, #24356e73, #0000 55%), #060913f0;
  place-items: center;
  padding: 1.5rem;
  animation: 0.55s cubic-bezier(0.22, 1, 0.36, 1) both overlay-in;
  display: grid;
  position: fixed;
  inset: 0;
}

.timer-overlay-inner {
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.85rem, 2.5vh, 1.5rem);
  width: min(920px, 100%);
  max-height: 100%;
  animation: 0.65s cubic-bezier(0.22, 1, 0.36, 1) 80ms both rise;
  display: flex;
  overflow-y: auto;
}

.timer-topic {
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 500;
}

.timer-ring {
  --p: 0;
  background: radial-gradient(circle at center, #0b1120 62%, transparent 63%),
    conic-gradient(var(--accent) calc(var(--p) * 1turn), #e9edf81f 0);
  border-radius: 50%;
  place-items: center;
  width: min(62vw, 52vh, 380px);
  height: min(62vw, 52vh, 380px);
  transition: background 0.15s linear;
  display: grid;
  box-shadow: 0 0 70px -12px rgba(232, 178, 92, 0.4), inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.timer-overlay.is-live .timer-digits {
  color: var(--accent-bright);
  text-shadow: 0 0 34px rgba(244, 201, 122, 0.35);
}

.timer-overlay.is-done .timer-ring {
  animation: 0.8s pulse-done;
}

.timer-digits {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.5rem, 14vw, 7rem);
  font-weight: 500;
  line-height: 1;
}

.timer-status {
  font-family: var(--font-body);
  color: var(--muted);
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.timer-phase {
  font-family: var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--research);
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
}

.timer-next {
  font-family: var(--font-body);
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.timer-actions {
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  display: flex;
}

.timer-overlay.is-research .timer-ring {
  background: radial-gradient(circle at center, #0b1120 62%, transparent 63%),
    conic-gradient(var(--research) calc(var(--p) * 1turn), #e9edf81f 0);
  box-shadow: 0 0 70px -12px rgba(127, 214, 232, 0.4), inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.timer-overlay.is-research .timer-digits {
  color: var(--research);
  text-shadow: 0 0 34px rgba(127, 214, 232, 0.35);
}

.speech-stages {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(100%, 560px);
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.speech-stage {
  min-height: 3rem;
  color: var(--muted);
  background: #e9edf80a;
  border-radius: 1rem;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0.6rem;
  transition: background 0.35s, box-shadow 0.35s, color 0.35s, transform 0.35s;
  display: flex;
  box-shadow: inset 0 0 0 1px #e9edf829;
}

.speech-stage-label {
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  font-weight: 600;
}

.speech-stage.is-hit {
  color: #b7efc5;
  background: #489e6e38;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px #6ec48c8c, 0 0 24px #489e6e38, 0 4px 14px rgba(0, 0, 0, 0.25);
}

.speech-stage.is-pending {
  color: var(--muted);
}

.foot {
  margin-top: clamp(2.5rem, 7vh, 4rem);
  color: var(--muted);
  font-family: var(--font-body);
  letter-spacing: 0.06em;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.85;
  animation: 1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both rise;
  display: flex;
}

.foot-star {
  color: var(--accent);
  font-size: 0.72rem;
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes topic-in {
  0% {
    opacity: 0.65;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tick-flash {
  0% {
    opacity: 0.55;
    transform: translateY(4px);
  }
  to {
    opacity: 0.88;
    transform: translateY(0);
  }
}

@keyframes pulse-done {
  0%,
  to {
    transform: scale(1);
  }
  40% {
    transform: scale(1.06);
  }
}

@keyframes overlay-in {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere::before {
    animation: none;
  }
  .shooting-stars {
    display: none;
  }
  .brand,
  .stage,
  .reel.is-landed .reel-phrase,
  .reel.is-spinning .reel-phrase,
  .timer-overlay,
  .timer-overlay-inner,
  .settings-overlay,
  .settings-panel,
  .niche-menu,
    animation: none !important;
  }
}

/* ---------- 移动端适配（知言） ---------- */
@media (max-width: 520px) {
  .btn { padding: 1.05rem 1.35rem; }
  .actions-main { flex-direction: column; width: 100%; }
  .actions-main .btn { width: min(100%, 320px); }
  .settings-trigger { width: 48px; height: 48px; }
  .niche-select { width: min(100%, 264px); }
  .niche-menu { max-height: min(56vh, 420px); }
  .settings-panel { padding: 1.15rem 1.1rem 1.1rem; }
  .timer-actions { flex-wrap: wrap; justify-content: center; }
}

/* ---------- 知言：主题计数 ---------- */
.niche-count {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  margin-left: 0.15rem;
}

.niche-opt-count {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  padding-left: 0.75rem;
}

.niche-option {
  justify-content: flex-start;
}
