/* Ам-Ням mini app — styles. Look: «леденцовая лавка», dark edition — the dark page of the first version (#131319),
   warm ivory text with lemon headings (not the white + pastel gradient of the original), dark stickers with visible
   outlines and hard shadows, ivory tags at the wheel, cherry push buttons; Unbounded for display type, Onest for text.
   Layout: a single fixed screen (max 430px wide) that never scrolls; the wheel is scaled through --ws so everything
   fits the viewport height. Bottom sheets slide over the screen. The wheel (face, frame, pointer, cells) is art from
   tools/make_wheel.py: its rules below are left exactly as they were. */

/* ---------- fonts ---------- */
@font-face { font-family: "Unbounded"; font-weight: 400 900; font-display: swap;
  src: url("fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-weight: 400 900; font-display: swap;
  src: url("fonts/unbounded-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ---------- tokens ---------- */
:root {
  --page: #131319;           /* the page: the dark of the first version */
  --surface: #1e1d25;        /* stickers, strips, sheets: a raised dark */
  --surface-2: #2a2932;      /* panels on a surface: coupons, the human-check field, chips, prize faces, secondary buttons */
  --edge: #46434f;           /* sticker outlines on the dark */
  --edge-soft: rgba(243, 238, 228, 0.14);   /* perforations, faint outlines */
  --depth: #060609;          /* the hard shadow under a sticker / button */
  --text: #f3eee4;           /* warm ivory text (the original was pure white) */
  --text-2: rgba(243, 238, 228, 0.72);      /* secondary text: 8:1 on the page */
  --text-3: rgba(243, 238, 228, 0.56);      /* quiet text: 5.4:1 on a surface */
  --ivory: #f3eee4;          /* light tags: the badges at the wheel, the human-check token */
  --ink: #1f1d24;            /* dark text and rings on light accents (lemon, gold, ivory) */
  --ink-70: rgba(31, 29, 36, 0.72);
  --lemon: #ffe45c;          /* headings, the current day, the picked tile, highlights */
  --cherry: #e0223f;         /* actions: white text on it 4.7:1 */
  --cherry-depth: #8a1326;   /* the side of a cherry push button */
  --cherry-text: #ff6b7f;    /* cherry as text on the dark */
  --violet: #7c4dff;         /* the wheel's rim: the Premium tile, «almost there» in the human check */
  --violet-text: #b9a3ff;    /* links */
  --mint: #13a86f;           /* done / ok */
  --mint-hi: rgba(19, 168, 111, 0.18);
  --gold: #ffb800;           /* stars */
  --gold-text: #ffc94a;      /* gold as text on the dark */
  --line: 2px;               /* outline */
  --lift: 4px;               /* hard shadow under a sticker */
  --font-ui: "Onest", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: "Unbounded", "Onest", -apple-system, system-ui, sans-serif;
  --glow-alpha: 0.12;
  --glow-blur: 14px;
  --glow-scale: 1.4;
  /* the wheel face (wheel.svg) is drawn up to r 220.5 of 501, the frame's rim (wheel-frame.svg) starts at r 230:
     every rotating face is scaled by 230/220.5 so its edge meets the rim (app.js reads it as FACE_SCALE) */
  --face-scale: 1.0431;
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: calc(var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  --sheet-ease: cubic-bezier(0.22, 0.9, 0.3, 1);
  /* the prize rays behind the wheel and the hunt board: 20 faint warm beams */
  --rays: repeating-conic-gradient(from 4deg, rgba(255, 238, 200, 0.075) 0deg 6deg, rgba(255, 238, 200, 0) 7deg 17deg, rgba(255, 238, 200, 0.075) 18deg);
  --rays-fade: radial-gradient(closest-side, #000 22%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 100%);
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; }

.accent-text { color: var(--lemon); }   /* the headings: solid lemon */

/* ---------- screen skeleton ---------- */
.screen {
  position: fixed;
  inset: 0;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(12px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  overflow: hidden;
}
#main.scroll { overflow-y: auto; }
#main.compact .prizes-block { display: none; }

/* flexible spacers: they shrink first when the viewport is short */
.sp { flex-shrink: 1; min-height: 6px; }
.sp-a { flex: 2 1 31px; }
.sp-b { flex: 3 1 30px; min-height: 10px; }
.sp-c { flex: 1 1 14px; min-height: 8px; }

.top { position: relative; padding-top: 6px; }
.titles { text-align: center; }
/* one line on every phone: Unbounded is wide, so the size follows the width below 354 px (a 320 px screen: 26 px) */
.h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: min(29px, 8.2vw);
  line-height: 31px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.sub { margin-top: 7px; font-size: 16px; font-weight: 600; color: var(--text-2); }

/* ---------- wheel ---------- */
/* .wheel-zone only gains position: relative for the rays; the rays sit under everything on the screen (z-index -1
   inside the fixed .screen) and are centred on the wheel: its centre is 11 px * --ws below the zone's middle */
.wheel-zone { position: relative; flex: 0 0 auto; display: flex; justify-content: center; }
.wheel-zone::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: calc(50% + 10px);
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  background: var(--rays);
  -webkit-mask-image: var(--rays-fade);
  mask-image: var(--rays-fade);
  pointer-events: none;
}
/* a scrolling main screen (very short viewports) would scroll into the square of the rays: no rays there */
#main.scroll .wheel-zone::before { display: none; }
.wheel-wrap {
  position: relative;
  width: 322px;
  height: 322px;
  flex-shrink: 0;
  transform: scale(var(--ws, 1));
  transform-origin: center top;
  /* keep the layout box in sync with the scaled visual box */
  margin-top: calc(22px * var(--ws, 1));
  margin-bottom: calc(322px * var(--ws, 1) - 322px);
}
.wheel-wrap.fit-anim {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), margin 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wheel {
  position: absolute;
  inset: 0;
  left: -2px;
  right: 2px;
  will-change: transform;
}
.wheel .wheel-face { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wheel-frame {
  position: absolute;
  top: 0;
  left: -2px;
  width: 322px;
  height: 322px;
  pointer-events: none;
  transform: scale(1.003);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
}
/* gift cells sit on r 150 of the 36° sectors: 42 px keeps the widest gift art (the rocket's flame reaches its
   corners) about 4 px off the dividers; the candy art fills more of its square, so 38 px reads the same size */
.cell, .cell-glow {
  position: absolute;
  width: 42px;
  height: 42px;
  pointer-events: none;
}
.cell.paw-cell, .cell-glow.paw-cell { width: 38px; height: 38px; }
.cell.nft-cell, .cell-glow.nft-cell { width: 50px; height: 50px; }
.cell { transform: translate(-50%, -50%); }
.cell-glow {
  transform: translate(-50%, -50%) scale(var(--glow-scale));
  filter: blur(var(--glow-blur));
  opacity: var(--glow-alpha);
}
.pointer {
  position: absolute;
  right: -21px;   /* was -18px: the rim got narrower and the face bigger, so the tip moved out to stay off the candy icons */
  top: 50%;
  width: 54px;
  height: 32px;
  transform: translateY(-50%);
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(40, 15, 90, 0.32));
}
.pointer img { width: 100%; height: 100%; display: block; }

/* stickers stuck around the wheel: a white tag with an ink outline, a little askew, and a cherry «!» */
.badge {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}
.badge-right { right: -28px; top: -31px; padding: 16px 10px 4px; }
.badge-right.badge-lower { top: 26px; padding: 4px 10px 16px; }
.badge-left { left: -28px; top: -31px; padding: 16px 10px 4px; flex-direction: row-reverse; }
.badge-pill {
  display: block;
  background: var(--ivory);
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 3px 0 var(--depth);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.badge-right .badge-pill { --tilt: 3deg; }
.badge-right.badge-lower .badge-pill { --tilt: -2deg; }
.badge-left .badge-pill { --tilt: -3deg; }
.badge:active .badge-pill { transform: rotate(var(--tilt, 0deg)) translateY(2px); box-shadow: 0 1px 0 var(--depth); }
.badge:focus-visible { outline: none; }
.badge:focus-visible .badge-pill { outline: 3px solid var(--lemon); outline-offset: 2px; }
.badge-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: -8px 0 0 -14px;
  border: var(--line) solid var(--page);
  border-radius: 50%;
  background: var(--cherry);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}
.badge-left .badge-dot { margin: -8px -14px 0 0; }
.paw-ic { width: 17px; height: 17px; vertical-align: -3px; margin: -1px 5px -1px 0; }

/* ---------- streak strip: a ribbon of tickets, torn along dashed perforations ---------- */
.series-block { margin-top: 9px; }
.block-label {
  margin: 0 0 6px 4px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 13px;
  text-transform: uppercase;
  color: var(--text-2);
}
.series {
  display: flex;
  background: var(--surface);
  border: var(--line) solid var(--edge);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--depth);
  overflow-x: auto;
  scrollbar-width: none;
}
.series::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto;
  min-width: 67px;
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 2px dashed var(--edge-soft);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
}
.day:first-child { border-left-color: transparent; }
.day.current { background: var(--lemon); border-left-color: var(--lemon); color: var(--ink); }
.day.current + .day { border-left-color: transparent; }
.day.prize-day { background: var(--cherry); border-left-color: var(--cherry); color: #fff; }
.day.goal-day { color: var(--text); }
.day.goal-day.current { color: var(--ink); }
.day.goal-day.taken { color: var(--text-3); }
.day-bonus { margin-left: 5px; color: var(--cherry-text); font-weight: 800; }
.day.current .day-bonus { color: var(--ink); }
.day.prize-day .day-bonus { color: #fff; }
.day.goal-day.taken .day-bonus { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 2px; }

/* ---------- prizes strip: a shop shelf ---------- */
.prizes-block {
  position: relative;
  margin-top: 10px;
  height: 77px;
  flex-shrink: 0;
  background: var(--surface);
  border: var(--line) solid var(--edge);
  border-radius: 14px;
  box-shadow: 0 var(--lift) 0 var(--depth);
}
.prizes {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.prizes::-webkit-scrollbar { display: none; }
.prizes::after { content: ""; flex: 0 0 24px; }   /* at the end of the shelf the last tile clears the chevron */
.prize-tgs { flex: 0 0 auto; width: 57px; height: 57px; }
.prize-tgs canvas, .prize-tgs img { display: block; width: 100%; height: 100%; }
.prize-q {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  background: var(--lemon);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prize-prem { background: var(--violet); }
/* the NFT card (lottie with its own backdrop): rounded like the other tiles */
.prize-nft { border-radius: 12px; overflow: hidden; }
.nft-card svg, .nft-card img { border-radius: 22%; }
.prize-nft svg { display: block; }
.prize-prem svg { width: 32px; height: 32px; display: block; overflow: visible; }
.prizes-fade {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}
.prizes-fade::before, .prizes-fade::after {
  content: "";
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease;
}
.prizes-fade::before { background: linear-gradient(90deg, rgba(30, 29, 37, 0) 40%, rgba(30, 29, 37, 0.92) 100%); }
.prizes-fade::after { background: linear-gradient(90deg, rgba(30, 29, 37, 0) calc(100% - 72px), rgba(30, 29, 37, 0.92) 100%); opacity: 0; }
.prizes-fade.at-end::before { opacity: 0; }
.prizes-fade.at-end::after { opacity: 1; }
.prizes-chevron {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--lemon);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.28s var(--sheet-ease), opacity 0.2s ease;
}
.prizes-chevron:active { opacity: 0.7; }
.prizes-chevron.back { transform: rotate(180deg); }

/* ---------- status + buttons ---------- */
.status { text-align: center; font-size: 15px; font-weight: 600; color: var(--text-2); }
/* the count / countdown: Unbounded digits are proportional, tabular ones keep the line still; it never wraps alone */
.status b { color: var(--lemon); font-family: var(--font-display); font-weight: 800; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.bottom-bar { flex-shrink: 0; }
.bottom-bar .btn:not([hidden]) ~ .btn:not([hidden]) { margin-top: 12px; }
/* a chunky push button: a hard shadow under it (--btn-depth) that it sinks into when pressed */
.btn {
  --btn-depth: var(--depth);
  width: 100%;
  height: 50px;
  border: 2.5px solid var(--edge);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 var(--lift) 0 var(--btn-depth);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.18s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-depth); }
.btn-primary { --btn-depth: var(--cherry-depth); background: var(--cherry); border-color: var(--cherry); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.btn-outline { background: var(--surface-2); color: var(--text); }
/* nothing to press: the button lies flat, sunk into its shadow */
.btn.disabled {
  background: rgba(243, 238, 228, 0.05);
  border-color: var(--edge-soft);
  box-shadow: none;
  color: var(--text-3);
  text-shadow: none;
  transform: translateY(2px);
  pointer-events: none;
}
/* waiting for an answer: the button stays pressed into its shadow (and breathes while aria-busy) instead of fading */
.btn.busy, .btn[aria-busy="true"] { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-depth); pointer-events: none; }
.btn[aria-busy="true"] { animation: btn-wait 1.1s ease-in-out infinite; }
@keyframes btn-wait { 50% { transform: translateY(1px); box-shadow: 0 3px 0 var(--btn-depth); } }
.btn .star { width: 18px; height: 18px; margin-left: -2px; flex: 0 0 auto; }
/* the gift chance of a paid spin (SPEC 5.9) on the paid buttons and on «Крутить!»: «шанс 5%» — a lemon price tag */
.btn .paid-odds {
  flex: 0 0 auto;
  margin-left: -2px;
  padding: 2px 7px;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: var(--lemon);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 800;
  line-height: 14px;
  letter-spacing: 0;
  text-shadow: none;
  white-space: nowrap;
  transform: rotate(-3deg);
}
.btn.disabled .paid-odds { opacity: 0.5; }
.btn-offer .offer-mini { width: 22px; height: 22px; flex: 0 0 auto; }
.btn-offer.pending { opacity: 0; visibility: hidden; pointer-events: none; }
.btn:focus-visible { outline: 3px solid var(--lemon); outline-offset: 3px; }
@keyframes pulse { 50% { opacity: 0.4; } }

/* ---------- splash (not onboarded) ---------- */
.splash-center { margin: auto; text-align: center; }
.mini-wheel { position: relative; width: 81px; height: 81px; margin: 0 auto; }
.mini-wheel img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini-wheel .face { transform: scale(var(--face-scale)); }
.mini-wheel .frame { transform: scale(1.003); }
.splash-title {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 26px;
}
.splash-sub { margin: 10px auto 0; max-width: 220px; font-size: 16px; font-weight: 500; color: var(--text-2); }

/* fatal screen (401 at start) */
.fatal {
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
/* boot failure other than 401: overlays the (still hidden) screens and offers a retry */
.fatal.boot-error { position: fixed; inset: 0; z-index: 20; flex-direction: column; gap: 22px; background: var(--page); }
.fatal.boot-error .btn { width: auto; min-width: 220px; padding: 0 28px; }

/* ---------- confetti (win sheet) ---------- */
.confetti { position: fixed; inset: 0; z-index: 9; pointer-events: none; }

/* ---------- overlay + sheets ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.overlay.show { opacity: 0.6; }
/* a sheet is a candy wrapper: its top edge is crimped (a zigzag mask, --zz deep) */
.sheet {
  --zz: 8px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  max-width: 430px;
  margin: 0 auto;
  padding: calc(var(--zz) + 10px) 16px calc(18px + var(--safe-bottom));
  background: var(--surface);
  color: var(--text);
  text-align: center;
  transform: translateY(105%);
  transition: transform 0.32s var(--sheet-ease);
  -webkit-mask:
    conic-gradient(from 135deg at 50% 0, #000 90deg, rgba(0, 0, 0, 0) 0) 50% 0 / calc(var(--zz) * 2) var(--zz) repeat-x,
    linear-gradient(#000 0 0) 0 var(--zz) / 100% 100% no-repeat;
  mask:
    conic-gradient(from 135deg at 50% 0, #000 90deg, rgba(0, 0, 0, 0) 0) 50% 0 / calc(var(--zz) * 2) var(--zz) repeat-x,
    linear-gradient(#000 0 0) 0 var(--zz) / 100% 100% no-repeat;
  /* a very short screen (the chance sheet has the most lines): scroll inside the sheet instead of cutting its top */
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.sheet::-webkit-scrollbar { display: none; }
.sheet.show { transform: translateY(0); }
.sheet-handle {
  width: 36px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 3px;
  background: rgba(243, 238, 228, 0.16);
}
.m-title {
  margin-top: 12px;
  color: var(--lemon);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 23px;
  line-height: 26px;
  letter-spacing: -0.01em;
  text-wrap: balance;   /* «ПОДПИШИСЬ / НА КАНАЛ», not a lone last word */
}
.m-sub { margin-top: 8px; font-size: 16px; font-weight: 600; text-wrap: pretty; }
.m-note { margin: 8px auto 0; max-width: 330px; font-size: 15px; font-weight: 500; line-height: 1.38; color: var(--text-2); text-wrap: pretty; }
.m-note b { color: var(--text); font-weight: 700; white-space: nowrap; }   /* «от 10%», «раз в 2 дня» stay whole; the longest fits a 260 px note */
.m-note.dim { margin-top: 16px; font-size: 14px; color: var(--text-3); }
.m-note.goal { margin-top: 12px; color: var(--text); font-weight: 600; text-wrap: balance; }
.goal-risk { margin-top: 2px; font-weight: 500; color: var(--text-2); }
.m-sub.narrow, .m-note.narrow { max-width: 260px; margin-left: auto; margin-right: auto; }
.link { color: var(--violet-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.in-sheet { margin-top: 20px; }
.chance-big {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* win sheet */
.win-stage { position: relative; width: 175px; margin: 6px auto 0; }
.win-badge {
  position: absolute;
  right: -46px;
  top: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  background: var(--gold);
  box-shadow: 0 3px 0 var(--depth);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  transform: rotate(6deg);
}
.star-ic { font-size: 13px; }
.big-tgs { width: 145px; height: 145px; margin: 0 auto; }
.big-tgs.solo { margin-top: 8px; }
.big-tgs canvas, .big-tgs img { display: block; width: 100%; height: 100%; }
.wrote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.wrote-box {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  border: var(--line) solid var(--edge);
  border-radius: 7px;
  background: var(--surface-2);
  box-shadow: 0 2px 0 var(--depth);
}
.wrote-box.on { background: var(--cherry); border-color: var(--cherry); }
.wrote-box.on::after {
  content: "✓";
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* paw sheets */
.paw-hero { width: 145px; height: 145px; margin: 8px auto 0; }
.paw-hero img { width: 100%; height: 100%; display: block; }
.paw-hero.small { width: 72px; height: 72px; margin-top: 12px; }
.paw-hero.small + .chance-big { margin-top: 6px; }
.sheet.show .paw-hero img { animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes pop {
  from { transform: scale(0.4) rotate(-14deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.paws-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-width: 270px;
  margin: 14px auto 0;
}
.paw-slot {
  width: 21px;
  height: 21px;
  background: url("assets/candy.png") center / contain no-repeat;
  opacity: 0.3;
  filter: grayscale(1);
}
.paw-slot.on { opacity: 1; filter: none; }
.sheet.show .paw-slot.new { animation: pop 0.5s 0.3s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.paw-bar { display: block; width: 100%; max-width: 250px; height: 12px; border: var(--line) solid var(--edge); border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.paw-bar i { display: block; height: 100%; background: var(--cherry); }
.m-note.hot { color: var(--text); font-weight: 600; }
/* «50★» inside a text line (i18n STARS): one line, the star in gold like the prices on the tiles and the win badge */
.price { white-space: nowrap; }
.price i { margin-left: 1px; font-style: normal; color: var(--gold-text); }
/* the chance sheet's Sweet Hunt line: its top prize («Бриллиант за 100★», app.js renderHuntChance) on one line */
.hunt-top { white-space: nowrap; }

/* candies sheet: the gift the candies are exchanged for (one tile per paws_gifts entry) */
.paws-pick { display: flex; justify-content: center; gap: 8px; max-width: 330px; margin: 14px auto 0; }
.pick {
  flex: 1 1 0;
  min-width: 0;
  max-width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px 7px;
  border: var(--line) solid var(--edge);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-ui);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pick:active { transform: scale(0.96); }
.pick:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; }
.pick.on { border-color: var(--lemon); box-shadow: 0 3px 0 var(--depth); }
.pick-img { display: block; width: 48px; height: 48px; object-fit: contain; }
.pick-emoji { display: block; height: 48px; font-size: 34px; line-height: 48px; }
.pick-name { max-width: 100%; font-size: 13px; font-weight: 700; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-price { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; line-height: 14px; color: var(--gold-text); }
.pick-price .star { width: 12px; height: 12px; flex: 0 0 auto; }
.pick.on .pick-img, .pick.on .pick-emoji { animation: pick-hop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pick-hop { 40% { transform: translateY(-3px) scale(1.1); } }

/* friends sheet */
.fr-progress { display: flex; gap: 6px; justify-content: center; max-width: 250px; margin: 16px auto 0; }
.fr-seg { flex: 1 1 0; height: 12px; border: var(--line) solid var(--edge); border-radius: 4px; background: var(--surface-2); }
.fr-seg.on { background: var(--cherry); border-color: var(--cherry); }
.fr-partner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 330px;
  margin: 14px auto 0;
  padding: 9px 13px 9px 9px;
  border: var(--line) solid var(--edge);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-align: left;
}
.fr-partner-ic { width: 30px; height: 30px; flex: 0 0 auto; }

/* chance sheet steps strip */
.chance-steps { max-width: 300px; margin: 14px auto 0; }
.chance-row { display: flex; background: var(--surface-2); border: var(--line) solid var(--edge); border-radius: 12px; overflow: hidden; }
.chance-row .day { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 14px; }
.chance-row .day-bonus { margin-left: 4px; }
.chance-caps { display: flex; margin-top: 6px; padding: 0 2px; }
.chance-caps > div {
  flex: 1 1 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
}

/* ---------- offer card (a cut-out coupon) + offer sheet ---------- */
.offer-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 14px 0 0;
  padding: 9px 9px 9px 11px;
  border: var(--line) dashed var(--text-3);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.offer-card:active { transform: scale(0.98); }
.offer-card:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; }
.offer-row { display: flex; align-items: center; gap: 12px; }
.offer-ic { position: relative; flex: 0 0 44px; width: 44px; height: 44px; }
.offer-ic img { width: 100%; height: 100%; display: block; }
.offer-plus {
  position: absolute;
  right: -8px;
  top: -7px;
  min-width: 26px;
  height: 20px;
  padding: 0 5px;
  border: var(--line) solid var(--surface);
  border-radius: 7px;
  background: var(--cherry);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  color: #fff;
  transform: rotate(8deg);
}
.offer-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offer-h { font-size: 15px; font-weight: 700; }
.offer-s {
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: var(--text-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.offer-cta {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border: var(--line) solid var(--cherry);
  border-radius: 10px;
  background: var(--cherry);
  box-shadow: 0 2px 0 var(--cherry-depth);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 30px;
  white-space: nowrap;
}
.offer-hint { display: block; margin: 8px 2px 0 56px; font-size: 13px; font-weight: 500; line-height: 16px; color: var(--text-2); }
.offer-card.wait .offer-cta { animation: pulse 1.1s ease-in-out infinite; }
.offer-card.ok { border-style: solid; border-color: var(--mint); background: var(--mint-hi); }
.offer-card.ok .offer-cta { width: 34px; padding: 0; text-align: center; font-size: 17px; background: var(--mint); }

.offer-hero { position: relative; width: 112px; height: 112px; margin: 8px auto 0; }
.offer-hero img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.offer-hero .face { transform: scale(var(--face-scale)); animation: turn 24s linear infinite; }
.offer-hero .frame { transform: scale(1.003); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28)); }
/* both ends spelled out: a lone `to` would interpolate from the plain scale() as a matrix and never turn */
@keyframes turn {
  from { transform: rotate(0deg) scale(var(--face-scale)); }
  to { transform: rotate(360deg) scale(var(--face-scale)); }
}
.offer-plus.big {
  right: -18px;
  top: 0;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  border-width: 2.5px;
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--depth);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 27px;
}

/* ---------- anti-abuse: human check, required channel, banned, dev toast ---------- */
.m-note.warn { color: var(--cherry-text); font-weight: 600; }
.verify-field {
  position: relative;
  width: 100%;
  height: 220px;
  margin-top: 16px;
  border: var(--line) solid var(--edge);
  border-radius: 16px;
  background: var(--surface-2);
  touch-action: none;
}
.verify-target {
  position: absolute;
  right: 24px;
  top: 50%;
  width: 84px;
  height: 84px;
  margin-top: -42px;
  border: 2.5px dashed var(--text-3);
  border-radius: 50%;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.verify-field.near .verify-target { border-color: var(--violet); background: rgba(124, 77, 255, 0.22); transform: scale(1.06); }
.verify-field.ok .verify-target { border-color: var(--mint); border-style: solid; background: rgba(19, 168, 111, 0.16); }
.verify-field.fail .verify-target { border-color: var(--cherry); }
.verify-bear {
  position: absolute;
  left: 24px;
  top: 50%;
  z-index: 2;
  width: 64px;
  height: 64px;
  margin-top: -32px;
  padding: 6px;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 3px 0 var(--depth);
  object-fit: contain;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.2, 1.6, 0.4, 1), box-shadow 0.2s ease;
}
.verify-bear.drag { z-index: 3; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.45); cursor: grabbing; transition: none; }
.verify-bear.busy { pointer-events: none; animation: pulse 1.1s ease-in-out infinite; }
.sub-hero { width: 72px; height: 72px; margin: 10px auto 0; padding: 7px; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--ivory); box-shadow: 0 3px 0 var(--depth); }
.sub-hero img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* dev shim only (?dev_user / ?mock): in-page stand-in for Telegram's showAlert */
.dev-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 40;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ivory);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dev-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- «Сладкая охота» / Sweet Hunt: the bonus game section ---------- */
/* Over the main screen, under the overlay / sheets (5–6) and the confetti (9). Only transform and opacity move. */
.hunt {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  background: var(--page);
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
}
.hunt.show { opacity: 1; }
.hunt::before {   /* the prize rays behind the board, as behind the wheel; fixed: never scrollable overflow in .hunt.scroll */
  content: "";
  position: fixed;
  left: 50%;
  top: 56%;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  background: var(--rays);
  -webkit-mask-image: var(--rays-fade);
  mask-image: var(--rays-fade);
  pointer-events: none;
}
.hunt-col {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  height: 100%;
  padding: calc(12px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  transform: scale(0.96);
  transition: transform 0.45s var(--sheet-ease);
}
.hunt.show .hunt-col { transform: none; }
.hunt-head { flex: 0 0 auto; text-align: center; }
.hunt-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  margin-top: 4px;
  padding: 0 10px 0 8px;
  border-radius: 7px;
  background: var(--lemon);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 24px;
  transform: rotate(-2deg);
}
.hunt-kicker svg { width: 14px; height: 14px; flex: 0 0 auto; }
/* one line: «СЛАДКАЯ ОХОТА» is about 11.4 em wide, so below 385 px the size follows the width */
.hunt-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: min(30px, 7.8vw);
  line-height: 34px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
/* two lines are always reserved: a caption change never moves the board */
.hunt-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 42px;
  max-width: 340px;
  margin: 6px auto 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 19px;
  text-align: center;
  color: var(--text);
  transition: opacity 0.15s ease;
}
.hunt-caption.fade { opacity: 0; }
.hunt-caption b { font-weight: 700; }
.hunt-caption .hc-sub { font-size: 14px; font-weight: 500; color: var(--text-2); }

/* the board area: the countdown row (always reserved) right above the board */
.hunt-stage {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hunt-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 24px;
  margin-bottom: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hunt-timer.on { opacity: 1; }
.hunt-track { position: relative; flex: 1 1 auto; height: 12px; border: var(--line) solid var(--edge); border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hunt-track i { position: absolute; inset: 0; background: var(--lemon); transform-origin: left center; will-change: transform; }
.hunt-timer.hot .hunt-track i { background: var(--cherry); }
.hunt-num {
  flex: 0 0 30px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hunt-timer.hot .hunt-num { color: var(--cherry-text); }
/* the tray: its outline and shadow are box-shadows, so the 8 px padding stays the whole frame (app.js HUNT_PLATE_PAD) */
.hunt-plate {
  position: relative;
  padding: 8px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 2.5px var(--edge), 0 4px 0 2.5px var(--depth);
}
.hunt-board { position: relative; touch-action: none; }
.hunt-board.aiming { cursor: crosshair; }
.hunt-board.swap { opacity: 0.12; transition: opacity 0.2s ease; }
.hunt-fx { position: absolute; left: 8px; top: 8px; z-index: 5; pointer-events: none; }

/* a tile: .ht carries the grid position (transform, FLIP), .ht-body the pop / shake / dim, .ht-inner the flip */
.ht {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--tile, 48px);
  height: var(--tile, 48px);
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: inherit;
}
.ht:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; border-radius: 14px; }
.ht-body { display: block; width: 100%; height: 100%; perspective: 480px; transition: transform 0.14s ease, opacity 0.35s ease; }
.ht-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.42s cubic-bezier(0.3, 0.6, 0.3, 1.12);
}
.hunt-board.fast .ht-inner { transition-duration: 0.3s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.hunt-board.instant .ht-inner { transition: none; }
.ht.open .ht-inner { transform: rotateY(180deg); }
.ht-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--tile, 48px) * 0.24);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* a wrapped candy: the wrapper colours come from app.js (--c1 / --c2), the ink outline from the look */
.ht-cover {
  background: linear-gradient(150deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 -4px 0 rgba(31, 29, 36, 0.18), 0 3px 0 var(--depth);
}
.ht-cover::before {   /* the candy gloss */
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 9%;
  height: 36%;
  border-radius: calc(var(--tile, 48px) * 0.16) calc(var(--tile, 48px) * 0.16) 45% 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.ht-cover svg { position: relative; display: block; width: 60%; height: 60%; overflow: visible; }
.ht-prize {
  transform: rotateY(180deg);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--edge), 0 3px 0 var(--depth);
}
.ht-prize img { display: block; width: 50%; height: 50%; object-fit: contain; }
.ht-prize b {
  margin-top: 2%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--tile, 48px) * 0.23);
  line-height: 1;
  color: var(--text);
}
.ht-prize.k-paw b { color: var(--cherry-text); }
.ht-prize.k-spin b { color: var(--violet-text); }
.ht-prize.k-gift {
  background: radial-gradient(circle at 50% 45%, rgba(255, 184, 0, 0.45), rgba(255, 184, 0, 0) 62%), var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--edge), inset 0 0 0 4.5px var(--gold), 0 3px 0 var(--depth);
}
.ht-prize.k-gift img { width: 76%; height: 76%; }
.ht-emoji { font-size: calc(var(--tile, 48px) * 0.5); line-height: 1; }
.ht.target .ht-body { transform: scale(1.03); }
.ht.target .ht-cover { box-shadow: inset 0 0 0 2px var(--ink), inset 0 -4px 0 rgba(31, 29, 36, 0.18), 0 0 0 3px var(--cherry), 0 3px 0 3px var(--depth); }
.ht.shot { z-index: 2; }
.ht.shot .ht-body { animation: ht-wait 0.75s ease-in-out infinite alternate; }
.ht.shot .ht-cover { box-shadow: inset 0 0 0 2px var(--ink), inset 0 -4px 0 rgba(31, 29, 36, 0.18), 0 0 0 3px var(--cherry), 0 0 18px 4px rgba(224, 34, 63, 0.5); }
@keyframes ht-wait { from { transform: scale(1.03); } to { transform: scale(1.1); } }
.ht.picked { z-index: 3; }
.ht.picked .ht-inner { transition-duration: 0.55s; }
.ht.picked .ht-body { transform: scale(1.12); transition: transform 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
.ht.picked .ht-prize {   /* the shot tile: lemon, like the current streak day; its reach stays inside the tray's 8 px */
  background: var(--lemon);
  box-shadow: inset 0 0 0 2px var(--ink), 0 3px 0 var(--depth);
}
.ht.picked .ht-prize b { color: var(--ink); }
.ht.picked::before {   /* the winner's halo */
  content: "";
  position: absolute;
  left: -35%;
  top: -35%;
  width: 170%;
  height: 170%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 60, 0.6) 0%, rgba(255, 200, 60, 0) 62%);
  pointer-events: none;
  animation: ht-halo 1.6s ease-in-out infinite;
}
@keyframes ht-halo { 0%, 100% { opacity: 0.65; transform: scale(0.92); } 50% { opacity: 1; transform: scale(1.06); } }
/* the other tiles after the shot: faded outlines and pictures, the "+N" labels stay fully readable */
.ht.dim .ht-prize { box-shadow: inset 0 0 0 2px var(--edge-soft), 0 3px 0 rgba(0, 0, 0, 0.25); }
.ht.dim .ht-prize.k-gift { box-shadow: inset 0 0 0 2px var(--edge-soft), inset 0 0 0 4.5px var(--gold), 0 3px 0 rgba(0, 0, 0, 0.25); }
.ht.dim .ht-prize img, .ht.dim .ht-emoji { opacity: 0.45; }

/* the crosshair: centred on its transform point (app.js moves it with translate3d) */
.hunt-reticle {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--tile, 48px) * 1.3);
  height: calc(var(--tile, 48px) * 1.3);
  margin: calc(var(--tile, 48px) * -0.65) 0 0 calc(var(--tile, 48px) * -0.65);
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}
.hunt-reticle.on { opacity: 1; }
.hunt-reticle svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
/* the dashed ring turns as its own layer (a composited transform, no repaint); the dark halo sits on the static cross */
.hunt-reticle .rt-ring { animation: rt-spin 7s linear infinite; }
.hunt-reticle .rt-cross { filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.75)); transition: transform 0.14s ease; }
.hunt-reticle.lock .rt-cross { transform: scale(0.84); }
@keyframes rt-spin { to { transform: rotate(360deg); } }
.hunt-burst { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.hb-ring, .hb-flash {
  position: absolute;
  left: calc(var(--tile, 48px) * -0.7);
  top: calc(var(--tile, 48px) * -0.7);
  width: calc(var(--tile, 48px) * 1.4);
  height: calc(var(--tile, 48px) * 1.4);
  border-radius: 50%;
}
.hb-ring { border: 3px solid var(--cherry); box-shadow: 0 0 0 2px #fff, inset 0 0 0 2px #fff; }
.hb-flash { background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 200, 60, 0.55) 35%, rgba(255, 200, 60, 0) 65%); }
.hb-spark { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--ink); }

/* the panel under the board: «На поле» chips, replaced by the result card (same box: nothing moves). The chips set
   its height (a long prize list or a narrow screen may wrap them to a third row); the card covers the same box.
   Outlines are box-shadows here too: the box keeps its size. */
.hunt-panel { position: relative; flex: 0 0 auto; min-height: 110px; margin-top: 16px; }
.hunt-legend, .hunt-result {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  transition: opacity 0.3s ease, transform 0.35s var(--sheet-ease);
}
.hunt-legend {
  position: relative;
  inset: auto;
  min-height: inherit;
  padding: 10px;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--edge), 0 4px 0 2px var(--depth);
  text-align: center;
}
.hunt-label { font-family: var(--font-display); font-size: 10px; font-weight: 800; line-height: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.hunt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 8px; }
.hl-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 27px;
  padding: 0 8px 0 4px;
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--edge);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.hl-chip img { width: 19px; height: 19px; object-fit: contain; }
.hl-chip i { margin-left: 1px; font-style: normal; font-weight: 600; color: var(--text-3); }
.hl-chip.k-gift { background: var(--gold); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.hl-chip.k-gift i { color: var(--ink-70); }
.hunt-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  text-align: left;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--edge), 0 4px 0 2px var(--depth);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.hunt-panel.done .hunt-legend { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.hunt-panel.done .hunt-result { opacity: 1; transform: none; pointer-events: auto; }
.hunt-result-icon { position: relative; flex: 0 0 72px; width: 72px; height: 72px; }
.hunt-result-icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 60, 0.7), rgba(255, 210, 60, 0) 66%);
}
.hunt-result-icon img, .hunt-result-icon canvas { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.hunt-result-tx { flex: 1 1 auto; min-width: 0; }
.hunt-result .hunt-label { color: var(--text-2); }
.hunt-result-value {
  margin-top: 3px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: min(23px, 6vw);
  line-height: 27px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hunt-result-note {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  color: var(--text-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.hunt-result-note.hot { color: var(--text); font-weight: 600; }
.hunt-result-note .link { cursor: pointer; }
/* the jackpot: «ДЖЕКПОТ!» in gold instead of «Твой приз»; a gift's price after its name, a size smaller and in the
   text face, the star in gold as everywhere (.price) */
.hunt-result .hunt-label.jackpot { color: var(--gold-text); }
.hunt-result-value .price { font-family: var(--font-ui); font-size: 16px; font-weight: 800; letter-spacing: 0; color: var(--text); }
.hunt .bottom-bar { margin-top: 14px; }
/* the button keeps its place while the round plays (hidden, not removed) */
#btn-hunt { transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.25s ease, visibility 0s; }
#btn-hunt.ghost { opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s 0.2s; }
/* a short screen: no kicker, tighter texts, a lower panel (app.js adds .tight when the tiles would get too small) */
.hunt.tight .hunt-kicker { display: none; }
.hunt.tight .hunt-title { margin-top: 2px; font-size: min(26px, 7.2vw); line-height: 30px; }
.hunt.tight .hunt-caption { height: 38px; margin-top: 4px; font-size: 14px; line-height: 18px; }
.hunt.tight .hunt-caption .hc-sub { font-size: 13px; }
.hunt.tight .hunt-panel { min-height: 96px; }
.hunt.tight .hunt-legend { padding-top: 8px; }
.hunt.tight .hunt-chips { margin-top: 6px; gap: 4px; }
.hunt.tight .hl-chip { height: 25px; font-size: 12px; }
.hunt.tight .hunt-result-icon { flex-basis: 60px; width: 60px; height: 60px; }
/* the card drops its «Твой приз» label, so a gift's delivery note keeps all 3 lines (with the @support link); the
   jackpot keeps its gold «ДЖЕКПОТ!» while the texts still fit the card (app.js huntLabelFit adds .cut otherwise) */
.hunt.tight .hunt-result .hunt-label:not(.jackpot), .hunt.tight .hunt-result .hunt-label.cut { display: none; }
.hunt.tight .hunt-result-value { margin-top: 0; font-size: min(21px, 5.8vw); line-height: 25px; }
/* still under 40-px tiles: the title goes too (app.js adds .tighter) */
.hunt.tighter .hunt-title { display: none; }
/* not even 26-px tiles fit (a landscape phone, a short desktop window): the section scrolls instead of overlapping */
.hunt.scroll { overflow-y: auto; }
.hunt.scroll .hunt-col { align-self: flex-start; height: auto; min-height: 100%; }
.hunt.scroll .hunt-stage { flex: 0 0 auto; }
.hunt.scroll #btn-hunt { scroll-margin-bottom: calc(16px + var(--safe-bottom)); }   /* app.js huntShowButton: above the safe area */

/* ---------- responsive tweaks ---------- */
@media (max-height: 700px) {
  .series-block { margin-top: 8px; }
  .big-tgs { width: 112px; height: 112px; }
  .paw-hero { width: 112px; height: 112px; }
  .paw-hero.small { width: 60px; height: 60px; }
  .win-stage { width: 150px; }
  .win-badge { top: -8px; }   /* clear of the premium star's upper arm */
  .m-title { margin-top: 8px; }
  .in-sheet { margin-top: 14px; }
  .offer-card { margin-top: 10px; padding-top: 7px; padding-bottom: 7px; }
  .offer-hero { width: 88px; height: 88px; }
  .paws-pick { margin-top: 10px; }
  .pick-img, .pick-emoji { width: 40px; height: 40px; line-height: 40px; font-size: 30px; }
}
@media (max-height: 620px) {
  .sub { display: none; }
  .btn { height: 46px; }
  .bottom-bar .btn:not([hidden]) ~ .btn:not([hidden]) { margin-top: 8px; }
}
@media (max-height: 540px) {
  .paw-hero { width: 72px; height: 72px; }
  .big-tgs { width: 96px; height: 96px; }
  .win-stage { width: 134px; }
  .offer-hero { width: 76px; height: 76px; }
  .sheet-handle { margin-bottom: 8px; }
  #modal-paws .paw-hero.small { display: none; }   /* the counter and the slots already show the candies */
}
/* narrow phones: the wide Unbounded labels («Крутить сейчас за 5 ★ шанс 5%») stay on one line inside the outline */
@media (max-width: 374px) {
  .btn { font-size: 14px; letter-spacing: 0; gap: 6px; }
  .btn .paid-odds { font-size: 11px; padding: 2px 5px; }
}
@media (max-width: 339px) {
  .btn { font-size: 13px; }
}
/* wider than the column (a tablet, a stretched desktop window): the rays fade out round instead of being cut by the
   column's edges (the body still clips) */
@media (min-width: 431px) {
  #main:not(.scroll) { overflow: visible; }
}
@media (max-width: 359px) {
  .status, .status b { font-size: 13px; }   /* the countdown stays on one line (two lines switch on .compact: no shelf) */
  .offer-cta, .offer-card.ok .offer-cta { width: 34px; padding: 0; font-size: 0; text-align: center; }
  .offer-cta::after { content: "›"; font-size: 22px; line-height: 28px; }
  .offer-card.ok .offer-cta::after { content: "✓"; font-size: 17px; line-height: 30px; }
  .offer-card.wait .offer-cta::after { content: "…"; font-size: 17px; line-height: 26px; }
  .offer-hint { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .offer-hero .face, .offer-card.wait .offer-cta, .btn[aria-busy="true"], .verify-bear.busy, .pick.on .pick-img, .pick.on .pick-emoji { animation: none; }
  .wheel-wrap.fit-anim { transition: none; }
  .verify-bear { transition: none; }
  /* Sweet Hunt: instant flips, no pulsing; the fades stay (they do not move anything) */
  .ht-inner, .ht-body, .hunt-col, .hunt-reticle .rt-cross { transition: none; }
  .hunt-col { transform: none; }
  .ht.shot .ht-body, .ht.picked::before, .hunt-reticle .rt-ring { animation: none; }
}
