:root {
  --ink: #17172b;
  --ink-soft: #25243d;
  --paper: #fff8e7;
  --paper-dim: #ece3cf;
  --acid: #dfff52;
  --coral: #ff7358;
  --sky: #91dcff;
  --lavender: #b9a8ff;
  --muted: #aaa8b6;
  --line: rgba(255, 248, 231, 0.16);
  --shadow: 0 24px 90px rgba(5, 5, 20, 0.34);
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--ink);
  background-size: 48px 48px;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--acid);
}

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

.orb {
  position: absolute;
  width: 46vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.13;
}

.orb--coral {
  top: 18%;
  left: -30%;
  background: var(--coral);
  animation: drift-coral 18s ease-in-out infinite alternate;
}

.orb--acid {
  right: -32%;
  bottom: -10%;
  background: var(--acid);
  animation: drift-acid 22s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.055;
  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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(78px + var(--safe-top));
  padding-top: var(--safe-top);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
  cursor: pointer;
}

.wordmark__half {
  padding: 7px 8px 6px;
  border: 1px solid rgba(255, 248, 231, 0.68);
}

.wordmark__half--left {
  color: var(--ink);
  border-color: var(--coral);
  background: var(--coral);
}

.wordmark__spark {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  margin-inline: -3px;
  transform: rotate(45deg);
  background: var(--acid);
  box-shadow: 0 0 18px var(--acid);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.connection-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f6c85f;
  box-shadow: 0 0 0 4px rgba(246, 200, 95, 0.1);
}

.connection-pill[data-status="online"] .connection-pill__dot {
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(223, 255, 82, 0.1);
}

.connection-pill[data-status="offline"] .connection-pill__dot {
  background: var(--coral);
  animation: pulse 1.2s ease infinite;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--paper);
  background: var(--paper);
  transform: rotate(7deg);
}

.app-shell {
  min-height: calc(100dvh - 148px - var(--safe-top));
  padding-block: 52px 64px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: calc(70px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.site-footer button {
  padding: 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--acid);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.live-star {
  display: inline-block;
  margin-right: 5px;
  animation: twinkle 2.4s ease-in-out infinite;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--paper);
  background: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.43;
}

.button--wide {
  width: 100%;
}

.button--primary {
  color: var(--paper);
  background: var(--ink);
}

.button--secondary {
  min-width: 110px;
  color: var(--paper);
  border-color: rgba(23, 23, 43, 0.2);
  background: var(--ink-soft);
}

.button--acid {
  color: var(--ink);
  background: var(--acid);
}

.button--coral {
  color: var(--ink);
  background: var(--coral);
}

.button--ink {
  color: var(--paper);
  background: var(--ink);
}

.button--ready {
  color: var(--ink);
  border-color: rgba(23, 23, 43, 0.15);
  background: #b9e6ca;
}

.button.is-loading::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-100%);
  animation: loading-sweep 1s linear infinite;
}

.text-button {
  padding: 10px 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.text-button:disabled {
  opacity: 0;
  pointer-events: none;
}

.text-button--muted {
  color: var(--muted);
}

.home-hero {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.15fr) minmax(370px, 0.85fr);
  gap: clamp(50px, 8vw, 112px);
  min-height: 600px;
}

.hero-copy h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 750;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.hero-copy h1 em {
  color: var(--coral);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.hero-copy__lead {
  max-width: 590px;
  margin: 36px 0 28px;
  color: rgba(255, 248, 231, 0.68);
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.38;
}

.demo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.demo-link__play {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding-left: 2px;
  border: 1px solid rgba(255, 248, 231, 0.35);
  border-radius: 50%;
  color: var(--acid);
  font-size: 10px;
  transition: 170ms ease;
}

.demo-link:hover .demo-link__play {
  color: var(--ink);
  border-color: var(--acid);
  background: var(--acid);
  transform: scale(1.08);
}

.play-panel {
  position: relative;
  padding: 34px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(0.65deg);
}

.play-panel::before,
.play-panel::after {
  position: absolute;
  z-index: -1;
  width: 62px;
  height: 18px;
  content: "";
  background: rgba(223, 255, 82, 0.78);
}

.play-panel::before {
  top: -9px;
  left: 24px;
  transform: rotate(-4deg);
}

.play-panel::after {
  right: 20px;
  bottom: -8px;
  transform: rotate(3deg);
}

.play-panel__stamp {
  position: absolute;
  top: -22px;
  right: -22px;
  display: grid;
  width: 73px;
  height: 73px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--coral);
  font-size: 13px;
  font-weight: 800;
  transform: rotate(8deg);
  box-shadow: 0 9px 24px rgba(20, 18, 35, 0.24);
}

