/* =====================================================================
   «Войлочная комната» для всех экранов (скилл felt-design). Подключается последним.
   Старый «альбом наклеек» держится на токенах --stk/--line/--ink/--disp — меняем их, и все карточки,
   кнопки и рамки становятся фетром. Фон: игровые экраны — кукольная сцена (мир за победы — её задник),
   остальные — комната (стена + пол). Текст, который ребёнок должен был бы прочитать, прячем: его говорит голос.
   ===================================================================== */

:root {
  --ink: #3D2552;
  --line: 0px;
  --stk: inset 0 calc(-1.2 * var(--u)) 0 rgba(61,37,82,.10), 0 calc(1.1 * var(--u)) 0 rgba(61,37,82,.24);
  --stk-down: inset 0 calc(-.6 * var(--u)) 0 rgba(61,37,82,.10), 0 calc(.4 * var(--u)) 0 rgba(61,37,82,.24);
  --disp: 'Nunito', system-ui, sans-serif;
}
body { font-family: var(--f-text); color: var(--f-ink); }

/* ---------- фон: комната или сцена ---------- */
#bg { z-index: -2 !important; }
#feltRoom, #stageFrame { position: fixed; inset: 0; z-index: -1; pointer-events: none; display: none; }
#feltRoom .wall { position: absolute; left: 0; right: 0; top: 0; height: 74%; }
#feltRoom .skirt { position: absolute; left: 0; right: 0; top: 74%; height: calc(3.2 * var(--u)); background: var(--f-lav); box-shadow: 0 calc(1 * var(--u)) 0 rgba(61,37,82,.2); }
#feltRoom .floor { position: absolute; left: 0; right: 0; top: calc(74% + 3.2 * var(--u)); bottom: 0; }
html[data-daypart="night"] #feltRoom .floor { filter: brightness(.72); }

