/* ---------- base ---------- */
:root {
  --block: 36px;
  --ink: #2b1d0e;
  --parch: #f4e4c1;
  --parch-dark: #e2c995;
  --wood: #8a5322;
  --green: #4caf50;
  --green-dark: #1e4a14;
  --red: #e8413a;
  --gold: #ffd84a;
  --diamond: #5ef2ff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body { margin: 0; min-height: 100%; }

body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: var(--ink);
  background: #4aa8ff;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; touch-action: manipulation; }

[hidden] { display: none !important; }

.px { image-rendering: crisp-edges; image-rendering: pixelated; }

canvas.px { display: block; }

/* ---------- sky ---------- */
#sky {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(#3f9dff 0%, #7cc4ff 45%, #c4ebff 100%);
}

body.night #sky { background: linear-gradient(#060f27 0%, #142450 55%, #2b4580 100%); }

.sky-body { position: absolute; top: calc(4% + var(--safe-top)); right: 9%; animation: glow 4s ease-in-out infinite; }

@keyframes glow {
  50% { transform: scale(1.06); filter: brightness(1.08); }
}

.cloud { position: absolute; left: 0; opacity: .95; animation: drift 90s linear infinite; will-change: transform; }

body.night .cloud { opacity: .18; }

@keyframes drift {
  from { transform: translateX(-35vw); }
  to { transform: translateX(110vw); }
}

.star { position: absolute; width: 2px; height: 2px; background: #fff; animation: twinkle 2.6s steps(2) infinite; }
.star.big { width: 3px; height: 3px; }

@keyframes twinkle {
  50% { opacity: .25; }
}

/* ---------- shared bits ---------- */
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 26px;
  border: 3px solid var(--green-dark);
  background: var(--green);
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  text-shadow: 2px 2px 0 var(--green-dark);
  box-shadow: inset -4px -4px 0 #2e7d32, inset 4px 4px 0 #8fdc7f, 0 5px 0 var(--green-dark);
  cursor: pointer;
  transition: transform .08s;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active { transform: translateY(4px); box-shadow: inset -4px -4px 0 #2e7d32, inset 4px 4px 0 #8fdc7f, 0 1px 0 var(--green-dark); }

.btn:focus-visible, .link-btn:focus-visible, .sound-btn:focus-visible, .cell:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.btn.gold {
  border-color: #6b4a00;
  background: #ffc93c;
  color: #3b2400;
  text-shadow: 1px 1px 0 #fff3b0;
  box-shadow: inset -4px -4px 0 #d99a14, inset 4px 4px 0 #fff3b0, 0 5px 0 #6b4a00;
}

.btn.gold:active { box-shadow: inset -4px -4px 0 #d99a14, inset 4px 4px 0 #fff3b0, 0 1px 0 #6b4a00; }

.btn.small { min-height: 42px; padding: 6px 14px; font-size: 1rem; }

.btn[disabled] { filter: grayscale(.6) brightness(.9); cursor: wait; }

.link-btn {
  border: 0;
  background: rgba(20, 10, 0, .55);
  color: #fff;
  padding: 8px 16px;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 2px;
  cursor: pointer;
}

.sound-btn {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 10px;
  z-index: 47; /* above the level-up overlay (45), so the loudest part can be muted */
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .6);
  background: rgba(10, 20, 40, .45);
  cursor: pointer;
  padding: 0;
}

#fx { position: fixed; top: 0; left: 0; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

#wipe { position: fixed; top: 0; left: 0; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; }
#wipe.on { pointer-events: auto; }

.flyer { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; }

.shake { animation: shake .32s steps(8); }

@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-6px, 3px); }
  40% { transform: translate(5px, -4px); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(3px, 4px); }
}

/* achievement toasts */
#toasts { position: fixed; top: calc(8px + var(--safe-top)); left: 0; right: 0; z-index: 60; display: grid; justify-items: center; pointer-events: none; }

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 18px;
  background: rgba(24, 18, 12, .92);
  border: 3px solid #ffc93c;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  color: #fff;
  transform: translateY(-130%);
  transition: transform .3s cubic-bezier(.3, 1.4, .6, 1);
}

.toast.in { transform: translateY(0); }

