/* Layout: a small-town guitar shop at dusk, drawn in a matte low-poly toon style.
   Muted slate UI, a front window looking out on pines and a dusky sky, a plain wood
   counter where customers walk up, and a green cutting mat on the workbench. */
:root {
  --wall: #252a31;
  --wall-2: #343b45;
  --peg: #1c2026;
  --panel: #2c323a;
  --wood: #b07240;
  --wood-2: #7d4a24;
  --wood-3: #4b2a14;
  --mat: #2f4a3e;
  --paper: #f3ecdf;
  --ink: #1b1d22;
  --cream: #ece6dc;
  --muted: #a9b0ba;
  --neon: #ff6fa8;
  --amber: #f2a54a;
  --good: #6cc28e;
  --bad: #e8705e;

  --font-sign: "Monoton", "Bungee", Impact, sans-serif;
  --font-display: "Bungee", Impact, "Arial Black", sans-serif;
  /* Copy font: Narkiss. If the Narkiss font file is in fonts/, it's used; otherwise Heebo, a close free match. */
  --font-hand: "Narkiss", "Narkiss Tam", "Narkiss Yair", "Heebo", "Rubik", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: dark;
}

@font-face {
  font-family: "Narkiss";
  src: local("Narkiss Tam"), local("Narkiss Yair"), local("Narkiss"),
       url("fonts/narkiss.woff2") format("woff2"),
       url("fonts/narkiss.woff") format("woff"),
       url("fonts/narkiss.ttf") format("truetype"),
       url("fonts/narkiss.otf") format("opentype");
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--wall); }
body {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  background: linear-gradient(180deg, #3a4350 0, var(--wall) 420px) no-repeat, var(--wall);
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

#app {
  min-height: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main { flex: 1; display: flex; flex-direction: column; }

/* ---------- HUD ---------- */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
}
.hud-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hud-logo {
  flex: none;
  width: 44px; height: 26px;
  fill: var(--amber);
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.35));
}
.hud-name {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .02em;
  line-height: 1.15;
  color: var(--cream);
}
.hud-stats { display: flex; align-items: center; gap: 8px; }
.stat {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 3px 10px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-val { font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--amber); }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--cream); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .spk { fill: var(--cream); }
.icon-btn .x { display: none; }
.icon-btn[aria-pressed="true"] .wave { display: none; }
.icon-btn[aria-pressed="true"] .x { display: inline; stroke: var(--bad); }

