/* ══════════════════════════════════════════════════════════
   HUSH — a surprise party in the dark
   Ink black, bone, pumpkin, candle gold, and a little birthday pink.
══════════════════════════════════════════════════════════ */

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

:root {
  --ink:        #0c0a0b;
  --ink-2:      #141112;
  --ink-3:      #1c1718;
  --line:       rgba(243, 236, 223, .10);
  --line-2:     rgba(243, 236, 223, .18);
  --bone:       #f3ecdf;
  --bone-2:     rgba(243, 236, 223, .68);
  --bone-3:     rgba(243, 236, 223, .44);
  --pumpkin:    #ff6b1a;
  --pumpkin-hi: #ff8a45;
  --flame:      #ffc65c;
  --hush:       #ff8fb8;
  --danger:     #ff8a8a;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:    'Geist', system-ui, -apple-system, sans-serif;
  --mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --spooky:  'Creepster', var(--display);

  --radius:   22px;
  --ease:     cubic-bezier(.22, .61, .36, 1);
  --spring:   cubic-bezier(.34, 1.56, .64, 1);
  --gutter:   max(16px, env(safe-area-inset-left));
}

html { background: var(--ink); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% 115%, rgba(255, 107, 26, .16), transparent 60%),
    radial-gradient(60% 40% at 0% 0%, rgba(255, 143, 184, .06), transparent 70%),
    var(--ink);
  background-attachment: fixed;
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.nowrap { white-space: nowrap; }
em { font-style: italic; }

:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 8px; }

/* Film grain keeps the dark from looking flat. */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); }
}

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; display: none; }

.kicker { color: var(--pumpkin-hi); }

/* ══════════════════════════════════════════════════════════
   VIEWS
══════════════════════════════════════════════════════════ */
.view { animation: view-in .8s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); } }

/* ── Sign in: haunted house, the doorway is the button ──── */
.auth {
  position: fixed; inset: 0; overflow: hidden; background: #0b0a0e;
  /* Equal top and bottom rows keep the door at the exact center of the screen. */
  display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); justify-items: center;
  --door: clamp(56px, min(11dvh, 20vw), 104px);
  --lx: 50%; --ly: 50%; --near: 0;
  touch-action: pinch-zoom;   /* finger drags steer the lantern; pinch-zoom still works */
}
.scene { position: absolute; inset: 0; overflow: hidden; }
/* The photo is shifted so its doorway (47.4%, 65.5%) lands on the screen's
   center, behind the door button, and scaled so it always fills the width
   and the top. Its bottom edge fades into the background. */
.scene-art {
  --door-x: 47.4%; --door-y: 65.5%;
  position: absolute; left: 50%; top: 50%;
  height: max(118dvh, calc(108vw * 941 / 1672)); aspect-ratio: 1672 / 941;
  transform: translate(calc(-1 * var(--door-x)), calc(-1 * var(--door-y)));
}
.house-photo {
  display: block; width: 100%; height: 100%;
  filter: saturate(.9) contrast(1.05) brightness(.9);
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
          mask-image: linear-gradient(to bottom, #000 82%, transparent);
  transform-origin: var(--door-x) var(--door-y);
  transition: transform 1.6s cubic-bezier(.2, .65, .2, 1), filter 1.2s ease;
}
.door-glow {
  position: absolute; left: var(--door-x); top: var(--door-y); width: clamp(160px, 28dvh, 300px); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 170, 80, .45) 0%, rgba(255, 107, 26, .14) 32%, transparent 68%);
  opacity: calc(.75 + var(--near) * .5);
  animation: door-breathe 3.4s ease-in-out infinite;
}
@keyframes door-breathe { 50% { transform: translate(-50%, -50%) scale(1.1); } }
.scene-fog {
  position: absolute; inset: 40% -30% -10%; pointer-events: none; opacity: .25;
  background: radial-gradient(ellipse at 30% 60%, rgba(209, 181, 191, .22), transparent 48%), radial-gradient(ellipse at 70% 72%, rgba(208, 125, 90, .2), transparent 42%);
  filter: blur(32px); animation: fog 19s ease-in-out infinite alternate;
}
@keyframes fog { to { transform: translateX(8%); } }
.scene-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 7, 10, .9) 0%, rgba(8, 7, 10, .35) 26%, transparent 42%, transparent 70%, rgba(8, 7, 10, .92) 100%),
    radial-gradient(120% 90% at 50% 60%, transparent 50%, rgba(0, 0, 0, .55) 100%);
}