.play-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.play-panel .eyebrow {
  margin: 0;
  color: rgba(23, 23, 43, 0.62);
}

.roundel {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(23, 23, 43, 0.18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(23, 23, 43, 0.66);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field-label--row {
  display: flex;
  justify-content: space-between;
}

.text-input {
  width: 100%;
  height: 54px;
  margin-bottom: 12px;
  padding: 0 15px;
  border: 1px solid rgba(23, 23, 43, 0.2);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-weight: 650;
  transition: border 160ms ease, box-shadow 160ms ease;
}

.text-input:focus {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--acid);
  outline: none;
}

.code-input {
  margin: 0;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.join-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 23px 0 18px;
  color: rgba(23, 23, 43, 0.4);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
}

.or-divider::before,
.or-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: rgba(23, 23, 43, 0.13);
}

.microcopy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 0;
  color: rgba(23, 23, 43, 0.48);
  font-size: 10px;
}

.promise-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.promise-strip article {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 12px 25px;
  border-right: 1px solid var(--line);
}

.promise-strip article:last-child {
  border: 0;
}

.promise-strip strong {
  color: var(--coral);
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  font-weight: 500;
}

.promise-strip span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reveal {
  animation: reveal-up 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal--delay {
  animation-delay: 110ms;
}

.reveal--later {
  animation-delay: 220ms;
}

/* Lobby */
.app-shell--lobby {
  display: grid;
  place-items: center;
}

.lobby-card {
  display: grid;
  width: min(920px, 100%);
  grid-template-columns: 0.8fr 1.2fr;
  gap: 42px 58px;
  padding: clamp(28px, 5vw, 58px);
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.lobby-card__intro h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 74px);
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.lobby-card__intro p:not(.eyebrow) {
  max-width: 330px;
  margin-top: 24px;
  color: rgba(23, 23, 43, 0.59);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
}

.lobby-card .eyebrow {
  color: #7c7420;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #56a767;
  box-shadow: 0 0 0 5px rgba(86, 167, 103, 0.1);
  animation: pulse 1.8s ease infinite;
}

.room-ticket {
  position: relative;
  padding: 24px;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
}

.room-ticket::after {
  position: absolute;
  right: -38px;
  bottom: -48px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(223, 255, 82, 0.22);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 25px rgba(223, 255, 82, 0.04), 0 0 0 50px rgba(223, 255, 82, 0.03);
}

.room-ticket__label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.room-code {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 5px;
  margin: 14px 0 18px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.room-code span {
  display: grid;
  min-width: 0;
  aspect-ratio: 0.72;
  flex: 1;
  place-items: center;
  border-bottom: 2px solid var(--acid);
  background: rgba(255, 255, 255, 0.07);
  font-size: clamp(20px, 3.1vw, 36px);
  font-weight: 750;
}

.room-ticket__actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
}

.room-ticket__actions .button {
  flex: 1;
  color: var(--ink);
  background: var(--acid);
}

.icon-button--ticket {
  width: 51px;
  height: 51px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.share-preview {
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin: 12px 0 0;
  overflow: hidden;
  color: rgba(255, 248, 231, 0.4);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.players-list {
  display: grid;
  align-content: start;
  gap: 9px;
}

.player-row {
  display: grid;
  min-height: 68px;
  align-items: center;
  grid-template-columns: 45px 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(23, 23, 43, 0.12);
}

.player-row.is-ready {
  border-color: rgba(74, 144, 88, 0.45);
  background: rgba(137, 205, 155, 0.13);
}

.player-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
}

.player-row:nth-child(2) .player-avatar {
  color: var(--ink);
  background: var(--coral);
}

.player-row small,
.player-row strong {
  display: block;
}

.player-row small {
  margin-bottom: 2px;
  color: rgba(23, 23, 43, 0.43);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-row strong {
  font-size: 15px;
}

.player-state {
  color: rgba(23, 23, 43, 0.48);
  font-size: 10px;
  font-weight: 700;
}

.player-row--empty {
  border-style: dashed;
  opacity: 0.7;
}

.player-row--empty .player-avatar i {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.loading-dots {
  display: inline-flex;
  gap: 3px;
}

.loading-dots b {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: dot-wave 1.2s ease infinite;
}

.loading-dots b:nth-child(2) { animation-delay: 130ms; }
.loading-dots b:nth-child(3) { animation-delay: 260ms; }

.lobby-ready {
  align-self: start;
}

.lobby-ready p {
  margin: 10px 0 0;
  color: rgba(23, 23, 43, 0.48);
  font-size: 10px;
  text-align: center;
}

.lobby-card > .text-button {
  align-self: end;
  justify-self: start;
}

/* Game */
.app-shell--game {
  width: min(980px, calc(100% - 32px));
  padding-top: 26px;
}

.game-header {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.game-header .eyebrow {
  margin-bottom: 8px;
  color: rgba(255, 248, 231, 0.62);
}

.round-dots {
  display: flex;
  gap: 5px;
}

.round-dots span {
  width: 24px;
  height: 3px;
  background: rgba(255, 248, 231, 0.16);
}

.round-dots span[data-state="done"] { background: rgba(223, 255, 82, 0.48); }
.round-dots span[data-state="current"] { background: var(--acid); box-shadow: 0 0 12px rgba(223, 255, 82, 0.48); }

.game-metrics {
  display: flex;
  gap: 8px;
}

.metric {
  min-width: 86px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  text-align: center;
}

.metric span,
.metric strong {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.metric strong {
  color: var(--acid);
  font-size: 20px;
}

.metric strong small {
  margin-left: 2px;
  color: rgba(255, 248, 231, 0.35);
  font-size: 9px;
}

.metric--echo strong {
  color: var(--coral);
  font-size: 16px;
  letter-spacing: 0.12em;
}

.partner-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.partner-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.partner-status.is-online span {
  background: var(--acid);
}

.game-stage {
  padding: clamp(24px, 4vw, 44px);
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

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

.phase-heading .eyebrow {
  margin-bottom: 9px;
  color: #797020;
}

.phase-heading h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.phase-subtitle {
  margin: 10px 0 0;
  color: rgba(23, 23, 43, 0.55);
  font-family: var(--serif);
  font-size: 16px;
}

.soft-clock {
  display: flex;
  min-width: 76px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 23, 43, 0.15);
  border-radius: 99px;
  color: rgba(23, 23, 43, 0.55);
  font-size: 11px;
}

.soft-clock strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.soft-clock.is-overtime {
  color: #8d432f;
  border-color: rgba(255, 115, 88, 0.4);
  background: rgba(255, 115, 88, 0.09);
}

.word-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0;
}

.word-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 105px;
  align-items: center;
  justify-content: center;
  padding: 17px 10px;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 43, 0.13);
  border-radius: 2px;
  color: rgba(23, 23, 43, 0.65);
  background: rgba(23, 23, 43, 0.035);
  cursor: default;
  transition: border 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.word-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(14px, 2.3vw, 22px);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1;
  text-align: center;
}

.word-card__number {
  position: absolute;
  top: 7px;
  left: 8px;
  color: rgba(23, 23, 43, 0.28);
  font-size: 7px;
  font-weight: 800;
}

.word-card__mark {
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: rgba(23, 23, 43, 0.48);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.word-card.is-mine {
  color: var(--ink);
  border-color: rgba(112, 125, 28, 0.5);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 60%),
    var(--acid);
  box-shadow: 3px 3px 0 rgba(23, 23, 43, 0.14);
}

.word-board[role="listbox"] .word-card.is-mine {
  cursor: pointer;
}

.word-board[role="listbox"] .word-card.is-mine:hover {
  z-index: 1;
  transform: translateY(-3px) rotate(-0.5deg);
  box-shadow: 5px 7px 0 rgba(23, 23, 43, 0.16);
}

.word-card.is-selected {
  z-index: 2;
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--coral), 6px 7px 0 rgba(23, 23, 43, 0.14);
  transform: translateY(-2px);
}

.word-card.is-selected .word-card__number,
.word-card.is-selected .word-card__mark {
  color: rgba(255, 248, 231, 0.55);
}

.word-card.is-shared {
  z-index: 2;
  color: var(--ink);
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 115, 88, 0.2), 5px 6px 0 var(--ink);
  animation: shared-pop 500ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.word-card__spark {
  position: absolute;
  top: 7px;
  right: 8px;
  font-size: 13px;
  animation: twinkle 1.6s ease infinite;
}

.word-card__pick {
  position: absolute;
  right: 6px;
  bottom: 5px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-size: 8px;
  font-weight: 800;
}

.word-card__pick[data-correct="false"] {
  background: #8c4436;
}

.rule-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 21px;
  padding: 11px 14px;
  border-left: 3px solid var(--coral);
  color: rgba(23, 23, 43, 0.6);
  background: rgba(255, 115, 88, 0.07);
}

.rule-note__icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--coral);
  border-radius: 50%;
  color: #9c402e;
  font-size: 10px;
  font-weight: 900;
}