.toast-text { display: grid; line-height: 1.5; }
.toast-text small { color: #ffd84a; font-weight: 700; font-size: .78rem; }
.toast-text b { font-weight: 900; }

.plain { max-width: 480px; margin: 24px auto; padding: 20px; background: var(--parch); border: 4px solid var(--ink); line-height: 2; }

/* plain details: hidden while the game loads, shown by themselves after 6 s if it never does */
.fallback {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 30;
  margin: 0 auto;
  visibility: hidden;
  animation: fallbackReveal 0s linear 6s forwards;
}

.fallback.show { visibility: visible; animation: none; }

@keyframes fallbackReveal {
  to { visibility: visible; }
}

/* ---------- title screen ---------- */
.title-sky {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: calc(18px + var(--safe-top)) 16px 0;
}

.bunting { display: flex; gap: 6px; margin-bottom: 6px; }
.bunting i {
  width: 16px;
  height: 18px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: var(--c);
  transform-origin: top center;
  animation: swing 2.4s ease-in-out infinite;
  animation-delay: var(--d);
}

@keyframes swing {
  50% { transform: rotate(9deg); }
}

.ribbon {
  position: relative;
  padding: 6px 22px 7px;
  background: var(--red);
  border-top: 3px solid #ff7a72;
  border-bottom: 3px solid #8f1d17;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%, 12px 50%);
}

.pop-in { animation: popIn .5s cubic-bezier(.3, 1.6, .6, 1) both; animation-delay: var(--d, 0s); }

@keyframes popIn {
  from { opacity: 0; transform: translateY(-24px) scale(.8); }
}

.stage { position: relative; width: calc(var(--block) * 7); height: calc(var(--block) * 4); margin-top: 10px; }

.gblock {
  position: absolute;
  width: var(--block);
  height: var(--block);
  background: var(--tex-gold) 0 0 / 100% 100%;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px rgba(120, 70, 0, .25);
  animation: drop .6s cubic-bezier(.3, 1.5, .6, 1) both;
  animation-delay: var(--d);
}

@keyframes drop {
  from { transform: translateY(-110vh); }
}

.hero { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); animation: hop .6s cubic-bezier(.3, 1.6, .6, 1) both; animation-delay: var(--d, 1.3s); }
.hero canvas { animation: bob 1.4s steps(2) infinite; }

@keyframes hop {
  from { opacity: 0; transform: translate(-50%, 40px) scale(.6); }
}

@keyframes bob {
  50% { transform: translateY(-3px); }
}

.title-ground {
  position: relative;
  height: var(--block);
  background: var(--tex-G) 0 0 / var(--block) var(--block) repeat-x;
  image-rendering: pixelated;
  box-shadow: 0 -2px 0 rgba(0, 0, 0, .12);
}

.title-ground .deco { position: absolute; bottom: 100%; }

.title-dirt {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 30vh;
  padding: 22px 16px calc(22px + var(--safe-bottom));
  background: var(--tex-D) 0 0 / var(--block) var(--block);
  image-rendering: pixelated;
}

.title-dirt .btn { min-width: 230px; }

.title-dirt { position: relative; overflow: hidden; }
.title-dirt > :not(.ore) { position: relative; z-index: 1; }
.ore { position: absolute; width: var(--block); height: var(--block); image-rendering: pixelated; background: 0 0 / 100% 100%; display: none; }
.ore-d { background-image: var(--tex-d); }
.ore-A { background-image: var(--tex-A); }
.ore-C { background-image: var(--tex-C); }
@media (min-height: 760px) { .ore { display: block; } }

#start { position: relative; animation: popIn .5s cubic-bezier(.3, 1.6, .6, 1) .9s both; }

/* the call to tap pulses around the button, the button itself stays put */
#start::after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 3px solid #fff;
  opacity: 0;
  pointer-events: none;
  animation: ring 1.6s ease-out 1.8s infinite;
}

@keyframes ring {
  0% { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.16, 1.3); }
}

.title-date {
  margin: 2px 0 0;
  padding: 4px 12px;
  background: rgba(20, 10, 0, .55);
  color: #ffe9a8;
  font-weight: 700;
  font-size: .95rem;
}

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

/* ---------- mine ---------- */
#mine { --cell: 56px; }

.hud { width: 100%; max-width: 480px; margin: 0 auto; padding: calc(10px + var(--safe-top)) 12px 10px; display: grid; gap: 8px; }

.guide { display: flex; align-items: flex-start; gap: 10px; padding-left: 52px; }

