:root {
  color-scheme: light;
  --ink: #17332f;
  --ink-soft: #50645f;
  --cream: #f6f2e8;
  --paper: #fffdf8;
  --coral: #f26b4e;
  --coral-dark: #d84f35;
  --yellow: #f2ca52;
  --mint: #addac5;
  --mint-dark: #2e8069;
  --line: #dce2d9;
  --shadow: 0 24px 70px rgba(31, 62, 55, 0.13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 15%, rgba(242, 202, 82, 0.25) 0 90px, transparent 91px),
    radial-gradient(circle at 92% 78%, rgba(173, 218, 197, 0.38) 0 135px, transparent 136px),
    var(--cream);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.noise-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

.site-header,
.layout,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid rgba(23, 51, 47, 0.13);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--paper);
  border-radius: 50%;
  background: var(--ink);
  transform: rotate(-7deg);
}

.brand-mark svg {
  width: 27px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-pop {
  color: var(--coral);
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--ink-soft);
  border: 1px solid rgba(23, 51, 47, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.45);
  font-size: 0.77rem;
  font-weight: 700;
}

.privacy-pill svg {
  width: 17px;
  fill: none;
  stroke: var(--mint-dark);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1fr);
  gap: clamp(56px, 8vw, 110px);
  align-items: center;
  padding-block: 64px 58px;
}

.intro {
  position: relative;
  padding-left: 14px;
}

.intro::before {
  position: absolute;
  top: -8px;
  left: -28px;
  width: 12px;
  height: 12px;
  content: "";
  border: 3px solid var(--coral);
  transform: rotate(28deg);
}

.eyebrow,
.card-kicker,
.modal-kicker {
  margin: 0 0 15px;
  color: var(--coral-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow span {
  display: inline-block;
  width: 24px;
  height: 2px;
  background: currentColor;
}

.intro h1 {
  max-width: 620px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.35rem, 5.1vw, 5.45rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.91;
}

.intro h1 em {
  position: relative;
  color: var(--coral);
  font-weight: 500;
}

.intro h1 em::after {
  position: absolute;
  right: 2px;
  bottom: -11px;
  width: 88%;
  height: 9px;
  content: "";
  background: url("data:image/svg+xml,%3Csvg width='300' height='12' viewBox='0 0 300 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 8C65 1 220 1 298 6' fill='none' stroke='%23f2ca52' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.intro-copy {
  max-width: 480px;
  margin: 30px 0 28px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.7;
}

.prize-ticket {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 410px;
  min-height: 88px;
  padding: 16px 20px;
  overflow: hidden;
  border: 1px solid rgba(23, 51, 47, 0.13);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.67);
}

.prize-ticket::before,
.prize-ticket::after {
  position: absolute;
  right: 82px;
  width: 18px;
  height: 18px;
  content: "";
  border: 1px solid rgba(23, 51, 47, 0.13);
  border-radius: 50%;
  background: var(--cream);
}

.prize-ticket::before {
  top: -10px;
}

.prize-ticket::after {
  bottom: -10px;
}

.ticket-icon {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--ink);
  border-radius: 13px;
  background: var(--yellow);
  transform: rotate(-3deg);
}

.ticket-icon svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prize-ticket div:nth-child(2) {
  display: grid;
  gap: 4px;
}

.prize-ticket div:nth-child(2) span {
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prize-ticket strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.ticket-stamp {
  position: absolute;
  right: 13px;
  color: var(--coral);
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  padding: 8px 5px;
  text-align: center;
  transform: rotate(11deg);
}

.how-it-works {
  max-width: 410px;
  margin-top: 32px;
}

.how-it-works[hidden] {
  display: none;
}

.how-it-works h2 {
  margin: 0 0 12px;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.how-it-works ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-it-works li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 650;
}

.how-it-works li span {
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.room-panel[hidden] {
  display: none;
}

.room-panel {
  max-width: 430px;
  margin-top: 30px;
  padding: 20px;
  border: 1px solid rgba(23, 51, 47, 0.13);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 13px 35px rgba(31, 62, 55, 0.07);
  animation: fade-in 350ms ease both;
}

.room-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(23, 51, 47, 0.1);
}

.room-live {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--mint-dark);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.room-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42a47e;
  box-shadow: 0 0 0 4px rgba(66, 164, 126, 0.12);
  animation: pulse-dot 1.4s infinite;
}

.room-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.room-panel-header > strong {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--ink-soft);
  border-radius: 999px;
  background: #edf2ec;
  font-size: 0.61rem;
}

.participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.participant-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 6px;
  color: var(--ink);
  border: 1px solid #dfe4dc;
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 750;
}

.participant-list li.me {
  border-color: #edc0b5;
  background: #fff5f1;
}

.participant-avatar {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--avatar-ink, var(--ink));
  border-radius: 50%;
  background: var(--avatar-color, var(--mint));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.participant-list small {
  color: var(--coral-dark);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.last-noise[hidden] {
  display: none;
}

.last-noise {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  color: #9d3d2c;
  border-radius: 9px;
  background: #fff0eb;
  font-size: 0.63rem;
}

.last-noise span {
  color: #9a675d;
  font-weight: 750;
}

.last-noise strong {
  font-weight: 900;
}

.challenge-card {
  position: relative;
  padding: clamp(25px, 4vw, 40px);
  border: 1px solid rgba(23, 51, 47, 0.1);
  border-radius: 27px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.challenge-card::before {
  position: absolute;
  z-index: -1;
  inset: 14px -13px -14px 13px;
  content: "";
  border: 2px solid rgba(23, 51, 47, 0.1);
  border-radius: 27px;
  transform: rotate(1.1deg);
}

.card-topline,
.rounds-header,
.noise-labels,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-kicker {
  margin-bottom: 5px;
  font-size: 0.59rem;
}

.card-topline h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.2vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f7f1;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.state-badge > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #91a09b;
}

.state-badge[data-state="listening"] {
  color: #276651;
  border-color: #b7dbcb;
  background: #ecf8f2;
}

.state-badge[data-state="listening"] > span:first-child {
  background: #42a47e;
  box-shadow: 0 0 0 4px rgba(66, 164, 126, 0.12);
  animation: pulse-dot 1.4s infinite;
}

.state-badge[data-state="danger"] {
  color: #b43f2b;
  border-color: #f0c1b7;
  background: #fff1ed;
}

.state-badge[data-state="danger"] > span:first-child {
  background: var(--coral);
}

.state-badge[data-state="won"] {
  color: #755d0a;
  border-color: #e7d18a;
  background: #fff8d9;
}

.state-badge[data-state="won"] > span:first-child {
  background: var(--yellow);
}

.rounds-header {
  margin-top: 30px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.rounds-header strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.round-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 14px 4px 22px;
}

.track-line {
  position: absolute;
  top: 50%;
  right: 17px;
  left: 17px;
  height: 3px;
  overflow: hidden;
  background: #e5e8e1;
  transform: translateY(-50%);
}

.track-line span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mint-dark);
  transition: width 300ms ease;
}

.round-stamp {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #8e9b96;
  border: 2px solid #dfe4dc;
  border-radius: 50%;
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.75rem;
  font-weight: 700;
  transition: 240ms ease;
}

.round-stamp.active {
  color: var(--coral-dark);
  border-color: var(--coral);
  box-shadow: 0 0 0 5px rgba(242, 107, 78, 0.1);
  transform: scale(1.06);
}

.round-stamp.complete {
  color: white;
  border-color: var(--mint-dark);
  background: var(--mint-dark);
  transform: scale(1.03);
}

.round-stamp.complete span {
  width: 12px;
  height: 7px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  font-size: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.round-stamp.pop {
  animation: stamp-pop 500ms cubic-bezier(0.16, 1.5, 0.5, 1);
}

.meter-wrap {
  position: relative;
  display: grid;
  min-height: 224px;
  place-items: center;
}

.meter {
  --meter-color: var(--mint-dark);
  position: relative;
  display: grid;
  width: 216px;
  height: 216px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--paper) 63%, transparent 64%),
    conic-gradient(from -90deg, var(--meter-color) calc(var(--quiet-progress) * 1%), #e8ebe4 0);
  filter: drop-shadow(0 10px 24px rgba(23, 51, 47, 0.08));
  transition: background 200ms ease, transform 200ms ease;
}

.meter::before {
  position: absolute;
  width: 182px;
  height: 182px;
  content: "";
  border: 1px solid #eef0ea;
  border-radius: 50%;
  background: var(--paper);
}

.meter::after {
  position: absolute;
  top: 7px;
  width: 9px;
  height: 9px;
  content: "";
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--meter-color);
  transform: rotate(calc(var(--quiet-progress) * 3.6deg));
  transform-origin: 50% 101px;
}

