:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #f5f6f8;
  background: #090b10;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; }
button { font: inherit; }

.stage {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse 62% 65% at 51% 48%, #121722 0%, #0b0e15 56%, #080a0e 100%);
}

#particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.masthead, .footer {
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(24px, 4vw, 64px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #a7b0c0;
}
.masthead { padding-top: clamp(24px, 3.6vw, 50px); }
.footer { padding-bottom: clamp(24px, 3.6vw, 50px); color: #737d8b; }
.muted { color: #6f7887; }

.experience {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.reset-button {
  position: relative;
  display: block;
  width: min(70vw, 540px, 65svh);
  aspect-ratio: 420 / 340;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity calc(.26s / 1.5) ease, transform calc(.26s / 1.5) ease;
}
.reset-button:hover:not(:disabled) { transform: translateY(-6px); }
.reset-button:active:not(:disabled) { transform: translateY(7px) scale(.98); }
.reset-button:focus-visible { outline: 2px solid #8fbaff; outline-offset: 12px; }
.reset-button:disabled { cursor: default; }
.reset-button.is-burst { opacity: 0; transform: scale(.8); }

.pedestal { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.phase-intro .pedestal { visibility: hidden; }
.pedestal path, .button-face > circle {
  fill: none;
  stroke: #2475ad;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.pedestal .control-points circle { fill: #65c879; stroke: none; }
.button-face > circle { fill: #795cf3; stroke: none; }
.phase-outline .button-face > circle { fill: none; stroke: #2475ad; }
.phase-two .button-face > circle, .phase-pressed .button-face > circle { fill: #078df2; }
.phase-one .button-face > circle { fill: #5ac66f; }
.circle-points { visibility: hidden; }
.phase-outline .circle-points, .phase-pressed .circle-points { visibility: visible; }
.pedestal #side-wall, .pedestal #stem-wall { fill: #090b10; }
.phase-pressed .pedestal #side-wall, .phase-pressed .pedestal #stem-wall,
.phase-pressed .pedestal .base-front { fill: #078df2; }
.phase-pressed .pedestal .base-top { fill: url(#stripes); }
.countdown {
  fill: #08090d;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 150px;
  font-weight: 400;
}
.phase-outline .countdown, .phase-pressed .countdown { visibility: hidden; }
.button-mark { display: none; }
.phase-pressed .button-mark { display: block; }
.pedestal .button-mark path { stroke: #0659ac; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.intro-card {
  position: absolute;
  inset: 2% 12% 7%;
  display: block;
  transform: rotate(-10deg);
  color: #f6f6f7;
  transition: opacity calc(.14s / 1.5) ease, transform calc(.25s / 1.5) ease;
}
.intro-card::before {
  content: "";
  position: absolute;
  inset: 2%;
  border: 1px solid rgba(8, 141, 242, .6);
  opacity: .55;
}
.intro-card::after {
  content: "";
  position: absolute;
  inset: 2%;
  background: radial-gradient(circle at 0 0, #55cc6d 0 3px, transparent 4px),
    radial-gradient(circle at 100% 0, #55cc6d 0 3px, transparent 4px),
    radial-gradient(circle at 0 100%, #55cc6d 0 3px, transparent 4px),
    radial-gradient(circle at 100% 100%, #55cc6d 0 3px, transparent 4px);
}
.intro-words {
  position: absolute;
  inset: 5% 8% auto;
  display: flex;
  flex-direction: column;
  font-size: clamp(76px, 10vw, 130px);
  font-weight: 700;
  letter-spacing: -.075em;
  line-height: .82;
  text-align: left;
}
.intro-words span:last-child { align-self: flex-end; }
.intro-balls { position: absolute; left: 10%; bottom: 6%; display: flex; }
.intro-balls i, .intro-blue {
  display: block;
  width: clamp(20px, 2.4vw, 30px);
  aspect-ratio: 1;
  border-radius: 50%;
}
.intro-balls i + i { margin-left: -2px; }
.intro-balls .green { background: #5ac66f; }
.intro-balls .purple { background: #795cf3; }
.intro-balls .orange { background: #ff7746; }
.intro-balls .white { background: #f6f7f8; }
.intro-blue { position: absolute; right: 9%; bottom: 8%; background: #078df2; }
.reset-button:not(.phase-intro) .intro-card { opacity: 0; transform: rotate(-10deg) scale(.82); pointer-events: none; }
.instruction, .global-counter { zoom: .5; }
.instruction {
  margin: 28px 0 0;
  color: #c3cbd6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  transition: opacity calc(.2s / 1.5) ease;
}
.instruction span { padding-left: 7px; font-size: 18px; font-weight: 400; vertical-align: -1px; }
.experience.is-playing .instruction { opacity: 0; }
.global-counter {
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 28px;
  max-width: calc(100% - 40px);
  text-align: center;
}
.counter-sentence { margin: 0; color: #c3cbd6; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
#counter-name { color: #f5f6f8; }
.counter-total {
  color: #f5f6f8;
  font-size: 30px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.counter-name-field { display: flex; align-items: center; gap: 10px; margin-top: 5px; color: #a7b0c0; font-size: 11px; }
.counter-name-field input {
  width: 190px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #343e50;
  border-radius: 6px;
  background: #111722;
  color: #f5f6f8;
  font: inherit;
  font-size: 16px;
}
.counter-name-field input::placeholder { color: #8d98aa; font-size: 12px; }
.counter-name-field input:focus-visible { outline: 2px solid #8fbaff; outline-offset: 2px; }
.counter-message { min-height: 14px; color: #a7b0c0; font-size: 10px; }
.author-links {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 18px 20px 24px;
  font-size: 12px;
  line-height: 1.6;
}
.author-links a, .author-links summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #a7b0c0; text-decoration: none; cursor: pointer; }
.author-links a:hover, .author-links summary:hover { color: #f5f6f8; text-decoration: underline; text-underline-offset: 4px; }
.author-links a:focus-visible, .author-links summary:focus-visible { outline: 2px solid #8fbaff; outline-offset: 4px; border-radius: 2px; }
.wechat-links summary { list-style: none; }
.wechat-links summary::-webkit-details-marker { display: none; }
.wechat-links summary::after { content: "+"; }
.wechat-links[open] summary::after { content: "−"; }
.wechat-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100svh - 180px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid #343e50;
  border-radius: 12px;
  background: #111722;
  box-shadow: 0 16px 48px #0008;
  text-align: center;
}
.wechat-panel a { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 0; color: #f5f6f8; font-size: 14px; }
.wechat-panel small, .wechat-panel p { color: #a7b0c0; font-size: 11px; }
.wechat-panel p { margin: 12px 0 0; line-height: 1.8; }
.wechat-accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wechat-qr { display: block; width: 100%; max-width: 140px; height: auto; aspect-ratio: 1; margin: 12px auto 0; border-radius: 8px; object-fit: cover; object-position: 50% 40%; }
.status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .masthead, .footer { font-size: 8px; letter-spacing: .11em; }
  .masthead .muted, .footer span:last-child { display: none; }
  .reset-button { width: min(96vw, 540px, 65svh); }
  .intro-words { font-size: clamp(68px, 20vw, 130px); }
  .intro-balls i, .intro-blue { width: clamp(19px, 5vw, 30px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