@media (max-width: 420px) {
  .hud-name { font-size: 11px; max-width: 9.5em; }
  .stat { padding: 2px 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .02em;
  color: var(--ink);
  background: var(--amber);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px 18px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  touch-action: manipulation;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn-big { font-size: 19px; padding: 15px 24px; width: 100%; max-width: 420px; align-self: center; }
.btn-ship { background: var(--neon); }
.btn-ghost { background: var(--panel); color: var(--cream); border-color: var(--ink); }
.btn-small { font-size: 13px; min-height: 40px; padding: 8px 14px; box-shadow: 0 3px 0 var(--ink); }

/* ---------- Screens ---------- */
.screen { display: none; flex: 1; flex-direction: column; gap: 16px; padding-block: 6px 28px; }
.screen.is-active { display: flex; animation: screenIn .35s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Title ---------- */
.screen-title { align-items: center; text-align: center; justify-content: center; gap: 22px; }
.sign-wrap { position: relative; padding: 26px 12px 18px; width: 100%; max-width: 640px; }
.sign { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 400; }
.sign-logo {
  display: block; margin: 0 auto 14px;
  width: clamp(120px, 34vw, 200px); aspect-ratio: 660 / 390; height: auto;
  fill: var(--cream);
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.35));
}
.sign-small {
  font-family: var(--font-display);
  font-size: clamp(18px, 5.4vw, 30px);
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 200, 69, .8), 0 0 20px rgba(255, 200, 69, .35);
}
.sign-big {
  font-family: var(--font-sign);
  font-size: clamp(34px, 10.5vw, 76px);
  line-height: 1.05;
  color: #ffe3f0;
  text-shadow: 0 0 4px #fff, 0 0 10px var(--neon), 0 0 24px var(--neon), 0 0 48px var(--neon);
  animation: flicker 6s infinite;
}
.sign-sub { margin: 12px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.open-sign {
  position: absolute; top: 0; right: 4%;
  font-family: var(--font-display); font-size: 12px;
  color: #c7fff0; padding: 2px 8px;
  border: 2px solid #59f0c8; border-radius: 6px;
  text-shadow: 0 0 6px #59f0c8;
  box-shadow: 0 0 10px rgba(89, 240, 200, .5);
  transform: rotate(6deg);
}
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: .55; }
}
.tagline { margin: 0; max-width: 34ch; font-size: 18px; text-wrap: balance; }
.howto {
  list-style: none; counter-reset: step;
  margin: 0; padding: 0;
  display: grid; gap: 10px;
  width: 100%; max-width: 460px;
  text-align: left;
}
.howto li {
  counter-increment: step;
  position: relative;
  min-height: 62px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 12px 14px 12px 62px;
  font-size: 15px;
}
.howto li::before {
  content: counter(step);
  position: absolute; left: 14px; top: 12px;
  font-family: var(--font-display);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--amber); color: var(--ink);
}
.howto b { color: var(--amber); font-weight: 700; }
.best { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Counter ---------- */
.scene {
  position: relative;
  height: clamp(280px, 46dvh, 420px);
  border: 3px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  background: #7f93ab;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.wall-deco { position: absolute; inset: 0; pointer-events: none; }
.town { position: absolute; inset: 0; width: 100%; height: 100%; }
.window-frame {
  position: absolute; inset: 0;
  border: 14px solid #4a4f57;
  border-bottom: 0;
  background:
    linear-gradient(90deg, transparent calc(33% - 5px), #4a4f57 calc(33% - 5px) calc(33% + 5px), transparent calc(33% + 5px)),
    linear-gradient(90deg, transparent calc(66% - 5px), #4a4f57 calc(66% - 5px) calc(66% + 5px), transparent calc(66% + 5px));
  box-shadow: inset 0 0 40px rgba(20, 24, 32, .35);
}
.shop-sign {
  position: absolute; top: 22px; right: 22px;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 10px; letter-spacing: .12em;
  color: #2a2d33; background: #e7dccb;
  padding: 3px 8px; border-radius: 3px;
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
  opacity: .85;
}
.customer-wrap {
  position: absolute;
  bottom: 30px; right: 5%;
  width: min(42%, 210px);
  filter: drop-shadow(0 6px 10px rgba(20, 24, 32, .3));
}
.customer { width: 100%; }
.customer svg { display: block; width: 100%; height: auto; }
.customer-wrap.is-entering { animation: walkIn .9s cubic-bezier(.2,.8,.3,1) both; }
.customer-wrap.is-entering .customer { animation: bob .45s ease-in-out 2 alternate; }
.customer.idle { animation: breathe 3s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes walkIn { from { transform: translateX(130%); } to { transform: none; } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.015); } }
.bubble {
  position: absolute; z-index: 3;
  top: 58px; left: 12px;
  width: min(56%, 330px);
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(20, 24, 32, .35);
  animation: pop .35s .7s cubic-bezier(.3,1.6,.5,1) both;
}
.bubble::after {
  content: ""; position: absolute; right: -14px; top: 28px;
  border: 10px solid transparent; border-left: 14px solid var(--paper);
}
.bubble-name { margin: 0 0 4px; font-family: var(--font-display); font-size: 12px; color: #b0522a; letter-spacing: .03em; }
.bubble-text { margin: 0; font-family: var(--font-hand); font-size: 15px; font-weight: 500; line-height: 1.35; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.counter-top {
  position: absolute; left: 0; right: 0; bottom: 0; height: 50px; z-index: 2;
  background:
    linear-gradient(#a08a74 0 9px, #7c6856 9px 12px, #8d7763 12px 100%);
  box-shadow: 0 -4px 14px rgba(0,0,0,.25);
}
.bell {
  position: absolute; left: 12%; top: -20px;
  width: 30px; height: 18px;
  background: linear-gradient(90deg, #f1d58e, #c9a04a 60%, #9c7a32);
  border-radius: 30px 30px 4px 4px;
}
.counter-side { display: flex; flex-direction: column; gap: 16px; }

.shop-sign svg { width: 22px; height: 13px; fill: #2a2d33; }

/* ---------- Order ticket ---------- */
.ticket {
  position: relative;
  background:
    repeating-linear-gradient(transparent 0 25px, rgba(60, 40, 20, .1) 25px 26px),
    var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 18px 16px 14px;
  box-shadow: 0 6px 0 rgba(0,0,0,.35);
  transform: rotate(-.6deg);
  max-width: 460px;
  width: 100%;
  align-self: center;
}
.ticket::before {
  content: ""; position: absolute; top: -10px; left: 50%;
  width: 84px; height: 22px; transform: translateX(-50%) rotate(2deg);
  background: rgba(255, 230, 160, .7);
  border: 1px solid rgba(0,0,0,.08);
}
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 2px dashed rgba(34, 20, 28, .35); padding-bottom: 6px; margin-bottom: 8px; }
.ticket-title { font-family: var(--font-hand); font-size: 19px; font-weight: 700; line-height: 1.15; }
.ticket-no { font-family: var(--font-display); font-size: 11px; color: #8a5a34; white-space: nowrap; }
.ticket-rows { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.ticket-rows dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #7d4a24; padding-top: 3px; }
.ticket-rows dd { margin: 0; font-family: var(--font-hand); font-size: 15px; font-weight: 500; line-height: 1.3; min-width: 0; }
.ticket-rows dd img { width: 28px; height: 28px; vertical-align: middle; margin-right: 2px; }
.ticket-rows dd.no img { opacity: .9; }
.no-sticker { position: relative; display: inline-block; }
.no-sticker::after {
  content: ""; position: absolute; left: 0; right: 4px; top: 50%; height: 3px;
  background: #d1243b; transform: rotate(-35deg); border-radius: 2px;
}
.ticket-small { transform: none; box-shadow: 0 6px 18px rgba(0,0,0,.45); padding: 12px 12px 10px; }
.ticket-small::before { display: none; }
.ticket-small .ticket-title { font-size: 16px; }
.ticket-small .ticket-rows dd { font-size: 14px; }
.ticket-small .ticket-rows dd img { width: 22px; height: 22px; }

/* ---------- Build ---------- */
.screen-build { gap: 12px; }
.bench {
  position: relative;
  height: clamp(300px, 50dvh, 560px);
  border: 3px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px) 0 0 / 96px 96px,
    var(--mat);
}
.stage-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; }
.stage { position: relative; height: 100%; aspect-ratio: 200 / 420; max-width: 100%; }
.stage.drop-hover::after {
  content: ""; position: absolute; inset: 40% -6% -2%;
  border: 3px dashed var(--amber); border-radius: 30px; pointer-events: none;
}
.guitar, .guitar svg { width: 100%; height: 100%; display: block; }
.guitar svg { filter: drop-shadow(0 12px 10px rgba(0,0,0,.45)); overflow: visible; }
.guitar.pop svg { animation: guitarPop .35s cubic-bezier(.3,1.7,.5,1); }
@keyframes guitarPop { 0% { transform: scale(.96); } 100% { transform: none; } }
.sticker-layer { position: absolute; inset: 0; }
.placed {
  position: absolute;
  width: 26%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.placed.dragging { cursor: grabbing; z-index: 5; }
.placed.dragging img { transform: scale(1.15); }
.placed.peeling { opacity: .45; }
.placed.slap { animation: slap .3s cubic-bezier(.3,1.8,.5,1); }
@keyframes slap { from { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1.6); opacity: 0; } }
.placed img { width: 100%; height: 100%; display: block; pointer-events: none; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 2px 2px rgba(0,0,0,.45)); transition: transform .1s; -webkit-user-drag: none; }
.placed.selected::before {
  content: ""; position: absolute; inset: -6%;
  border: 2px dashed var(--amber); border-radius: 10px;
}
.peel-btn {
  position: absolute; top: -12px; right: -12px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bad); color: #fff;
  border: 2px solid var(--ink);
  font-weight: 700; font-size: 15px; line-height: 1;
  display: none; place-items: center; cursor: pointer; padding: 0;
}
.placed.selected .peel-btn { display: grid; }
.peel-hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  margin: 0; padding: 4px 10px; border-radius: 99px;
  background: rgba(0,0,0,.6); font-size: 12px; white-space: nowrap;
}
.ghost {
  position: fixed; z-index: 50; width: 64px; height: 64px;
  transform: translate(-50%, -60%) rotate(-8deg) scale(1.1);
  pointer-events: none;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.5));
}

.order-peek { position: absolute; top: 10px; left: 10px; z-index: 6; max-width: calc(100% - 20px); }
.order-peek summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 99px;
  padding: 3px 12px 3px 3px;
  font-family: var(--font-hand); font-size: 15px;
  box-shadow: 0 3px 0 rgba(0,0,0,.4);
}
.order-peek summary::-webkit-details-marker { display: none; }
.order-peek summary::after { content: "\25BE"; font-family: var(--font-body); font-size: 12px; }
.order-peek[open] summary::after { content: "\25B4"; }
.peek-face { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--wall-2); border: 2px solid var(--ink); flex: none; }
.peek-face svg { width: 100%; height: auto; display: block; transform: scale(1.7) translateY(18%); }
.order-peek .ticket { margin-top: 8px; width: min(340px, 100%); max-height: 60vh; overflow: auto; }

