/*! Love Arcade — © 2026 B2 Stealthy Solutions. All rights reserved. */
/* Love Arcade ✻ warm, paper-and-coral design system */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --cream: #faf6f0;
  --paper: #fffdf8;
  --sand: #f1e9dd;
  --line: #e7dccd;
  --ink: #2b2622;
  --muted: #6b625a;
  --coral: #d97757;
  --coral-dark: #a84f33; /* action colour: 5.5:1 with white */
  --coral-deep: #9a4529;
  --sage-text: #3f7a6c;
  --rose: #c2185b;
  --plum: #7b5ea7;
  --sage: #5b9a8b;
  --gold: #f2c14e;
  --navy: #3d5a80;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(43, 38, 34, 0.06), 0 10px 30px rgba(43, 38, 34, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(217, 119, 87, 0.12), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(123, 94, 167, 0.1), transparent 60%),
    var(--cream);
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--coral-dark);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--paper);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

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

.small {
  font-size: 0.85rem;
}

.center {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 2rem);
  padding-top: max(0.7rem, env(safe-area-inset-top));
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-company {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral-dark);
  white-space: nowrap;
}

.brand-name {
  font-size: 1.2rem;
}

.brand-mark {
  color: var(--coral);
  font-size: 1.5rem;
  display: inline-block;
  animation: spin 18s linear infinite;
}

.top-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.points {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.points.bump {
  animation: bump 0.4s ease;
}

.streak {
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.9rem;
}

.icon-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  width: 2.3rem;
  height: 2.3rem;
  cursor: pointer;
}

.view {
  width: min(100% - 2rem, 1080px);
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
  outline: none;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  width: min(100% - 2rem, 760px);
  margin: 0 auto;
  padding: 1.5rem 0 6rem;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0.35rem 0;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}

.footer-copy {
  font-weight: 700;
  color: var(--ink);
}

.footer-legal {
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

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

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

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

.btn.primary {
  background: var(--coral-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(217, 119, 87, 0.35);
}

.btn.primary:hover:not(:disabled) {
  background: var(--coral-deep);
}

.btn.ghost {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}

.btn.danger {
  background: #b3261e;
  color: #fff;
}

.btn.truth {
  background: var(--plum);
  color: #fff;
}

.btn.dare {
  background: var(--rose);
  color: #fff;
}

.btn.big {
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
}

.btn.small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.link {
  background: none;
  border: none;
  color: var(--coral-dark);
  text-decoration: underline;
  cursor: pointer;
  padding: 0.3rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0.5rem;
}

.row.center {
  justify-content: center;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(217, 119, 87, 0.14);
  color: var(--coral-dark);
}

.pill.truth {
  background: rgba(123, 94, 167, 0.14);
  color: var(--plum);
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---------- home ---------- */
.hero {
  text-align: center;
  padding: clamp(1rem, 5vw, 3rem) 0 1.5rem;
}

.display {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 5rem);
  line-height: 1;
  margin: 0.2rem 0 0.8rem;
  letter-spacing: -0.02em;
}

.display em {
  color: var(--coral-dark);
  font-style: italic;
}

.lede {
  max-width: 38rem;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.names {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.name-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.name-input,
.text-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
}

.name-input {
  width: 11rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.name-input:focus,
.text-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.18);
}

.names-heart {
  color: var(--coral);
  font-size: 1.6rem;
  padding-bottom: 0.45rem;
  animation: beat 1.6s ease-in-out infinite;
}

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

.heat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.25rem;
  border-radius: 999px;
}

.heat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0 0.5rem;
  font-weight: 600;
}

.heat-btn {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.heat-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.3rem 0 1rem;
  scrollbar-width: none;
}

.tab {
  flex: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}

.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.game-card {
  --accent: var(--coral);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.2rem 1.2rem 1rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  animation: fadeUp 0.45s ease both;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--accent);
}

.game-card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(43, 38, 34, 0.14);
}

.game-emoji {
  font-size: 2.2rem;
  line-height: 1;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 16%, var(--paper));
  margin-bottom: 0.4rem;
}

.game-emoji.small {
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.6rem;
  margin: 0;
}

.game-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
}