.guide-face { flex: none; padding: 3px; background: #fff7e0; border: 3px solid var(--ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }

.bubble {
  position: relative;
  flex: 1;
  margin: 0;
  min-height: 3.9em;
  padding: 7px 12px;
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.75;
}

.bubble::before { content: ''; position: absolute; right: -16px; top: 12px; border: 7px solid transparent; border-left-color: var(--ink); }

.bubble.say { animation: say .25s ease-out; }

@keyframes say {
  from { transform: scale(.95); }
}

.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.sockets { display: flex; direction: ltr; gap: 3px; padding: 5px 7px; background: rgba(15, 10, 5, .62); border: 2px solid rgba(255, 255, 255, .35); }

.socket { position: relative; width: 24px; height: 18px; }
.socket canvas { position: absolute; top: 0; left: 0; inset: 0; }
.socket canvas + canvas { opacity: 0; transform: scale(.3); transition: opacity .25s, transform .3s cubic-bezier(.3, 1.6, .6, 1); }
.socket.filled canvas + canvas { opacity: 1; transform: none; }

.skip-btn { font-size: .85rem; padding: 6px 10px; }

.xp { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 900; text-shadow: 2px 2px 0 rgba(0, 0, 0, .55); }

.xp-bar { position: relative; flex: 1; height: 14px; background: #1d1d1d; border: 2px solid #000; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .1); }
.xp-bar::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(0, 0, 0, .45) calc(10% - 2px) 10%); }
.xp-fill { position: absolute; top: 0; bottom: 0; right: 0; width: 0; background: linear-gradient(#c6ff7a, #45b833); transition: width .45s ease-out; }

.mine-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  --x: calc(50% + var(--cell) / 2);
  background:
    linear-gradient(rgba(0, 0, 0, 0) calc(var(--cell) * .95), rgba(0, 0, 0, .45) calc(var(--cell) * 1.5), rgba(0, 0, 0, .66) calc(var(--cell) * 2.5), rgba(0, 0, 0, .8) calc(var(--cell) * 3.5)),
    var(--tex-G) var(--x) 0 / var(--cell) var(--cell) repeat-x,
    var(--tex-D) var(--x) calc(var(--cell) * 1) / var(--cell) var(--cell) repeat-x,
    var(--tex-D) var(--x) calc(var(--cell) * 2) / var(--cell) var(--cell) repeat-x,
    var(--tex-S) var(--x) calc(var(--cell) * 3) / var(--cell) var(--cell) repeat-x,
    var(--tex-S) var(--x) calc(var(--cell) * 4) / var(--cell) var(--cell) repeat-x,
    var(--tex-S) var(--x) calc(var(--cell) * 5) / var(--cell) var(--cell) repeat-x,
    var(--tex-S) var(--x) calc(var(--cell) * 6) / var(--cell) var(--cell) repeat-x,
    var(--tex-H) var(--x) calc(var(--cell) * 7) / var(--cell) var(--cell) repeat;
  image-rendering: pixelated;
}

.mine-grid {
  position: relative;
  display: grid;
  direction: ltr;
  grid-template-columns: repeat(6, var(--cell));
  grid-auto-rows: var(--cell);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 0 26px rgba(0, 0, 0, .4);
}

.cell {
  position: relative;
  width: var(--cell);
  height: var(--cell);
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--tex) 0 0 / 100% 100%;
  image-rendering: pixelated;
  cursor: pointer;
}

.cell::before, .cell::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; pointer-events: none; z-index: 1; }
.cell::before { background: var(--tex-crack1) 0 0 / 100% 100%; image-rendering: pixelated; opacity: 0; }
.cell::after { background: #000; opacity: var(--dark, 0); transition: opacity .4s; }
.cell.cracked::before { opacity: 1; }
.cell.mineable { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); }
.cell.broken { background-image: var(--tex-S); cursor: default; box-shadow: inset 0 6px 8px rgba(0, 0, 0, .5); }
.cell.broken::before { opacity: 0; }
.cell.broken::after { opacity: .72; transition: opacity .15s; }
.cell.bump { animation: bump .14s ease-out; }
.cell.lit { animation: fuse .2s steps(2) infinite; }
.cell.glow { z-index: 2; animation: chestGlow 1s ease-in-out infinite; }
.cell.opened { z-index: 2; box-shadow: 0 0 30px 12px rgba(255, 228, 120, .9); }

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

@keyframes fuse {
  50% { filter: brightness(2.4) saturate(.2); }
}

