/* Game screens. Tokens, base styles and the .key colours live in style.css. */

.game { justify-content: center; overflow-y: auto; }
.view {
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.view h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.05;
  color: var(--gold);
}
.muted { color: var(--muted); margin: 0; }
.small { font-size: 14px; }
.name { font-family: var(--display); font-size: clamp(26px, 8vw, 34px); line-height: 1.1; overflow-wrap: anywhere; }

/* While the key is lit the screen is bright, so text turns dark. */
.key.lit .view, .key.lit .muted, .key.lit .roundLabel { color: var(--ink); }
.key.lit .roundLabel { background: rgba(12, 7, 22, 0.15); border-color: rgba(12, 7, 22, 0.3); }

.miniBrand { display: flex; flex-direction: column; align-items: center; gap: 0; }
.miniBrand .pipes { height: 44px; margin-bottom: 4px; }
.miniBrand .pipes i { width: 12px; }
.miniBrand .pipes i::after { height: 4px; }
.miniBrand .wordmark { font-size: clamp(30px, 10vw, 44px); flex-direction: row; gap: 0.12em; }

/* Lobby: one organ pipe per seat. Joined seats light up in their colour. */
.organ {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(4px, 1.6vw, 8px);
  width: 100%;
  height: 92px;
  padding: 0 4px 10px;
  border-bottom: 3px solid var(--gold);
  background: linear-gradient(0deg, rgba(255, 201, 60, 0.12), transparent 60%);
  border-radius: 0 0 6px 6px;
}
.organ .slot {
  --c: var(--line);
  flex: 1;
  max-width: 30px;
  height: calc(var(--h) * 100%);
  border-radius: 999px 999px 4px 4px;
  border: 2px dashed rgba(255, 247, 234, 0.18);
}
.organ .slot.on {
  border: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, #000), var(--c) 45%, color-mix(in srgb, var(--c) 65%, #fff) 60%, color-mix(in srgb, var(--c) 55%, #000));
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent);
  animation: rise 500ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes rise { from { transform: scaleY(0.2); transform-origin: bottom; opacity: 0; } }
.count-line { display: flex; justify-content: space-between; width: 100%; margin-top: -8px; font-size: 14px; color: var(--muted); }
.count-line b { font-family: var(--display); font-weight: 400; color: var(--fg); }

/* Host settings, as rows of organ stops: a dark slot per setting, the
   chosen stop pulled out and lit in its own colour. */
.settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  padding: 16px 14px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 2px solid color-mix(in srgb, var(--gold) 55%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 247, 234, 0.12), 0 10px 30px rgba(0, 0, 0, 0.35);
  text-align: left;
}
.settings label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-top: 8px;
}
.settings label::before {
  content: "";
  width: 6px;
  height: 14px;
  border-radius: 999px 999px 2px 2px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.settings label:first-child { margin-top: 0; }
.seg {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 247, 234, 0.08);
}
.seg button {
  --acc: var(--gold);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 8px 4px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(14px, 4.4vw, 17px);
  letter-spacing: 0.02em;
  transition: background 120ms ease-out, color 120ms ease-out, transform 60ms ease-out;
}
.seg button small { font-family: var(--body); font-size: 18px; line-height: 1; filter: grayscale(0.8) opacity(0.6); }
.seg button:active:not(:disabled) { transform: scale(0.96); box-shadow: none; }
.seg button.on {
  color: var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 55%, #fff), var(--acc) 45%, color-mix(in srgb, var(--acc) 75%, #000));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--acc) 45%, #000), 0 0 22px color-mix(in srgb, var(--acc) 55%, transparent);
  transform: translateY(-2px);
}
.seg button.on small { filter: none; }
.settingsNote { margin: 8px 2px 0; font-size: 14px; color: var(--muted); }
.songReveal { margin: 0; font-size: 16px; color: var(--muted); }
.songReveal b { color: var(--gold); }

button:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
button.big:disabled { filter: grayscale(0.7); box-shadow: none; }
button.ghost {
  background: transparent;
  border-color: rgba(255, 247, 234, 0.3);
  width: min(100%, 360px);
  box-shadow: none;
  font-weight: 600;
}
.view .big { width: min(100%, 360px); }
.row2 { display: flex; gap: 8px; width: min(100%, 360px); }
.row2 button { flex: 1; font-size: 15px; }
.techlink { color: var(--muted); font-size: 14px; padding: 8px; }

