/* Die Grete: one dark, warm bar look. Single theme on purpose (the bar at night).
   Layout: fixed-height phone column; HUD, scene, stats, scrolling panel, tab bar. */
:root {
  --night: #1b100a;        /* page around the app */
  --wood-dark: #24150c;    /* bars, panels */
  --wood: #3c2213;
  --wood-light: #6b3f22;
  --ochre: #d9ae55;        /* Grete walls */
  --curtain: #a3212a;      /* red velvet, used for danger + accents */
  --brass: #d4ab55;
  --paper: #f3eee2;
  --ink: #f6ead2;          /* text on dark */
  --ink-dim: #c4ad86;
  --ember: #ff7a2f;
  --zone: #7fbf4d;
  --sweet: #f4d35e;
  --line: rgba(246, 234, 210, .14);

  --font-display: "Rockwell", "Roboto Slab", "Zilla Slab", "DejaVu Serif", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-hand: "Segoe Print", "Bradley Hand", "Comic Neue", "Chalkboard SE", cursive;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 15px/1.4 var(--font-body);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sweet); outline-offset: 2px; }

#app {
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--wood-dark);
  box-shadow: 0 0 60px rgba(0, 0, 0, .6);
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
}

/* ---------- HUD ---------- */
.hud {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px max(14px, env(safe-area-inset-left, 0px)) 10px max(14px, env(safe-area-inset-right, 0px));
  background: var(--wood-dark);
  border-bottom: 1px solid var(--line);
}
.clock { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.clock b {
  font: 700 22px/1 var(--font-display);
  color: var(--ember);
  text-shadow: 0 0 10px rgba(255, 122, 47, .55);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.clock small { font-size: 10px; color: var(--ink-dim); margin-top: 3px; white-space: nowrap; }
.clock.late b { color: var(--curtain); text-shadow: 0 0 10px rgba(163, 33, 42, .8); animation: blink 1s steps(2) infinite; }

.goal { min-width: 0; }
.goal-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goal-line span { font-size: 11px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.goal-line b { font: 700 15px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-of { display: block; font-size: 10.5px; color: var(--ink-dim); margin-top: 3px; }
.goal-of b { color: var(--ink); font-weight: 600; }

/* progress bar drawn as a cigarette that burns down towards the filter */
.cig { display: flex; height: 10px; margin-top: 5px; border-radius: 2px; overflow: visible; }
.cig-filter { flex: 0 0 14%; background: repeating-linear-gradient(90deg, #fbfaf6 0 2px, #dcd8cf 2px 3px); border-radius: 2px 0 0 2px; border-right: 1px solid #cfc9bc; }
.cig-paper { position: relative; flex: 1; background: var(--paper); border-radius: 0 2px 2px 0; }
.cig-ash {
  position: absolute; right: 0; top: 0; bottom: 0; width: 0%;
  background: repeating-linear-gradient(90deg, #8a8580 0 2px, #6e6964 2px 4px);
  border-radius: 0 2px 2px 0;
  transition: width .4s ease-out;
}
.cig-ash::before {
  content: ""; position: absolute; left: -3px; top: -1px; bottom: -1px; width: 5px; border-radius: 2px;
  background: var(--ember); box-shadow: 0 0 8px 2px rgba(255, 122, 47, .8);
  animation: glow 1.6s ease-in-out infinite;
}

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; fill: var(--ink); }

/* ---------- scene ---------- */
.scene {
  position: relative;
  flex: 0 0 auto;
  height: clamp(170px, 29vh, 260px);
  overflow: hidden;
  background: var(--ochre);
}
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 55% 45%, transparent 30%, rgba(12, 7, 3, .75) 100%);
}
.puff { fill: #e8e4dc; opacity: .5; transform-box: fill-box; transform-origin: center; animation: puff 2.6s ease-out forwards; }
.puff.big { opacity: .7; animation-duration: 2.4s; }
.leo .leo-arm { transform-box: view-box; transform-origin: 147px 140px; transition: transform .35s ease; }
.leo.drag .leo-arm { transform: rotate(-38deg) translate(-6px, -4px); }
.ember { animation: glow 1.8s ease-in-out infinite; }
.solli-arm { transform-box: view-box; transform-origin: 316px 118px; animation: polish 3.2s ease-in-out infinite; }
.beer { cursor: pointer; }
.haze { opacity: var(--haze, .3); transition: opacity 2s; }
.haze ellipse { transform-box: fill-box; transform-origin: center; animation: drift 26s ease-in-out infinite alternate; }
.haze .h2 { animation-duration: 34s; animation-direction: alternate-reverse; }
.haze .h3 { animation-duration: 41s; }
.haze .h4 { animation-duration: 29s; animation-direction: alternate-reverse; }
.beer-ring { transform-box: fill-box; transform-origin: center; animation: ring 1s ease-out infinite; }

.bubble {
  position: absolute; z-index: 3; max-width: 58%;
  padding: 6px 10px; border-radius: 12px;
  background: var(--paper); color: #2a1a10;
  font: 600 13px/1.25 var(--font-hand);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.bubble.show { opacity: 1; transform: none; }
.bubble::after { content: ""; position: absolute; bottom: -6px; width: 12px; height: 12px; background: var(--paper); transform: rotate(45deg); }
.leo-bubble { left: 18%; top: 10%; }
.leo-bubble::after { left: 34%; }
.solli-bubble { right: 3%; top: 6%; text-align: right; }
.solli-bubble::after { right: 26%; }

.floats { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.float {
  position: absolute; left: 30%; top: 46%;
  font: 700 15px var(--font-display); color: var(--paper);
  text-shadow: 0 1px 0 #000, 0 0 8px rgba(0, 0, 0, .6);
  white-space: nowrap; animation: floatUp 1.3s ease-out forwards;
}
.float.perfekt { color: var(--sweet); }

.banner {
  position: absolute; left: 50%; bottom: 10px; z-index: 4; transform: translateX(-50%) scale(.9);
  padding: 6px 14px; border-radius: 4px; white-space: nowrap;
  background: var(--curtain); color: var(--paper); border: 1px solid var(--brass);
  font: 700 14px var(--font-display); letter-spacing: .04em; text-transform: uppercase;
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
}
.banner.show { opacity: 1; transform: translateX(-50%) scale(1); }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--wood);
  border-top: 2px solid var(--brass);
  border-bottom: 1px solid rgba(0, 0, 0, .4);
}
.stat { position: relative; padding: 6px 4px 7px; text-align: center; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat small { display: block; font-size: 10px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .06em; }
.stat b { display: block; font: 700 14px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-timer { position: absolute; left: 10%; right: 10%; bottom: 2px; height: 2px; background: var(--sweet); transform-origin: left; transform: scaleX(0); }
.stat.flow b { color: var(--sweet); }
.pegel { letter-spacing: 1px; }
.pegel .mug { display: inline-block; width: 7px; height: 11px; margin: 0 1px; border-radius: 1px 1px 2px 2px; background: rgba(246, 234, 210, .18); vertical-align: -1px; }
.pegel .mug.full { background: var(--sweet); }
.pegel.wobbly .mug.full { background: var(--ember); }

/* ---------- panel + tabs ---------- */
.panel { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.tab { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#tab-drehen { overflow: hidden; }

.tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--wood-dark); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabs button {
  position: relative; border: 0; background: none; cursor: pointer;
  padding: 12px 4px 13px; font-size: 13px; font-weight: 600; color: var(--ink-dim);
  letter-spacing: .02em;
}
.tabs button.active { color: var(--ink); box-shadow: inset 0 2px 0 var(--ember); }
.tabs .dot { position: absolute; top: 8px; right: calc(50% - 32px); width: 7px; height: 7px; border-radius: 50%; background: var(--ember); display: none; }
.tabs button.ready .dot { display: block; }

/* ---------- rolling mat ---------- */
.roll-head { padding: 8px max(14px, env(safe-area-inset-left, 0px)) 6px max(14px, env(safe-area-inset-right, 0px)); }
.steps { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.steps li {
  flex: 1; text-align: center; padding: 4px 0 3px; border-radius: 3px;
  font-size: 11px; font-weight: 600; color: var(--ink-dim);
  background: rgba(246, 234, 210, .06); border-bottom: 2px solid transparent;
}
.steps li small { display: block; font-size: 9px; font-weight: 500; opacity: .8; }
.steps li.done { color: var(--zone); }
.steps li.now { color: var(--ink); border-bottom-color: var(--ember); background: rgba(255, 122, 47, .12); }
.steps li.auto { opacity: .45; text-decoration: line-through; }
.hint { margin: 7px 0 0; min-height: 2.6em; font-size: 14px; text-wrap: balance; }

.mat {
  position: relative; flex: 1; min-height: 250px; margin: 0 10px 10px;
  border-radius: 8px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 23px),
    linear-gradient(180deg, #7a4626 0%, #6b3f22 45%, #5a3219 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .08), inset 0 -10px 30px rgba(0, 0, 0, .35);
}
.pack {
  position: absolute; left: 12px; top: 14px; width: 92px; height: 62px; padding: 0; cursor: pointer;
  border: 0; border-radius: 2px;
  background: linear-gradient(160deg, #262626, #0d0d0d 60%);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
/* papers peeking out of the booklet */
.pack::before { content: ""; position: absolute; left: 6px; right: 6px; top: -4px; height: 5px; background: #f1ede3; border-radius: 1px 1px 0 0; }
.pack b { font: 700 16px/1 Georgia, "DejaVu Serif", serif; letter-spacing: .14em; color: #f4f1ea; }
.pack small { font-size: 7.5px; letter-spacing: .12em; text-transform: uppercase; color: #bdb8ad; }
.mat[data-step="paper"] .pack { animation: nudge 1.2s ease-in-out infinite; box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 0 3px var(--sweet); }

.filterbox {
  position: absolute; left: 12px; bottom: 12px; width: 84px; height: 58px; border-radius: 3px 3px 6px 6px; cursor: grab;
  background: linear-gradient(180deg, rgba(235, 238, 240, .55), rgba(210, 215, 220, .35));
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; overflow: hidden;
}
.bag-label { background: #111; color: #f4f1ea; text-align: center; padding: 2px 0 3px; line-height: 1; }
.bag-label b { display: block; font: 700 10px Georgia, "DejaVu Serif", serif; letter-spacing: .14em; }
.bag-label small { font-size: 6.5px; letter-spacing: .08em; text-transform: uppercase; color: #bdb8ad; }
.tips { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px 4px; padding: 5px 6px; align-content: center; }
.tips i { height: 7px; border-radius: 3px; background: repeating-linear-gradient(90deg, #fbfaf6 0 2px, #e3e0d8 2px 3px); box-shadow: 0 1px 1px rgba(0, 0, 0, .2); }
.mat[data-step="filter"] .filterbox { animation: nudge 1.2s ease-in-out infinite; box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 0 3px var(--sweet); }

.pouch {
  position: absolute; right: 12px; top: 12px; width: 78px; height: 60px; border-radius: 4px 4px 12px 12px;
  background: linear-gradient(180deg, #3a2414 0%, #24160c 55%, #170e07 100%);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .4), inset 0 6px 0 rgba(255, 255, 255, .05);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.pouch::before { content: ""; position: absolute; left: 6px; right: 6px; top: 7px; height: 1px; background: rgba(232, 220, 180, .25); }
.pouch b { font: 900 19px/1 Georgia, "DejaVu Serif", serif; letter-spacing: .06em; color: #efe2bf; text-shadow: 0 1px 0 #000; }
.pouch small { font-size: 8px; letter-spacing: .14em; text-transform: uppercase; color: #c99a4a; }

.paper {
  --roll: 0;
  position: absolute; left: 50%; top: 42%;
  width: min(66%, 280px); height: calc(66px - 46px * var(--roll));
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  background: var(--paper); border-radius: calc(2px + 10px * var(--roll));
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, calc(.18 * var(--roll))), transparent 40%, rgba(0, 0, 0, calc(.22 * var(--roll))));
  transition: transform .25s ease, opacity .2s, height .2s ease, border-radius .2s;
  overflow: hidden; pointer-events: none;
}
.paper.out { opacity: 1; transform: translate(-50%, -50%); }
.paper::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: rgba(216, 200, 160, .55); opacity: calc(1 - var(--roll)); }
.tobacco {
  --fill: 0;
  position: absolute; left: 6%; right: 4%; top: 50%;
  height: calc(var(--fill) * 70%); transform: translateY(-50%);
  border-radius: 6px;
  background: repeating-linear-gradient(80deg, #3a2312 0 2px, #24150b 2px 3px, #4a2e18 3px 4px, #1c1009 4px 5px);
  transition: height .05s linear;
}
.paper-filter {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: repeating-linear-gradient(0deg, #fbf8f1 0 3px, #e6dfcd 3px 4px);
  transition: width .2s ease;
}
.paper.has-filter .paper-filter { width: 15%; }
.lick { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); transform: translateX(-100%); }
.paper.licked .lick { animation: sheen .4s ease-out forwards; }
.paper.done { animation: away .42s ease-in forwards; }
.paper.torn { animation: tear .6s ease-out forwards; }

.gauge {
  position: absolute; left: 50%; top: calc(42% + 52px); transform: translateX(-50%);
  width: min(66%, 280px); height: 16px; border-radius: 8px;
  background: rgba(0, 0, 0, .35); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5);
  opacity: .35; transition: opacity .2s;
}
.mat[data-step="tobacco"] .gauge { opacity: 1; }
.zone { position: absolute; top: 2px; bottom: 2px; border-radius: 6px; background: var(--zone); display: grid; place-items: center; }
.sweet { height: 100%; border-radius: 6px; background: var(--sweet); }
.needle { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--paper); box-shadow: 0 0 6px rgba(0, 0, 0, .6); }

.drag-filter {
  position: absolute; left: 0; top: 0; width: 22px; height: 14px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #fbf8f1 0 3px, #e6dfcd 3px 4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45); display: none; pointer-events: none; z-index: 3;
}
.drag-filter.show { display: block; }

.verdict {
  position: absolute; left: 50%; top: 18%; transform: translate(-50%, 8px);
  font: 700 18px var(--font-display); white-space: nowrap; color: var(--paper);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5); opacity: 0; transition: opacity .15s, transform .15s; pointer-events: none;
}
.verdict.show { opacity: 1; transform: translate(-50%, 0); }
.verdict.perfekt { color: var(--sweet); }
.verdict.duenn, .verdict.zerrissen { color: #ffb3a1; }

/* ---------- shop lists ---------- */
.shop-head {
  display: flex; gap: 12px; align-items: center;
  padding: 12px max(14px, env(safe-area-inset-left, 0px)) 10px max(14px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
}
.shop-head p { margin: 0; font-size: 13.5px; color: var(--ink-dim); }
.shop-head p b { color: var(--ink); margin-right: 4px; }
.avatar { flex: 0 0 40px; height: 40px; border-radius: 50%; border: 2px solid var(--brass); }
.solli-avatar { background: radial-gradient(circle at 50% 38%, #e6b896 0 30%, transparent 31%), radial-gradient(circle at 50% 18%, #e4cb8c 0 26%, transparent 27%), linear-gradient(#a3212a, #7d1014); }
.helper-avatar { background: radial-gradient(circle at 50% 50%, #f3eee2 0 18%, transparent 19%), linear-gradient(#3b5b6e, #23303a); }

.list { list-style: none; margin: 0; padding: 4px 0 16px; }
.item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 11px max(14px, env(safe-area-inset-left, 0px)) 11px max(14px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
}
.item h3 { margin: 0; font: 700 15px var(--font-display); }
.item h3 small { font: 500 12px var(--font-body); color: var(--ink-dim); margin-left: 4px; }
.item p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-dim); }
.item .meta { font-size: 12px; color: var(--ink); margin-top: 3px; font-variant-numeric: tabular-nums; }
.item .buy { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.item.locked { opacity: .45; }
.item.bought h3 { color: var(--zone); }

.btn {
  border: 0; border-radius: 6px; padding: 9px 12px; cursor: pointer;
  background: var(--brass); color: #2a1a10; font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 92px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
.btn small { display: block; font-size: 10.5px; font-weight: 600; opacity: .8; }
.btn:disabled { background: rgba(246, 234, 210, .12); color: var(--ink-dim); box-shadow: none; cursor: default; }
.btn:not(:disabled):active { transform: translateY(1px); box-shadow: none; }
.btn.small { padding: 6px 10px; min-width: 0; font-size: 12px; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; font-family: var(--font-display); }
.btn.ghost { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost.armed { border-color: var(--curtain); color: #ffb3a1; }

/* ---------- night stats ---------- */
.night-stats { padding: 14px max(14px, env(safe-area-inset-left, 0px)) 4px max(14px, env(safe-area-inset-right, 0px)); }
.night-stats h2 { font: 700 18px var(--font-display); margin: 4px 0 8px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 16px; font-size: 14px; }
.kv dt { color: var(--ink-dim); }
.kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.danger { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px max(14px, env(safe-area-inset-left, 0px)) 24px max(14px, env(safe-area-inset-right, 0px)); }

/* ---------- overlay cards ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(20, 11, 6, .82);
  backdrop-filter: blur(3px);
}
.card {
  width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto;
  background: var(--wood); border: 1px solid var(--brass); border-radius: 10px;
  padding: 20px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.card h1 { font: 700 28px/1.1 var(--font-display); margin: 0 0 6px; text-wrap: balance; }
.card h2 { font: 700 20px/1.15 var(--font-display); margin: 0 0 6px; text-wrap: balance; }
.card p { margin: 0 0 12px; color: var(--ink-dim); }
.card p strong { color: var(--ink); }
.card .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ember); margin-bottom: 6px; }
.card .quote { font: 600 16px/1.3 var(--font-hand); color: var(--paper); margin: 4px 0 14px; }
.card .list { padding: 0; margin: 0 -18px 14px; border-top: 1px solid var(--line); }
.card > .btn.big:last-child { position: sticky; bottom: -20px; margin-top: 4px; box-shadow: 0 -12px 16px var(--wood), 0 2px 0 rgba(0, 0, 0, .35); }
.card .big-num { font: 700 26px var(--font-display); color: var(--sweet); margin: 2px 0 12px; }
.card ol.howto { margin: 0 0 14px; padding-left: 20px; color: var(--ink-dim); font-size: 14px; }
.card ol.howto li { margin-bottom: 4px; }
.anek-bal { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; }
.anek-bal b { font: 700 20px var(--font-display); color: var(--sweet); }

/* ---------- animations ---------- */
@keyframes puff { from { transform: translate(0, 0) scale(.6); } to { transform: translate(var(--dx, 6px), -70px) scale(3.2); opacity: 0; } }
@keyframes glow { 50% { filter: brightness(1.35); } }
@keyframes ring { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes polish { 50% { transform: rotate(-10deg); } }
@keyframes floatUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-46px); opacity: 0; } }
@keyframes nudge { 50% { transform: translateY(-3px); } }
@keyframes sheen { to { transform: translateX(100%); } }
@keyframes away { to { transform: translate(-50%, -260%) rotate(-8deg) scale(.4); opacity: 0; } }
@keyframes tear { 30% { transform: translate(-50%, -50%) rotate(4deg); } to { transform: translate(-50%, 20%) rotate(-14deg) scale(.8); opacity: 0; } }
@keyframes drift { from { transform: translateX(-30px) scaleY(.9); } to { transform: translateX(40px) scaleY(1.15); } }
@keyframes blink { 50% { opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-height: 640px) {
  .scene { height: clamp(140px, 24vh, 200px); }
  .hint { min-height: 2.4em; font-size: 13px; }
}
