/* ============================================================
   Systato Winter Village: pixel holiday UI
   ============================================================ */
:root {
  --night: #0b1638;
  --night-2: #142a66;
  --ink: #1b2340;
  --ink-2: #2d3a63;
  --paper: #fffdf7;
  --paper-2: #f3efe4;
  --snow: #eef4fb;
  --blue: #085cfc;
  --blue-d: #0646c2;
  --teal: #66cccc;
  --gold: #f5c542;
  --gold-d: #c99a1a;
  --red: #d94a4a;
  --red-d: #a8323a;
  --green: #2f8f5b;
  --muted: #5f6886;
  --px: 'Press Start 2P', ui-monospace, monospace;
  --ui: 'Pixelify Sans', ui-rounded, system-ui, sans-serif;
  --frame: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--ui);
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

#bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated; z-index: 0;
}

/* ---------- screens ---------- */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: none;
  height: 100dvh;
}
.screen.is-active { display: flex; animation: screen-in .5s ease both; }
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- pixel buttons ---------- */
.btn {
  --bg: var(--blue);
  --fg: #fff;
  font-family: var(--px);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .02em;
  padding: 13px 18px;
  margin: 4px;
  border: 0;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  box-shadow: var(--frame), inset -4px -4px 0 0 rgba(0,0,0,.22), inset 4px 4px 0 0 rgba(255,255,255,.28);
  transition: transform .08s, filter .15s;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: var(--frame), inset 4px 4px 0 0 rgba(0,0,0,.22); }
.btn:focus-visible { outline: 3px dashed var(--gold); outline-offset: 7px; }
.btn:disabled { filter: grayscale(.8) brightness(.9); cursor: not-allowed; opacity: .7; }
.btn-gold { --bg: var(--gold); --fg: var(--ink); }
.btn-red { --bg: var(--red); }
.btn-green { --bg: var(--green); }
.btn-ghost { --bg: #fff; --fg: var(--ink); }
.btn-small { font-size: 10px; padding: 9px 12px; }
.btn-xl { font-size: 15px; padding: 18px 26px; }
.btn-icon { padding: 7px 10px; font-size: 14px; }
.btn-block { display: block; width: calc(100% - 8px); }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ---------- panel (classic RPG window) ---------- */
.panel {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px #fff, 0 0 0 12px var(--ink), 0 18px 0 10px rgba(0,0,0,.25);
  padding: 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel h2, .h2 { font-family: var(--px); font-size: 15px; margin: 0; line-height: 1.5; }
.x { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--ink); padding: 4px 8px; }
.muted { color: var(--muted); }

/* ============================================================
   TICKET
   ============================================================ */
#screen-ticket {
  flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 24px 16px 18px;
  overflow-y: auto;
}
.ticket-wrap { position: relative; perspective: 1200px; filter: drop-shadow(0 24px 30px rgba(0,0,0,.5)) drop-shadow(0 0 40px rgba(245,197,66,.25)); }
.ticket {
  --cut: calc(100% - 132px);
  position: relative;
  display: flex;
  width: min(780px, 92vw);
  min-height: 360px;
  color: #3b2a07;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 6px, transparent 6px 12px),
    linear-gradient(135deg, #fde58f 0%, #f5c542 28%, #ffeaa3 48%, #e3aa2c 70%, #f9d777 100%);
  border-radius: 20px;
  -webkit-mask:
    radial-gradient(circle at var(--cut) 0, #0000 17px, #000 18px) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--cut) 100%, #0000 17px, #000 18px) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle at var(--cut) 0, #0000 17px, #000 18px) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--cut) 100%, #0000 17px, #000 18px) bottom / 100% 51% no-repeat;
  transform-style: preserve-3d;
  transition: transform .2s ease-out;
  animation: ticket-in .9s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes ticket-in { from { transform: translateY(40px) rotateX(25deg) scale(.9); opacity: 0; } }
.ticket::before {
  content: ''; position: absolute; inset: 9px; border-radius: 13px; pointer-events: none;
  border: 2px solid rgba(138,90,0,.55);
  box-shadow: inset 0 0 0 4px rgba(255,248,215,.55);
}
.ticket::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.75) 48%, rgba(255,255,255,0) 58%);
  background-size: 260% 100%;
  animation: sheen 4.5s ease-in-out infinite;
  mix-blend-mode: soft-light;
}
@keyframes sheen { 0% { background-position: 130% 0; } 60%, 100% { background-position: -40% 0; } }