.game-tag {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.game-meta .new {
  color: var(--coral-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-meta .played {
  color: var(--sage-text);
  font-weight: 600;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
  font-size: 0.92rem;
}

/* ---------- game shell ---------- */
.game-shell {
  --accent: var(--coral);
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.game-head-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
}

.game-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.game-head p {
  margin: 0.1rem 0 0;
}

.stage {
  min-height: 50vh;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
  animation: fadeUp 0.3s ease both;
}

/* Panels that re-render on every move shouldn't replay their entrance animation. */
.panel.static {
  animation: none;
}

.panel h3,
.result h3 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  margin: 0.2rem 0 0.8rem;
}

.result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 5vw, 2.4rem);
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 720px;
  margin: 1rem auto 0;
  animation: pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.big-text {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 600;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.choice {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  border: 2px solid var(--line);
  background: var(--cream);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.choice:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.choice strong {
  font-size: 1.1rem;
}

.choice span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* hand-off */
.handoff {
  text-align: center;
  padding: 3rem 1rem;
  background: repeating-linear-gradient(135deg, var(--sand), var(--sand) 14px, var(--cream) 14px, var(--cream) 28px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  max-width: 720px;
  margin: 0 auto;
}

.handoff-icon {
  font-size: 3.5rem;
  animation: wiggle 1.4s ease-in-out infinite;
}

.handoff h3 {
  font-family: var(--serif);
  font-size: 2rem;
  margin: 0.5rem 0;
}

/* HUD */
.hud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.hud-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
}

.hud-item.turn {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--paper));
}

.label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* prompt cards */
.prompt-card {
  position: relative;
  background: linear-gradient(160deg, var(--paper), var(--sand));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.6rem 1.4rem;
  margin: 1rem 0;
  min-height: 9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.prompt-card.truth {
  background: linear-gradient(160deg, #f6f1fc, #ebe2f7);
  border-color: #d9cdef;
}

.prompt-card.dare {
  background: linear-gradient(160deg, #fdf0f4, #f8dce6);
  border-color: #f0c4d3;
}

.prompt-card.deep.deeper {
  background: linear-gradient(160deg, #eef6f4, #d9ebe6);
}

.prompt-card.deep.deepest {
  background: linear-gradient(160deg, #2b2340, #3d2f55);
  color: #f6f0ff;
  border-color: #3d2f55;
}

.prompt-text {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.8vw, 1.6rem);
  line-height: 1.35;
  margin: 0;
  text-align: center;
}

.flip-in {
  animation: flipIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.fade-up {
  animation: fadeUp 0.4s ease both;
}

/* options / quizzes */
.question {
  font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
}

.options {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.option {
  text-align: left;
  border: 2px solid var(--line);
  background: var(--cream);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  font-size: 1.02rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.option:hover {
  border-color: var(--accent);
  background: var(--paper);
  transform: translateX(3px);
}

.reveal-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.5rem;
  text-align: left;
}

.reveal-list li {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: var(--cream);
  border-left: 5px solid var(--line);
}

.reveal-list li.hit {
  border-left-color: var(--sage);
}

.reveal-list li.miss {
  border-left-color: var(--rose);
}

.reveal-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* would you rather */
.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  align-items: stretch;
}

.vs-option {
  border: none;
  border-radius: 20px;
  padding: 1.4rem 1rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  cursor: pointer;
  color: #fff;
  min-height: 9rem;
  transition: transform 0.15s;
}

.vs-option:hover {
  transform: scale(1.03);
}

.vs-option.a {
  background: linear-gradient(160deg, var(--coral-dark), var(--coral-deep));
}

.vs-option.b {
  background: linear-gradient(160deg, var(--plum), #5d4485);
}

.vs-or {
  align-self: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}

.reveal-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1rem 0;
}

.reveal-vote {
  background: var(--cream);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meter,
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--sand);
  overflow: hidden;
  margin: 1rem 0;
}

.meter span,
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--rose));
  border-radius: inherit;
  transition: width 0.5s ease;
}

/* memory */
.memory-board {
  display: grid;
  gap: clamp(0.4rem, 1.5vw, 0.8rem);
  max-width: 560px;
  margin: 0 auto;
  perspective: 900px;
}

.mcard {
  aspect-ratio: 1;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.mcard:disabled {
  cursor: default;
}

.mcard-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.mcard.up .mcard-inner {
  transform: rotateY(180deg);
}

.mcard-back,
.mcard-front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  box-shadow: var(--shadow);
}

.mcard-back {
  color: rgba(255, 255, 255, 0.85);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.25), transparent 50%),
    linear-gradient(150deg, var(--coral), var(--rose));
}

.mcard:hover:not(:disabled) .mcard-back {
  filter: brightness(1.08);
}

.mcard-front {
  background: var(--paper);
  border: 2px solid var(--line);
  transform: rotateY(180deg);
}