.door-portal {
  grid-row: 2; position: relative; z-index: 3;
  width: var(--door); aspect-ratio: 1;
  transform: scale(calc(1 + var(--near) * .08));
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fffaf0, #f3ecdf 70%);
  box-shadow: 0 0 0 3px rgba(255, 198, 92, .55), 0 0 30px 6px rgba(255, 150, 60, .55), 0 10px 30px rgba(0, 0, 0, .5);
  pointer-events: auto; cursor: pointer;
  transition: transform .4s var(--spring), box-shadow .3s, opacity .3s;
}
.door-portal:not(.ready) { opacity: .6; cursor: progress; }
.door-portal .g-logo { width: 50%; height: 50%; }
.portal-ring {
  position: absolute; inset: -3px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255, 198, 92, .8);
  animation: portal-ring 2.2s ease-out infinite;
}
@keyframes portal-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.door-portal.ready:hover { transform: scale(1.1); box-shadow: 0 0 0 3px rgba(255, 198, 92, .9), 0 0 46px 12px rgba(255, 150, 60, .7), 0 10px 30px rgba(0, 0, 0, .5); }
.door-portal:focus-within { outline: 2px solid var(--flame); outline-offset: 6px; }
/* Google's real button, scaled to cover the circle, kept invisible. */
.gsi-overlay { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; opacity: .0001; z-index: 2; }
#google-signin-button { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* Lantern: a warm pool of light at the cursor/finger, darkness around it. */
.lantern {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at var(--lx) var(--ly), rgba(255, 184, 110, .20) 0, rgba(255, 140, 60, .07) min(14vmax, 160px), transparent min(28vmax, 340px)),
    radial-gradient(circle at var(--lx) var(--ly), transparent min(12vmax, 140px), rgba(4, 3, 6, .5) max(50vmax, 520px));
  mix-blend-mode: normal;
}
.scene-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Tapping the door: push into the house while Google's window opens. */
.auth.opening .house-photo { transform: scale(2.4); filter: saturate(1.05) contrast(1.08) brightness(1.1); }
.auth.opening .door-portal { transform: scale(1.25); }

.scene-copy, .scene-foot {
  position: relative; z-index: 4; width: 100%; text-align: center; min-height: 0;
  padding: 0 var(--gutter); pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}