.meter.too-loud {
  --meter-color: var(--coral);
  animation: meter-shake 350ms ease;
}

.meter.won {
  --meter-color: var(--yellow);
  transform: scale(1.035);
}

.meter-inner {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.meter-kicker,
.countdown-unit {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.countdown {
  margin: -2px 0 -4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.65rem;
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 1;
}

.sound-waves {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  opacity: 0.16;
  pointer-events: none;
}

.sound-waves i {
  width: 4px;
  height: calc(4px + var(--wave, 1) * var(--level, 0) * 0.42px);
  max-height: 82px;
  border-radius: 99px;
  background: var(--mint-dark);
  transform: translateX(var(--shift));
  transition: height 80ms linear;
}

.sound-waves i:nth-child(1) { --wave: 0.8; --shift: -132px; }
.sound-waves i:nth-child(2) { --wave: 1.2; --shift: -125px; }
.sound-waves i:nth-child(3) { --wave: 0.65; --shift: -120px; }
.sound-waves i:nth-child(4) { display: none; }
.sound-waves i:nth-child(5) { --wave: 0.7; --shift: 120px; }
.sound-waves i:nth-child(6) { --wave: 1.15; --shift: 125px; }
.sound-waves i:nth-child(7) { --wave: 0.85; --shift: 132px; }

.noise-readout {
  margin-top: 18px;
}

.noise-labels {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 750;
}

.noise-labels span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.level-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-dark);
}

.noise-bar {
  position: relative;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(90deg, #d8ebdf 0 52%, #f8e3bd 52% 72%, #f6c7bd 72%);
}

.noise-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--mint-dark);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--mint-dark);
  transition: width 80ms linear, background-color 180ms ease;
}

.noise-fill.loud {
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--coral);
}

.threshold-marker {
  position: absolute;
  top: -3px;
  left: calc(var(--threshold) * 1%);
  width: 2px;
  height: 15px;
  background: rgba(23, 51, 47, 0.6);
}

.threshold-marker b {
  position: absolute;
  top: 16px;
  left: 50%;
  width: max-content;
  color: #8c5549;
  font-size: 0.53rem;
  font-style: normal;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.blame-banner[hidden] {
  display: none;
}

.blame-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 27px;
  padding: 11px 13px;
  color: #9d3d2c;
  border: 1px solid #f0baad;
  border-radius: 11px;
  background: #fff0eb;
  box-shadow: 0 8px 20px rgba(179, 67, 42, 0.08);
  animation: blame-in 480ms cubic-bezier(0.16, 1.25, 0.4, 1) both;
}

.blame-avatar {
  display: grid;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 800;
}

.blame-banner > div:last-child {
  display: grid;
  gap: 2px;
}

.blame-banner strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
}

.blame-banner > div:last-child > span {
  color: #9a675d;
  font-size: 0.59rem;
  font-weight: 700;
}

.blame-banner:not([hidden]) + .status-message {
  margin-top: 10px;
}

.status-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  margin: 28px 0 14px;
  padding: 9px 12px;
  color: var(--ink-soft);
  border: 1px solid #e1e6de;
  border-radius: 10px;
  background: #f8f8f3;
  font-size: 0.66rem;
  font-weight: 700;
  text-align: center;
}