.ticket-main { flex: 1; padding: 34px 30px 26px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ticket-kicker {
  font-family: var(--px); font-size: 11px; letter-spacing: .25em; color: #8a5a00;
  text-transform: uppercase; margin-bottom: 14px;
}
.ticket-kicker span { color: var(--red); }
.ticket-from { margin: 0 0 6px; font-size: 19px; max-width: 520px; }
.ticket-from b { color: var(--red-d); }
#greeting:not(:empty) { display: block; font-family: var(--px); font-size: 12px; margin-bottom: 8px; color: #6b4600; }
.ticket-title { margin: 8px 0 16px; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tt-systato { margin-bottom: clamp(10px, 2vw, 16px); }
.tt-systato img { height: clamp(30px, 6vw, 46px); display: block; filter: drop-shadow(2px 2px 0 rgba(255,255,255,.7)); }
.tt-line {
  position: relative; display: block;
  font-family: var(--px);
  font-size: clamp(28px, 6.4vw, 54px);
  letter-spacing: .04em;
  color: #cfe5ff;
  text-shadow: 3px 3px 0 var(--blue), 6px 6px 0 var(--ink);
  animation: bob 3s ease-in-out infinite;
}
.tt-line + .tt-line { animation-delay: -.6s; }
.tt-line::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; color: #fff; text-shadow: none;
  clip-path: inset(0 0 62% 0);
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.ticket-copy { margin: 4px 0 18px; font-size: 19px; max-width: 520px; }
.ticket-meta { margin: 14px 0 0; font-size: 15px; color: #6b4600; }
.ticket-meta span, .nowrap { white-space: nowrap; }

.ticket-stub {
  width: 132px; flex: none; position: relative;
  border-left: 4px dashed rgba(120,80,0,.45);
  display: flex; align-items: center; justify-content: center;
}
.stub-inner { transform: rotate(90deg); display: flex; flex-direction: column; align-items: center; gap: 10px; white-space: nowrap; }
.stub-admit { font-family: var(--px); font-size: 17px; color: var(--red-d); letter-spacing: .12em; }
.stub-no { font-family: var(--px); font-size: 10px; color: #6b4600; }
.ticket-punch {
  position: absolute; right: 50px; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%;
  background: var(--night); transform: scale(0); opacity: 0;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.4);
}
.ticket.punched .ticket-punch { animation: punch .25s ease-out forwards; }
@keyframes punch { to { transform: scale(1); opacity: 1; } }
.ticket.fly { animation: fly .8s .25s cubic-bezier(.6,-0.3,.7,0) forwards; }
@keyframes fly { to { transform: translateY(-120vh) rotate(-14deg) scale(.8); } }

.sparkles i {
  position: absolute; width: 10px; height: 10px; z-index: 2; pointer-events: none;
  background:
    linear-gradient(#fff, #fff) center / 2px 10px no-repeat,
    linear-gradient(#fff, #fff) center / 10px 2px no-repeat;
  animation: twinkle 2.2s ease-in-out infinite;
}
.sparkles i:nth-child(1) { left: -18px; top: 12%; }
.sparkles i:nth-child(2) { right: -14px; top: 6%; animation-delay: .5s; }
.sparkles i:nth-child(3) { left: 8%; bottom: -16px; animation-delay: 1s; }
.sparkles i:nth-child(4) { right: 20%; bottom: -20px; animation-delay: 1.4s; }
.sparkles i:nth-child(5) { left: 45%; top: -18px; animation-delay: .8s; }
.sparkles i:nth-child(6) { right: -22px; bottom: 30%; animation-delay: 1.8s; }
@keyframes twinkle { 0%, 100% { transform: scale(.2) rotate(0); opacity: 0; } 50% { transform: scale(1.2) rotate(45deg); opacity: 1; } }

.skip-link {
  background: none; border: 0; color: #c9d6ff; font-size: 16px; cursor: pointer; padding: 10px 14px;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(201,214,255,.4);
  position: relative; z-index: 1;
  background: rgba(11,22,56,.72); box-shadow: 0 0 0 2px rgba(11,22,56,.72);
}
.skip-link:hover { color: #fff; text-decoration-color: #fff; }

@media (max-width: 640px) {
  .ticket {
    --cuty: calc(100% - 64px);
    flex-direction: column; min-height: 0;
    -webkit-mask:
      radial-gradient(circle at 0 var(--cuty), #0000 15px, #000 16px) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% var(--cuty), #0000 15px, #000 16px) right / 51% 100% no-repeat;
            mask:
      radial-gradient(circle at 0 var(--cuty), #0000 15px, #000 16px) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% var(--cuty), #0000 15px, #000 16px) right / 51% 100% no-repeat;
  }
  .ticket-main { padding: 26px 20px 18px; }
  .ticket-from, .ticket-copy { font-size: 17px; }
  .ticket-stub { width: auto; height: 64px; border-left: 0; border-top: 4px dashed rgba(120,80,0,.45); }
  .stub-inner { transform: none; flex-direction: row; gap: 16px; }
  .stub-admit { font-size: 13px; }
  .ticket-punch { right: 50%; top: auto; bottom: 16px; margin: 0 -17px 0 0; }
  .btn-xl { font-size: 13px; padding: 16px 18px; }
}

/* ============================================================
   VILLAGE
   ============================================================ */
#screen-village { flex-direction: column; background: rgba(6,12,34,.5); }
.hud {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(#0b1638, #0b1638ee);
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.hud-title { font-family: var(--px); font-size: 11px; color: #cfe5ff; white-space: nowrap; }
.hud-logo { color: var(--teal); }
.hud-sleigh { display: flex; align-items: center; gap: 8px; }
.sleigh-label { font-family: var(--px); font-size: 10px; color: var(--gold); }
.slot {
  width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px;
  background: rgba(255,255,255,.06);
  outline: 3px dashed rgba(255,255,255,.3); outline-offset: -3px;
}
.slot.filled { background: var(--paper); outline: 0; box-shadow: var(--frame), inset -3px -3px 0 rgba(0,0,0,.12); animation: pop .4s cubic-bezier(.3,1.8,.5,1); cursor: pointer; }
@keyframes pop { from { transform: scale(.3); } }
.hud-actions { display: flex; gap: 6px; }
.hud-sleigh.full .sleigh-label::after { content: ' FULL!'; color: #fff; }

.stage-wrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 14px; position: relative; z-index: 2; }
.stage {
  position: relative;
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px #33407a, 0 0 0 12px var(--ink), 0 20px 50px rgba(0,0,0,.55);
  background: var(--snow);
  container-type: inline-size;
}
#game { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; cursor: pointer; touch-action: manipulation; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.map-label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%);
  pointer-events: auto; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--px); font-size: clamp(7px, 1.55cqw, 11px); line-height: 1.3;
  color: #fff; background: var(--ink); border: 0;
  padding: 5px 7px 4px; white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 3px 0 2px rgba(0,0,0,.35);
  transition: background .2s;
}
.map-label::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -4px;
  border: 4px solid transparent; border-top-color: var(--ink); border-bottom: 0;
}
.map-label:hover { background: var(--blue); }
.map-label:hover::after { border-top-color: var(--blue); }
.map-label.picked { background: var(--green); }
.map-label.picked::after { border-top-color: var(--green); }
.map-label.goal { background: var(--gold); color: var(--ink); animation: label-pulse 1s ease-in-out infinite; }
@keyframes label-pulse { 50% { scale: 1.1; } }
.map-label.goal::after { border-top-color: var(--gold); }
.ml-badge:empty, .ep-badge:empty { display: none; }
.ml-badge.new, .ep-badge.new {
  font-size: .8em; background: var(--gold); color: var(--ink); padding: 2px 4px 1px; margin-left: 2px;
  animation: blink 1.1s steps(2) infinite;
}

/* off-screen shop pointers (phones) */
.edge-ptr {
  position: absolute; pointer-events: auto; cursor: pointer; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  transform: translateY(-50%);
  font-family: var(--px); font-size: 8px; line-height: 1.2;
  color: #fff; background: var(--ink); border: 0; padding: 6px 6px 5px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 3px 0 2px rgba(0,0,0,.35);
}
.edge-ptr.left { left: 4px; animation: nudge-left 1.2s ease-in-out infinite; }
.edge-ptr.right { right: 4px; flex-direction: row-reverse; animation: nudge-right 1.2s ease-in-out infinite; }
.edge-ptr .ep-icon { font-size: 13px; }
.edge-ptr .ep-badge { font-size: 0; }
.edge-ptr .ep-badge.new { width: 8px; height: 8px; padding: 0; margin: 0; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--ink); animation: pulse 1s ease-in-out infinite; }
.edge-ptr .ep-badge:not(.new):not(:empty) { font-size: 11px; }
.edge-ptr .ep-arrow { color: var(--gold); }
.edge-ptr.is-new { background: var(--blue); }
.edge-ptr.picked { background: var(--green); }
.edge-ptr.goal { background: var(--gold); color: var(--ink); }
.edge-ptr.goal .ep-arrow { color: var(--ink); }
/* quiet states: Post Office before the sleigh is full, visited shops after (signs stay, edge guides hide) */
.labels .edge-ptr.off { display: none; }
.labels .map-label.plain { background: var(--ink); color: #fff; animation: none; }
.labels .map-label.plain::after { border-top-color: var(--ink); }
.labels .map-label.plain:hover { background: var(--blue); }
@keyframes nudge-left { 50% { translate: -4px 0; } }
@keyframes nudge-right { 50% { translate: 4px 0; } }
.hud-shops { font-family: var(--px); font-size: 10px; color: #cfe5ff; white-space: nowrap; margin-right: 6px; }

/* dialog box */
.dialog {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 4;
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper); color: var(--ink);
  padding: 12px 16px 14px 12px;
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px #fff, 0 0 0 9px var(--ink), 0 10px 0 6px rgba(0,0,0,.25);
  animation: dialog-in .25s cubic-bezier(.2,1.4,.4,1);
  cursor: pointer;
  max-width: 720px; margin: 0 auto;
}
@keyframes dialog-in { from { transform: translateY(20px); opacity: 0; } }
.dialog-portrait { width: 64px; height: 64px; flex: none; image-rendering: pixelated; background: #dfe9f6; box-shadow: 0 0 0 3px var(--ink); }
.dialog-body { flex: 1; min-width: 0; }
.dialog-name { font-family: var(--px); font-size: 10px; color: var(--blue); margin-bottom: 6px; }
.dialog-text { font-size: 19px; min-height: 2.6em; }
.dialog-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dialog-choices:empty { display: none; }
.dialog-next { position: absolute; right: 14px; bottom: 8px; font-size: 12px; color: var(--red); animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hint {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 14px 12px; font-size: 16px; color: #b9c6ef; text-align: center; min-height: 52px;
}
.hint b { color: #fff; }
.hint-touch { display: none; }
@media (hover: none) { .hint-touch { display: inline; } .hint-desktop { display: none; } }

@media (max-width: 640px) {
  .hud { padding: 8px 10px; }
  .hud-title { display: none; }
  .stage-wrap { padding: 10px 8px; }
  .dialog-text { font-size: 17px; }
  .dialog-portrait { width: 48px; height: 48px; }
}

/* ============================================================
   OVERLAYS
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex;
  padding: 24px 16px;
  background: rgba(5,10,30,.72);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  animation: screen-in .25s ease;
}
.overlay > * { margin: auto; }
.map-panel { width: min(520px, 100%); }
.map-list { display: grid; gap: 10px; margin-top: 14px; }
.map-item {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff; border: 0; padding: 12px 14px; cursor: pointer;
  box-shadow: 0 0 0 3px var(--ink); color: var(--ink); font-size: 18px;
}
.map-item:hover { background: #eef4ff; }
.map-item .mi-icon { font-size: 26px; width: 34px; text-align: center; }
.map-item .mi-name { font-family: var(--px); font-size: 11px; display: block; margin-bottom: 3px; }
.map-item .mi-sub { color: var(--muted); font-size: 16px; }
.map-item .mi-badge { margin-left: auto; font-size: 13px; font-family: var(--px); color: var(--green); }

/* ---------- shop ---------- */
.shop-window {
  --accent: var(--blue);
  --wall: #f6e7cf;
  --wall-2: #efd9b8;
  width: min(1020px, 100%);
  background: var(--wall);
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px #fff, 0 0 0 12px var(--ink), 0 24px 0 10px rgba(0,0,0,.25);
  animation: shop-in .35s cubic-bezier(.2,1.3,.4,1);
  position: relative;
}
@keyframes shop-in { from { transform: scale(.92) translateY(18px); opacity: 0; } }
.shop-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; background: var(--accent); color: #fff;
  border-bottom: 4px solid var(--ink);
  position: relative;
}
.shop-head::after { /* awning scallops */
  content: ''; position: absolute; left: 0; right: 0; bottom: -16px; height: 12px;
  background: radial-gradient(circle at 10px 0, var(--accent) 9px, transparent 10px) 0 0 / 20px 12px repeat-x;
  filter: drop-shadow(0 3px 0 var(--ink));
  z-index: 1;
}
.shop-head h2 { font-family: var(--px); font-size: 15px; margin: 0; text-shadow: 2px 2px 0 rgba(0,0,0,.3); }
.shop-body { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; padding: 28px 22px 18px; }
.shop-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.shop-right { min-width: 0; }
.keeper { display: flex; gap: 12px; align-items: flex-start; }
.keeper-portrait { width: 96px; height: 96px; flex: none; image-rendering: pixelated; background: rgba(255,255,255,.6); box-shadow: 0 0 0 3px var(--ink); animation: idle 1.6s steps(2) infinite; }
@keyframes idle { 50% { transform: translateY(-2px); } }
.speech {
  position: relative; flex: 1; background: #fff; padding: 10px 14px; min-height: 96px;
  box-shadow: 0 0 0 3px var(--ink);
}
.speech::before { content: ''; position: absolute; left: -11px; top: 22px; border: 8px solid transparent; border-right-color: var(--ink); border-left: 0; }
.speech-name { font-family: var(--px); font-size: 10px; color: var(--accent); margin-bottom: 6px; filter: brightness(.8); }
.speech-text { font-size: 18px; }
.toy {
  position: relative; min-height: 230px; display: grid; place-items: center; align-content: center; overflow: hidden;
  background: rgba(255,255,255,.35); box-shadow: 0 0 0 3px var(--ink), inset 0 -40px 0 rgba(0,0,0,.06);
  padding: 14px;
}

.product { scroll-margin-top: 12px; background: var(--paper); padding: 14px; box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 3px rgba(0,0,0,.15); position: relative; }
.product-media { position: relative; aspect-ratio: 16 / 11; background: #fff; overflow: hidden; box-shadow: 0 0 0 2px var(--ink); }
.product-media img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; transition: filter .6s, transform .6s; }
.product-media img.cover { object-fit: cover; }
.product.locked .product-media img { filter: blur(14px) saturate(.6); transform: scale(1.1); }
.product-lock {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-family: var(--px); font-size: 11px; line-height: 1.8; color: #fff; text-shadow: 2px 2px 0 var(--ink);
  background: rgba(27,35,64,.35); cursor: pointer;
}
.product:not(.locked) .product-lock { display: none; }
.product.revealed .product-media { animation: reveal .7s ease; }
@keyframes reveal { 0% { transform: scale(.96); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
.media-tag { position: absolute; left: 10px; top: 10px; background: var(--ink); color: #fff; font-family: var(--px); font-size: 9px; padding: 6px 8px; }
.product-media.is-mock { background: radial-gradient(circle at 50% 40%, #fff, #e9edf4 75%); }
.product-media.is-mock img { background: transparent; transform: scale(1.04); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { width: 56px; height: 56px; padding: 0; border: 0; flex: none; cursor: pointer; background: #fff; box-shadow: 0 0 0 2px #c4c9d8; }
.thumbs button[aria-current="true"] { box-shadow: 0 0 0 3px var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product h3 { font-family: var(--px); font-size: 13px; line-height: 1.5; margin: 14px 0 6px; }
.product p { margin: 0 0 8px; font-size: 17px; }
.product ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 17px; }
.product li::before { content: '✦ '; color: var(--accent); }
.product.locked h3, .product.locked p, .product.locked ul, .product.locked .thumbs { filter: blur(5px); user-select: none; pointer-events: none; }

.shop-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px 16px;
  position: sticky; bottom: 0; z-index: 2;
  background: var(--paper); border-top: 4px solid var(--ink);
}
.theme-casino .shop-actions { background: #2c1f47; }
.shop-actions .note { margin-right: auto; font-size: 16px; color: var(--muted); }

/* shop themes */
.theme-bakery { --accent: #e8788f; --wall: #fbeee0;
  background: linear-gradient(transparent 60%, #e8c9a2 60%) 0 0 / 100% 100%,
    repeating-linear-gradient(90deg, #fbeee0 0 24px, #f8e3cf 24px 48px); }
.theme-hydro { --accent: #1d9fb0;
  background: repeating-linear-gradient(0deg, #d9f2f7 0 22px, #c9eaf2 22px 24px), repeating-linear-gradient(90deg, transparent 0 22px, #c9eaf2 22px 24px); }
.theme-pets { --accent: #e07a2c;
  background: radial-gradient(circle at 12px 12px, rgba(160,90,40,.12) 4px, transparent 5px) 0 0 / 34px 34px, #f9e4cc; }
.theme-casino { --accent: #7b4bc4; color: #fff;
  background: radial-gradient(circle at 50% 0, #5b3399, #23163f 70%); }
.theme-casino .speech, .theme-casino .product { color: var(--ink); }
.theme-casino .toy { background: rgba(0,0,0,.25); }
.theme-casino .shop-actions .note { color: #cdb9f0; }

@media (max-width: 760px) {
  .shop-body { grid-template-columns: 1fr; padding: 28px 14px 6px; }
  .toy { min-height: 210px; }
  .keeper-portrait { width: 72px; height: 72px; }
  .shop-actions { padding: 10px 10px 12px; justify-content: stretch; gap: 6px; }
  .shop-actions .btn { flex: 1; font-size: 10px; padding: 11px 8px; }
  .shop-actions .note { width: 100%; text-align: center; font-size: 14px; }
  .overlay { padding: 14px 10px; align-items: start; }
}

/* ---------- toys ---------- */
.toy-btn { position: relative; z-index: 2; order: -1; margin-bottom: 16px; }
.toy-done-msg { font-family: var(--px); font-size: 11px; text-align: center; line-height: 1.7; }

/* oven */
.oven { width: 190px; height: 150px; background: #c9ced8; position: relative; box-shadow: 0 0 0 4px var(--ink), inset -6px -6px 0 rgba(0,0,0,.12); }
.oven::before { content: ''; position: absolute; left: 12px; right: 12px; top: 10px; height: 14px; background: repeating-linear-gradient(90deg, #2d3a63 0 10px, transparent 10px 22px); }
.oven-window { position: absolute; left: 22px; right: 22px; top: 36px; bottom: 18px; background: #3a2a2a; box-shadow: 0 0 0 4px var(--ink); overflow: hidden; }
.oven.baking .oven-window { animation: bake 1.4s ease-in forwards; }
@keyframes bake { to { background: #ff9d3a; box-shadow: 0 0 0 4px var(--ink), 0 0 30px #ff9d3a; } }
.oven-window .tray { position: absolute; left: 10%; right: 10%; bottom: 10px; height: 4px; background: #888; }
.oven-window .dough { position: absolute; bottom: 14px; width: 20px; height: 8px; border-radius: 10px 10px 2px 2px; background: #f2d3a2; transition: all 1.3s; }
.oven.baking .dough { background: #c98a4b; height: 11px; }
.cookie-pop { position: absolute; font-size: 34px; animation: cookie-pop 1s cubic-bezier(.2,1.4,.4,1) forwards; z-index: 3; }
@keyframes cookie-pop { from { transform: translate(0, 40px) scale(.2); opacity: 0; } to { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--r)); opacity: 1; } }

/* bottle */
.bottle-wrap { display: flex; align-items: flex-end; gap: 22px; }
.bottle { width: 78px; height: 170px; position: relative; }
.bottle .lid { position: absolute; left: 10px; right: 10px; top: 0; height: 30px; background: #2d3a4a; border-radius: 10px 10px 2px 2px; box-shadow: 0 0 0 3px var(--ink); }
.bottle .lid::after { content: ''; position: absolute; right: -16px; top: 6px; width: 16px; height: 18px; border: 4px solid #2d3a4a; border-left: 0; border-radius: 0 10px 10px 0; }
.bottle .body { position: absolute; left: 0; right: 0; top: 34px; bottom: 0; background: rgba(255,255,255,.7); border-radius: 14px 14px 10px 10px; box-shadow: 0 0 0 3px var(--ink); overflow: hidden; }
.bottle .water { position: absolute; left: 0; right: 0; bottom: 0; height: 6%; background: linear-gradient(#5ad1e0, #2bb3c0); transition: height 1.6s cubic-bezier(.4,0,.2,1); }
.bottle .water::before { content: ''; position: absolute; left: 0; right: 0; top: -4px; height: 8px; background: radial-gradient(circle at 8px 8px, #5ad1e0 6px, transparent 7px) 0 0 / 16px 8px repeat-x; animation: wave 1s linear infinite; }
@keyframes wave { to { background-position: 16px 0; } }
.bottle.full .water { height: 92%; }
.bottle .shine { position: absolute; left: 10px; top: 46px; width: 8px; height: 90px; background: rgba(255,255,255,.7); border-radius: 4px; }
.bubble { position: absolute; bottom: 4px; width: 7px; height: 7px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); animation: bubble 1.6s ease-in infinite; }
@keyframes bubble { to { transform: translateY(-120px); opacity: 0; } }
.ice { font-size: 22px; animation: bob 1.4s ease-in-out infinite; }

/* dog */
.dog-portrait { width: 150px; height: 150px; image-rendering: pixelated; cursor: pointer; transition: transform .1s; }
.dog-portrait.wiggle { animation: wiggle .4s ease; }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.heart { position: absolute; font-size: 22px; pointer-events: none; animation: heart 1.2s ease-out forwards; z-index: 3; }
@keyframes heart { from { transform: translateY(0) scale(.5); opacity: 1; } to { transform: translateY(-110px) scale(1.2); opacity: 0; } }

/* slot machine */
.slot-machine { position: relative; padding: 16px 16px 14px; background: linear-gradient(#f5c542, #c99a1a); box-shadow: 0 0 0 4px var(--ink), inset 0 0 0 4px #ffe9a8; margin: 0 40px 0 0; }
.slot-machine::before { content: 'LUCKY ❄ SLOTS'; display: block; text-align: center; font-family: var(--px); font-size: 10px; color: var(--ink); margin-bottom: 10px; }
.reels { display: flex; gap: 8px; }
.reel { width: 58px; height: 64px; background: #fff; overflow: hidden; box-shadow: 0 0 0 3px var(--ink), inset 0 10px 10px -6px rgba(0,0,0,.25), inset 0 -10px 10px -6px rgba(0,0,0,.25); position: relative; }
.strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; }
.strip span { height: 64px; display: grid; place-items: center; font-size: 34px; }
.reel.spinning .strip { animation: spin .12s linear infinite; }
@keyframes spin { from { transform: translateY(0); } to { transform: translateY(-384px); } }
.lever { position: absolute; right: -36px; top: 18px; width: 10px; height: 80px; background: #9aa3b5; box-shadow: 0 0 0 3px var(--ink); transform-origin: bottom center; transition: transform .25s; cursor: pointer; }
.lever::before { content: ''; position: absolute; left: -9px; top: -24px; width: 28px; height: 28px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--ink), inset -4px -4px 0 rgba(0,0,0,.25); }
.lever.pulled { transform: scaleY(-1); }
.marquee { position: absolute; inset: -10px; pointer-events: none; }
.jackpot-banner { margin-top: 14px; font-family: var(--px); font-size: 16px; color: var(--gold); text-shadow: 3px 3px 0 var(--red-d); animation: jackpot .5s steps(2) infinite; text-align: center; }
@keyframes jackpot { 50% { color: #fff; } }
.coin { position: absolute; top: -20px; font-size: 22px; animation: coin-fall 1.6s ease-in forwards; z-index: 3; pointer-events: none; }
@keyframes coin-fall { to { transform: translateY(330px) rotate(540deg); opacity: .2; } }

/* ============================================================
   CHECKOUT / POST OFFICE
   ============================================================ */
#screen-checkout { overflow-y: auto; padding: 22px 14px 40px; display: none; justify-content: center; align-items: flex-start; }
#screen-checkout.is-active { display: flex; }
.checkout { position: relative; width: min(900px, 100%); padding: 14px; margin: auto 0;
  background: repeating-linear-gradient(-45deg, var(--red) 0 22px, #fff 22px 34px, var(--blue) 34px 56px, #fff 56px 68px);
  box-shadow: 0 0 0 4px var(--ink), 0 24px 50px rgba(0,0,0,.5);
  animation: shop-in .4s cubic-bezier(.2,1.3,.4,1);
}
.co-inner { background: var(--paper); color: var(--ink); padding: 18px 22px 26px; box-shadow: 0 0 0 4px var(--ink); }
.co-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.co-brand { font-family: var(--px); font-size: 10px; color: var(--blue); white-space: nowrap; }
.co-steps { display: flex; gap: 6px; }
.co-steps i { width: 26px; height: 8px; background: #d5dae6; box-shadow: 0 0 0 2px var(--ink); }
.co-steps i.on { background: var(--blue); }
.co-steps i.done { background: var(--green); }
.co-body h2 { font-family: var(--px); font-size: clamp(14px, 2.4vw, 18px); line-height: 1.5; margin: 6px 0 8px; }
.co-body .lede { font-size: 19px; margin: 0 0 18px; color: var(--ink-2); }
.co-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 24px; }
.co-actions .spacer { margin-right: auto; }
.co-actions.sticky { position: sticky; bottom: -26px; z-index: 3; background: var(--paper); margin: 18px -22px -26px; padding: 12px 22px 14px; border-top: 4px solid var(--ink); }
@media (max-width: 640px) { .co-actions.sticky { margin: 14px -14px -20px; padding: 10px 14px 12px; bottom: -20px; } }
.co-counter { font-family: var(--px); font-size: 11px; color: var(--blue); }

.gift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gift-card {
  position: relative; text-align: left; padding: 0; border: 0; cursor: pointer; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 3px var(--ink), 5px 5px 0 3px rgba(0,0,0,.12);
  transition: transform .12s, box-shadow .12s;
  display: flex; flex-direction: column;
}
.gift-card:hover { transform: translateY(-3px); }
.gift-card:focus-visible { outline: 3px dashed var(--blue); outline-offset: 6px; }
.gift-card .gc-img { aspect-ratio: 16 / 10; background: #fff center / cover no-repeat; border-bottom: 3px solid var(--ink); }
.gift-card .gc-img.contain { background-size: contain; }
.gift-card .gc-body { padding: 12px 14px 14px; }
.gift-card .gc-pick { font-size: 19px; font-weight: 600; display: block; }
.gift-card .gc-pick .em { font-size: 22px; margin-right: 4px; }
.gift-card .gc-sub { color: var(--muted); font-size: 16px; }
.gift-card .gc-gift { display: block; margin-top: 6px; font-family: var(--px); font-size: 9px; color: var(--blue); line-height: 1.6; }
.gift-card .gc-check {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: grid; place-items: center;
  background: #fff; box-shadow: 0 0 0 3px var(--ink); font-size: 18px; color: transparent;
}
.gift-card[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--blue), 0 0 0 8px var(--ink), 6px 6px 0 6px rgba(8,92,252,.2); }
.gift-card[aria-pressed="true"] .gc-check { background: var(--blue); color: #fff; }
.gift-card.declined { opacity: .45; filter: grayscale(1); cursor: not-allowed; }
.gift-card .gc-ribbon { position: absolute; left: -6px; top: 14px; background: var(--red); color: #fff; font-family: var(--px); font-size: 9px; padding: 6px 10px; box-shadow: 0 0 0 2px var(--ink); }

.top-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.top-grid.single { grid-template-columns: minmax(0, 420px); justify-content: center; }
.more-gifts { margin-top: 16px; text-align: center; }
.linkish { background: none; border: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: 17px; padding: 6px; }

@media (max-width: 640px) {
  .gift-grid, .top-grid { grid-template-columns: 1fr; gap: 14px; }
  .gift-card .gc-img { aspect-ratio: 16 / 8; }
  .co-inner { padding: 14px 14px 20px; }
  .checkout { padding: 10px; }
  .co-brand { display: none; }
}

/* detail hero */
.detail-hero { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; margin-bottom: 18px; background: #fff; padding: 12px; box-shadow: 0 0 0 3px var(--ink); }
.detail-hero img { width: 150px; height: 120px; object-fit: cover; box-shadow: 0 0 0 2px var(--ink); background: #fff; }
.detail-hero img.contain { object-fit: contain; }
.detail-hero h2 { margin: 0 0 6px; }
.detail-hero p { margin: 0; font-size: 17px; }
@media (max-width: 560px) { .detail-hero { grid-template-columns: 1fr; } .detail-hero img { width: 100%; height: 160px; } }

.pet-row { display: grid; grid-template-columns: 30px 1fr 190px 30px; gap: 10px; align-items: center; margin-bottom: 12px; }
.pet-num { width: 30px; height: 30px; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--px); font-size: 10px; }
.pet-rm { width: 30px; height: 30px; border: 0; background: none; color: var(--red-d); font-size: 18px; cursor: pointer; }
.pet-desc { grid-column: 2 / -1; font-size: 16px; padding: 9px 10px; }
@media (max-width: 560px) { .pet-row { grid-template-columns: 30px 1fr 30px; } .pet-row select { grid-column: 2; grid-row: 2; } .pet-desc { grid-column: 2; grid-row: 3; } }

.followup { margin: 0 0 16px; padding: 12px 14px 14px; background: #f4f7fd; box-shadow: 0 0 0 3px var(--ink); animation: dialog-in .25s ease; }
.fu-head { font-family: var(--px); font-size: 10px; line-height: 1.6; margin-bottom: 10px; }
.fu-head .ic { font-size: 16px; }
.fu-q { font-family: var(--ui); font-size: 16px; color: var(--muted); }
.followup .chips { gap: 8px; }
.followup .chip { font-size: 15px; padding: 7px 10px; }
.fu-text { margin-top: 12px; font-size: 16px; padding: 9px 10px; }

/* Owala live preview */
.owala-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; align-items: start; }
.owala-preview {
  position: sticky; top: 12px; text-align: center; padding: 10px 10px 12px;
  background: radial-gradient(circle at 50% 38%, #ffffff, #e6ebf3 75%);
  box-shadow: 0 0 0 3px var(--ink), 5px 5px 0 3px rgba(0,0,0,.12);
}
.op-title { font-family: var(--px); font-size: 10px; color: var(--blue); margin-bottom: 4px; }
.op-stage { aspect-ratio: 3 / 4; overflow: hidden; display: grid; place-items: center; }
.op-stage canvas { width: 100%; height: 100%; object-fit: contain; transform: scale(1.18); }
.op-cap { font-size: 14px; color: var(--muted); margin-top: 6px; }
@media (max-width: 760px) {
  .owala-layout { grid-template-columns: 1fr; gap: 14px; }
  .owala-preview { order: -1; top: 0; z-index: 5; display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 4px 12px; text-align: left; padding: 6px 10px; }
  .op-title { grid-column: 2; align-self: end; margin: 0; }
  .op-stage { grid-row: 1 / span 2; grid-column: 1; height: 128px; aspect-ratio: auto; }
  .op-cap { grid-column: 2; align-self: start; margin: 0; font-size: 13px; }
}

/* form bits */
.field { margin: 0 0 18px; }
.field > label, .field > .label, fieldset > legend {
  display: block; font-family: var(--px); font-size: 10px; line-height: 1.6; margin-bottom: 8px; color: var(--ink);
}
.field .opt { color: var(--muted); font-family: var(--ui); font-size: 15px; text-transform: none; margin-left: 4px; }
.field .help { font-size: 15px; color: var(--muted); margin-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 18px; padding: 11px 12px; color: var(--ink);
  background: #fff; border: 0; box-shadow: 0 0 0 3px var(--ink); border-radius: 0;
  appearance: none;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; box-shadow: 0 0 0 3px var(--blue), 0 0 0 7px rgba(8,92,252,.2); }
.input.invalid { box-shadow: 0 0 0 3px var(--red), 0 0 0 7px rgba(217,74,74,.18); }
.err { color: var(--red-d); font-size: 15px; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 0; } }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 0; background: #fff; color: var(--ink); cursor: pointer; padding: 9px 13px; font-size: 17px;
  box-shadow: 0 0 0 3px var(--ink); display: inline-flex; align-items: center; gap: 6px;
  transition: transform .08s;
}
.chip:hover { background: #eef4ff; }
.chip:active { transform: translateY(2px); }
.chip[aria-pressed="true"] { background: var(--blue); color: #fff; }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.chip .ic { font-size: 19px; }

.style-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.style-card { border: 0; background: #fff; padding: 10px; cursor: pointer; box-shadow: 0 0 0 3px var(--ink); color: var(--ink); text-align: center; }
.style-card img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.style-card b { display: block; font-family: var(--px); font-size: 11px; margin-top: 6px; }
.style-card span { font-size: 15px; color: var(--muted); }
.style-card[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--blue), 0 0 0 7px var(--ink); background: #eef4ff; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
@media (max-width: 560px) { .swatches { grid-template-columns: repeat(3, 1fr); gap: 10px; } .swatch { font-size: 13px; } }
.swatch { border: 0; background: #fff; padding: 6px 6px 8px; cursor: pointer; box-shadow: 0 0 0 3px var(--ink); color: var(--ink); font-size: 14px; line-height: 1.2; }
.swatch img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--blue), 0 0 0 7px var(--ink); background: #eef4ff; }
.dots { display: flex; flex-wrap: wrap; gap: 10px; }
.dot { width: 40px; height: 40px; border: 0; cursor: pointer; box-shadow: 0 0 0 3px var(--ink); position: relative; }
.dot[aria-pressed="true"]::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.dot[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--blue); }
.dot-label { font-size: 16px; color: var(--muted); margin-top: 8px; }

.upload {
  display: grid; place-items: center; text-align: center; gap: 6px; padding: 22px; cursor: pointer;
  background: repeating-linear-gradient(45deg, #fff 0 12px, #f4f7fd 12px 24px);
  box-shadow: 0 0 0 3px var(--ink); outline: 3px dashed var(--blue); outline-offset: -12px;
  font-size: 17px;
}
.field > label.upload { display: grid; font-family: var(--ui); font-size: 17px; position: relative; margin: 0; }
.upload:hover { background: #eef4ff; }
.field > label.check { display: flex; gap: 10px; align-items: center; font-family: var(--ui); font-size: 17px; margin-top: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.gc-cta { display: block; margin-top: 10px; font-family: var(--px); font-size: 10px; color: #fff; background: var(--blue); padding: 9px 10px; text-align: center; box-shadow: inset -3px -3px 0 rgba(0,0,0,.2); }
.gift-card:hover .gc-cta { background: var(--blue-d); }
.top-grid .gc-check { display: none; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload .big { font-size: 34px; }
.previews { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.preview { position: relative; width: 110px; height: 110px; box-shadow: 0 0 0 3px var(--ink); }
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview button { position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--red); color: #fff; cursor: pointer; box-shadow: 0 0 0 2px var(--ink); }

.sound-good { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; background: #fff7dc; box-shadow: 0 0 0 3px var(--ink); margin-bottom: 20px; }
.sound-good p { margin: 0 auto 0 0; font-size: 18px; }
.callout { padding: 14px 16px; background: #eef4ff; box-shadow: 0 0 0 3px var(--ink); font-size: 18px; margin-bottom: 18px; }
.callout.gold { background: #fff7dc; }
.diet-note { margin-top: 16px; font-size: 17px; animation: dialog-in .25s ease; }
.yay { font-family: var(--px); font-size: 11px; color: var(--green); line-height: 1.6; margin-top: 10px; }
.zim-stack { position: relative; height: 150px; margin: 4px 0 18px; }
.zim-stack img { position: absolute; width: 230px; left: 50%; top: 10px; box-shadow: 0 0 0 2px var(--ink), 4px 4px 0 rgba(0,0,0,.2); transform-origin: 50% 120%; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag { background: var(--ink); color: #fff; padding: 6px 10px; font-size: 16px; display: inline-flex; gap: 8px; align-items: center; }
.tag button { background: none; border: 0; color: #fff; cursor: pointer; padding: 0; font-size: 16px; }
.team-entry { display: flex; gap: 8px; }
.team-entry .input { flex: 1; }
.privacy { font-size: 15px; color: var(--muted); margin-top: 14px; }

.wrapping { text-align: center; padding: 40px 10px; }
.wrapping .box { font-size: 60px; display: inline-block; animation: shake .5s ease-in-out infinite; }
@keyframes shake { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

/* ============================================================
   DONE
   ============================================================ */
#screen-done { align-items: center; justify-content: center; padding: 20px 16px; overflow-y: auto; }
.done { width: min(640px, 100%); text-align: center; position: relative; }
.done .panel { padding: 30px 26px 26px; }
.present { width: 120px; height: 110px; margin: 0 auto 20px; position: relative; }
.present .p-box { position: absolute; left: 10px; right: 10px; bottom: 0; height: 74px; background: var(--red); box-shadow: 0 0 0 4px var(--ink), inset -8px -8px 0 rgba(0,0,0,.15); }
.present .p-lid { position: absolute; left: 0; right: 0; top: 18px; height: 24px; background: var(--red); box-shadow: 0 0 0 4px var(--ink), inset -8px -6px 0 rgba(0,0,0,.15); animation: lid 1s .4s cubic-bezier(.3,1.6,.5,1) forwards; }
.present .p-rib-v { position: absolute; left: 50%; margin-left: -9px; width: 18px; top: 18px; bottom: 0; background: var(--gold); }
.present .p-bow { position: absolute; left: 50%; top: 0; margin-left: -26px; width: 52px; height: 22px; background: radial-gradient(circle at 25% 50%, var(--gold) 10px, transparent 11px), radial-gradient(circle at 75% 50%, var(--gold) 10px, transparent 11px); animation: lid 1s .4s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes lid { to { transform: translateY(-36px) rotate(-14deg); } }
.present .p-glow { position: absolute; left: 50%; top: 40px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 60px 40px rgba(255,216,74,.8); opacity: 0; animation: glow 1s .6s forwards; }
@keyframes glow { to { opacity: 1; } }
.done h1 { font-family: var(--px); font-size: clamp(16px, 3.6vw, 24px); line-height: 1.5; margin: 0 0 10px; }
.done p { font-size: 19px; margin: 0 0 12px; }
.done .gift-line { font-family: var(--px); font-size: 12px; color: var(--blue); line-height: 1.8; margin: 14px 0; }
.done .sig { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.done .sig img { height: 34px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; width: 100%; height: 100%; }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 40; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; font-size: 17px; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); animation: toast 2.6s ease forwards; white-space: nowrap; }
@keyframes toast { 0% { transform: translateY(-14px); opacity: 0; } 10%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }

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