/* Copy sits in the middle of its half, never touching the door or the edges. */
.scene-copy { grid-row: 1; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: calc(var(--door) * .35); animation: view-in .9s var(--ease) both; }
.scene-foot { grid-row: 3; gap: 6px; pointer-events: auto; padding-top: calc(var(--door) * .35); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.auth-title {
  margin-top: min(10px, 1.2dvh);
  font-family: var(--spooky); font-weight: 400;
  font-size: clamp(28px, min(12.5vw, 8.5dvh), 80px); line-height: .95; letter-spacing: .01em;
}
.auth-title em { display: block; color: var(--pumpkin); font-style: normal; }
.scene-date { margin-top: min(30px, 3.6dvh); color: var(--bone-2); }
.door-prompt { font-family: var(--display); font-variation-settings: "opsz" 36, "SOFT" 100; font-style: italic; font-size: clamp(17px, min(5.4vw, 3.6dvh), 26px); color: var(--bone); max-width: 26ch; }
.door-prompt .arrow { display: inline-block; color: var(--flame); font-style: normal; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.auth-hint { color: var(--bone-3); font-size: 13px; max-width: 34ch; }
.auth-hint:empty { display: none; }
.error-msg { color: #ffb08a; font-size: 14px; max-width: 34ch; }
.error-msg:empty { display: none; }
.signin-alert {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px var(--gutter);
  background: rgba(6, 5, 7, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: alert-fade .25s var(--ease) both;
}
.signin-alert[hidden] { display: none; }
.signin-alert-card {
  width: 100%; max-width: 340px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 22px 22px; border-radius: 24px;
  background: var(--ink-2); border: 1px solid rgba(255, 107, 26, .45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(255, 107, 26, .15);
  animation: alert-pop .45s var(--spring) both;
}
.signin-alert-icon { font-size: 40px; line-height: 1; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.signin-alert-title {
  font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 100;
  font-weight: 700; font-size: 24px; line-height: 1.15; letter-spacing: -.01em;
}
.signin-alert-body { color: var(--bone-2); font-size: 15px; line-height: 1.45; margin-bottom: 6px; }
.signin-alert-card .btn { width: 100%; }
@keyframes alert-fade { from { opacity: 0; } }
@keyframes alert-pop { from { opacity: 0; transform: translateY(12px) scale(.92); } }

.inapp { display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: auto; }
.inapp[hidden] { display: none; }
/* Short screens (phones in landscape): drop the extras so nothing collides. */
@media (max-height: 460px) {
  .scene-date, .auth-hint { display: none; }
  .scene-copy .kicker { font-size: 10px; }
}

/* ══════════════════════════════════════════════════════════
   INVITE
══════════════════════════════════════════════════════════ */
/* Full-screen backdrop: the house photo, blurred and darkened, so wide
   screens get atmosphere around the phone-width column. */
.invite-backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* The blurred photo overhangs the screen to hide soft blur edges; the
   frame above clips it so Firefox doesn't count it as scrollable width. */
.invite-backdrop::before {
  content: ''; position: absolute; inset: -40px;
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(255, 107, 26, .12), transparent 70%),
    linear-gradient(180deg, rgba(12, 10, 11, .35), rgba(12, 10, 11, .5) 45%, rgba(12, 10, 11, .88) 100%),
    url("/assets/haunted-house-night.webp") 47% 62% / cover no-repeat;
  filter: blur(3px) saturate(.95);
}
.invite { position: relative; isolation: isolate; min-height: 100dvh; }
.invite-wrap {
  width: 100%; max-width: 480px; margin: 0 auto;
  padding: max(36px, env(safe-area-inset-top)) var(--gutter) 48px;
  display: flex; flex-direction: column; gap: 16px;
}
.invite-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding-bottom: 6px; }
.invite-title {
  font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-weight: 800; font-size: clamp(44px, 13vw, 60px); line-height: 1; letter-spacing: -.03em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .6);
}
.invite-title em { color: var(--pumpkin); font-weight: 500; }

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(243, 236, 223, .045), rgba(243, 236, 223, .015)), rgba(20, 17, 18, .82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.panel-title {
  margin-top: 8px;
  font-family: var(--display); font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 0;
  font-weight: 600; font-size: clamp(26px, 7vw, 32px); line-height: 1.05; letter-spacing: -.02em;
}
.panel-note { margin-top: 6px; color: var(--bone-3); font-size: 14px; }

/* Host note (header) and joke (after RSVP) */
.guest-note {
  font-family: var(--display); font-style: italic; font-variation-settings: "opsz" 36, "SOFT" 100;
  font-size: 20px; line-height: 1.35; color: var(--bone);
}
.guest-note::before { content: '“'; color: var(--pumpkin); }
.guest-note::after { content: '”'; color: var(--pumpkin); }
.joke-label { color: var(--hush); }
.guest-joke {
  margin-top: 8px;
  font-family: var(--display); font-variation-settings: "opsz" 36, "SOFT" 100;
  font-size: 22px; line-height: 1.3; color: var(--bone); min-height: 2.6em;
}
.joke-punch { display: inline-block; color: var(--pumpkin-hi); font-weight: 600; }
.done-after { margin-top: 18px; }
/* A label, not a button: shows the saved answer next to "Change my answer". */
.my-answer { font-weight: 600; font-size: 16px; padding-right: 6px; }
.my-answer:empty { display: none; }

/* Joke reveal after an RSVP: each piece waits hidden until its class arrives. */
.rsvp-pane.playing .joke-label,
.rsvp-pane.playing .joke-punch,
.rsvp-pane.playing .done-after { opacity: 0; }
.rsvp-pane.label-in .joke-label { animation: fade-up .45s var(--ease) forwards; }
.rsvp-pane.punch-in .joke-punch { animation: punch-pop .55s var(--spring) forwards; }
.rsvp-pane.after-in .done-after { animation: fade-up .5s var(--ease) forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes punch-pop { from { opacity: 0; transform: scale(.6) rotate(-4deg); } 60% { opacity: 1; transform: scale(1.12) rotate(1deg); } to { opacity: 1; transform: none; } }
.ideas-title { font-size: clamp(21px, 5.6vw, 24px); line-height: 1.2; }

/* Ticket */
.ticket {
  --notch: 13px; --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%;
  position: relative; display: grid; grid-template-columns: 1fr 44px;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--spring);
  will-change: transform;
  background: var(--bone); color: var(--ink);
  border-radius: var(--radius);
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - 44px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - 44px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle var(--notch) at calc(100% - 44px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - 44px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
/* Light sheen that follows the cursor across the ticket. */
.ticket::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .55), rgba(255, 220, 170, .12) 30%, transparent 60%);
  mix-blend-mode: soft-light; opacity: 0; transition: opacity .4s;
}
.ticket.tilting { transition: transform .12s linear; }
.ticket.tilting::after { opacity: 1; }
.ticket.pressed { transition: transform .25s var(--spring); }
.ticket-main { padding: 6px 18px; }
.ticket-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; row-gap: 6px;
  padding: 16px 0;
}
.ticket-row + .ticket-row { border-top: 1px dashed rgba(12, 10, 11, .18); }
.t-label { grid-column: 1 / -1; color: rgba(12, 10, 11, .5); }
.t-val {
  font-family: var(--display); font-variation-settings: "opsz" 36, "SOFT" 50;
  font-weight: 600; font-size: 19px; line-height: 1.2; letter-spacing: -.01em;
}
.t-sub { font-size: 13.5px; color: rgba(12, 10, 11, .62); margin-top: 3px; }
.t-action {
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 8px 12px; border-radius: 999px; border: 1.5px solid rgba(12, 10, 11, .85);
  background: transparent; cursor: pointer; white-space: nowrap; min-height: 40px;
  display: inline-flex; align-items: center;
  transition: background .2s, color .2s, transform .2s var(--spring);
}
.t-action:hover { background: var(--ink); color: var(--bone); }
.t-action:active { transform: scale(.95); }
.ticket-stub {
  border-left: 2px dashed rgba(12, 10, 11, .22);
  display: grid; place-items: center; overflow: hidden;
  background: var(--pumpkin);
}
.stub-text { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--ink); font-weight: 500; white-space: nowrap; font-size: 10.5px; }