.rule-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
}

.clue-composer {
  padding: 18px;
  color: var(--paper);
  background: var(--ink);
}

.clue-composer label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.clue-composer__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.clue-composer input {
  min-width: 0;
  height: 55px;
  padding: 0 15px;
  border: 1px solid rgba(255, 248, 231, 0.22);
  border-radius: 2px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.07);
  font-size: 19px;
  font-weight: 650;
}

.clue-composer input::placeholder {
  color: rgba(255, 248, 231, 0.25);
}

.clue-composer input:focus {
  border-color: var(--acid);
  outline: none;
  box-shadow: 3px 3px 0 rgba(223, 255, 82, 0.28);
}

.clue-composer small {
  display: block;
  margin-top: 9px;
  color: rgba(255, 248, 231, 0.38);
  font-family: var(--serif);
  font-size: 10px;
}

.waiting-card {
  display: grid;
  min-height: 83px;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 15px 18px;
  color: var(--paper);
  background: var(--ink);
}

.waiting-card__check {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--acid);
  font-size: 15px;
}

.waiting-card div span,
.waiting-card div strong {
  display: block;
}

.waiting-card div span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.waiting-card div strong {
  margin-top: 3px;
  color: var(--acid);
  font-family: var(--serif);
  font-size: 23px;
  font-style: italic;
}