.mcard.matched .mcard-front {
  border-color: var(--sage);
  background: #eef6f3;
  animation: glow 0.6s ease;
}

.mini-challenge {
  max-width: 620px;
  margin: 1rem auto 0;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: var(--paper);
  border: 1px dashed var(--coral);
  text-align: center;
  animation: fadeUp 0.3s ease both;
}

.mini-challenge p {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0.6rem 0 0;
}

/* timers / clocks */
.big-clock {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 10vw, 4rem);
  font-weight: 700;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

.tap-pad {
  width: min(100%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 35% 30%, #ff9aa8, var(--rose));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  box-shadow: 0 16px 40px rgba(194, 24, 91, 0.35);
  touch-action: manipulation;
  user-select: none;
}

.tap-pad .count {
  font-size: 3.5rem;
  font-family: var(--serif);
}

.tap-pad.pulse {
  animation: bump 0.25s ease;
}

.timer-bar {
  height: 8px;
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  overflow: hidden;
}

.timer-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--coral);
  transform-origin: left;
}

.timer-bar span.run {
  transition: transform 3s linear;
  transform: scaleX(0);
}

/* jinx */
.jinx-board {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  gap: 0.6rem;
  min-height: 70vh;
  max-width: 720px;
  margin: 0 auto;
}

.jinx-half {
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
}

.jinx-half.p0 {
  background: color-mix(in srgb, var(--coral) 14%, var(--paper));
}

.jinx-half.p1 {
  background: color-mix(in srgb, var(--plum) 14%, var(--paper));
}

.jinx-half.flipped {
  transform: rotate(180deg);
}

.jinx-name {
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
}

.jinx-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.jinx-btn {
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: 18px;
  padding: 1.4rem 0.6rem;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.jinx-btn.chosen {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.jinx-btn:disabled:not(.chosen) {
  opacity: 0.35;
}

.jinx-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--muted);
}

.jinx-flash {
  font-family: var(--serif);
  font-size: 2rem;
  animation: pop 0.35s ease both;
}

.jinx-flash.hit {
  color: var(--coral);
}

.toggle {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* canvas games */
.canvas-wrap {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.game-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 360 / 520;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(43, 35, 64, 0.55);
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
}

.overlay-card {
  background: var(--paper);
  padding: 1.5rem;
  border-radius: 20px;
  text-align: center;
  width: 80%;
  animation: pop 0.35s ease both;
}

.overlay-card h3 {
  font-family: var(--serif);
  margin: 0 0 0.4rem;
}

/* sync */
.sync-board {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 1.2fr) 1fr;
  gap: 0.8rem;
  min-height: 60vh;
}

.sync-pad {
  border: none;
  border-radius: var(--radius);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.1s;
}

.sync-pad small {
  opacity: 0.7;
  font-weight: 500;
}

.sync-pad.p0 {
  background: linear-gradient(160deg, var(--coral-dark), var(--coral-deep));
}

.sync-pad.p1 {
  background: linear-gradient(160deg, var(--plum), #5d4485);
}

.sync-pad.hit {
  transform: scale(0.95);
}

.sync-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.8rem;
}

.sync-heart {
  font-size: clamp(4rem, 14vw, 7rem);
  transition: transform 0.15s;
}

.sync-heart.lit {
  transform: scale(1.2);
  filter: drop-shadow(0 0 24px rgba(194, 24, 91, 0.6));
}

.sync-info {
  min-height: 3rem;
  font-weight: 600;
}

/* emoji */
.emoji-puzzle {
  font-size: clamp(3rem, 14vw, 5rem);
  letter-spacing: 0.1em;
  margin: 1rem 0;
  animation: flipIn 0.45s ease both;
}

.guess-form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  margin: 1rem auto 0;
}

.feedback {
  min-height: 1.5rem;
  font-weight: 600;
}

.feedback .btn {
  margin-left: 0.4rem;
}

.error {
  color: #b3261e;
  min-height: 1.2rem;
  font-size: 0.9rem;
  margin: 0.4rem 0;
}