/* RSVP */
.rsvp { padding-bottom: 20px; }
.choices { margin-top: 18px; display: grid; gap: 10px; }
.choice {
  position: relative; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px;
  align-items: center; text-align: left;
  padding: 14px 16px; border-radius: 18px;
  background: var(--ink-3); border: 1.5px solid var(--line);
  color: var(--bone); font: inherit; cursor: pointer;
  transition: border-color .2s, background .2s, transform .3s var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.choice:hover { border-color: var(--line-2); background: #221c1d; }
.choice:active { transform: scale(.98); }
.choice-emoji { font-size: 26px; line-height: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(243, 236, 223, .06); transition: transform .35s var(--spring); }
.choice:hover .choice-emoji { transform: rotate(-8deg) scale(1.1); }
.choice-label { font-weight: 600; font-size: 17px; }
.choice[data-attending="yes"]:hover, .choice[data-sleeping="yes"]:hover { border-color: rgba(255, 107, 26, .6); }
.choice[aria-pressed="true"] { border-color: var(--pumpkin); background: rgba(255, 107, 26, .10); }
.choice[aria-pressed="true"]::after {
  content: 'current'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--pumpkin-hi);
}

.rsvp-pane { animation: pane-in .45s var(--ease) both; }
@keyframes pane-in { from { opacity: 0; transform: translateX(16px); } }

.text-btn {
  margin-top: 14px; background: none; border: 0; color: var(--bone-2); font: inherit; font-size: 14px;
  cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2);
}
.text-btn:hover { color: var(--bone); }

.save-status { margin-top: 14px; color: var(--bone-3); min-height: 1em; }
.save-status.error { color: var(--danger); }
.save-status.ok::before { content: '✓ '; color: var(--pumpkin); }
.done-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  background: transparent; color: var(--bone); border: 1.5px solid var(--line-2);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .3s var(--spring);
}
.btn:hover { border-color: var(--bone-3); background: rgba(243, 236, 223, .04); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-solid { background: var(--pumpkin); border-color: var(--pumpkin); color: var(--ink); }
.btn-solid:hover { background: var(--pumpkin-hi); border-color: var(--pumpkin-hi); }

/* Updates */
.updates-list { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.updates-list li {
  padding: 14px 16px; border-radius: 16px; background: var(--ink-3); border: 1px solid var(--line);
  font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.updates-list li.direct { border-color: rgba(255, 143, 184, .35); }
.update-meta { display: block; margin-bottom: 4px; color: var(--bone-3); font-size: 10px; }
.updates-list li.direct .update-meta { color: var(--hush); }

/* Creature wall */
.creature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.creature-tag, .creature-more { padding: 7px 12px; border-radius: 999px; background: var(--ink-3); border: 1px solid var(--line); font-size: 14px; }
.creature-more { color: var(--bone-3); }

/* Ideas */
.idea-input {
  display: block; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--ink); border: 1.5px solid var(--line); color: var(--bone);
  font: inherit; font-size: 16px; resize: vertical; min-height: 92px;
  transition: border-color .2s;
}
.idea-input::placeholder { color: var(--bone-3); }
.idea-input:focus { outline: none; border-color: var(--pumpkin); }
.idea-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.idea-foot .btn { flex-shrink: 0; white-space: nowrap; }
.idea-feedback { color: var(--bone-2); text-transform: none; letter-spacing: .02em; font-size: 12px; }
.idea-feedback.error { color: var(--danger); }

/* Footer */
.invite-foot { display: flex; justify-content: center; padding-top: 8px; }

/* ── Game: tarot card ─────────────────────────────────── */
.game { border-color: rgba(255, 143, 184, .3); }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--hush); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hush); box-shadow: 0 0 0 0 rgba(255, 143, 184, .6); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(255, 143, 184, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 143, 184, 0); } }