.waiting-card p {
  margin: 0;
  color: rgba(255, 248, 231, 0.48);
  font-size: 10px;
}

.clue-reveal {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 9px;
  margin: 18px 0;
}

.clue-reveal--compact {
  margin-top: 0;
}

.clue-slip {
  position: relative;
  min-width: 0;
  padding: 17px 19px;
  border: 1px solid rgba(23, 23, 43, 0.12);
  background: #eee4d0;
}

.clue-slip::before {
  position: absolute;
  top: -4px;
  left: 23px;
  width: 46px;
  height: 9px;
  content: "";
  background: rgba(255, 255, 255, 0.68);
  transform: rotate(-2deg);
}

.clue-slip span,
.clue-slip strong {
  display: block;
}

.clue-slip span {
  margin-bottom: 4px;
  color: rgba(23, 23, 43, 0.46);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.clue-slip strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 30px);
  font-style: italic;
  font-weight: 600;
  text-overflow: ellipsis;
}

.clue-slip strong i {
  color: #a44835;
  font-size: 0.67em;
  font-style: normal;
}

.clue-slip--partner {
  background: var(--coral);
  transform: rotate(-0.5deg);
}

.clue-slip--self {
  transform: rotate(0.35deg);
}

.decision-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  color: var(--paper);
  background: var(--ink);
}

.decision-bar__copy span,
.decision-bar__copy strong {
  display: block;
}

.decision-bar__copy span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.decision-bar__copy strong {
  font-size: 16px;
}

.echo-button {
  display: grid;
  width: 100%;
  align-items: center;
  grid-template-columns: 37px 1fr;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px dashed rgba(23, 23, 43, 0.26);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.echo-decision {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 16px;
}

.echo-choice {
  position: relative;
  display: grid;
  min-height: 112px;
  grid-template-columns: 42px 1fr;
  align-content: center;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(23, 23, 43, 0.16);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 170ms ease;
}

.echo-choice:hover {
  z-index: 1;
  transform: translateY(-3px);
  box-shadow: 4px 5px 0 rgba(23, 23, 43, 0.16);
}

.echo-choice > span {
  display: grid;
  width: 32px;
  height: 32px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-size: 14px;
}

.echo-choice strong {
  font-size: 18px;
}

.echo-choice small {
  margin-top: 2px;
  color: rgba(23, 23, 43, 0.52);
  font-size: 9px;
  line-height: 1.35;
}

.echo-choice--play {
  background: rgba(223, 255, 82, 0.23);
}

.echo-choice--play > span {
  color: var(--ink);
  background: var(--acid);
}

.echo-choice--echo {
  background: rgba(185, 168, 255, 0.2);
}

.echo-choice--echo > span {
  color: var(--ink);
  background: var(--lavender);
}

.echo-privacy {
  margin: 10px 0 0;
  color: rgba(23, 23, 43, 0.44);
  font-size: 8px;
  text-align: center;
}

.echo-button:hover {
  border-style: solid;
  background: rgba(185, 168, 255, 0.2);
}

.echo-button > span {
  grid-row: 1 / 3;
  color: #6c56cc;
  font-size: 23px;
}

.echo-button strong {
  font-size: 11px;
}

.echo-button small {
  color: rgba(23, 23, 43, 0.48);
  font-size: 8px;
}

.echo-used {
  margin: 12px 0 0;
  color: rgba(23, 23, 43, 0.52);
  font-size: 9px;
  text-align: center;
}

.echo-used span {
  color: #6c56cc;
}

.waiting-card--pick {
  margin-top: 11px;
}

/* Results */
.result-burst {
  position: relative;
  padding: 10px 20px 25px;
  text-align: center;
}

.result-burst__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--acid);
  font-size: 23px;
  box-shadow: 0 0 0 8px rgba(223, 255, 82, 0.2);
}