/* doodle */
.doodle-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.doodle-timer {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

.doodle-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fffdf8;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.swatches {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.swatch.active {
  box-shadow: 0 0 0 3px var(--ink);
}

.secret-word {
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  margin: 1rem 0;
  color: var(--coral-dark);
}

/* story / letter */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.story-prev {
  background: var(--cream);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
}

.story-prev p {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
}

.story-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

textarea.text-input {
  resize: vertical;
}

.story-text,
.letter {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.7;
  text-align: left;
  white-space: pre-wrap;
}

.letter {
  background:
    linear-gradient(transparent 1.9rem, rgba(217, 119, 87, 0.12) 1.9rem) 0 0 / 100% 2.04rem,
    #fffaf0;
  padding: 1.6rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: rotate(-0.6deg);
  white-space: normal;
}

.letter mark {
  background: rgba(242, 193, 78, 0.45);
  padding: 0 0.15em;
  border-radius: 3px;
}

.wish-pick {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* oracle */
.orb {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

.oracle-out {
  display: grid;
  gap: 0.6rem;
  text-align: left;
  margin: 1rem 0;
}

.oracle-line {
  background: linear-gradient(120deg, #f6f1fc, var(--cream));
  border-radius: 14px;
  padding: 0.7rem 1rem;
  display: flex;
  flex-direction: column;
}

/* wheel */
.wheel-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.wheel-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.wheel-canvas {
  width: min(100%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--paper), 0 0 0 9px var(--line), var(--shadow);
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  color: var(--ink);
  font-size: 1.8rem;
  z-index: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.bucket {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.bucket li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  background: var(--cream);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
}

.bucket .link {
  flex: none;
  font-size: 0.82rem;
}

/* dice */
.dice-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
}

.die {
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.die-face {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.die.rolling {
  animation: shake 0.15s linear infinite;
}

/* bingo */
.bingo-head {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 0.4rem;
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}

.bingo-cell {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 12px;
  font-size: clamp(0.6rem, 2vw, 0.82rem);
  line-height: 1.2;
  padding: 0.3rem;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s, transform 0.15s;
}

.bingo-cell:hover {
  transform: scale(1.04);
}

.bingo-cell.marked {
  background: var(--coral-dark);
  color: #fff;
  border-color: var(--coral-dark);
  font-weight: 600;
}

.bingo-cell.free {
  background: var(--rose);
  color: #fff;
}

/* badges */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.badge {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  opacity: 0.6;
  filter: grayscale(1);
}

.badge.got {
  opacity: 1;
  filter: none;
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(242, 193, 78, 0.25);
}

.badge-icon {
  font-size: 2.2rem;
}

.favs {
  text-align: left;
  margin-top: 1rem;
}

/* ---------- wave two games ---------- */
/* dots & hearts */
.dots-board {
  display: grid;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  align-self: center;
  justify-self: center;
}

.line {
  position: relative;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.line::before {
  content: "";
  position: absolute;
  border-radius: 6px;
  background: var(--sand);
  transition: background 0.15s;
}

.line.h::before {
  left: 3px;
  right: 3px;
  top: 11px;
  height: 10px;
}

.line.v::before {
  top: 3px;
  bottom: 3px;
  left: 11px;
  width: 10px;
}

.line:hover:not(:disabled)::before {
  background: var(--muted);
}

.line.p0::before {
  background: var(--coral-dark);
}

.line.p1::before {
  background: var(--plum);
}

.box {
  display: grid;
  place-items: center;
  font-size: clamp(1.2rem, 6vw, 2rem);
  border-radius: 8px;
  margin: 4px;
}

.box.claimed {
  animation: pop 0.3s ease both;
}

.box.p0 {
  background: color-mix(in srgb, var(--coral) 18%, transparent);
}

.box.p1 {
  background: color-mix(in srgb, var(--plum) 18%, transparent);
}

/* hot & cold */
.heat-grid {
  display: grid;
  gap: 0.3rem;
  width: min(100%, 420px, calc(100dvh - 21rem));
  min-width: 240px;
  margin: 1rem auto 0;
}

.heat-tile {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  touch-action: manipulation;
}

.heat-tile:hover:not(:disabled) {
  background: var(--sand);
}

.heat-tile[data-heat="0"] { background: var(--gold); color: var(--ink); font-size: 1.4rem; }
.heat-tile[data-heat="1"] { background: #c62828; }
.heat-tile[data-heat="2"] { background: #c2452b; }
.heat-tile[data-heat="3"] { background: #f2a541; color: var(--ink); }
.heat-tile[data-heat="4"] { background: #8fb8c9; color: var(--ink); }
.heat-tile[data-heat="5"] { background: #45729a; }
.heat-tile[data-heat="6"],
.heat-tile[data-heat="7"] { background: #3d5a80; }

/* love lock */
.code-slots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.code-slot {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 14px;
  border: 2px dashed var(--line);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}

.code-slot.filled {
  border-style: solid;
  border-color: var(--accent);
}

.code-pad {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  max-width: 420px;
  margin: 0 auto;
}

.code-key {
  aspect-ratio: 1;
  font-size: clamp(1.4rem, 6vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  cursor: pointer;
  touch-action: manipulation;
}

.code-history {
  text-align: left;
  max-width: 360px;
  margin: 0 auto;
  padding-left: 1.6rem;
}

.code-history li {
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--line);
}

.code-guess {
  font-size: 1.3rem;
  margin-right: 0.8rem;
}

/* pass the heart */
.holder-name {
  font-size: clamp(2rem, 9vw, 3rem) !important;
  color: var(--coral);
  margin: 0 !important;
}

.pass-heart {
  --beat: 0.9s;
  width: min(100%, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 5rem;
  background: radial-gradient(circle at 35% 30%, #ffd0c2, var(--coral));
  box-shadow: 0 16px 40px rgba(217, 119, 87, 0.4);
  cursor: pointer;
  animation: beat var(--beat) ease-in-out infinite;
  touch-action: manipulation;
  user-select: none;
}

.pass-heart.other {
  background: radial-gradient(circle at 35% 30%, #e3d6f6, var(--plum));
}

.pass-heart small {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 700;
}

.boom-icon {
  font-size: 4.5rem;
  animation: pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

/* love echo */
.echo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: min(100%, 360px);
  margin: 1rem auto;
}

.echo-pad {
  aspect-ratio: 1;
  border: none;
  border-radius: 28px;
  font-size: 3rem;
  cursor: pointer;
  opacity: 0.55;
  transition: transform 0.1s, opacity 0.1s, box-shadow 0.1s;
  touch-action: manipulation;
}

.echo-pad.red { background: #f6c1c9; }
.echo-pad.gold { background: #fbe3a1; }
.echo-pad.green { background: #c7e6d8; }
.echo-pad.purple { background: #dccff0; }

.echo-pad.lit {
  opacity: 1;
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.8), 0 12px 30px rgba(43, 38, 34, 0.25);
}

/* tug of love */
.tug-rope {
  position: relative;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, #c9a27a, #c9a27a 8px, #b08560 8px, #b08560 16px);
  margin: 2rem 0 1rem;
}

.tug-zone {
  position: absolute;
  top: -10px;
  bottom: -10px;
  width: 4px;
  border-radius: 2px;
}

.tug-zone.left {
  left: 0;
  background: var(--coral);
}

.tug-zone.right {
  right: 0;
  background: var(--plum);
}

.tug-knot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  transition: left 0.08s linear;
}

/* heart rally */
.rally-canvas {
  aspect-ratio: 360 / 560;
}

/* rank it */
.rank-chosen {
  text-align: left;
  max-width: 360px;
  margin: 0.5rem auto;
  min-height: 1rem;
  font-weight: 600;
}

.rank-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  text-align: left;
  margin: 1rem 0;
}

.rank-compare > div {
  background: var(--cream);
  border-radius: 14px;
  padding: 0.8rem 1rem;
}

.rank-compare ol {
  margin: 0.4rem 0 0;
  padding-left: 1.3rem;
}

/* coupons & countdown */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1rem;
}

.suggestions .chip {
  font-size: 0.82rem;
}

.coupon-list,
.countdown-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
  max-width: 720px;
  margin: 1rem auto;
}

.coupon {
  position: relative;
  background: var(--paper);
  border: 2px dashed var(--coral);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
  animation: fadeUp 0.3s ease both;
}

.coupon-from {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.coupon-text {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.countdown-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
}

.countdown-clock {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .countdown-form {
    grid-template-columns: 1fr;
  }

  .rank-compare {
    grid-template-columns: 1fr;
  }
}

/* ---------- host bubble ---------- */
.host {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translate(-50%, 150%);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: min(92vw, 520px);
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1.1rem 0.6rem 0.6rem;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(43, 38, 34, 0.3);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.3s ease;
  cursor: pointer;
}

.host.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}


.host p {
  margin: 0;
  font-size: 0.92rem;
}

.host strong {
  color: var(--coral);
  margin-right: 0.2rem;
}

.host-avatar {
  flex: none;
  color: var(--ink);
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  font-size: 1.3rem;
  animation: spin 8s linear infinite;
}

/* toasts */
.toasts {
  position: fixed;
  top: 4.2rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 40;
  pointer-events: none;
}

.toast {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideIn 0.3s ease both;
}

.toast.gold {
  border-left-color: var(--gold);
  background: #fffaeb;
}

.toast.out {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s ease;
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(43, 38, 34, 0.45);
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.modal.open {
  display: grid;
}

.modal-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.6rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(43, 38, 34, 0.35);
  animation: pop 0.3s ease both;
}

.modal-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0 0 0.6rem;
}

.sound-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
}

.sound-result {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 60;
}

/* ---------- animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes flipIn {
  from { opacity: 0; transform: rotateX(-70deg) translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: none; }
}

@keyframes bump {
  50% { transform: scale(1.15); }
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
}

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

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}

@keyframes float {
  50% { transform: translateY(-8px); }
}

@keyframes glow {
  50% { box-shadow: 0 0 0 6px rgba(91, 154, 139, 0.3); }
}

@keyframes shake {
  0% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
  100% { transform: rotate(-2deg); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .wheel-layout {
    grid-template-columns: 1fr;
  }

  .sync-board {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto 1fr;
  }

  .sync-pad.p0 {
    order: -1;
  }

  .versus {
    grid-template-columns: 1fr;
  }

  .vs-option {
    min-height: 6rem;
  }

}

@media (max-width: 480px) {
  .topbar {
    gap: 0.4rem;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .brand {
    gap: 0.35rem;
    min-width: 0;
  }

  .brand-mark {
    font-size: 1.2rem;
  }

  .brand-company {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .top-stats {
    gap: 0.3rem;
    flex: none;
  }

  .points {
    padding: 0.25rem 0.6rem;
  }

  .icon-btn {
    width: 2rem;
    height: 2rem;
  }

  .name-input {
    width: 9rem;
  }

  .heat-label {
    display: none;
  }

  .host p {
    font-size: 0.85rem;
  }

  .game-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .game-card {
    padding: 1rem 0.8rem 0.8rem;
  }

  .game-tag {
    font-size: 0.8rem;
  }

  .game-title {
    font-size: 1.08rem;
  }
}

/* ---------- design-critique fixes ---------- */
.pad-link {
  display: inline-block;
  padding: 0.7rem 0.5rem;
}

.link {
  padding: 0.7rem 0.5rem;
}

/* compact game header: one row, rules tucked behind a toggle */
.game-head {
  margin-bottom: 0.8rem;
  align-items: flex-start;
}

.game-head .btn {
  min-height: 44px;
}

.game-head-text {
  min-width: 0;
}

.game-head h2 {
  line-height: 1.15;
}

details.how summary {
  cursor: pointer;
  color: var(--coral-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0;
  min-height: 24px;
}

details.how p {
  margin: 0.2rem 0 0;
}

.stage {
  min-height: 0;
}

/* home: Spark greeting, who's-playing, picks */
.spark-line {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 34rem;
  margin: 0 auto 1.2rem;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 16px;
  font-size: 0.9rem;
  text-align: left;
}

.spark-line strong {
  color: #e8a87c;
}

.spark-dot {
  color: var(--coral);
}

.who {
  margin: 1rem auto 0;
  max-width: 34rem;
}

.who summary {
  cursor: pointer;
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
}

.who .names {
  margin: 1rem 0 0;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 1.2rem 0 0.6rem;
}

.pick-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.pick {
  --accent: var(--coral);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 0.6rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  box-shadow: var(--shadow);
}

.pick:hover {
  border-color: var(--accent);
}

.pick-emoji {
  font-size: 1.6rem;
}

/* full-screen games: no header/footer, floating controls, whole phone for play */
body.fullscreen .topbar,
body.fullscreen .game-head,
body.fullscreen .site-footer {
  display: none;
}

body.fullscreen .view {
  padding: max(0.6rem, env(safe-area-inset-top)) 0 max(0.6rem, env(safe-area-inset-bottom));
  width: min(100% - 1rem, 1080px);
}

.fabs {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  right: 0.5rem;
  display: flex;
  gap: 0.4rem;
  z-index: 25;
}

.fab {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

body.fullscreen .jinx-board {
  height: calc(100dvh - 1.4rem);
  min-height: 0;
}

body.fullscreen .sync-board {
  height: calc(100dvh - 5.5rem);
  min-height: 0;
  margin-top: 3.2rem;
}

body.fullscreen .hud {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-right: 9.4rem;
  margin-bottom: 0.4rem;
}

body.fullscreen .hud-item {
  padding: 0.3rem 0.5rem;
}

body.fullscreen .hud .label {
  font-size: 0.6rem;
  letter-spacing: 0.05em;
}

body.fullscreen .canvas-wrap {
  width: min(100%, 420px, calc((100dvh - 5.6rem) * var(--ar, 0.69)));
}

body.fullscreen .game-canvas {
  width: 100%;
}

body.fullscreen .panel {
  margin-top: 3.2rem;
}

.host {
  pointer-events: none;
}

.host.show {
  pointer-events: none;
}

/* compact HUD tiles */
.hud {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.4rem;
}

.hud-item {
  padding: 0.4rem 0.7rem;
  border-radius: 14px;
}

.hud-item strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

@media (max-width: 480px) {
  .hero {
    padding: 0.6rem 0 0.8rem;
  }

  .display {
    font-size: 2.6rem;
    margin-bottom: 0.4rem;
  }

  .lede {
    display: none;
  }

  .eyebrow {
    margin-bottom: 0.1rem;
  }

  .spark-line {
    font-size: 0.82rem;
    margin-bottom: 0.7rem;
  }

  .hero-actions {
    gap: 0.5rem;
  }

  .who {
    margin-top: 0.4rem;
  }

  .back-text {
    display: none;
  }

  .game-head {
    gap: 0.5rem;
  }

  .game-head .btn {
    padding: 0.5rem 0.9rem;
  }

  .game-head h2 {
    font-size: 1.25rem;
  }

  .game-emoji.small {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.3rem;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    position: relative;
  }

  .icon-btn::after {
    content: "";
    position: absolute;
    inset: -2px;
  }

  .panel.static {
    padding: 0.6rem;
  }

  .panel {
    padding: 1rem;
  }
}

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

/* ---------- flip-two-cards family: Love Journey, Perfect Pairs, Our Story Match, Flip Race ---------- */
.mcard {
  touch-action: manipulation;
}

.mcard[aria-disabled="true"] {
  cursor: default;
}

.match-board .mcard-front,
.race-grid .mcard-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.25rem;
  text-align: center;
}

.mc-emoji {
  font-size: clamp(1.45rem, 6vw, 2.4rem);
  line-height: 1.1;
}

.mc-sub {
  font-size: clamp(0.6rem, 2.2vw, 0.78rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--muted);
}

.mcard.text {
  aspect-ratio: 4 / 5;
}

.match-board.tall .mcard.text {
  aspect-ratio: 2 / 3;
}

.mc-text {
  font-size: clamp(0.68rem, 2.6vw, 0.95rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.mc-tag {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mcard.kind-q .mcard-front {
  background: #f5f0fa;
  border-color: rgba(123, 94, 167, 0.45);
}

.mcard.kind-q .mc-tag {
  color: var(--plum);
}

.mcard.kind-a .mcard-front {
  background: #fdf2ec;
  border-color: rgba(217, 119, 87, 0.55);
}

.mcard.kind-a .mc-tag {
  color: var(--coral-dark);
}

.mcard.matched.kind-q .mcard-front,
.mcard.matched.kind-a .mcard-front {
  background: #eef6f3;
  border-color: var(--sage);
}

/* HUDs that must stay on one row on phones */
.hud.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hud.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 480px) {
  .hud.cols-4 .hud-item {
    padding: 0.35rem 0.5rem;
  }

  .hud.cols-4 .label {
    letter-spacing: 0.04em;
  }
}

/* plot twist: two face-down cards trade places */
.mcard.swapped .mcard-back {
  box-shadow: 0 0 0 3px var(--gold), var(--shadow);
  animation: swapWiggle 0.9s ease;
}

@keyframes swapWiggle {
  0%, 100% { transform: none; }
  20% { transform: translateY(-6px) rotate(-6deg); }
  45% { transform: rotate(5deg); }
  70% { transform: rotate(-3deg); }
}

.match-status {
  min-height: 1.5em;
  max-width: 560px;
  margin: 0.8rem auto 0;
  text-align: center;
  font-weight: 600;
}

.hud-item.warn {
  border-color: #b3261e;
  color: #b3261e;
  animation: beat 1s ease-in-out infinite;
}

.stars,
.jstop-stars,
.journey-total {
  color: #8a5f00;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Love Journey map */
.journey-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem 1rem;
}

.journey-total {
  font-weight: 700;
}

.journey-relaxed {
  margin: 0.4rem 0;
}

.journey-path {
  position: relative;
  list-style: none;
  margin: 0.8rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.journey-path::before {
  content: "";
  position: absolute;
  top: 1.4rem;
  bottom: 1.4rem;
  left: calc(2px + 0.9rem + 1.3rem - 1.5px);
  border-left: 3px dotted var(--line);
}

.jstop-btn {
  position: relative;
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.jstop-btn:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateX(3px);
}

.jstop-btn:disabled {
  cursor: not-allowed;
  background: var(--sand);
  color: var(--muted);
}

.jstop.current .jstop-btn {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
  box-shadow: var(--shadow);
}

.jstop-icon {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--cream);
  font-size: 1.4rem;
}

.jstop.done .jstop-icon {
  border-color: var(--sage);
}

.jstop-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.jstop-facts {
  font-size: 0.8rem;
  color: var(--muted);
}

.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.6rem;
  margin-bottom: 0.7rem;
  text-align: center;
}

.stage-moment {
  margin: 1rem auto 0;
  padding: 1rem 1.1rem 0.4rem;
  border-radius: 18px;
  border: 1px dashed var(--accent);
  background: var(--cream);
}

.moment-q {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0.6rem 0 0;
}

/* Our Story Match answer form */
.story-q {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.story-q .field {
  flex: 1;
  min-width: 0;
}

.swap-q {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin-bottom: 0.8rem;
}

.form-error {
  min-height: 1.2em;
  margin: 0 0 0.6rem;
  color: #b3261e;
  font-weight: 600;
}

/* Flip Race: two boards, one phone */
.race-board {
  height: calc(100vh - 1.4rem);
  height: calc(100dvh - max(0.6rem, env(safe-area-inset-top)) - max(0.6rem, env(safe-area-inset-bottom)));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.4rem;
  padding-top: 3.3rem; /* keeps the top player's cards clear of the floating ✕ ? ↻ buttons */
}

.race-half {
  position: relative;
  container-type: size;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.race-half.p0 {
  background: color-mix(in srgb, var(--coral) 8%, var(--paper));
}

.race-half.p1 {
  background: color-mix(in srgb, var(--plum) 8%, var(--paper));
}

.race-half.flipped {
  transform: rotate(180deg);
}

.race-name {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.race-count {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.race-grid {
  --card: min(19vw, calc((50vh - 6.5rem) / var(--rows)), 92px);
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--card));
  grid-auto-rows: var(--card);
  gap: 6px;
  perspective: 900px;
}

@supports (width: 1cqw) {
  .race-grid {
    --card: min(calc((100cqw - (var(--cols) - 1) * 6px) / var(--cols)), calc((100cqh - 1.9rem - (var(--rows) - 1) * 6px) / var(--rows)), 96px);
  }
}

.race-grid .mcard {
  width: var(--card);
  height: var(--card);
  aspect-ratio: auto;
}

.race-grid .mcard-back,
.race-grid .mcard-front {
  border-radius: 12px;
  font-size: calc(var(--card) * 0.42);
}

.race-grid .mc-emoji {
  font-size: calc(var(--card) * 0.46);
}

.race-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  padding: 1rem;
  border-radius: inherit;
  background: rgba(255, 253, 248, 0.88);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  font-weight: 700;
  text-align: center;
}

.race-overlay.show {
  display: grid;
  animation: pop 0.3s ease both;
}

.race-mid {
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.8rem;
  padding: 0.1rem 0.4rem;
  text-align: center;
}

.race-score {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- party & bluffing games (Spin the Bottle, Lie Detector, Spot the Fib, Interrogation Room, Hot Seat) ---------- */
.bottle-table {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 0.6rem auto 0.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fffdf8 0 38%, var(--sand) 39% 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 10px rgba(91, 154, 139, 0.08);
}

.bottle-wedge {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 4.2rem;
  padding: 0.25rem 0.3rem;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink);
  transition: background 0.2s ease, transform 0.2s ease;
}

.bottle-wedge .bw-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.bottle-wedge.active {
  background: var(--sage);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 6px 16px rgba(63, 122, 108, 0.35);
}

.bottle-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  height: 52%;
  margin: -26% 0 0 -11%;
  transform-origin: 50% 50%;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.12, 0.75, 0.15, 1);
}

.bottle-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 6px 8px rgba(43, 38, 34, 0.25));
}

.bottle-status {
  min-height: 9rem;
}

.secret-card {
  border-radius: 20px;
  padding: 1.2rem 1rem;
  margin: 1rem 0;
  color: #fff;
}

.secret-card.truth {
  background: linear-gradient(160deg, #3f7a6c, #2f5f54);
}

.secret-card.lie {
  background: linear-gradient(160deg, #c2185b, #8e1244);
}

.secret-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 0.3rem;
}

.secret-line {
  margin: 0;
  opacity: 0.95;
}

.polygraph {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 1;
  margin: 0.4rem 0 0.6rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.countdown-big {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 12vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  margin: 0.2rem 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.countdown-big.warn {
  color: var(--rose);
}

.hs-card {
  min-height: 7rem;
}