.station {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tab {
  font-family: var(--font-display); font-size: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 2px;
  border: 2px solid transparent; border-radius: 12px;
  background: rgba(255,255,255,.05); color: var(--muted);
  cursor: pointer;
}
.tab span { font-size: 10px; opacity: .7; }
.tab[aria-selected="true"] { background: var(--amber); color: var(--ink); border-color: var(--ink); }
.panel { display: flex; flex-direction: column; gap: 8px; }
.group-label {
  margin: 4px 0 0; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.group-value { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--amber); margin-left: 6px; font-size: 13px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 8px 12px;
  border: 2px solid rgba(255,255,255,.14); border-radius: 12px;
  background: rgba(255,255,255,.05);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .1s, background .15s;
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--amber); color: var(--ink); border-color: var(--ink); }
.chip:disabled { opacity: .35; cursor: not-allowed; }
.chip .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.opt-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); }
.opt-thumbs .chip { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 12px; }
.opt-thumbs svg { width: 40px; height: 48px; display: block; }
.opt-thumbs svg path { fill: currentColor; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.swatch {
  aspect-ratio: 1; width: 100%; max-width: 52px; justify-self: center;
  border-radius: 50%;
  border: 3px solid var(--ink);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), inset 0 4px 0 rgba(255,255,255,.25);
  cursor: pointer; padding: 0;
  transition: transform .1s;
}
.swatch:active { transform: scale(.9); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--amber); outline-offset: 3px; transform: scale(1.06); }
.note { margin: 0; font-size: 13px; color: var(--muted); }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
.tray-item {
  aspect-ratio: 1; padding: 6px;
  border: 2px solid rgba(255,255,255,.12); border-radius: 12px;
  background: rgba(255,255,255,.05);
  cursor: grab; touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.tray-item img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.tray-item:active { transform: scale(.94); }
.actions { display: flex; gap: 10px; margin-top: 4px; }
.actions .btn { flex: 1; padding-inline: 10px; }

/* ---------- Ship ---------- */
.screen-ship { align-items: stretch; }
.packing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 360px; }
.box { position: relative; width: 210px; height: 150px; margin-top: 140px; perspective: 600px; }
.box-back, .box-front { position: absolute; inset: 0; border: 3px solid var(--ink); border-radius: 6px; }
.box-back { background: #a86f3c; }
.box-front {
  z-index: 2;
  background: linear-gradient(#d39a5f, #c0844a);
  display: grid; place-items: center;
}
.stamp {
  font-family: var(--font-display); font-size: 22px; color: #c2203a;
  border: 3px solid #c2203a; padding: 0 8px; border-radius: 6px;
  transform: rotate(-10deg); opacity: 0;
}
.tape { position: absolute; top: -3px; left: 50%; width: 36px; height: 60px; transform: translateX(-50%); background: rgba(240, 220, 170, .75); }
.box-guitar {
  position: absolute; z-index: 1; left: 50%; bottom: 8px;
  width: 64px; height: 134px;
  transform: translate(-50%, -200px);
}
.box-guitar svg { width: 100%; height: 100%; }
.flap { position: absolute; z-index: 3; top: -3px; width: 50%; height: 64px; background: #b97c43; border: 3px solid var(--ink); }
.flap-l { left: 0; transform-origin: top left; transform: rotateZ(-115deg); }
.flap-r { right: 0; transform-origin: top right; transform: rotateZ(115deg); }
.packing.go .box-guitar { animation: dropIn .7s cubic-bezier(.5,0,.75,0) forwards; }
.packing.go .flap-l { animation: flapL .35s .75s ease-out forwards; }
.packing.go .flap-r { animation: flapR .35s .85s ease-out forwards; }
.packing.go .stamp { animation: stamp .25s 1.2s ease-out forwards; }
.packing.go .box { animation: shipOut .5s 1.55s ease-in forwards; }
@keyframes dropIn { to { transform: translate(-50%, 0); } }
@keyframes flapL { to { transform: rotateZ(0deg); } }
@keyframes flapR { to { transform: rotateZ(0deg); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-10deg) scale(2); } to { opacity: 1; transform: rotate(-10deg) scale(1); } }
@keyframes shipOut { 20% { transform: translateX(-12px); } to { transform: translateX(120vw) rotate(8deg); } }
.packing-text { margin: 0; font-family: var(--font-hand); font-size: 20px; color: var(--muted); }

.result { display: flex; flex-direction: column; gap: 16px; animation: screenIn .4s ease both; }
.result-top { display: flex; align-items: flex-end; gap: 12px; }
.result-face {
  flex: none; width: 104px; height: 120px;
  border-radius: 18px; overflow: hidden;
  border: 3px solid var(--ink); background: var(--wall-2);
}
.result-face svg { width: 100%; height: auto; display: block; transform: translateY(4px); }
.result-bubble {
  position: relative; flex: 1; min-width: 0;
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 16px;
  padding: 10px 14px 12px;
}
.result-bubble::before {
  content: ""; position: absolute; left: -16px; bottom: 18px;
  border: 10px solid transparent; border-right: 14px solid var(--ink);
}
.stars { margin: 0; font-size: 26px; letter-spacing: 2px; color: #d99a12; line-height: 1; }
.stars .off { color: rgba(34, 20, 28, .2); }
.quote { margin: 6px 0 0; font-family: var(--font-hand); font-size: 17px; font-weight: 500; line-height: 1.35; }
.quote-by { margin: 6px 0 0; font-size: 12px; font-weight: 700; color: #7d4a24; text-transform: uppercase; letter-spacing: .06em; }
.result-body {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start;
  background: var(--panel); border: 3px solid var(--ink); border-radius: 20px; padding: 14px;
}
.result-guitar { width: 112px; aspect-ratio: 200 / 420; }
.result-guitar svg { width: 100%; height: 100%; display: block; }
.result-info { min-width: 0; }
.verdict-label { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.match-name { margin: 2px 0 4px; font-family: var(--font-display); font-size: 20px; line-height: 1.15; color: var(--neon); }
.match-blurb { margin: 0; font-size: 14px; }
.tip { margin: 10px 0 0; font-family: var(--font-display); font-size: 18px; color: var(--amber); }
.checklist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.checklist li { display: flex; gap: 8px; align-items: baseline; }
.checklist .mark { font-weight: 700; width: 14px; flex: none; }
.checklist .ok .mark { color: var(--good); }
.checklist .miss { color: var(--muted); }
.checklist .miss .mark { color: var(--bad); }

/* ---------- End ---------- */
.screen-end { align-items: center; text-align: center; }
.end-head { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.end-kicker { margin: 10px 0 0; font-family: var(--font-sign); font-size: clamp(28px, 9vw, 52px); color: #ffe3f0; text-shadow: 0 0 10px var(--neon), 0 0 26px var(--neon); line-height: 1.1; }
.end-cash { margin: 0; font-family: var(--font-display); font-size: 28px; color: var(--amber); font-weight: 400; }
.end-rank { margin: 0; font-size: 16px; max-width: 36ch; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; width: 100%; max-width: 900px; }
.gallery-card {
  background: var(--panel); border: 3px solid var(--ink); border-radius: 16px;
  padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.gallery-card .g { width: 64px; aspect-ratio: 200 / 420; }
.gallery-card .g svg { width: 100%; height: 100%; display: block; }
.gallery-card .who { font-family: var(--font-display); font-size: 12px; line-height: 1.2; }
.gallery-card .gstars { color: var(--amber); font-size: 14px; letter-spacing: 1px; }

/* ---------- Wider screens ---------- */
@media (min-width: 760px) {
  .screen-counter { display: none; }
  .screen-counter.is-active { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 20px; }
  .scene { height: min(70dvh, 520px); }
  .bubble-text { font-size: 17px; }
  .screen-build.is-active { display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: start; gap: 16px; }
  .bench { height: max(520px, calc(100dvh - 110px)); max-height: 820px; }
  .result-body { grid-template-columns: 170px minmax(0, 1fr); }
  .result-guitar { width: 170px; }
  .result, .packing { width: 100%; max-width: 720px; align-self: center; }
}

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