/* Seating: each name is a key in that player's colour. */
.picks { display: flex; flex-direction: column; gap: 12px; width: 100%; align-items: center; }
.picks button.pick {
  --c: var(--fg);
  width: min(100%, 360px);
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 20px;
  background: color-mix(in srgb, var(--c) 18%, var(--ink));
  border: 2px solid var(--c);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 45%, #000);
}
.picks button.pick:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 45%, #000); }
.picks button.pick i { width: 14px; height: 30px; border-radius: 999px 999px 3px 3px; background: var(--c); flex: none; }
.picked { font-family: var(--display); font-size: 28px; color: var(--green); margin: 0; }
.arrowHint { font-size: 48px; line-height: 1; margin: -6px 0 -4px; }

.warn { margin: 0; padding: 12px 14px; border-radius: 14px; background: #3d2600; border: 1px solid #a26b00; color: #ffe3a3; font-size: 15px; }

/* Soundcheck: your key number, huge and outlined. */
.bigSeat {
  font-family: var(--display);
  font-size: clamp(120px, 44vw, 200px);
  line-height: 0.9;
  color: var(--key);
  text-shadow: 0 0 40px color-mix(in srgb, var(--key) 60%, transparent);
}
.bigSeat small { display: block; font-size: 16px; letter-spacing: 0.25em; color: var(--muted); text-shadow: none; margin-bottom: 8px; }
.key.lit .bigSeat, .key.lit .bigSeat small { color: var(--ink); text-shadow: none; }

.roundLabel {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.16em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 7, 22, 0.5);
  color: var(--fg);
}
.count { font-family: var(--display); font-size: clamp(120px, 42vw, 180px); line-height: 1; min-height: 1em; }
/* While playing, the view is split in three around the ring, which sits in
   the middle of the screen. */
/* The playing screen is exactly one screen high, so the field gets the rest. */
.game[data-phase="playing"] { height: 100dvh; }
.game[data-phase="playing"] .view { flex: 1; min-height: 0; display: grid; grid-template-rows: auto auto 1fr auto; justify-items: center; gap: 12px; }
/* Above the field: who starts during the countdown, RAAK / FOUT after it. */
.fbSlot { height: 84px; justify-self: stretch; display: grid; place-items: center; }
.game[data-phase="playing"] .feedback { font-size: clamp(34px, 11vw, 64px); }
/* The play field (not drawn): the target circle stays inside it, clear of
   every label. The circle is at most 68% of it, so even the widest band fits. */