.result-burst--1 .result-burst__icon { background: var(--sky); box-shadow: 0 0 0 8px rgba(145, 220, 255, 0.2); }
.result-burst--0 .result-burst__icon { color: var(--paper); background: #807c8d; box-shadow: 0 0 0 8px rgba(128, 124, 141, 0.16); }

.result-burst .eyebrow {
  margin-bottom: 4px;
  color: rgba(23, 23, 43, 0.45);
}

.result-burst h1 {
  margin: 0;
  color: var(--coral);
  font-family: var(--serif);
  font-size: clamp(58px, 11vw, 100px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.result-burst h2 {
  margin: 15px 0 5px;
  font-size: 22px;
}

.result-burst > p:not(.eyebrow) {
  margin: 0;
  color: rgba(23, 23, 43, 0.52);
  font-family: var(--serif);
  font-size: 15px;
}

.points-award {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 7px 12px;
  color: var(--paper);
  background: var(--ink);
}

.points-award strong {
  color: var(--acid);
  font-size: 18px;
}

.points-award span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.meaning-bridge {
  display: grid;
  align-items: stretch;
  grid-template-columns: 1fr 36px 1fr;
  margin: 10px 0;
  border: 1px solid rgba(23, 23, 43, 0.12);
}

.meaning-bridge article {
  min-width: 0;
  padding: 13px 15px;
}

.meaning-bridge article:last-child {
  text-align: right;
}

.meaning-bridge article > span,
.meaning-bridge article > strong {
  display: block;
}

.meaning-bridge article > span {
  color: rgba(23, 23, 43, 0.42);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meaning-bridge article > strong {
  margin: 3px 0 5px;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
}

.meaning-bridge article p {
  margin: 0;
  overflow: hidden;
  color: rgba(23, 23, 43, 0.52);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meaning-bridge__spark {
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
}

.picks-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 10px 0;
}

.picks-summary article {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: 1fr auto;
  padding: 11px 13px;
  border: 1px solid rgba(23, 23, 43, 0.12);
}

.picks-summary article span,
.picks-summary article strong {
  display: block;
  grid-column: 1;
}

.picks-summary article span {
  color: rgba(23, 23, 43, 0.42);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.picks-summary article strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picks-summary article b {
  display: grid;
  width: 27px;
  height: 27px;
  grid-row: 1 / 3;
  grid-column: 2;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: #8e4234;
}

.picks-summary article[data-correct="true"] b {
  color: var(--ink);
  background: var(--acid);
}

.next-round-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(23, 23, 43, 0.12);
}

.next-round-panel > div span,
.next-round-panel > div strong {
  display: block;
}

.next-round-panel > div span {
  color: rgba(23, 23, 43, 0.43);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.next-round-panel > div strong {
  font-size: 27px;
}

.next-round-panel > div small {
  margin-left: 3px;
  color: rgba(23, 23, 43, 0.43);
  font-size: 9px;
}

.ready-footnote {
  margin: 9px 0 0;
  color: rgba(23, 23, 43, 0.43);
  font-size: 9px;
  text-align: right;
}

/* Final */
.app-shell--finished {
  display: grid;
  width: min(760px, calc(100% - 32px));
  place-items: center;
}

.final-card {
  position: relative;
  width: 100%;
  padding: clamp(30px, 6vw, 64px);
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.final-card__halo {
  position: absolute;
  top: -95px;
  right: -70px;
  display: grid;
  width: 245px;
  height: 245px;
  place-items: end start;
  padding: 45px;
  border-radius: 50%;
  color: rgba(23, 23, 43, 0.22);
  background: var(--acid);
  font-size: 45px;
}

.final-card .eyebrow {
  position: relative;
  color: #756d20;
}

.final-card h1 {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(43px, 8vw, 72px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.final-card__lead {
  max-width: 490px;
  margin: 15px auto 24px;
  color: rgba(23, 23, 43, 0.54);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.4;
}

.final-score {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
}

.final-score strong {
  font-size: 76px;
  letter-spacing: -0.08em;
  line-height: 1;
}

.final-score > span {
  color: rgba(23, 23, 43, 0.35);
  font-size: 22px;
}

.final-score p {
  grid-column: 1 / 3;
  margin: 2px 0 0;
  color: rgba(23, 23, 43, 0.45);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-meter {
  height: 7px;
  margin: 18px 0 22px;
  padding: 1px;
  border: 1px solid rgba(23, 23, 43, 0.2);
}

.signal-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--acid));
  animation: meter-grow 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 22px;
  border-block: 1px solid rgba(23, 23, 43, 0.11);
}

.final-stats article {
  padding: 15px 8px;
  border-right: 1px solid rgba(23, 23, 43, 0.11);
}

.final-stats article:last-child { border: 0; }

.final-stats strong,
.final-stats span {
  display: block;
}

.final-stats strong {
  font-family: var(--serif);
  font-size: 25px;
  font-style: italic;
}

.final-stats span {
  color: rgba(23, 23, 43, 0.45);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.round-recap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 22px;
}

.round-recap article {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(23, 23, 43, 0.12);
  text-align: left;
}

.round-recap article span,
.round-recap article strong {
  display: block;
}

.round-recap article span {
  color: rgba(23, 23, 43, 0.35);
  font-size: 7px;
  font-weight: 800;
}

.round-recap article strong {
  max-width: calc(100% - 24px);
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-recap article b {
  position: absolute;
  top: 50%;
  right: 9px;
  color: #6c7324;
  font-size: 12px;
  transform: translateY(-50%);
}

.round-recap article[data-points="0"] {
  opacity: 0.48;
}

.final-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.final-actions .button {
  width: 100%;
}

/* Tutorial */
.tutorial {
  width: min(720px, calc(100% - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 2px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
}

.tutorial::backdrop {
  background: rgba(9, 8, 24, 0.83);
  backdrop-filter: blur(9px);
}

.tutorial[open] {
  animation: dialog-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tutorial__topline,
.tutorial__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
}

.tutorial__topline {
  border-bottom: 1px solid rgba(23, 23, 43, 0.1);
}

.tutorial__topline .eyebrow {
  margin: 0;
  color: rgba(23, 23, 43, 0.46);
}

.icon-button--light {
  color: var(--ink);
  border-color: rgba(23, 23, 43, 0.15);
}

.icon-button--light:hover {
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
}

.tutorial__content {
  min-height: 470px;
  padding: clamp(25px, 5vw, 48px);
}

.tutorial-step {
  animation: reveal-up 300ms ease both;
}

.tutorial-step .eyebrow {
  margin-bottom: 10px;
  color: #756d20;
}

.tutorial-step h2 {
  max-width: 590px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.tutorial-step > p:not(.eyebrow) {
  max-width: 590px;
  color: rgba(23, 23, 43, 0.58);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.48;
}

.tutorial-phones {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-bottom: 35px;
}

.tutorial-phones > div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 5px solid var(--ink);
  border-radius: 18px;
  background: var(--ink-soft);
  box-shadow: 6px 7px 0 rgba(23, 23, 43, 0.12);
}

.tutorial-phones > div:last-child {
  transform: rotate(3deg);
}

.tutorial-phones > div:first-child {
  transform: rotate(-3deg);
}

.tutorial-phones span {
  padding: 8px 4px;
  border-radius: 2px;
  color: var(--ink);
  background: var(--acid);
  font-size: clamp(8px, 2vw, 12px);
  font-weight: 800;
  text-align: center;
}

.tutorial-phones i {
  color: var(--coral);
  font-size: 27px;
  font-style: normal;
  animation: twinkle 1.8s ease infinite;
}

.tutorial-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 24px 0;
}

.tutorial-board span {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px solid rgba(23, 23, 43, 0.12);
  color: rgba(23, 23, 43, 0.5);
  font-size: 11px;
  font-weight: 700;
}

.tutorial-board span.is-mine {
  color: var(--ink);
  border-color: #9daa34;
  background: var(--acid);
  box-shadow: 2px 3px 0 rgba(23, 23, 43, 0.18);
}

.tutorial-clues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 25px 0;
}

.tutorial-clues article {
  padding: 17px;
  background: #e9dfca;
  transform: rotate(-0.7deg);
}

.tutorial-clues article:last-child {
  background: var(--coral);
  transform: rotate(0.7deg);
}

.tutorial-clues small,
.tutorial-clues strong,
.tutorial-clues span {
  display: block;
}

.tutorial-clues small {
  color: rgba(23, 23, 43, 0.48);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.tutorial-clues strong {
  margin: 5px 0 10px;
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 31px);
  font-style: italic;
}

.tutorial-clues span {
  color: rgba(23, 23, 43, 0.5);
  font-size: 7px;
  font-weight: 750;
}

.tutorial-picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 26px 0 18px;
}

.tutorial-picks button {
  min-height: 76px;
  border: 1px solid #9ca832;
  border-radius: 2px;
  color: var(--ink);
  background: var(--acid);
  font-weight: 750;
  cursor: pointer;
  transition: 170ms ease;
}

.tutorial-picks button:hover {
  transform: translateY(-3px);
  box-shadow: 4px 5px 0 var(--ink);
}

.tutorial-picks button.is-correct {
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--coral), 5px 6px 0 rgba(23, 23, 43, 0.15);
  animation: shared-pop 420ms ease both;
}

.tutorial-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px;
  color: var(--paper);
  background: var(--ink);
  animation: reveal-up 260ms ease both;
}

.tutorial-success strong {
  color: var(--acid);
  font-size: 18px;
}

.tutorial-success span {
  font-size: 10px;
}

.tutorial__progress {
  display: flex;
  gap: 5px;
  padding: 0 22px;
}

.tutorial__progress span {
  height: 3px;
  flex: 1;
  background: rgba(23, 23, 43, 0.12);
}

.tutorial__progress span.is-active {
  background: var(--coral);
}

.tutorial__footer {
  gap: 15px;
}

.tutorial__footer .button {
  min-width: 130px;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: calc(18px + var(--safe-bottom));
  max-width: min(390px, calc(100% - 36px));
  padding: 13px 16px;
  border-left: 4px solid var(--sky);
  color: var(--paper);
  background: var(--ink-soft);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: 220ms ease;
}

.toast[data-type="error"] { border-color: var(--coral); }
.toast[data-type="success"] { border-color: var(--acid); }

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shared-pop {
  0% { opacity: 0; transform: scale(0.82) rotate(-2deg); }
  70% { transform: scale(1.04) rotate(0.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes loading-sweep {
  to { transform: translateX(100%); }
}

@keyframes pulse {
  50% { opacity: 0.45; transform: scale(0.85); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.55; transform: rotate(0deg) scale(0.85); }
  50% { opacity: 1; transform: rotate(90deg) scale(1.08); }
}

@keyframes dot-wave {
  0%, 70%, 100% { transform: translateY(0); opacity: 0.35; }
  35% { transform: translateY(-3px); opacity: 1; }
}

@keyframes meter-grow {
  from { width: 0 !important; }
}

@keyframes drift-coral {
  to { transform: translate(12vw, -7vh) scale(1.2); }
}

@keyframes drift-acid {
  to { transform: translate(-10vw, -8vh) scale(0.82); }
}

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .app-shell {
    width: min(100% - 28px, 680px);
  }

  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .hero-copy {
    padding-top: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(60px, 17vw, 98px);
  }

  .play-panel {
    width: min(100%, 500px);
    justify-self: center;
  }

  .promise-strip {
    margin-top: 60px;
  }

  .lobby-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .lobby-card__intro p:not(.eyebrow) {
    max-width: 500px;
  }

  .lobby-card > .text-button {
    order: 5;
  }

  .game-header {
    grid-template-columns: 1fr auto;
  }

  .partner-status {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: calc(66px + var(--safe-top));
  }

  .connection-pill {
    min-height: 31px;
    padding: 0 9px;
    font-size: 9px;
  }

  .header-actions .icon-button {
    width: 31px;
    height: 31px;
  }

  .app-shell {
    min-height: calc(100dvh - 130px - var(--safe-top));
    padding-block: 35px 48px;
  }

  .site-footer {
    min-height: calc(62px + var(--safe-bottom));
    font-size: 9px;
  }

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

  .hero-copy h1 {
    font-size: clamp(58px, 18vw, 85px);
  }

  .hero-copy__lead {
    margin-top: 28px;
    font-size: 18px;
  }

  .play-panel {
    padding: 26px 22px;
  }

  .play-panel__stamp {
    right: -8px;
    width: 62px;
    height: 62px;
    font-size: 11px;
  }

  .promise-strip article {
    justify-content: center;
    gap: 7px;
    min-height: 66px;
    padding: 8px 4px;
  }

  .promise-strip strong {
    font-size: 14px;
  }

  .promise-strip span {
    font-size: 8px;
  }

  .lobby-card {
    padding: 25px 20px;
  }

  .lobby-card__intro h1 {
    font-size: 48px;
  }

  .room-ticket {
    margin-inline: -7px;
    padding: 20px 16px;
  }

  .room-code span {
    font-size: 22px;
  }

  .player-row {
    grid-template-columns: 40px 1fr;
  }

  .player-avatar {
    width: 37px;
    height: 37px;
  }

  .player-state {
    display: none;
  }

  .app-shell--game,
  .app-shell--finished {
    width: 100%;
    padding-top: 14px;
  }

  .game-header {
    width: calc(100% - 28px);
    margin-inline: auto;
  }

  .round-dots span {
    width: 17px;
  }

  .metric {
    min-width: 69px;
    padding-inline: 8px;
  }

  .metric--echo {
    display: none;
  }

  .game-stage,
  .final-card {
    padding: 24px 14px calc(25px + var(--safe-bottom));
  }

  .phase-heading h1 {
    font-size: 36px;
  }

  .soft-clock {
    min-width: 66px;
    padding-inline: 8px;
    font-size: 9px;
  }

  .word-board {
    gap: 6px;
  }

  .word-card {
    min-height: 88px;
    padding-inline: 5px;
  }

  .word-card strong {
    font-size: clamp(12px, 4vw, 17px);
  }

  .clue-composer {
    padding: 14px;
  }

  .clue-composer__row {
    grid-template-columns: 1fr;
  }

  .clue-composer .button {
    width: 100%;
  }

  .waiting-card {
    grid-template-columns: auto 1fr;
  }

  .waiting-card p {
    display: none;
  }

  .clue-reveal {
    grid-template-columns: 1fr;
  }

  .clue-slip {
    padding: 13px 15px;
  }

  .clue-slip strong {
    font-size: 23px;
  }

  .decision-bar {
    position: sticky;
    z-index: 5;
    bottom: calc(7px + var(--safe-bottom));
  }

  .echo-decision {
    grid-template-columns: 1fr;
  }

  .echo-choice {
    min-height: 84px;
    padding: 13px 15px;
  }

  .decision-bar__copy strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-burst {
    padding-inline: 5px;
  }

  .meaning-bridge {
    grid-template-columns: 1fr 27px 1fr;
  }

  .meaning-bridge article {
    padding-inline: 9px;
  }

  .meaning-bridge article p {
    display: none;
  }

  .next-round-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .next-round-panel .button {
    width: 100%;
  }

  .ready-footnote {
    text-align: center;
  }

  .final-card__halo {
    top: -120px;
    right: -100px;
  }

  .round-recap {
    grid-template-columns: repeat(2, 1fr);
  }

  .final-actions {
    grid-template-columns: 1fr;
  }

  .tutorial__content {
    min-height: 470px;
    padding: 25px 20px;
  }

  .tutorial-step h2 {
    font-size: 36px;
  }

  .tutorial-clues {
    grid-template-columns: 1fr;
  }

  .tutorial-picks button {
    min-height: 65px;
    font-size: 12px;
  }

  .tutorial-success {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 370px) {
  .site-header,
  .site-footer,
  .app-shell {
    width: calc(100% - 20px);
  }

  .wordmark {
    font-size: 14px;
  }

  .connection-pill #connection-label {
    display: none;
  }

  .connection-pill {
    min-width: 31px;
    justify-content: center;
  }

  .game-stage {
    padding-inline: 10px;
  }

  .word-card {
    min-height: 80px;
  }

  .word-card strong {
    font-size: 12px;
  }

  .rule-note {
    padding-inline: 9px;
  }
}

@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;
  }
}