#stageFrame .valance { position: absolute; left: 0; right: 0; top: 0; height: calc(env(safe-area-inset-top) + 13 * var(--u));
  background: linear-gradient(#C93A6A, #C93A6A) top / 100% calc(100% - 5 * var(--u)) no-repeat,
              radial-gradient(circle at 50% 0, #C93A6A calc(5 * var(--u)), transparent calc(5 * var(--u) + .5px)) bottom / calc(10 * var(--u)) calc(5 * var(--u)) repeat-x;
  filter: drop-shadow(0 calc(1 * var(--u)) 0 rgba(61,37,82,.25)); }
#stageFrame .valance::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(6.5 * var(--u)); border-top: calc(.9 * var(--u)) dashed var(--f-mustard); }
#stageFrame .curtain { position: absolute; top: 0; bottom: calc(9 * var(--u)); width: calc(10 * var(--u));
  background: repeating-linear-gradient(90deg, #E54B7E 0 calc(2.6 * var(--u)), #C93A6A calc(2.6 * var(--u)) calc(3.4 * var(--u))); }
#stageFrame .curtain.l { left: 0; border-bottom-right-radius: 100% 26%; box-shadow: calc(.8 * var(--u)) 0 0 rgba(61,37,82,.18); }
#stageFrame .curtain.r { right: 0; border-bottom-left-radius: 100% 26%; box-shadow: calc(-.8 * var(--u)) 0 0 rgba(61,37,82,.18); }
#stageFrame .boards { position: absolute; left: 0; right: 0; bottom: 0; height: calc(env(safe-area-inset-bottom) + 9 * var(--u));
  background: repeating-linear-gradient(90deg, #B57A45 0 calc(15 * var(--u)), #A86C3C calc(15 * var(--u)) calc(15.5 * var(--u))); border-top: calc(1.6 * var(--u)) solid var(--f-mustard); }
@media (orientation: landscape) and (min-width: 700px) { #stageFrame .curtain { width: calc(13 * var(--u)); } }

/* какие экраны — сцена, какие — комната */
html[data-screen="game"] #stageFrame, html[data-screen="mini"] #stageFrame, html[data-screen="rules"] #stageFrame,
html[data-screen="levelup"] #stageFrame, html[data-screen="secret"] #stageFrame, html[data-screen="kto"] #stageFrame, html[data-screen="zaryadka"] #stageFrame { display: block; }
html[data-screen="album"] #feltRoom, html[data-screen="gift"] #feltRoom, html[data-screen="gallery"] #feltRoom, html[data-screen="paintPick"] #feltRoom,
html[data-screen="paint"] #feltRoom, html[data-screen="craftPick"] #feltRoom, html[data-screen="craft"] #feltRoom, html[data-screen="puzzlePick"] #feltRoom,
html[data-screen="puzzle"] #feltRoom, html[data-screen="line"] #feltRoom, html[data-screen="bday"] #feltRoom, html[data-screen="dress"] #feltRoom,
html[data-screen="house"] #feltRoom, html[data-screen="storyLib"] #feltRoom, html[data-screen="todo"] #feltRoom, html[data-screen="ask"] #feltRoom,
html[data-screen="svyaz"] #feltRoom, html[data-screen="records"] #feltRoom, html[data-screen="photos"] #feltRoom, html[data-screen="rest"] #feltRoom,
html[data-screen="hub"] #feltRoom, html[data-screen="booth"] #feltRoom { display: block; }
html[data-screen="album"] #bg, html[data-screen="gift"] #bg, html[data-screen="gallery"] #bg, html[data-screen="paintPick"] #bg, html[data-screen="paint"] #bg,
html[data-screen="craftPick"] #bg, html[data-screen="craft"] #bg, html[data-screen="puzzlePick"] #bg, html[data-screen="puzzle"] #bg, html[data-screen="line"] #bg,
html[data-screen="bday"] #bg, html[data-screen="dress"] #bg, html[data-screen="house"] #bg, html[data-screen="storyLib"] #bg, html[data-screen="todo"] #bg,
html[data-screen="ask"] #bg, html[data-screen="svyaz"] #bg, html[data-screen="records"] #bg, html[data-screen="photos"] #bg, html[data-screen="rest"] #bg,
html[data-screen="hub"] #bg, html[data-screen="booth"] #bg, html[data-screen="start"] #bg { visibility: hidden; }
/* у этих экранов был свой фон — теперь фон даёт комната */
#paint, #paintPick, #puzzlePick, #puzzle, #storyLib, #album, #gallery, #todo, #ask, #dress, #house, #line, #bday, #hub, #craft, #craftPick { background: none !important; }

/* ---------- кнопки и карточки — фетр ---------- */
.mini-btn, .nav-back { background: var(--f-cream) !important; border: 0 !important; box-shadow: var(--f-drop) !important; color: var(--f-ink); }
.mini-btn:active, .nav-back:active { box-shadow: none !important; translate: 0 calc(.8 * var(--u)); transform: none; }
.nav-back svg { stroke: var(--f-ink); }
.next-btn { background: var(--f-rasp) !important; color: var(--f-cream) !important; border: 0 !important; box-shadow: 0 calc(1.6 * var(--u)) 0 var(--f-rasp-d) !important;
  font-family: var(--f-display) !important; font-weight: 400 !important; text-shadow: 0 calc(.6 * var(--u)) 0 var(--f-rasp-d); }
.next-btn:active { box-shadow: 0 calc(.5 * var(--u)) 0 var(--f-rasp-d) !important; translate: 0 calc(1 * var(--u)); transform: none; }
.round-btn { background: var(--f-rasp) !important; color: var(--f-cream) !important; border: 0 !important; box-shadow: 0 calc(1.6 * var(--u)) 0 var(--f-rasp-d) !important; }
.round-btn.play { animation: none; position: relative; }
.pick-card, .story-card, .todo-card, .answer, #cards .card, .dress-item, .gal-item, .ask-face, .ask-btn, .rules-card, .ask-card, .album-page, .photos-card, .m-bubble, .line-level {
  background-color: var(--f-cream); border: 0 !important; }
.pick-card, .story-card, .todo-card, .answer, #cards .card, .dress-item, .gal-item, .ask-face {
  outline: calc(.55 * var(--u)) dashed rgba(61,37,82,.16); outline-offset: calc(-1.6 * var(--u)); }
.face { border-color: var(--f-cream) !important; box-shadow: 0 0 0 calc(.5 * var(--u)) rgba(61,37,82,.15), 0 calc(1 * var(--u)) 0 rgba(61,37,82,.22) !important; }
.star-count { background: var(--f-cream) !important; font-family: var(--f-text) !important; font-weight: 900; }
.title span { -webkit-text-stroke-color: var(--f-ink); text-shadow: calc(.9 * var(--u)) calc(.9 * var(--u)) 0 var(--f-ink); font-family: var(--f-display); font-weight: 400; }
.tease, .w-txt { font-family: var(--f-display) !important; font-weight: 400 !important; }

/* ---------- Влада не читает: слова прячем, говорит голос ---------- */
.rules-title, .rules-list, .rules-new, #game .title.small, #cards .card .name, #recordBanner, #newSticker .cap,
.album-title, .story-card .sc-title, .todo-card span:not(.em), .ask-card p, #giftNote, #giftResult .gift-title, #lvlWorld .w-txt, .mini-hint { display: none !important; }
/* кнопки: только значок ▶ / эмодзи, без слова (взрослые кнопки — с классом adult) */
.next-btn:not(.adult):not(#svInviteBtn) { font-size: 0 !important; gap: 0; min-width: calc(30 * var(--u)); min-height: var(--f-hit); justify-content: center; }
.next-btn:not(.adult):not(#svInviteBtn) img.em { font-size: calc(9 * var(--u)) !important; }
.next-btn:not(.adult):not(#svInviteBtn) img.em { width: calc(9 * var(--u)); height: calc(9 * var(--u)); margin: 0 calc(1 * var(--u)); }
#paintDone, #craftDone { background: var(--f-mint) !important; box-shadow: 0 calc(1.6 * var(--u)) 0 var(--f-mint-d) !important; }
#paintDone::after, #craftDone::after { content: "✓"; font: 900 calc(9 * var(--u))/1 var(--f-text); color: var(--f-ink); text-shadow: none; }
#comeback { font-size: 0 !important; } #comeback img.em { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }
/* пузырь котика-подсказчика: волны вместо фразы */
.m-bubble { font-size: 0 !important; min-width: calc(16 * var(--u)); min-height: calc(10 * var(--u)); padding: calc(2 * var(--u)) !important; display: grid; place-items: center; }
.m-bubble::before { content: ""; width: calc(11 * var(--u)); height: calc(7 * var(--u)); background: url(icons/waves.svg) center / contain no-repeat; }

/* ---------- правила: картинка в круглом окошке на сцене, 🔊 и ▶ ---------- */
.rules-card { background: none !important; box-shadow: none !important; gap: calc(8 * var(--u)) !important; }
.rules-pic { width: calc(56 * var(--u)) !important; height: calc(56 * var(--u)) !important; border-radius: 50%; background: var(--f-cream); box-shadow: 0 calc(2 * var(--u)) 0 rgba(61,37,82,.25);
  display: grid !important; place-items: center; font-size: calc(30 * var(--u)) !important; }
.rules-pic img.em { width: 62%; height: 62%; }
#rulesGo { width: calc(30 * var(--u)) !important; height: calc(30 * var(--u)) !important; font-size: calc(12 * var(--u)) !important; }
#rulesRead, .helpBtn { width: var(--f-hit) !important; height: var(--f-hit) !important; }

/* ---------- сцена: игровое поле не залезает под кулисы ---------- */
#game, #mini, #rules, #party, #levelup, #kto, #zaryadka { padding-left: calc(env(safe-area-inset-left) + 8 * var(--u)); padding-right: calc(env(safe-area-inset-right) + 8 * var(--u)); }
#game .topbar, #mini .topbar, #rules .topbar { margin-top: calc(1 * var(--u)); }
#levelup { background: none !important; }
#party .tease { color: var(--f-cream); -webkit-text-stroke: calc(.6 * var(--u)) var(--f-rasp-d); paint-order: stroke fill; text-shadow: 0 calc(1 * var(--u)) 0 var(--f-rasp-d); }

/* ---------- победа / «Красиво!» — лучи и банка ---------- */
#wow { background: radial-gradient(circle at 50% 40%, #FFE7A8, #F7B95A 55%, #E86A3A) !important; }
.wow-frame { background: var(--f-cream) !important; border: 0 !important; box-shadow: 0 calc(2 * var(--u)) 0 rgba(61,37,82,.25) !important; }

/* ---------- полка сказок: ночная стена, книжки из цветного фетра (proto/Tales.html) ---------- */
html[data-screen="storyLib"] #feltRoom .wall { background: repeating-linear-gradient(90deg, var(--f-night) 0 calc(12 * var(--u)), var(--f-night-2) calc(12 * var(--u)) calc(24 * var(--u))); }
html[data-screen="storyLib"] #feltRoom .floor { filter: brightness(.6); }
#storyLib .story-page { background: none !important; box-shadow: none !important; }
#storyLib .story-card { --c: #F4B73F; background: var(--c) !important; border-radius: calc(1.6 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u)) calc(1.6 * var(--u)) !important;
  box-shadow: inset calc(2.2 * var(--u)) 0 0 rgba(0,0,0,.16), 0 calc(1.6 * var(--u)) 0 rgba(0,0,0,.3) !important; outline-color: rgba(255,247,232,.5) !important; opacity: 1 !important; }
#storyLib .story-card:nth-child(6n+2) { --c: #E54B7E; } #storyLib .story-card:nth-child(6n+3) { --c: #3B5BA9; }
#storyLib .story-card:nth-child(6n+4) { --c: #5FBF9A; } #storyLib .story-card:nth-child(6n+5) { --c: #8E6BC4; } #storyLib .story-card:nth-child(6n) { --c: #E86A3A; }
#storyLib .sc-cover { background: var(--f-cream); border-radius: 50%; padding: calc(1.5 * var(--u)); }

/* подписи-названия на карточках прячем, замок с ценой оставляем */
.pick-card:not(.locked) > span { display: none !important; }
.art-tab { font-size: 0 !important; } .art-tab img.em { width: calc(8 * var(--u)); height: calc(8 * var(--u)); }
.art-tab { background: var(--f-cream) !important; border: 0 !important; box-shadow: var(--f-drop) !important; }
.art-tab.on { background: var(--f-mustard) !important; }
.ask-btn span { display: none !important; } .ask-btn i img.em { width: calc(10 * var(--u)); height: calc(10 * var(--u)); }

/* ---------- домик: без полосок сытости/чистоты (решение 2026-10-21), без подписей, фон — комната ---------- */
#house .meters, #house .pet-name, #house .h-act span { display: none !important; }
#house .room { background: none !important; }
#house .room .window { display: none; }
#house .h-act { background: var(--f-cream) !important; border: 0 !important; box-shadow: var(--f-drop) !important; outline: calc(.55 * var(--u)) dashed rgba(61,37,82,.16); outline-offset: calc(-1.6 * var(--u)); }
#house .h-act img.em { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }

/* ---------- «Паша пупка!» — праздник: тёплые лучи (proto/Win.html) ---------- */
#party { background: radial-gradient(circle at 50% 40%, #FFE7A8, #F7B95A 55%, #E86A3A) !important; }
#party::before { background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(255,247,232,.32) 0 10deg, rgba(255,247,232,0) 10deg 20deg) !important; opacity: 1 !important; animation: none !important; background-size: auto !important; }

/* ---------- вопрос голосом: котик в пузыре с волнами, текст спрятан ---------- */
.ask-card { display: inline-flex !important; align-items: center; justify-content: center; gap: calc(3 * var(--u)); width: auto !important; min-width: 0 !important; padding: calc(3 * var(--u)) calc(5 * var(--u)) !important; margin-inline: auto; border-radius: var(--f-r-l) !important; }
.ask-card::after { content: ""; width: calc(14 * var(--u)); height: calc(9 * var(--u)); background: url(icons/waves.svg) center / contain no-repeat; }
.ask-card img { width: calc(18 * var(--u)) !important; height: auto; }

/* ---------- день рождения: торт, большое число, дорожка, календарь — подписи прячем ---------- */
#bdayAge, #bdayDaysWord, #bdayTimer .tbox span, #bdayNextAge, #calTitle { display: none !important; }
.bday-timer .tbox, .cal { background: var(--f-cream) !important; border: 0 !important; box-shadow: var(--f-drop) !important; }
/* «Замри» теперь финал зарядки — в фотобудке режима нет */
.bmode[data-mode="zamri"] { display: none !important; }
/* надписи-плашки в шапках (название пазла, «Уровень N», название мира) — ребёнку не нужны */
.line-level { visibility: hidden !important; }
#tripWorld { font-size: 0 !important; background: none !important; box-shadow: none !important; }
#tripWorld img.em { width: calc(10 * var(--u)); height: calc(10 * var(--u)); }
.trip-dice small { display: none !important; }
.trip-dice, .trip-cell { border: 0 !important; box-shadow: var(--f-drop-lg) !important; outline: calc(.55 * var(--u)) dashed rgba(61,37,82,.16); outline-offset: calc(-1.6 * var(--u)); }
/* цвета в раскраске — фетровые кружки без чернильной обводки */
.swatch { border: 0 !important; box-shadow: var(--f-drop) !important; }
/* ответы «Как дела?» — только картинка (её название говорит голос по первому нажатию) */
.ask-face span { display: none !important; }
.ask-face.pic i img.em { width: calc(20 * var(--u)) !important; height: calc(20 * var(--u)) !important; }
/* стрелка ▶ — ровным шрифтом: у «надувного» она превращается в кляксу */
.next-btn .arr { font-size: 0 !important; display: inline-block !important; width: 0 !important; height: 0 !important; background: none !important; border-radius: 0 !important; margin: 0 calc(1 * var(--u));
  border-left: calc(6.5 * var(--u)) solid var(--f-cream); border-top: calc(4 * var(--u)) solid transparent; border-bottom: calc(4 * var(--u)) solid transparent;
  filter: drop-shadow(0 calc(.6 * var(--u)) 0 var(--f-rasp-d)); }

/* ---------- по итогам прохода 2026-10-21 (review/felt-2026-10-21) ---------- */
/* на телефоне в Safari (высота ~664) --u мельчает: кнопки-значки — не меньше 60 px */
.mini-btn, .nav-back, .f-round, #rulesRead, .helpBtn { min-width: 60px !important; min-height: 60px !important; }
.nav-back { border-radius: 50% !important; }
.dress-item, .cat-tab, .who-tab { min-width: 60px !important; min-height: 60px !important; }
/* в мини-играх со своей кнопкой «повтори вопрос» вторую 🔊 не показываем */
#mini:has(.ask-again) .helpBtn { display: none !important; }
/* ответы-картинки без слов: «Угадай сказку», «Угадай мультик», «Вредилки» */
.quiz-card .qt, .vred-btn span { display: none !important; }
.quiz-card .qp { font-size: calc(12 * var(--u)) !important; }
.vred-btn i img.em { width: calc(14 * var(--u)); height: calc(14 * var(--u)); }
/* кулисы в мини-играх тоньше — поле игры почти не заходит под них */
html[data-screen="mini"] #stageFrame .curtain, html[data-screen="game"] #stageFrame .curtain { width: calc(5 * var(--u)); border-radius: 0; }
#mini, #game { padding-left: calc(env(safe-area-inset-left) + 5 * var(--u)); padding-right: calc(env(safe-area-inset-right) + 5 * var(--u)); }
/* «Паша пупка!» — малиновые буквы с кремовой обводкой: на светлых лучах кремовые терялись */
#party .tease { color: var(--f-rasp) !important; -webkit-text-stroke: calc(.7 * var(--u)) var(--f-cream) !important; text-shadow: 0 calc(1.2 * var(--u)) 0 var(--f-rasp-d) !important; }
/* домик: у старой комнаты была своя полоса плинтуса — второй горизонт; плинтус даёт #feltRoom */
#house .room::before { display: none !important; }
/* кнопка «дальше» после пазла и линии — над полоской «Домой» iPhone, не у самого края */
#puzzleNext, #lineNext { margin-bottom: calc(env(safe-area-inset-bottom) + 4 * var(--u)) !important; }
#puzzle .puz-area, #line .line-area { min-height: 0; }
/* «Мои дела» на планшете лёжа: карточки широкие — картинки крупнее */
@media (orientation: landscape) and (min-width: 700px) { .todo-card i { font-size: calc(20 * var(--u)) !important; } }
/* цели для пальца на коротком телефоне (замер 390×664): кнопки домика, цвета раскраски, «готово» */
#house .h-act { min-height: 60px !important; }
.swatch { min-width: 50px !important; min-height: 50px !important; }
#paint { padding-bottom: calc(env(safe-area-inset-bottom) + 2 * var(--u)) !important; }
#paintDone, #craftDone, #askBtn { min-height: 60px !important; }
/* одевалка и гардероб: вещей стало больше — список вещей прокручивается, а не уходит за край (iPhone SE и Safari) */
#dress { justify-content: flex-start !important; }
#dress .dress-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; align-content: flex-start;
  padding-bottom: calc(env(safe-area-inset-bottom) + 3 * var(--u)); }
@media (max-height: 700px) and (orientation: portrait) { .dress-stage { width: min(70vw, 33vh) !important; } }

/* ── раскраска: кармашки инструментов и коробка карандашей (канон proto/Paint.html) ── */
#paintTools button { background: var(--f-cream) !important; border: 0 !important; border-radius: var(--f-r-m) !important;
  box-shadow: var(--f-drop) !important; position: relative; display: grid; place-items: center; min-width: 54px; min-height: 54px; }
#paintTools button::after { content: ""; position: absolute; inset: 10%; border-radius: inherit; border: var(--f-stitch-ink); pointer-events: none; }
#paintTools button.on { background: #FFE3EC !important; translate: 0 calc(-1 * var(--u)); box-shadow: 0 calc(1.4 * var(--u)) 0 var(--f-rasp-d) !important; transform: none !important; }
#paintTools .ticon { width: 62%; height: 62%; }
#paintPalette { display: block !important; padding: 0 !important; width: min(100vw, 620px) !important; }
.pbox { position: relative; margin: 0 calc(2.5 * var(--u)); }
.pbox::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; border-radius: var(--f-r-l) var(--f-r-l) 0 0;
  background: var(--f-blue); box-shadow: inset 0 calc(1.4 * var(--u)) 0 rgba(255,255,255,.18); z-index: 2; pointer-events: none; }
.pbox::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: 7%; height: 20%; border-radius: var(--f-r-s); border: var(--f-stitch); z-index: 2; pointer-events: none; }
.prow { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 26px calc(3 * var(--u)) 0;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.prow::-webkit-scrollbar { display: none; }
.pencil { flex: 0 0 auto; width: 46px; height: 132px; border: 0; padding: 0; background: none; cursor: pointer; position: relative; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; transition: translate .25s var(--f-spring); filter: drop-shadow(0 3px 0 rgba(61,37,82,.25)); }
.pencil.on { translate: 0 -24px; }
.pencil .ptip { width: 34px; height: 26px; display: block; margin-bottom: -1px; }
.pencil .pbody { display: block; width: 30px; flex: 1; border-radius: 3px 3px 0 0; background: var(--body); position: relative; overflow: hidden; }
.pencil .pbody::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 6px; background: rgba(255,255,255,.3); }
.pencil .pbody::after { content: ""; position: absolute; right: 4px; top: 0; bottom: 0; width: 5px; background: rgba(0,0,0,.12); }
html[data-daypart="night"] .pbox::before { background: #2f4a8f; }
/* планшет лёжа: коробка в правой колонке */
@media (orientation: landscape) and (min-width: 700px) { #paint:not(.hidden) { grid-template-columns: auto minmax(0, min(38vw, 500px)) !important; } #paintTools { flex-wrap: nowrap !important; gap: calc(1.6 * var(--u)) !important; } #paintPalette { width: auto !important; } .pencil { width: 52px; height: 150px; } .pencil .pbody { width: 34px; } .pencil .ptip { width: 38px; height: 28px; } }
@media (max-height: 700px) and (orientation: portrait) { .pencil { height: 112px; } }

/* вкладки одевалки: цель для пальца ребёнка ≥ 64 px и на планшете лёжа */
.cat-tab { min-width: 64px !important; min-height: 64px !important; }

/* ── фотобудка: зеркало в деревянной раме, комод с ящиками (канон proto/Booth.html) ── */
#booth { background: none !important; padding-top: calc(env(safe-area-inset-top) + 18 * var(--u)) !important; gap: calc(2 * var(--u)) !important; }
#booth::before { content: ""; position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 15 * var(--u)); height: calc(9 * var(--u)); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 40' preserveAspectRatio='none'%3E%3Cpath d='M0 4 Q195 30 390 4' fill='none' stroke='%233D2552' stroke-width='2' opacity='.45'/%3E%3Cg stroke='%23FFF7E8' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M22 8 l14 2 -5 17z' fill='%23E54B7E'/%3E%3Cpath d='M62 13 l15 2 -6 17z' fill='%23F4B73F'/%3E%3Cpath d='M104 17 l15 1 -7 17z' fill='%235FBF9A'/%3E%3Cpath d='M146 19 l15 1 -8 17z' fill='%237EC8FF'/%3E%3Cpath d='M188 20 l15 0 -8 17z' fill='%238E6BC4'/%3E%3Cpath d='M230 19 l15 -1 -7 17z' fill='%23E54B7E'/%3E%3Cpath d='M272 17 l15 -1 -6 17z' fill='%23F4B73F'/%3E%3Cpath d='M313 13 l15 -2 -5 17z' fill='%235FBF9A'/%3E%3Cpath d='M352 8 l14 -2 -4 17z' fill='%237EC8FF'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.booth-modes { background: none !important; }
.booth-modes .bmode { background: var(--f-cream) !important; border: 0 !important; box-shadow: var(--f-drop) !important; border-radius: var(--f-r-m) !important; }
.booth-modes .bmode.on { background: #FFE3EC !important; box-shadow: 0 calc(1.2 * var(--u)) 0 var(--f-rasp-d) !important; translate: 0 calc(-.6 * var(--u)); }
/* зеркало: дерево, строчка, блик на стекле; сверху арка */
.booth-stage { border-radius: 48% 48% calc(4 * var(--u)) calc(4 * var(--u)) / 34% 34% calc(4 * var(--u)) calc(4 * var(--u)) !important;
  border: calc(3.4 * var(--u)) solid var(--f-wood-d) !important; box-shadow: var(--f-drop-lg), inset 0 0 0 calc(.6 * var(--u)) rgba(61,37,82,.25) !important;
  outline: var(--f-stitch); outline-offset: calc(-2.4 * var(--u)); background: linear-gradient(180deg, #d7c7b6, #c4b1a0) !important; box-sizing: border-box; }
.booth-stage::after { content: ""; position: absolute; left: 9%; top: 12%; width: 5%; height: 46%; border-radius: 99px; background: rgba(255,255,255,.28); rotate: 14deg; pointer-events: none; z-index: 3; }
/* комод: три ящика-кармашка на лавандовой крышке */
.booth-drawers { display: flex; gap: calc(2.4 * var(--u)); width: min(94vw, 560px); box-sizing: border-box; padding: calc(2.4 * var(--u)) calc(3 * var(--u)) calc(1.6 * var(--u));
  border-radius: var(--f-r-l) var(--f-r-l) 0 0; background: #6F4FA3; box-shadow: inset 0 calc(1.4 * var(--u)) 0 rgba(255,255,255,.14); margin-bottom: calc(-2 * var(--u)); }
.bdrawer { flex: 1; min-height: 56px; border: 0; border-radius: var(--f-r-m); background: var(--f-cream); box-shadow: 0 calc(1 * var(--u)) 0 rgba(61,37,82,.3); cursor: pointer;
  position: relative; display: grid; place-items: center; font-size: calc(7 * var(--u)); transition: translate .25s var(--f-spring); }
.bdrawer::after { content: ""; position: absolute; inset: 10%; border-radius: inherit; border: var(--f-stitch-ink); pointer-events: none; }
.bdrawer.on { translate: 0 calc(-1.6 * var(--u)); box-shadow: 0 calc(1.6 * var(--u)) 0 var(--f-rasp-d); }
/* выдвинутый ящик: вещи на подушечках */
#booth .booth-masks { width: min(94vw, 560px); max-width: none !important; box-sizing: border-box; background: var(--f-cream); border-radius: var(--f-r-l);
  box-shadow: var(--f-drop-lg); position: relative; padding: calc(3 * var(--u)) calc(3.4 * var(--u)) !important; gap: calc(2.6 * var(--u)) !important; z-index: 1; }
#booth .mask-btn { width: max(60px, calc(15 * var(--u))) !important; height: max(60px, calc(15 * var(--u))) !important; border: 0 !important; background: #FFE3EC !important;
  box-shadow: 0 calc(1 * var(--u)) 0 rgba(61,37,82,.18) !important; transform: none !important; transition: translate .2s var(--f-spring); }
#booth .mask-btn.warp { border-radius: 50% !important; background: #DDEFFF !important; }
#booth .mask-btn.toon { background: #FFF0D6 !important; }
#booth .mask-btn.on { background: var(--f-rasp) !important; translate: 0 calc(-.8 * var(--u)); box-shadow: 0 calc(1.4 * var(--u)) 0 var(--f-rasp-d), inset 0 0 0 calc(1 * var(--u)) var(--f-cream) !important; }
/* главное действие — малиновый фотоаппарат */
#booth .shutter { background: var(--f-rasp) !important; border: 0 !important; width: max(96px, calc(24 * var(--u))) !important; height: max(96px, calc(24 * var(--u))) !important;
  box-shadow: 0 calc(1.8 * var(--u)) 0 var(--f-rasp-d), 0 0 0 calc(1.8 * var(--u)) var(--f-cream), 0 0 0 calc(5 * var(--u)) rgba(255,247,232,.35) !important; display: grid; place-items: center; }
#booth .shutter svg { width: 54%; height: 54%; }
#booth .shutter:active { translate: 0 calc(1 * var(--u)); transform: none; }
.booth-ctrl { padding-bottom: calc(env(safe-area-inset-bottom) + 2 * var(--u)); }
@media (orientation: landscape) and (min-width: 700px) {
  #booth:not(.hidden) { grid-template-areas: "stage drawers" "stage tray" "stage ctrl" !important; grid-template-rows: 1fr auto 1fr; align-content: center; padding-top: calc(env(safe-area-inset-top) + 14 * var(--u)) !important; }
  #boothDrawers { grid-area: drawers; align-self: end; width: 100%; }
  #boothMasks, #boothToons, #boothWarps { grid-area: tray !important; width: 100% !important; flex-wrap: wrap !important; }
  #booth::before { display: none; }
}

/* ── «Путешествие»: карта миров (канон proto/Trip.html) ── */
#tripMap { background: #9FD3E8 !important; padding: 0 !important; overflow: hidden; }
html[data-daypart="night"] #tripMap { background: #3d5a8a !important; }
#tripMap::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140'%3E%3Cpath d='M10 30 q20 -10 40 0 t40 0 M90 100 q20 -10 40 0 t40 0' fill='none' stroke='%23FFF7E8' stroke-width='2.5' stroke-dasharray='7 7'/%3E%3C/svg%3E"); }
.tm-scene { position: absolute; left: calc(4 * var(--u)); right: calc(4 * var(--u)); top: calc(env(safe-area-inset-top) + 20 * var(--u)); bottom: calc(env(safe-area-inset-bottom) + 9 * var(--u)); }
.tm-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tm-path path { fill: none; stroke: var(--f-ink); stroke-width: 5; stroke-dasharray: 2 12; stroke-linecap: round; opacity: .5; vector-effect: non-scaling-stroke; }
.tm-isle { position: absolute; width: max(64px, calc(17 * var(--u))); height: max(64px, calc(17 * var(--u))); translate: -50% -50%; border: 0; border-radius: 50% 46% 52% 44%;
  display: grid; place-items: center; font-size: calc(8.4 * var(--u)); cursor: pointer; background: #E9E2F2;
  box-shadow: 0 calc(1.4 * var(--u)) 0 rgba(61,37,82,.25), inset 0 calc(-1.4 * var(--u)) 0 rgba(61,37,82,.12) !important; }
.tm-isle::after { content: ""; position: absolute; inset: 9%; border-radius: inherit; border: var(--f-stitch); pointer-events: none; }
.tm-isle img.em { width: 58%; height: 58%; }
.tm-isle.locked { background: #E9E2F2 !important; }
.tm-isle.locked::before { content: ""; position: absolute; inset: 18% 12%;
  background: radial-gradient(circle at 30% 60%, #fff 0 30%, transparent 31%), radial-gradient(circle at 60% 40%, #fff 0 34%, transparent 35%), radial-gradient(circle at 80% 65%, #fff 0 26%, transparent 27%); }
.tm-isle.done::before { content: ""; position: absolute; right: -6%; top: -6%; width: 34%; height: 34%; border-radius: 50%; z-index: 2; box-shadow: 0 2px 0 rgba(61,37,82,.3);
  background: var(--f-mustard) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M13 4 l2.6 5.6 6 .6 -4.6 4 1.4 6 -5.4 -3.2 -5.4 3.2 1.4 -6 -4.6 -4 6 -.6z' fill='%23FFF7E8'/%3E%3C/svg%3E") center/80% no-repeat; }
.tm-isle.here { outline: calc(1.2 * var(--u)) solid var(--f-cream); outline-offset: calc(.8 * var(--u)); animation: tmHere 1.8s ease-in-out infinite; }
@keyframes tmHere { 50% { translate: -50% calc(-50% - 1.4 * var(--u)); } }
.tm-token { position: absolute !important; width: 72% !important; height: 72% !important; left: 14%; top: -68%; border-radius: 50%; border: calc(.9 * var(--u)) solid var(--f-cream);
  box-shadow: 0 calc(1 * var(--u)) 0 rgba(61,37,82,.3); background: #FFD1E3; pointer-events: none; }
html.lite .tm-isle.here, .reduce-motion .tm-isle.here { animation: none; }
@media (prefers-reduced-motion: reduce) { .tm-isle.here { animation: none; } }
/* доска в мире: кубик — главное действие, малиновый */
#tripToMap svg { width: 62%; height: 62%; }
#tripDice { background: var(--f-rasp) !important; box-shadow: 0 calc(1.8 * var(--u)) 0 var(--f-rasp-d) !important; outline: none !important; min-width: 96px; min-height: 96px; }
#tripDice .die { color: var(--f-cream) !important; text-shadow: 0 calc(.6 * var(--u)) 0 var(--f-rasp-d); }

/* «Угадай сказку/мультик»: карточка, которую назвали, — светится и ждёт второго нажатия */
.quiz-card.armed { background: #FFF6D0 !important; box-shadow: 0 0 0 calc(1.8 * var(--u)) #FFD65A, var(--f-drop-lg) !important; translate: 0 calc(-.8 * var(--u)); }

/* ── «Путешествие»: доска — извилистая дорожка вместо сетки 3×3 (proto/Trip.html) ── */
#trip .trip-path { display: block !important; position: relative; width: min(92vw, 50vh); aspect-ratio: 4 / 5; height: auto; flex: none; }
.trip-road { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trip-road path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trip-road .edge { stroke: rgba(61,37,82,.12); stroke-width: max(50px, calc(13.5 * var(--u))); }
.trip-road .wide { stroke: rgba(255,247,232,.85); stroke-width: max(40px, calc(11 * var(--u))); }
.trip-road .dash { stroke: var(--f-ink); stroke-width: 4; stroke-dasharray: 2 11; opacity: .35; }
#trip .trip-cell { position: absolute !important; width: max(60px, 19%); aspect-ratio: 1; height: auto; translate: -50% -50%; font-size: calc(8.5 * var(--u)) !important; border-radius: var(--f-r-m) !important; }
#trip .trip-cell.here { z-index: 2; }
@media (orientation: landscape) and (min-width: 700px) {
  /* планшет лёжа: дорожка слева, улики и кубик справа */
  #trip:not(.hidden) { display: grid !important; grid-template-columns: auto auto; grid-template-areas: "path clues" "path act"; align-content: center; justify-content: center; column-gap: calc(8 * var(--u)); row-gap: calc(4 * var(--u)); padding-top: calc(env(safe-area-inset-top) + 14 * var(--u)) !important; }
  #trip .trip-path { grid-area: path; width: min(44vw, 64vh); }
  #tripClues { grid-area: clues; align-self: end; justify-self: center; }
  #tripDice, #tripPlay { grid-area: act; align-self: start; justify-self: center; }
}