.status-message svg {
  flex: 0 0 16px;
  width: 16px;
  fill: none;
  stroke: var(--mint-dark);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-message.danger {
  color: #a33e2c;
  border-color: #f0c4b9;
  background: #fff3ef;
}

.status-message.danger svg {
  stroke: var(--coral-dark);
}

.status-message.success {
  color: #6a550f;
  border-color: #e8d48e;
  background: #fff9de;
}

.actions {
  gap: 10px;
}

.primary-button,
.play-again {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 17px;
  color: white;
  border: 0;
  border-radius: 13px;
  outline: 0;
  background: var(--ink);
  box-shadow: 0 7px 0 #0c2420;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 850;
  transition: 180ms ease;
}

.primary-button:hover,
.play-again:hover {
  background: #21453f;
  transform: translateY(-2px);
  box-shadow: 0 9px 0 #0c2420;
}

.primary-button:active,
.play-again:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #0c2420;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.modal-close:focus-visible,
.reward-code button:focus-visible,
.play-again:focus-visible {
  outline: 3px solid rgba(242, 202, 82, 0.8);
  outline-offset: 3px;
}

.primary-button:disabled {
  color: #82908c;
  background: #dfe3de;
  box-shadow: 0 6px 0 #c8cec8;
  cursor: wait;
}

.button-icon {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
}

.button-icon svg,
.button-arrow {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-arrow {
  margin-left: auto;
}

.secondary-button {
  min-height: 58px;
  padding: 10px 20px;
  color: var(--ink);
  border: 1px solid #ccd4cd;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.secondary-button:hover {
  background: #f3f4ee;
}

.card-footnote {
  margin: 19px 0 -4px;
  color: #84918d;
  font-size: 0.6rem;
  font-weight: 650;
  text-align: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 0 30px;
  color: #70807b;
  border-top: 1px solid rgba(23, 51, 47, 0.13);
  font-size: 0.67rem;
  font-weight: 650;
}

.join-modal[hidden] {
  display: none;
}

.join-modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
}

.join-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(242, 202, 82, 0.34) 0 120px, transparent 121px),
    radial-gradient(circle at 87% 83%, rgba(173, 218, 197, 0.3) 0 160px, transparent 161px),
    rgba(12, 38, 33, 0.86);
  backdrop-filter: blur(12px);
}

.join-card {
  position: relative;
  width: min(450px, 100%);
  padding: 38px 42px 32px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 27px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(3, 20, 17, 0.4);
  animation: modal-in 560ms cubic-bezier(0.16, 1.2, 0.4, 1) both;
}

.join-mark {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 23px;
  place-items: center;
  color: var(--paper);
  border-radius: 22px;
  background: var(--ink);
  box-shadow: 9px 9px 0 var(--yellow);
  transform: rotate(-3deg);
}

.join-mark svg {
  width: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.join-mark i {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid var(--coral);
  transform: rotate(25deg);
}

.join-mark i:first-of-type {
  top: -8px;
  right: -13px;
}

.join-mark i:last-of-type {
  bottom: -11px;
  left: -12px;
  border-color: var(--mint-dark);
  border-radius: 50%;
}

.join-card .modal-kicker {
  margin-bottom: 8px;
  text-align: center;
}

.join-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.35rem;
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.02;
  text-align: center;
}

.join-card > p:not(.modal-kicker) {
  max-width: 340px;
  margin: 14px auto 25px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.join-card form {
  display: grid;
}

.join-card label {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.name-input-wrap {
  position: relative;
}

.name-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  fill: none;
  stroke: var(--mint-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  transform: translateY(-50%);
}

.name-input-wrap input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 44px;
  color: var(--ink);
  border: 1px solid #ccd6ce;
  border-radius: 11px;
  outline: 0;
  background: white;
  font-size: 1rem;
  font-weight: 700;
  transition: 180ms ease;
}

.name-input-wrap input::placeholder {
  color: #9ca7a3;
  font-weight: 500;
}

.name-input-wrap input:focus {
  border-color: var(--mint-dark);
  box-shadow: 0 0 0 4px rgba(46, 128, 105, 0.11);
}

.name-input-wrap input[aria-invalid="true"] {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(242, 107, 78, 0.1);
}

.join-error {
  min-height: 17px;
  margin: 7px 0 4px;
  color: var(--coral-dark);
  font-size: 0.65rem;
  font-weight: 750;
}

.join-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 55px;
  padding: 10px 18px;
  color: white;
  border: 0;
  border-radius: 12px;
  background: var(--coral);
  box-shadow: 0 6px 0 var(--coral-dark);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 850;
  transition: 180ms ease;
}

.join-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--coral-dark);
}

.join-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--coral-dark);
}

.join-button:focus-visible {
  outline: 3px solid rgba(242, 202, 82, 0.85);
  outline-offset: 3px;
}

.join-button:disabled {
  color: #f4d5cf;
  background: #bd6f60;
  box-shadow: 0 6px 0 #955345;
  cursor: wait;
}

.join-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.join-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  color: #7b8984;
  font-size: 0.59rem;
  font-weight: 650;
  text-align: center;
}

.join-privacy svg {
  flex: 0 0 15px;
  width: 15px;
  fill: none;
  stroke: var(--mint-dark);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prize-modal[hidden] {
  display: none;
}

.prize-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 32, 28, 0.7);
  backdrop-filter: blur(8px);
  animation: fade-in 300ms ease both;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(3, 20, 17, 0.35);
  text-align: center;
  animation: modal-in 560ms cubic-bezier(0.16, 1.2, 0.4, 1) both;
}