@keyframes chestGlow {
  50% { box-shadow: 0 0 0 3px #ffd84a, 0 0 24px 8px rgba(255, 216, 74, .9); }
}

.twinkle { position: absolute; z-index: 2; width: 10px; height: 10px; pointer-events: none; animation: twinkleIn 1s ease-in-out forwards; }

@keyframes twinkleIn {
  0% { opacity: 0; transform: scale(.2) rotate(0); }
  40% { opacity: 1; transform: scale(1.3) rotate(45deg); }
  100% { opacity: 0; transform: scale(.4) rotate(90deg); }
}

.pick { position: absolute; z-index: 5; width: calc(var(--cell) * .9); height: calc(var(--cell) * .9); pointer-events: none; opacity: 0; transform-origin: 50% 100%; }
.pick.swing { animation: pickSwing .18s ease-out; }

@keyframes pickSwing {
  0% { opacity: 1; transform: rotate(40deg); }
  65% { opacity: 1; transform: rotate(-58deg); }
  100% { opacity: 0; transform: rotate(-50deg); }
}

.mine-floor {
  position: relative;
  flex: 1 0 calc(var(--cell) * .6);
  background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .85)), var(--tex-H) calc(50% + var(--cell) / 2) 0 / var(--cell) var(--cell);
  image-rendering: pixelated;
}

.blast-flash {
  position: fixed;
  z-index: 55;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: radial-gradient(#fff, #ffd84a 40%, rgba(255, 138, 42, 0) 70%);
  pointer-events: none;
  animation: blastFlash .45s ease-out forwards;
}

@keyframes blastFlash {
  to { transform: scale(14); opacity: 0; }
}

/* ---------- level up ---------- */
#levelup {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  overflow: hidden auto;
  background: radial-gradient(circle at 50% 40%, rgba(45, 28, 6, .8), rgba(5, 3, 0, .95));
  opacity: 0;
  transition: opacity .3s;
}

#levelup.show { opacity: 1; }

.lu-rays {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  position: fixed; /* fixed, so the huge spinning square never adds to the overlay's scroll height */
  background: repeating-conic-gradient(rgba(255, 216, 74, .17) 0 9deg, transparent 9deg 18deg);
  animation: spin 22s linear infinite;
  pointer-events: none;
}

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

