:root { --bq-cream:#fff9ed; --bq-green:var(--olive,#365b38); --bq-ink:var(--ink,#292b21); --bq-muted:var(--muted,#625a4e); --bq-border:#e6d7bf; }
.bq-final { width:100%; display:flex; align-items:center; gap:12px; margin:12px 0 18px; padding:12px; border:1px solid #ead2a4; border-radius:22px; background:#faf0da; color:var(--bq-ink); text-align:left; }
.has-splash #borscht-rail,.kb-open #borscht-rail { visibility:hidden; }
#borscht-rail { position:fixed; top:42%; left:0; z-index:19; }
#borscht-rail button { min-height:44px; border:1px solid #d4b784; border-left:0; border-radius:0 14px 14px 0; background:#fff4dc; color:#563d26; padding:8px 10px; box-shadow:0 3px 12px #49321a25; writing-mode:vertical-rl; transform:rotate(180deg); border-radius:14px 0 0 14px; border-left:1px solid #d4b784; border-right:0; touch-action:pan-y; font-size:.78rem; font-weight:700; }
#borscht-panel { position:fixed; inset:0 auto 0 0; width:min(390px,calc(100vw - 22px)); max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; border-radius:0 22px 22px 0; color:var(--bq-ink); background:var(--bq-cream); box-shadow:12px 0 40px #331e263b; }
#borscht-panel::backdrop { background:#22271e70; }
.bq-sheet { padding:14px 18px max(22px,env(safe-area-inset-bottom)); }
.bq-top { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--bq-green); font-weight:700; letter-spacing:.07em; }
.bq-close { min-width:44px; min-height:44px; border-radius:50%; background:#f3ead9; color:#403228; font-size:1.4rem; }
.bq-bowl { display:block; width:min(146px,50%); aspect-ratio:1; object-fit:cover; border-radius:26px; margin:2px auto 12px; }
.bq-sheet h2 { margin:0 0 9px; font-size:1.65rem; line-height:1.15; }
.bq-sheet p { line-height:1.5; margin:10px 0; }
.bq-lead { font-size:1rem; }
.bq-muted { font-size:.8rem; color:var(--bq-muted); }
.bq-primary { background:var(--bq-green); color:white; font-weight:700; min-height:44px; padding:10px 14px; border-radius:13px; }
.bq-sheet .bq-primary { width:100%; }
.bq-progress { display:grid; gap:7px; margin:14px 0; padding:10px 12px; border-radius:12px; background:#e8efde; color:#37543b; }
.bq-progress-line { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 12px; }
.bq-percent { font-size:1.25rem; font-variant-numeric:tabular-nums; }
.bq-progress progress { width:100%; accent-color:var(--bq-green); }
.bq-sheet .bq-progress-message { margin:0; font-size:.84rem; }
.bq-grid { list-style:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; padding:0; margin:0; }
.bq-grid li { display:flex; position:relative; flex-direction:column; align-items:center; gap:4px; padding:7px 2px; border:1px solid var(--bq-border); border-radius:13px; font-size:.72rem; text-align:center; }
.bq-found { background:#fffdf7; }
.bq-found b { position:absolute; top:3px; right:5px; color:#2e6540; }
.bq-grid .bq-missing { border-style:dashed; color:#6c6254; }
.bq-ingredient-icon { display:block; width:52px; height:52px; object-fit:contain; }
/* Not found yet: grey faded picture; colour comes back after collecting. */
.bq-ghost { filter:grayscale(1); opacity:.45; }
.bq-hint,.bq-note { margin:12px 0; padding:11px 13px; background:#f6ecd7; border-radius:13px; }
.bq-hint summary { cursor:pointer; padding:5px 0; font-weight:600; }
button.bq-find {
  --bq-find-size:60px;
  position:relative; display:grid; place-items:center;
  width:var(--bq-find-size); height:var(--bq-find-size); flex:0 0 var(--bq-find-size);
  min-width:44px; min-height:44px; margin:4px 5px; padding:1px 1px 8px;
  border:0; border-radius:10px; background:none; box-shadow:none; color:#254b25;
}
button.bq-find[data-bq-find] { --bq-find-size:68px; }
button.bq-find[data-bq-find=bib] { --bq-find-size:96px; }
.bq-find img { display:block; width:100%; height:100%; object-fit:contain; }
.bq-find span { position:absolute; right:2px; bottom:0; font-size:1.08rem; font-weight:800; line-height:1; text-shadow:0 0 2px #fffdf7,0 0 2px #fffdf7; }
.bq-find:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.bq-find:is([data-bq-find=beef],[data-bq-find=plate],[data-bq-find=bib],[data-bq-find=pepper]) { margin-inline-start:auto; }
.bq-find:is([data-bq-find=carrot],[data-bq-find=chair],[data-bq-find=bread]) { margin-inline:auto; }
#borscht-status { position:fixed; z-index:60; bottom:calc(88px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:max-content; max-width:85vw; text-align:center; pointer-events:none; opacity:0; padding:9px 13px; color:white; background:#344931; border-radius:12px; font-size:.85rem; }
#borscht-status.visible { opacity:1; }
.bq-final h2,.bq-final h3 { margin:0; font-size:1.1rem; }
.bq-fire-step .bq-primary { margin-top:2px; }
.bq-fire-step .bq-link { margin:6px 0 0; padding:8px 0; }
.bq-final p { margin:6px 0 9px; font-size:.86rem; }
.bq-cooking-pot {
  position:relative; isolation:isolate; flex:0 0 min(116px,35%); aspect-ratio:1.16;
  background:radial-gradient(ellipse 38% 8% at 50% 90%, #8d60482b 60%, transparent 100%);
}
.bq-cooking-pot::before,.bq-cooking-pot::after,.bq-pot-spoon,.bq-pot-steam { position:absolute; }
.bq-cooking-pot::before {
  content:""; inset:43% 12% 15%; z-index:1; border-radius:10px 10px 35% 35%;
  background:linear-gradient(100deg,#365847,#648057 34%,#4d6e4d 68%,#2e5040);
  box-shadow:inset 0 -4px 0 #28473970, -19px -6px 0 -15px #466850, 19px -6px 0 -15px #466850;
}
.bq-cooking-pot::after {
  content:""; inset:31% 12% auto; height:23%; z-index:2; border-radius:50%;
  border:3px solid #718d68; background:radial-gradient(ellipse at 50% 34%,#b34341,#8d263e 70%);
  box-shadow:inset 0 0 0 2px #84313a;
}
.bq-pot-spoon {
  inset:8% 29% auto auto; z-index:3; width:6%; height:40%; border-radius:8px;
  background:linear-gradient(90deg,#f0c192,#bb784a); transform:rotate(36deg); transform-origin:center 90%;
}
.bq-pot-steam {
  inset:13% 50% auto auto; width:13%; height:16%; transform:rotate(22deg);
  border-left:2px solid #fffdf4; border-radius:50%;
}
.bq-pot-stirring { animation:bq-pot-arrive .32s ease-out both; }
.bq-pot-stirring .bq-pot-spoon { animation:bq-spoon-stir .46s ease-in-out .12s 2; }
@keyframes bq-pot-arrive {
  from { opacity:0; transform:translateY(7px) scale(.93); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes bq-spoon-stir {
  0%,100% { transform:rotate(36deg); }
  50% { transform:translateX(-13px) rotate(-32deg); }
}
@media(prefers-reduced-motion:reduce) {
  .bq-pot-stirring,.bq-pot-stirring .bq-pot-spoon { animation:none; }
}
.bq-group { display:flex; align-items:center; gap:6px; margin:14px 0 7px; color:var(--bq-green); font-size:.85rem; }
.bq-pot-icon { width:18px; height:18px; }
.bq-table { position:relative; margin:-22px 0 15px; padding-top:clamp(56px,9dvh,84px); overflow:hidden; }
.bq-scene-board { position:relative; width:min(100%,40dvh,330px); margin-inline:auto; }
.bq-scene { position:relative; display:block; width:100%; aspect-ratio:2/3; }
/* Scene layers stack on one 2:3 canvas; a find's colour layer is hidden until it is found (loaded early, no flash). */
.bq-layer { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; -webkit-user-select:none; user-select:none; }
.bq-layer[data-found="false"] { opacity:0; }
.bq-scene-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); padding:0; margin:0; }
.bq-table-mark { position:absolute; left:var(--x); top:var(--y); transform:translate(-50%,-50%); display:grid; place-items:center; width:18px; height:18px; border:1px solid #fff; border-radius:50%; color:#4f4a44; background:#eeebe4; font-size:.8rem; font-weight:800; pointer-events:none; }
.bq-table-mark.is-found { color:#fff; background:#365b38; }
.bq-fireworks { position:absolute; inset:0; pointer-events:none; }
.bq-fireworks i { position:absolute; left:var(--x); top:var(--y); width:7px; height:7px; border-radius:50%; background:var(--petal); opacity:0; animation:bq-burst 1.2s cubic-bezier(.2,.7,.42,1) both; }
@keyframes bq-burst {
  0% { opacity:0; transform:rotate(var(--angle)) translateX(0) scale(.4); }
  20% { opacity:1; }
  100% { opacity:0; transform:rotate(var(--angle)) translateX(var(--distance)) scale(.35); }
}
@media(prefers-reduced-motion:reduce) { .bq-fireworks { display:none; } }
.bq-grid li > span { overflow-wrap:anywhere; }

.bq-final-board { width:min(100%,40dvh,330px); }
.bq-final-photo { display:block; width:100%; aspect-ratio:2/3; object-fit:contain; }
.bq-watch { display:block; width:100%; min-height:44px; margin:12px 0; border:1px solid var(--bq-border); border-radius:13px; background:#fffdf7; color:var(--bq-green); font-weight:700; }
.bq-video { display:block; width:100%; max-height:46dvh; margin:12px 0; border-radius:13px; background:#292b21; }
.bq-final:has([data-bq=cream]) { min-height:108px; }

.bq-sheet .bq-standing{margin:-4px 0 0;font-weight:700;font-size:.9rem;color:#2f5a2c}
.bq-prize-note{margin:-6px 2px 10px;font-size:.8125rem;line-height:1.35;color:#5b6152}.bq-prize-note summary{cursor:pointer;padding:6px 0;list-style-position:inside}.bq-prize-note p{margin:2px 0 0}
/* Narrow tab in the left margin, in line with the page cards; full label kept. */
#borscht-rail{top:24%}
#borscht-rail button{min-height:0;padding:9px 4px;font-size:.68rem;line-height:1.1;letter-spacing:0;box-shadow:0 1px 4px #49321a1f;border-radius:9px 0 0 9px}
/* Bookmark look in the app's fresh green style with a soft glow. */
#borscht-rail button{background:linear-gradient(180deg,#f7fbef,#e6efd6);border:1px solid #c9dab0;border-right:0;border-radius:12px 0 0 12px;color:#3d6b2e;box-shadow:-2px 0 12px #8fb56a59,0 2px 8px #3b4a2a14;animation:bq-glow 3.2s ease-in-out infinite}
@keyframes bq-glow{0%,100%{box-shadow:-2px 0 8px #8fb56a40,0 2px 8px #3b4a2a14}50%{box-shadow:-3px 0 16px #8fb56a8c,0 2px 8px #3b4a2a14}}
@media (prefers-reduced-motion:reduce){#borscht-rail button{animation:none}}

/* Q3 scene: thought cloud with a cheer line, tap for the next one. */
.bq-table[data-bq=cheer] { cursor:pointer; -webkit-tap-highlight-color:transparent; }
.bq-cloud { position:absolute; right:0; bottom:89.3%; width:59.4%; aspect-ratio:220/132; margin:0; pointer-events:none; }
.bq-cloud svg,.bq-cloud-tail { position:absolute; inset:0; width:100%; height:100%; overflow:visible; filter:drop-shadow(0 3px 5px #7a5c2c26); }
.bq-cloud-tail { pointer-events:none; }
.bq-cloud span { position:absolute; top:56.5%; left:57%; width:62%; transform:translate(-50%,-50%); text-align:center; text-wrap:balance; font-size:calc(clamp(12px,3.6vw,14px) * var(--bq-text-scale,1)); line-height:1.15; font-weight:750; color:var(--bq-green); overflow-wrap:anywhere; }
.bq-jump .bq-cloud span { font-size:calc(clamp(12.5px,3.8vw,14.5px) * var(--bq-text-scale,1)); }
:root[data-text-size=large] .bq-cloud { --bq-text-scale:1.125; }
:root[data-text-size=largest] .bq-cloud { --bq-text-scale:1.25; }
/* Finish: the scene jumps three times. */
.bq-jump .bq-scene-board { animation:bq-jump .7s ease-out 3; }
.bq-jump .bq-cloud { animation:bq-pop .5s ease-out; }
@keyframes bq-jump { 0%,100% { transform:translateY(0); } 35% { transform:translateY(-14px) rotate(-1.5deg); } 65% { transform:translateY(-6px) rotate(1deg); } }
@keyframes bq-pop { from { transform:scale(.6); opacity:0; } to { transform:scale(1); opacity:1; } }
/* Boil step: steam and a small wobble on the pot. */
.bq-steam { position:absolute; z-index:4; top:-4px; left:28%; font-style:normal; font-size:18px; color:#9aa58f; opacity:0; pointer-events:none; }
.bq-steam2 { left:58%; animation-delay:.6s !important; }
.bq-boil { animation:bq-boil .5s ease-in-out infinite alternate; }
.bq-boil .bq-steam { animation:bq-steam 1.6s ease-out infinite; }
@keyframes bq-boil { from { transform:scale(1); } to { transform:scale(1.04) rotate(.8deg); } }
@keyframes bq-steam { 0% { opacity:0; transform:translateY(6px); } 30% { opacity:.8; } 100% { opacity:0; transform:translateY(-16px); } }
@media(prefers-reduced-motion:reduce) {
  .bq-jump .bq-scene-board,.bq-jump .bq-cloud,.bq-boil,.bq-boil .bq-steam { animation:none; }
  .bq-boil .bq-steam { opacity:.6; }
}
/* Q4: link-button to hide the bookmark. */
.bq-link { display:block; margin:14px auto 0; padding:10px 12px; min-height:44px; border:0; background:none; color:var(--bq-green); font:inherit; font-size:.88rem; font-weight:650; text-decoration:underline; }
/* The full label is the target. Centre the checkbox on the first line when the label wraps. */
#borscht-panel .bq-rail-opt { display:flex; align-items:flex-start; gap:10px; min-height:44px; padding-block:10px; font-size:.92rem; line-height:1.5; cursor:pointer; }
#borscht-panel .bq-rail-opt input[type=checkbox] { width:19px; height:19px; flex:none; margin:calc(.75em - 9.5px) 0 0; padding:0; font:inherit; }
/* Q5: two-line description under the bookmark checkbox in settings. */
.settings-hint { display:block; margin-top:2px; font-size:.78rem; font-weight:400; line-height:1.3; color:var(--muted,#625a4e); }
/* Ready nudge: bookmark (or settings quest row) pulses once all finds are collected, until the panel opens. */
.bq-pulse { animation:bq-pulse 1.1s ease-in-out infinite; outline:2px solid #8fb56a; outline-offset:2px; }
#borscht-rail button.bq-pulse { animation:bq-rail-pulse 1.1s ease-in-out infinite; }
@keyframes bq-rail-pulse { 0%,100% { transform:rotate(180deg) scale(1); } 50% { transform:rotate(180deg) scale(1.08); } }
@keyframes bq-pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.06); } }
@media(prefers-reduced-motion:reduce) { .bq-pulse,#borscht-rail button.bq-pulse { animation:none; } }
/* Finds on app pages are larger; the quest panel (data-bq buttons, .bq-table) is untouched. */
button.bq-find[data-bq-find] { --bq-find-size:96px; }
button.bq-find[data-bq-find=bib] { --bq-find-size:128px; }
button.bq-find[data-bq-find] span { font-size:1.4rem; }

/* Подарунки: помітніше, але не завелике */
.bq-prize-note{font-size:1rem;line-height:1.35;font-weight:700;color:var(--bq-green);margin:2px 0 12px}
.bq-prize-note summary{padding:8px 0}
.bq-prize-note p{font-weight:500;font-size:.9375rem;color:#4f5646}

/* Живе перетягування панелі пальцем */
#borscht-panel.bq-dragging{transition:none;will-change:transform}
#borscht-panel.bq-dragging::backdrop{opacity:var(--bq-drag,1)}
.bq-intro{position:fixed;inset:0;z-index:5;display:grid;place-items:center;padding:20px;background:rgba(40,48,34,.45)}
.bq-intro-card{max-width:420px;background:#fffef8;border-radius:22px;padding:22px 20px 18px;box-shadow:0 12px 40px rgba(0,0,0,.25);font-size:1rem;line-height:1.5;color:#303a2b}
.bq-intro-card p{margin:0 0 10px}.bq-intro-card .bq-primary{width:100%;margin-top:6px}
.bq-intro-prizes{list-style:none;margin:0 0 12px;padding:0;line-height:1.7}
.bq-scroll-cue{position:sticky;bottom:14px;z-index:3;display:flex;align-items:center;justify-content:center;gap:6px;margin:6px auto 10px;padding:5px 16px;white-space:nowrap;width:max-content;max-width:100%;border:1px solid #d9e3c8;border-radius:999px;background:#f3f7ea;color:var(--bq-green);font:700 .8125rem/1.2 inherit;box-shadow:0 4px 14px #3a4a2a22;animation:bq-cue 1.8s ease-in-out infinite}
.bq-scroll-cue.bq-cue-off{opacity:0;pointer-events:none;transition:opacity .25s}
@keyframes bq-cue{0%,100%{transform:translateY(0)}50%{transform:translateY(4px)}}
@media (prefers-reduced-motion:reduce){.bq-scroll-cue{animation:none}}