.modal-card::before,
.modal-card::after {
  position: absolute;
  width: 120px;
  height: 120px;
  content: "";
  border-radius: 50%;
  opacity: 0.45;
}

.modal-card::before {
  top: -68px;
  left: -50px;
  background: var(--yellow);
}

.modal-card::after {
  right: -65px;
  bottom: -70px;
  background: var(--mint);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  width: 35px;
  height: 35px;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  border: 0;
  border-radius: 50%;
  background: #f0f2ed;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.prize-burst {
  position: relative;
  display: grid;
  width: 116px;
  height: 116px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
}

.prize-burst::before {
  position: absolute;
  inset: -10px;
  content: "";
  border: 2px dashed var(--coral);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

.prize-burst svg {
  width: 66px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-kicker {
  margin-bottom: 8px;
}

.modal-card h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.55rem;
  letter-spacing: -0.055em;
  line-height: 1;
}

.modal-card > p:not(.modal-kicker) {
  max-width: 315px;
  margin: 0 auto 23px;
  color: var(--ink-soft);
  font-size: 0.87rem;
  line-height: 1.55;
}

.reward-reveal {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  padding: 20px;
  border: 1px dashed #be9e35;
  border-radius: 14px;
  background: #fff8dc;
}

.reward-reveal > span {
  color: #846b16;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reward-reveal > strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.27rem;
}

.reward-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.reward-code code {
  color: var(--coral-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.reward-code button {
  padding: 5px 8px;
  color: var(--ink);
  border: 1px solid #ddc464;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 800;
}

.play-again {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 20px;
}

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

.confetti-piece {
  position: absolute;
  top: -25px;
  width: 9px;
  height: 16px;
  opacity: 0;
  animation: confetti-fall var(--duration) var(--delay) ease-in forwards;
}

@keyframes pulse-dot {
  50% { box-shadow: 0 0 0 7px rgba(66, 164, 126, 0); }
}

@keyframes stamp-pop {
  50% { transform: scale(1.35) rotate(-8deg); }
}

@keyframes meter-shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes blame-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(28px) scale(0.9) rotate(-2deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes confetti-fall {
  8% { opacity: 1; }
  to { opacity: 1; transform: translate3d(var(--drift), 110vh, 0) rotate(var(--rotation)); }
}

@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 50px;
    width: min(680px, calc(100% - 40px));
  }

  .intro {
    padding-left: 0;
    text-align: center;
  }

  .eyebrow {
    justify-content: center;
  }

  .intro-copy,
  .prize-ticket,
  .how-it-works,
  .room-panel {
    margin-right: auto;
    margin-left: auto;
  }

  .how-it-works {
    display: none;
  }
}

@media (max-width: 600px) {
  .site-header,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 74px;
  }

  .privacy-pill {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .layout {
    width: calc(100% - 24px);
    gap: 36px;
    padding-block: 45px 38px;
  }

  .intro h1 {
    font-size: clamp(3rem, 15.3vw, 4.35rem);
  }

  .intro-copy {
    margin-top: 25px;
    font-size: 0.95rem;
  }

  .prize-ticket {
    text-align: left;
  }

  .challenge-card {
    padding: 24px 19px 26px;
    border-radius: 22px;
  }

  .challenge-card::before {
    display: none;
  }

  .state-badge {
    padding: 7px 9px;
    font-size: 0.6rem;
  }

  .meter {
    width: 196px;
    height: 196px;
  }

  .meter::before {
    width: 164px;
    height: 164px;
  }

  .meter::after {
    transform-origin: 50% 91px;
  }

  .meter-wrap {
    min-height: 204px;
  }

  .countdown {
    font-size: 4.15rem;
  }

  .sound-waves {
    display: none;
  }

  .status-message {
    font-size: 0.62rem;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }

  .site-footer span:last-child {
    display: none;
  }

  .modal-card {
    padding: 38px 24px 26px;
  }

  .modal-card h2 {
    font-size: 2.2rem;
  }

  .join-modal {
    padding: 12px;
  }

  .join-card {
    padding: 30px 22px 25px;
    border-radius: 22px;
  }

  .join-mark {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .join-mark svg {
    width: 35px;
  }

  .join-card h2 {
    font-size: 2rem;
  }

  .room-panel {
    text-align: left;
  }

  .blame-banner {
    text-align: left;
  }
}

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