.lu-body { position: relative; display: grid; justify-items: center; gap: 12px; max-width: 420px; text-align: center; color: #fff; }
.lu-title { animation: popIn .6s cubic-bezier(.3, 1.6, .6, 1) .1s both; }

.lu-badge {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  background: var(--tex-gold) 0 0 / 100% 100%;
  image-rendering: pixelated;
  box-shadow: 0 0 0 4px #3b2400, 0 0 44px rgba(255, 216, 74, .75);
  perspective: 300px;
  animation: popIn .6s cubic-bezier(.3, 1.6, .6, 1) .3s both;
}

.lu-badge canvas { grid-area: 1 / 1; transition: transform .45s, opacity .45s; backface-visibility: hidden; }
.lu-badge .lu-new { transform: rotateX(90deg); opacity: 0; }
.lu-badge.flipped .lu-old { transform: rotateX(-90deg); opacity: 0; }
.lu-badge.flipped .lu-new { transform: none; opacity: 1; }

.lu-line { margin: 0; font-weight: 900; font-size: 1.35rem; text-shadow: 2px 2px 0 #000; }
.lu-xp { width: min(320px, 80vw); }
.lu-xp .xp-fill { transition: width .9s ease-out; box-shadow: 0 0 12px #b8ff6a; }

.lu-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lu-stats li { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .28); font-weight: 700; }

.lu-hero canvas { animation: jump .55s ease-in-out infinite alternate; }

@keyframes jump {
  to { transform: translateY(-14px); }
}

/* ---------- the card ---------- */
#card { align-items: center; gap: 22px; padding: calc(78px + var(--safe-top)) 14px calc(28px + var(--safe-bottom)); }

.quest, .rsvp {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 26px 16px 20px;
  background: var(--parch);
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 4px #fff6df, inset 0 0 0 7px var(--parch-dark), 0 6px 0 rgba(0, 0, 0, .3);
}

.quest-ribbon { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); }
.quest-hero { position: absolute; top: -66px; right: 6px; animation: bob 1.4s steps(2) infinite; }

.quest-title { margin: 12px 0 2px; text-align: center; font-weight: 900; font-size: 1.5rem; line-height: 1.6; color: #b52a20; text-shadow: 2px 2px 0 #ffd84a; }
.quest-lead { margin: 0 0 14px; text-align: center; font-weight: 700; line-height: 1.8; }

.facts { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.facts li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: #fff8e6; border: 3px solid var(--parch-dark); }
.fact-icon { flex: none; margin-top: 4px; }
.fact-body { display: grid; line-height: 1.75; }
.fact-body small { color: #8a6a3a; font-weight: 700; font-size: .8rem; }
.fact-body b { font-weight: 900; font-size: 1.05rem; }
.fact-body .note { color: #6b5232; font-size: .9rem; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .btn { min-height: 46px; padding: 6px 8px; font-size: .95rem; text-decoration: none; text-align: center; }
.actions .map-google { grid-column: 1 / -1; }
.actions .map-geo, .actions #add-calendar { grid-column: 1 / -1; }

.copy-status { margin: 8px 0 0; min-height: 1.6em; text-align: center; font-weight: 700; color: #2e7d32; opacity: 0; transition: opacity .2s; }
.copy-status.show { opacity: 1; }

.countdown { margin-top: 6px; text-align: center; }
.countdown h2 { margin: 0 0 8px; font-weight: 900; font-size: 1.05rem; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.tile {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)), var(--tex-S) 0 0 / 32px 32px;
  image-rendering: pixelated;
  border: 3px solid var(--ink);
}

.tile .num { display: grid; place-items: center; min-height: 46px; }
.tile .unit { color: #fff; font-weight: 700; font-size: .8rem; }

.phase-msg { margin: 6px 0 0; padding: 12px; background: #2e7d32; border: 3px solid var(--ink); color: #fff; font-weight: 900; font-size: 1.15rem; }

/* RSVP */
.rsvp-title { margin: 0; text-align: center; font-weight: 900; font-size: 1.3rem; }
.team-count { margin: 6px 0 14px; text-align: center; font-weight: 700; color: #6b4a1a; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice .btn { padding: 8px; font-size: 1rem; }
.choice .btn.active { outline: 3px solid var(--ink); outline-offset: 2px; }

.btn.red {
  border-color: #5e1410;
  background: var(--red);
  text-shadow: 2px 2px 0 #5e1410;
  box-shadow: inset -4px -4px 0 #b52a20, inset 4px 4px 0 #ff8a80, 0 5px 0 #5e1410;
}

.btn.red:active { box-shadow: inset -4px -4px 0 #b52a20, inset 4px 4px 0 #ff8a80, 0 1px 0 #5e1410; }

.rsvp-form { position: relative; display: grid; gap: 12px; margin-top: 16px; }
.rsvp-form label { display: grid; gap: 6px; font-weight: 700; }

.rsvp-form input, .rsvp-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: #fff;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .12);
  font: inherit;
  font-size: 1rem;
}

.rsvp-form textarea { resize: vertical; }
.rsvp-form .btn { width: 100%; }

.steppers { display: grid; gap: 10px; }
.stepper { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #fff8e6; border: 3px solid var(--parch-dark); }
.step-label { flex: 1; font-weight: 700; }

.step {
  width: 44px;
  height: 44px;
  border: 3px solid var(--ink);
  background: #ffc93c;
  box-shadow: inset -3px -3px 0 #d99a14, inset 3px 3px 0 #fff3b0;
  font-weight: 900;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.step:active { transform: translateY(2px); }
.step-value { min-width: 2ch; text-align: center; font-weight: 900; font-size: 1.3rem; }

/* spam trap: invisible and kept inside the form (an offscreen left: -9999px makes RTL pages zoom out) */
.hp { position: absolute; top: 0; right: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; clip-path: inset(50%); }

.form-error { margin: 0; padding: 8px 10px; background: #ffe1de; border: 3px solid var(--red); color: #8f1d17; font-weight: 700; }

.rsvp-done { display: grid; justify-items: center; gap: 10px; margin-top: 8px; text-align: center; }
.badge { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #2b1d0e; border: 3px solid #ffc93c; box-shadow: 0 4px 0 rgba(0, 0, 0, .3); color: #fff; }
.badge-text { display: grid; justify-items: start; gap: 4px; }
.badge-name { font-weight: 900; font-size: 1.1rem; }
.done-line { margin: 0; font-weight: 900; font-size: 1.15rem; }
.done-meta { margin: 0; color: #6b4a1a; font-weight: 700; }
.link-btn.dark { background: var(--ink); }

.card-foot { display: grid; justify-items: center; gap: 10px; }
.sign { margin: 0; padding: 6px 14px; background: rgba(20, 10, 0, .55); color: #ffe9a8; font-weight: 900; }