.tarot {
  display: block; width: 100%; max-width: 340px; margin: 16px auto 0;
  background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer;
  perspective: 1200px; -webkit-tap-highlight-color: transparent;
}
.tarot-inner {
  display: grid; transform-style: preserve-3d;
  transition: transform .9s var(--spring);
}
.tarot[aria-pressed="true"] .tarot-inner { transform: rotateY(180deg); }
.tarot-face {
  grid-area: 1 / 1; min-height: 360px; border-radius: 20px; padding: 26px 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.tarot-back {
  color: var(--flame);
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 198, 92, .14), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 198, 92, .05) 0 2px, transparent 2px 14px),
    #17110f;
  border: 1.5px solid rgba(255, 198, 92, .45);
  box-shadow: inset 0 0 0 6px #17110f, inset 0 0 0 7px rgba(255, 198, 92, .25), 0 20px 50px rgba(0, 0, 0, .5);
}
.tarot:hover .tarot-back { box-shadow: inset 0 0 0 6px #17110f, inset 0 0 0 7px rgba(255, 198, 92, .4), 0 20px 60px rgba(255, 140, 40, .18); }
.tarot-sigil { width: 120px; animation: sigil 14s linear infinite; }
@keyframes sigil { to { transform: rotate(360deg); } }
.tarot-back-label { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--bone); }
.tarot-back-sub { color: rgba(255, 198, 92, .6); font-size: 10px; }
.tarot-front {
  transform: rotateY(180deg);
  background: var(--bone); color: var(--ink);
  box-shadow: inset 0 0 0 6px var(--bone), inset 0 0 0 7px rgba(12, 10, 11, .2), 0 20px 50px rgba(0, 0, 0, .5);
}
.tarot-front .g-kicker { color: rgba(12, 10, 11, .55); }
.tarot-front .g-pre { font-size: 14px; color: rgba(12, 10, 11, .6); }
.tarot-front .g-reveal {
  font-family: var(--display); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-weight: 800; font-size: clamp(32px, 9vw, 42px); line-height: .95; letter-spacing: -.03em;
}
.tarot-front .g-reveal.long { font-size: clamp(20px, 5.6vw, 24px); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.tarot-front .g-detail { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; background: rgba(12, 10, 11, .06); width: 100%; }
.tarot-front .g-detail .mono { color: rgba(12, 10, 11, .5); font-size: 10px; }
.tarot-front .g-foot { font-size: 13px; color: rgba(12, 10, 11, .6); }
.tarot-front.role-imposter { background: #1a0a0d; color: var(--bone); box-shadow: inset 0 0 0 6px #1a0a0d, inset 0 0 0 7px rgba(255, 90, 90, .45), 0 20px 60px rgba(255, 60, 60, .25); }
.tarot-front.role-imposter .g-reveal { color: #ff6b6b; }
.tarot-front.role-imposter .g-kicker, .tarot-front.role-imposter .g-pre, .tarot-front.role-imposter .g-foot { color: rgba(243, 236, 223, .6); }
.tarot-front.role-imposter .g-detail { background: rgba(255, 255, 255, .06); }
.tarot-front.role-imposter .g-detail .mono { color: rgba(243, 236, 223, .5); }
.tarot-front.role-out .g-reveal { text-decoration: line-through; opacity: .5; }

@media (min-width: 600px) {
  .invite-wrap { padding-top: 64px; padding-bottom: 72px; }
  .panel { padding: 26px; }
}

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