.field {
  justify-self: stretch;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 0;
  container-type: size;
}
.game[data-phase="playing"] .starter.me { font-size: clamp(30px, 9vw, 44px); }
.above, .below { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.above { justify-content: flex-end; }
.below { justify-content: flex-start; }
/* While playing, the count fills the target circle, so the labels sit
   above and below the ring instead of on it. */
.game[data-phase="playing"] .count { display: grid; place-items: center; width: min(62vmin, 300px); width: min(62vmin, 300px, 68cqh, 68cqw); aspect-ratio: 1; font-size: clamp(110px, 36vw, 170px); }
.hintPlay { margin-top: 8px; max-width: 320px; }

/* Mistake: the offender's phone turns red and pulses. */
.key.offender { animation: offender 0.8s ease-in-out infinite alternate; }
@keyframes offender {
  from { background: #3a0610; }
  to { background: #d41f3a; }
}
.who {
  font-family: var(--display);
  font-size: clamp(48px, 16vw, 84px);
  line-height: 1;
  color: var(--fg);
  overflow-wrap: anywhere;
  text-shadow: 4px 4px 0 var(--pink);
  transform: rotate(-3deg);
}
.key.offender .who { text-shadow: 4px 4px 0 #000; }

/* The challenge: a printed playing card, slightly crooked on the table. */
.card {
  position: relative;
  width: min(100%, 360px);
  padding: 22px 22px 24px;
  border-radius: 20px;
  background: linear-gradient(160deg, #fff7e3, #ffe6ad);
  color: var(--ink);
  border: 4px solid var(--gold);
  outline: 2px dashed rgba(122, 75, 0, 0.45);
  outline-offset: -12px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.45), 0 0 50px rgba(255, 201, 60, 0.3);
  transform: rotate(1.5deg);
  animation: deal 450ms cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes deal { from { transform: translateY(40px) rotate(-8deg) scale(0.9); opacity: 0; } }
.card::before, .card::after {
  content: "♪";
  position: absolute;
  font-family: var(--display);
  font-size: 22px;
  color: var(--pink);
}
.card::before { top: 14px; left: 18px; }
.card::after { bottom: 14px; right: 18px; transform: rotate(180deg); }
.cardLabel { font-family: var(--display); font-size: 13px; letter-spacing: 0.2em; color: #8a5600; }
.cardText { font-size: 23px; font-weight: 700; line-height: 1.3; margin-top: 8px; }
.cardOr {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
}

/* Results. */
.crown { margin: 0; font-size: 18px; color: var(--muted); }
.champ { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.champ .emoji { font-size: 56px; line-height: 1; animation: bob 1.6s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-6px) rotate(6deg); } }
.champ .cname { font-family: var(--display); font-size: clamp(34px, 11vw, 52px); line-height: 1; color: var(--gold); overflow-wrap: anywhere; }
.title {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--pink);
  color: #fff;
  transform: rotate(-2deg);
}
.scores { list-style: none; padding: 0; margin: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.scores li {
  --c: var(--fg);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(12, 7, 22, 0.7);
  border: 1px solid var(--line);
  border-left: 8px solid var(--c);
  text-align: left;
}
.scores li.winner { background: rgba(255, 201, 60, 0.16); border-color: var(--gold); border-left-color: var(--c); }
.rank { font-family: var(--display); font-size: 20px; width: 1.1em; color: var(--muted); }
.winner .rank { color: var(--gold); }
.rname { flex: 1; font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.rscore { color: var(--muted); font-size: 14px; text-align: right; white-space: nowrap; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }

/* Feedback: a sticker slapped on the screen. */
.feedback {
  position: absolute;
  top: 16%;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.feedback.show { animation: slap 260ms cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes slap { from { transform: scale(1.35) rotate(-14deg); } to { transform: scale(1) rotate(-6deg); } }
.feedback:not(:empty) > :first-child,
.feedback .stamp {
  display: inline-block;
  padding: 6px 22px 2px;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  background: var(--gold);
  border: 5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 8px 8px 0 var(--pink);
}
.feedback small { display: block; margin-top: 10px; font-family: var(--body); font-size: 18px; font-weight: 700; color: var(--fg); text-shadow: 0 2px 6px #000; }
.game .status { text-align: center; }

/* Approach ring: a target circle in the middle of the screen, and a ring
   that shrinks onto it right before this phone lights up. */
.rings { position: absolute; inset: 0; pointer-events: none; z-index: 0; container-type: size; }
.target, .approach, .band {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(62vmin, 300px);
  width: min(62vmin, 300px, 68cqh, 68cqw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.target {
  display: none;
  border: 4px solid color-mix(in srgb, var(--key) 65%, transparent);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--key) 40%, transparent) 0 2deg, transparent 2deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%);
  mask: radial-gradient(circle, transparent 62%, #000 63%);
}
.game[data-phase="playing"] .target { display: block; }
.key.lit .target { background: rgba(255, 255, 255, 0.5); border-color: #fff; -webkit-mask: none; mask: none; }
.approach { border: 2px solid #fff; box-shadow: 0 0 6px var(--key); opacity: 0; }
/* A soft glow without edges, so the (invisible) field never shows. */
.halo { position: absolute; inset: -30%; background: radial-gradient(closest-side, var(--key), transparent); opacity: 0; }

/* Twist warning: everything flashes white for a moment. */
.key.alert { background: #fff !important; }
.key.alert .feedback > :first-child { background: var(--pink); color: #fff; box-shadow: 8px 8px 0 var(--ink); }

.starter { font-family: var(--display); font-size: 22px; min-height: 1.3em; color: var(--muted); }
.starter.me {
  font-size: clamp(38px, 12vw, 60px);
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--pink);
  animation: starter 0.5s ease-in-out infinite alternate;
}
@keyframes starter { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.08) rotate(2deg); } }
.key.lit .starter.me { color: var(--ink); text-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .starter.me, .champ .emoji, .organ .slot.on, .card, .feedback.show { animation: none; }
  .key.offender { animation: none; background: #b0182f; }
}

/* ---- Round 2 feedback additions ------------------------------------------- */

/* "Tik als de ringen elkaar raken", always under the ring while playing. */
.tapRule {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.key.lit .tapRule { color: var(--ink); }
/* When the rings meet, the target says it out loud. */
.key.lit .target::after {
  content: "TIK!";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: clamp(56px, 20vw, 96px);
  color: var(--ink);
}
/* While playing, just three things: the band (when to tap), a thin circle
   (the perfect moment) and a thin ring coming in. */
.game[data-phase="playing"] .target { -webkit-mask: none; mask: none; background: none; border: 2px solid color-mix(in srgb, var(--key) 85%, #fff); }
.key.lit .target { background: rgba(255, 255, 255, 0.5); }

/* A good tap gets a green stamp instead of the gold one. */
.feedback[data-tone="good"] .stamp { background: var(--green); box-shadow: 8px 8px 0 var(--ink); }

/* Twist banner at the top of every phone. */
.twist {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 12px;
  right: 64px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--gold);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--pink);
  animation: slideDown 220ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.twist[data-now="1"] { background: var(--pink); color: #fff; box-shadow: 6px 6px 0 var(--ink); animation: shake 300ms ease-in-out 3; }
.tIcon { font-size: 28px; line-height: 1; }
.tText { flex: 1; display: flex; flex-direction: column; text-align: left; }
/* One line each, so the banner stays small and clear of the RAAK stamp below. */
.tText { min-width: 0; }
.tText b { font-family: var(--display); font-weight: 400; font-size: clamp(13px, 4.3vw, 20px); line-height: 1.15; white-space: nowrap; }
.tText small { font-size: 13px; font-weight: 600; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes slideDown { from { transform: translateY(-120%); } }
@keyframes shake { 50% { transform: translateX(6px) rotate(1deg); } }

/* Menu: a round button top-right, opening a sheet from the bottom. */
.menuBtn {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 46px;
  height: 46px;
  min-height: 0;
  padding: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--gold) 60%, transparent);
  background: rgba(12, 7, 22, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 0 #05030a, 0 0 14px rgba(255, 201, 60, 0.2);
}
.menuBtn i { display: block; width: 18px; height: 2.5px; border-radius: 2px; background: var(--gold); }
.menuBtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #05030a; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}
.sheetBox {
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.sheetBox button { width: 100%; }
.sheetBox button.danger { background: #3a0610; border-color: #d41f3a; color: #ffd2d9; }

/* Rules list on the "Snap je hem?" screen. */
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; }
.rules li { padding: 12px 14px; border-radius: 14px; background: rgba(12, 7, 22, 0.7); border: 1px solid var(--line); }
.rules b { color: var(--gold); }


/* Home: two clear ways in. */
.choices { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 380px); }
.choice {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 16px 16px;
  border-radius: 22px;
  background: rgba(26, 16, 41, 0.78);
  border: 2px solid var(--line);
  text-align: center;
}
.choice.host { border-color: color-mix(in srgb, var(--gold) 65%, transparent); box-shadow: 0 0 30px rgba(255, 201, 60, 0.12); }
.choice h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 19px; letter-spacing: 0.02em; color: var(--fg); }
.choice.host h2 { color: var(--gold); }
.choice p { margin: 0 0 6px; font-size: 15px; color: var(--muted); max-width: 300px; }
.choice .big { width: 100%; margin-top: 4px; }
.choiceIcon {
  position: absolute;
  top: -18px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--line);
  font-size: 18px;
}
.choice.host .choiceIcon { border-color: color-mix(in srgb, var(--gold) 65%, transparent); }
.or { display: flex; align-items: center; gap: 10px; width: 70%; margin: 6px 0; font-family: var(--display); font-size: 13px; letter-spacing: 0.2em; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* The name reminder is a sticker, slapped on slightly crooked. */
.nameHint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 0;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  transform: rotate(-2.5deg);
  box-shadow: 0 4px 0 #a3125a, 0 8px 22px rgba(255, 46, 136, 0.35);
  animation: wobble 2.8s ease-in-out infinite;
}
.nameHint[hidden] { display: none; }
.nameHint > span:first-child { font-size: 24px; }
.nameHint b { display: block; font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: 0.03em; }
@keyframes wobble { 50% { transform: rotate(1.5deg) scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .nameHint { animation: none; } }
.key.lit.counting .target::after { display: none; }
/* Home fits on one phone screen: a slightly smaller logo, and the join
   card as a compact row. */
#home .pipes { height: clamp(48px, 14vw, 76px); }
#home .wordmark { font-size: clamp(44px, 14vw, 84px); }
.choice.join { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; }
.choice.join .choiceIcon { position: static; flex: none; width: 46px; height: 46px; font-size: 22px; }
.choice.join h2 { font-size: 16px; }
.choice.join p { margin: 2px 0 0; font-size: 14px; }

/* Share the join link, right under the ticket. */
.shareRow { display: flex; gap: 8px; width: 100%; }
.share {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid transparent;
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 5px 0 #8a0f47;
}
.share:active { transform: translateY(4px); box-shadow: 0 1px 0 #8a0f47; }
.share.wa { background: #25d366; color: #062b14; box-shadow: 0 5px 0 #128c4a; }
.share.wa:active { box-shadow: 0 1px 0 #128c4a; }
.share span { font-size: 18px; }
.ticketSmall { word-break: normal; overflow-wrap: break-word; }
.shareRow .share { white-space: nowrap; font-size: 15px; padding: 12px 8px; }

/* Share buttons live inside the ticket, under the code. */
.ticket { flex-wrap: wrap; }
.ticket .shareRow { flex-basis: 100%; margin-top: 4px; }
.ticket .share { min-height: 46px; box-shadow: 0 4px 0 #8a0f47; }
.ticket .share.wa { box-shadow: 0 4px 0 #128c4a; }

/* Menu: darker backdrop, a close cross top-right. */
.sheet { background: rgba(4, 2, 10, 0.86); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheetBox { position: relative; padding-top: 22px; }
.sheetTitle { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: 0.08em; color: var(--gold); text-align: left; }
.sheetBox .sheetClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  background: var(--ink-3);
  box-shadow: none;
}
.ticket .qr { flex: none; }
.ticketInfo { flex: 1 1 0; min-width: 0; }

/* ---- Round 3 ------------------------------------------------------------------ */

/* Home: joining is the main way in, making a game the second. */
.codeInput {
  width: 100%;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-indent: 0.3em;
}
.codeInput::placeholder { letter-spacing: 0.3em; }
.choice.join .choiceText { flex: 1; min-width: 0; }
button.secondary {
  flex: none;
  min-height: 46px;
  padding: 10px 14px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  color: #fff;
  background: var(--pink);
  border-color: transparent;
  box-shadow: 0 4px 0 #8a0f47;
}
button.secondary:active:not(:disabled) { box-shadow: 0 1px 0 #8a0f47; }

/* The target circle and its ring move and shrink together. */
.ringBox { position: absolute; inset: 0; transition: transform 160ms ease-out; }

/* What's on the line in this round. */
.pot {
  min-height: 1.4em;
  font-size: 17px;
  color: var(--fg);
}
.pot b { font-family: var(--display); font-weight: 400; color: var(--gold); letter-spacing: 0.04em; }
.pot.bump { animation: bump 380ms ease-out; }
.key.lit .pot, .key.lit .pot b { color: var(--ink); }
@keyframes bump { 40% { transform: scale(1.25); } }

/* Mistake with drinking rules on: the drink first, the task as the way out. */
.drinkAmount { font-family: var(--display); font-size: clamp(44px, 14vw, 60px); line-height: 1; margin-top: 8px; color: var(--pink); text-shadow: 3px 3px 0 var(--ink); }
.drinkCard.atje .drinkAmount { font-size: clamp(56px, 18vw, 78px); animation: shake 300ms ease-in-out 3; }
.drinkEmoji { font-size: 28px; margin-top: 6px; letter-spacing: 4px; }
.cardAlt { margin-top: 8px; font-size: 16px; font-weight: 600; line-height: 1.35; color: #3a2410; }

/* The second note on the card stands upright like the first. */
.card::after { content: "♫"; transform: none; }
/* The "first lap is slow" hint only matters before the round starts. */
/* (Hidden rather than gone, so the field does not change size after it.) */
.hintPlay { visibility: hidden; }
.game.counting .hintPlay { visibility: visible; }

/* Results: "Nog een potje" with the settings folded away underneath. */
details.again { width: min(100%, 380px); }
details.again summary {
  list-style: none;
  cursor: pointer;
  padding: 10px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}
details.again summary::-webkit-details-marker { display: none; }
details.again summary::after { content: " ▾"; }
details.again[open] summary::after { content: " ▴"; }

/* Beer glass that fills up sip by sip; full only for an atje. */
.glass { width: 1.4em; height: 1.5em; vertical-align: -0.35em; color: var(--fg); }
.pot { display: flex; align-items: center; justify-content: center; gap: 6px; }
.key.lit .pot .glass { color: var(--ink); }
.drinkGlass { margin-top: 6px; }
.glass.big { width: 64px; height: 70px; color: var(--ink); }
.starter .way { display: block; margin-top: 4px; font-size: 16px; letter-spacing: 0.08em; color: var(--gold); }
/* Who is out, and why: big and clear on every phone. */
.who { font-size: clamp(40px, 13vw, 64px); }
.outWhy {
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  border: 2px solid var(--pink);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  max-width: 340px;
}
.inviteText { margin: 0 0 6px; text-align: left; color: var(--fg); }
.inviteText b { font-family: var(--display); font-weight: 400; color: var(--gold); letter-spacing: 0.1em; }

/* Full-screen gate when the sound is off: the tap that turns it back on
   lands here, never on the game. */
.soundGate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 100dvh;
  padding: 24px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(4, 2, 10, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--fg);
  text-align: center;
}
.soundGate:active:not(:disabled) { transform: none; box-shadow: none; }
.soundGate .gateIcon {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  font-size: 52px;
  background: var(--gold);
  box-shadow: 0 0 0 10px rgba(255, 201, 60, 0.2), 0 0 50px rgba(255, 201, 60, 0.5);
  animation: bump 1.4s ease-in-out infinite;
}
.soundGate b { font-family: var(--display); font-weight: 400; font-size: 22px; max-width: 300px; line-height: 1.2; }
.soundGate small { font-size: 15px; color: var(--muted); }

/* Lobby organ: the players' names stand in the pipes, read bottom to top.
   Each pipe is as long as its name (set as --ph), up to a maximum; longer
   names end in "…". The name is plain horizontal text turned a quarter,
   because Safari draws rotated vertical writing mirrored. */
.organ { height: auto; min-height: 92px; }
.organ .slot { height: 64px; max-width: 36px; }
.organ .slot.on { position: relative; height: var(--ph, 64px); }
.organ .slot b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--ph, 64px) - 26px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-90deg);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(12px, 3.6vw, 15px);
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.organ .slot.me { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--fg), 0 0 22px color-mix(in srgb, var(--c) 70%, transparent); }

/* "Start drinking", with "drinking" crossed out by a wonky pink line. */
.strike { position: relative; text-decoration: none; color: color-mix(in srgb, currentColor 55%, transparent); margin-left: 0.25em; }
.strike::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  background: var(--pink);
  transform: rotate(-7deg);
}

/* The last second of the countdown: GO! in gold, sized to fit the ring. */
.game[data-phase="playing"] .count.go { font-size: clamp(64px, 20vw, 96px); color: var(--gold); text-shadow: 0 0 30px rgba(255, 201, 60, 0.6); }

/* The tap window around the target's edge: tap while the ring is inside it. */
.band {
  position: absolute;
  left: 50%;
  top: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--key) 38%, transparent);
  opacity: 0;
  pointer-events: none;
}
.key.lit .band { background: rgba(255, 255, 255, 0.45); }

/* What the chosen difficulty means, under its buttons. */

/* The mistake screen for everybody who is not out: the same news (who, why,
   what they drink or do), so everyone can check it gets done, but calmer.
   Only the one who is out gets it in full. */
.safe { margin: 0; max-width: 320px; font-size: 15px; font-weight: 600; color: var(--muted); }
.key.watching .who { font-size: clamp(30px, 9vw, 40px); transform: none; text-shadow: 2px 2px 0 var(--pink); }
.key.watching .outWhy { font-size: 15px; padding: 6px 14px; border-color: rgba(255, 255, 255, 0.25); }
.key.watching .card { width: min(100%, 320px); padding: 14px 18px 16px; border-width: 2px; transform: none; animation: none; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); filter: saturate(0.75); }
.key.watching .card::before, .key.watching .card::after { display: none; }
.key.watching .drinkAmount, .key.watching .drinkCard.atje .drinkAmount { font-size: clamp(30px, 9vw, 40px); margin-top: 4px; animation: none; text-shadow: 2px 2px 0 var(--ink); }
.key.watching .drinkGlass { display: none; }
.key.watching .cardOr { margin-top: 8px; font-size: 13px; }
.key.watching .cardText { font-size: 18px; }
.key.watching .cardAlt { font-size: 15px; }
