/* =====================================================================
   SPRITOVÝ VZHLED UI – Colorful UI Kit (Smashy Tech), obrázky v assets/ui/
   Načítá se až po ui.css a jeho pravidla přebíjí. Pravidla:
   - tlačítka = devítidílné obrázky (border-image), barva podle významu: zelená = ano/hotovo, žlutá = jdi/hraj,
     modrá = obyčejné, růžová/červená = zrušit, fialová = záložky
   - okna mají bílou kartu, stuhu s nadpisem a modrý vnitřek; na telefonu jdou přes celou obrazovku
   - dárek (Secret pack), truhla, mince a hvězdy jsou obrázky z kitu
   ===================================================================== */
:root {
  --k-blue: url("../assets/ui/btn_blue.png"); --k-green: url("../assets/ui/btn_green.png"); --k-yellow: url("../assets/ui/btn_yellow.png");
  --k-orange: url("../assets/ui/btn_orange.png"); --k-pink: url("../assets/ui/btn_pink.png"); --k-red: url("../assets/ui/btn_red.png");
  --k-purple: url("../assets/ui/btn_purple.png"); --k-gray: url("../assets/ui/btn_gray.png"); --k-dark: url("../assets/ui/btn_dark.png");
  --k-panel: linear-gradient(180deg, #faf2dc, #eadfbf);
}

/* ---------- společné: kreslená tlačítka ---------- */
.u-btn, .u-tab, .u-primary, .u-buyb, .u-green, .u-hback, .u-sm, .u-grade button, .u-gwarn button, .u-pvisit {
  --bi: var(--k-blue); --sc: #4d889f;
  box-sizing: border-box; min-height: 52px; padding: 0 12px;
  border: solid transparent; border-width: 16px; border-image: var(--bi) 50 fill / 16px stretch;
  border-radius: 0 !important; background: none !important; box-shadow: none !important;
  color: #fff; text-shadow: none; -webkit-text-stroke: 3.5px var(--sc); paint-order: stroke fill;
  font-family: var(--font); font-weight: 900; letter-spacing: .01em; line-height: 1.1;
  transition: transform .1s var(--pop), filter .15s;
}
.u-btn:active, .u-tab:active, .u-primary:active, .u-buyb:active, .u-green:active, .u-hback:active, .u-sm:active { transform: translateY(3px); filter: brightness(.96); }
@media (hover: hover) { .u-btn:hover:not(.is-off), .u-tab:hover, .u-hback:hover { filter: brightness(1.07); transform: translateY(-2px); } }
.u-btn .u-i, .u-tab .u-i { filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); -webkit-text-stroke: 0; }
.u-btn { font-size: 19px; }
/* zelená: potvrdit */
.u-primary, .u-buyb, .u-green, [data-act="home-buy"], .u-pvisit, .u-gwarn button[data-act="grade-yes"], .u-grade button.sel { --bi: var(--k-green); --sc: #5f793d; border-image-source: var(--k-green); }
/* žlutá/oranžová: jdi, hraj, vyzvedni */
.u-race-go, .u-cam-go, .u-lr-btn, .u-dq-claim, .u-al-cta, [data-act="quiz-pack"], [data-act="pack-open"], [data-act="pack-claim"] { --bi: var(--k-orange); --sc: #ba6024; border-image-source: var(--k-orange); }
/* růžová/červená: zrušit, smazat */
[data-act*="cancel"], [data-act="home-cancel"], [data-act="album-del"], [data-act="post-stop"], .u-adlg-yes, [data-act="race-mp-leave"], [data-act="circuit-ignore"], [data-act="race-ignore"], [data-act="hunt-cancel"], .u-gwarn button[data-act="grade-no"] { --bi: var(--k-red); --sc: #ae2f26; border-image-source: var(--k-red); }
.is-off, .is-off:hover, .u-btn[aria-disabled="true"], .u-buyb[aria-disabled="true"], [data-act="home-buy"][aria-disabled="true"], .u-btn[disabled] { --bi: var(--k-gray); --sc: #7a6680; border-image-source: var(--k-gray); filter: none; opacity: .9; }
.u-primary, .u-lg { font-size: 22px; } .u-lg { min-height: 60px; }
.u-sm, .u-pvisit { min-height: 44px; font-size: 16px; }
.u-grade button { --bi: var(--k-gray); border-image-source: var(--k-gray); font-size: 17px; min-height: 46px; padding: 0 4px; min-width: 46px; }
.u-gwarn button { min-height: 48px; }
.u-hback { --bi: var(--k-purple); --sc: #906e9f; border-image-source: var(--k-purple); font-size: 17px; min-height: 46px; margin: 0 0 8px; display: inline-flex; align-items: center; gap: 6px; }
.u-hback svg { width: 1.1em; height: 1.1em; }

/* záložky: fialové, vybraná je žlutá */
.u-tab { --bi: var(--k-purple); --sc: #906e9f; border-image-source: var(--k-purple); font-size: 17px; min-height: 52px; padding: 0 8px; gap: 6px; }
.u-tab .u-ti { color: #fff; font-size: 1.25em; } .u-tab .u-ti .u-gi { height: 1.5em; margin: -.2em 0; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.u-tab.sel, .u-tab[aria-selected="true"] { --bi: var(--k-yellow); --sc: #bd7623; border-image-source: var(--k-yellow); color: #fff; box-shadow: none !important; background-image: none !important; }
.u-tab[aria-selected="true"]::after { display: none; }
.u-tab.u-power { --bi: var(--k-green); --sc: #5f793d; border-image-source: var(--k-green); color: #fff; }
.u-tab.u-power.on { --bi: var(--k-red); --sc: #ae2f26; border-image-source: var(--k-red); }
.u-num { font-family: var(--font); font-weight: 900; background: #f24838; box-shadow: 0 0 0 2.5px #fff; -webkit-text-stroke: 0; text-shadow: none; }
.u-tabs { padding: 10px 14px 8px; gap: 6px; }

/* křížek = obrázek z kitu */
.u-x, .u-x:hover:not(.primary), #mapZoom .u-x, .p-close { width: 54px; height: 58px; min-width: 54px; padding: 0; border: 0; border-radius: 0; font-size: 0; color: transparent; background: url("../assets/ui/i_x.png") center / contain no-repeat !important; box-shadow: none !important; filter: drop-shadow(0 3px 3px rgba(62,45,69,.35)); }
.u-x .u-i { display: none; }
.u-x:active { transform: translateY(2px) scale(.96); }
.u-card > .u-x { top: 8px; right: 10px; }
.u-x-in { width: 46px; height: 50px; min-width: 46px; }
.u-packm > .u-x { width: 56px; height: 60px; }

/* ---------- okna ---------- */
.u-modal { background: radial-gradient(ellipse at 50% 20%, rgba(120,86,128,.5), rgba(40,28,48,.9)); }
@media (pointer: fine) { .u-modal { backdrop-filter: blur(4px); } }
.u-card { --rib: url("../assets/ui/rib_blue.png"); --hd: #4d889f; border: solid transparent; border-width: 14px 14px 18px; border-image: url("../assets/ui/card.png") 44 fill / 14px 14px 18px stretch; border-radius: 0 !important; background: none; box-shadow: none; overflow: visible; filter: drop-shadow(0 18px 30px rgba(38,26,43,.55)); }
.u-modal[data-m="shop"] .u-card, .u-modal[data-m="race"] .u-card { --rib: url("../assets/ui/rib_orange.png"); --hd: #ac5922; }
.u-modal[data-m="bag"] .u-card, .u-modal[data-m="loginrew"] .u-card { --rib: url("../assets/ui/rib_yellow.png"); --hd: #b17322; }
.u-modal[data-m="quests"] .u-card, .u-modal[data-m="circuit"] .u-card { --rib: url("../assets/ui/rib_blue.png"); --hd: #4d889f; }
.u-modal[data-m="settings"] .u-card { --rib: url("../assets/ui/rib_dark.png"); --hd: #372d3a; }
.u-modal[data-m="quiz"] .u-card, .u-modal[data-m="hall"] .u-card { --rib: url("../assets/ui/rib_purple.png"); --hd: #886398; }
.u-modal[data-m="post"] .u-card { --rib: url("../assets/ui/rib_pink.png"); --hd: #a72e38; }
.u-modal[data-m="hunt"] .u-card { --rib: url("../assets/ui/rib_green.png"); --hd: #526e3a; }
.u-card header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 0 64px 6px 0; background: none; box-shadow: none; color: inherit; }
.u-card h2 { grid-column: 2; grid-row: 1; margin: -2px 0 0; padding: 0 22px; min-height: 50px; min-width: 190px; justify-content: center; border: solid transparent; border-width: 0 20px; border-image: var(--rib) 0 48 fill / 0 20px stretch;
  color: #fff; font-family: var(--font-d); font-weight: 400; font-size: 29px; letter-spacing: .04em; text-shadow: none; -webkit-text-stroke: 5px var(--hd); paint-order: stroke fill; white-space: nowrap; }
.u-card header .u-chips { grid-column: 1; grid-row: 1; justify-self: start; }
.u-h-ico { width: auto; height: auto; background: none; box-shadow: none; font-size: 28px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); -webkit-text-stroke: 0; }
.u-h-ico .u-i, .u-h-ico img { width: 1em; height: 1em; }
.u-body { margin: 0 2px 2px; padding: 12px 12px 14px; border-radius: 20px; background: var(--k-panel); box-shadow: inset 0 3px 8px rgba(120,84,70,.22); }
.u-tabs { background: none; }
.u-foot { background: none; }
/* mince a energie v hlavičce: fialové pilulky */
.u-chip, .u-card header .u-chip { min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px; color: #fff; font-size: 20px; font-weight: 900; background: linear-gradient(180deg, #c897dd, #a370b9); box-shadow: 0 0 0 2.5px #fff, 0 3px 0 2.5px #684677; -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(67,41,78,.5); }
.u-card header .u-chip .u-i { width: 26px; height: 26px; }
.u-gold { background: linear-gradient(180deg, #c897dd, #a370b9); }
.u-chip small { color: #fff; }

/* mince: obrázek z kitu všude */
.u-ci { display: inline-block; flex: none; width: auto; height: 1.25em; vertical-align: -.3em; filter: drop-shadow(0 2px 0 rgba(115,62,16,.35)); }
.u-gi { display: block; width: auto; height: 1.2em; flex: none; filter: drop-shadow(0 0 10px rgba(201,158,221,.75)) drop-shadow(0 4px 3px rgba(77,55,95,.35)); }
.u-coins .u-ci { height: 40px; margin: -6px 0; }
.u-chip .u-ci, .u-price .u-ci, .u-cost .u-ci { height: 1.3em; }

/* dlaždice uvnitř modrého okna */
.u-food, .u-row2, .u-setrow, .u-grade, .u-dq, .u-lq, .u-lr-day, .u-race-info, .u-al-card, .u-qcat, .u-qa, .u-ltile.got, .u-post-active, .u-post-res { box-shadow: 0 0 0 3px #fff, 0 5px 0 3px rgba(69,97,123,.28); background: #fff; }
.u-setrow { margin-top: 12px; min-height: 64px; border-radius: 22px; }
.u-setrow b { font-size: 21px; color: #55415d; }
.u-lq, .u-dq { border-radius: 24px; }
.u-dq-ico { background: linear-gradient(180deg, #f7d489, #f6b04c); }

/* přepínač = obrázek z kitu */
.u-switch { width: 92px; height: 46px; border-radius: 0; background: url("../assets/ui/tg_off.png") center / 100% 100% no-repeat; box-shadow: none; }
.u-switch::before { display: none; } .u-switch i { display: none; }
.u-switch.on { background: url("../assets/ui/tg_on.png") center / 100% 100% no-repeat; box-shadow: none; }
.u-switch.on::before { display: none; }
/* posuvník hlasitosti */
.u-vol input { -webkit-appearance: none; appearance: none; height: 24px; background: transparent; }
.u-vol input::-webkit-slider-runnable-track { height: 16px; border-radius: 99px; background: linear-gradient(180deg, #caa2dc, #ba87d0); box-shadow: 0 0 0 3px #fff, 0 3px 0 3px rgba(84,57,95,.3); }
.u-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -9px; border-radius: 50%; background: linear-gradient(180deg, #f7d489, #f69c24); box-shadow: 0 0 0 4px #fff, 0 4px 0 4px #c08531; }
.u-vol input::-moz-range-track { height: 16px; border-radius: 99px; background: #c092d4; }
.u-vol input::-moz-range-thumb { width: 30px; height: 30px; border: 3px solid #fff; border-radius: 50%; background: #f6ad3d; }

/* pruhy postupu: tmavě fialová dráha, zelená výplň */
.u-dq-bar, .u-qtimer { height: 28px; border-radius: 99px; background: #895e9c; box-shadow: 0 0 0 3px #fff, 0 3px 0 3px rgba(84,57,95,.3), inset 0 3px 5px rgba(0,0,0,.3); overflow: hidden; }
.u-dq-bar i { background: linear-gradient(180deg, rgba(255,255,255,.55) 0 28%, rgba(255,255,255,0) 28%), linear-gradient(180deg, #c6d878, #8db04f) !important; }
.u-dq.done .u-dq-bar i { background: linear-gradient(180deg, rgba(255,255,255,.55) 0 28%, rgba(255,255,255,0) 28%), linear-gradient(180deg, #f7ce65, #f69c24) !important; }
.u-dq-bar span { color: #fff; font-size: 17px; text-shadow: 0 2px 0 rgba(67,41,78,.6); }
.u-qtimer i { background: linear-gradient(180deg, #c6d878, #8db04f); }
.u-qprog i { height: 12px; }

/* karty jídla v obchodu a v batohu */
button.u-eat { border-radius: 24px; }
.u-price { border-radius: 0; border: solid transparent; border-width: 12px; border-image: var(--k-green) 50 fill / 12px stretch; background: none !important; box-shadow: none !important; color: #fff; -webkit-text-stroke: 3px #5f793d; paint-order: stroke fill; text-shadow: none; padding: 0 4px; min-width: 76%; }
button.u-shopcard.cant .u-price { border-image-source: var(--k-gray); -webkit-text-stroke-color: #7a6680; background: none !important; box-shadow: none !important; }
.u-fico { filter: drop-shadow(0 4px 2px rgba(69,97,123,.25)); }

/* ---------- HUD ---------- */
.u-coins { padding: 4px 22px 4px 10px; border-radius: 999px; background: linear-gradient(180deg, #c897dd, #a370b9) !important; box-shadow: 0 0 0 3.5px #fff, 0 5px 0 3.5px #684677, 0 12px 16px -6px rgba(60,40,69,.6) !important; color: #fff; font-size: 34px; text-shadow: 0 3px 0 rgba(67,41,78,.55); }
.u-plus { color: #f7ce65; text-shadow: 0 2px 0 #a370b9; }
.u-bar .u-ib { --sq: url("../assets/ui/sq_blue.png"); width: 64px; height: 64px; min-width: 64px; border-radius: 0; background: var(--sq) center / 100% 100% no-repeat !important; box-shadow: none !important; filter: drop-shadow(0 6px 6px rgba(46,30,52,.35)); padding-bottom: 5px; font-size: 36px; }
.u-bar .u-ib:active { transform: translateY(3px); box-shadow: none !important; }
@media (hover: hover) { .u-bar .u-ib:hover:not(.primary) { background: var(--sq) center / 100% 100% no-repeat !important; filter: drop-shadow(0 6px 6px rgba(46,30,52,.35)) brightness(1.08); } }
.u-bar .u-ib[data-act="bag"] { --sq: url("../assets/ui/sq_yellow.png"); }
.u-bar .u-ib[data-act="quests"] { --sq: url("../assets/ui/sq_blue.png"); }
.u-bar .u-ib[data-act="map"] { --sq: url("../assets/ui/sq_green.png"); }
.u-bar .u-ib[data-act="edit"] { --sq: url("../assets/ui/sq_purple.png"); }
.u-bar .u-ib[data-act="settings"] { --sq: url("../assets/ui/sq_dark.png"); margin-left: 8px; color: #fff; }
.u-bar .u-ib.u-lr-hud { --sq: url("../assets/ui/sq_red.png"); }
.u-bar .u-ib[data-act="exit"] { --sq: url("../assets/ui/sq_orange.png"); width: auto; min-width: 64px; padding: 0 22px 5px 16px; background: var(--sq) center / 100% 100% no-repeat !important; border-radius: 0; font-size: 32px; }
.u-bar .u-ib[data-act="exit"] .u-lbl { font-size: 20px; -webkit-text-stroke: 3px #ac5922; paint-order: stroke fill; }
.u-bar .u-ib .u-i { filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.u-bar .u-dot { background: #f24838; }
.u-editbar { --bi: var(--k-orange); border: solid transparent; border-width: 16px; border-image: var(--k-orange) 50 fill / 16px stretch; border-radius: 0; background: none !important; box-shadow: none !important; height: auto; min-height: 56px; -webkit-text-stroke: 3px #ba6024; paint-order: stroke fill; text-shadow: none; }

/* ---------- Secret pack = dárek z kitu ---------- */
.u-boxg { font-size: 170px; filter: drop-shadow(0 14px 18px rgba(0,0,0,.45)); }
.u-boxg .u-gi { height: 1.2em; }
.u-stage[data-s="shake"] .u-boxg { animation: u-glow 1.55s ease-in both; }
.u-reveal { border: solid transparent; border-width: 14px 14px 18px; border-image: url("../assets/ui/card.png") 44 fill / 14px 14px 18px stretch; background: none !important; box-shadow: none !important; border-radius: 0; filter: drop-shadow(0 0 40px var(--rc)) drop-shadow(0 14px 18px rgba(0,0,0,.4)); min-width: 270px; }
.u-rar { margin-top: -6px; padding: 3px 18px; border-radius: 999px; color: #fff; background: var(--rc); box-shadow: 0 0 0 3px #fff; -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(0,0,0,.35); font-size: 17px; letter-spacing: .08em; }
.u-stage[data-r="legendary"] .u-reveal { background: none !important; }
.u-qgift { width: auto; height: 84px; display: grid; } .u-qgift .u-gi { height: 84px; }
.u-lr-pack { --g1: transparent; } .u-lr-pack .u-gi { height: 62px; }
.u-lr-coins .u-ci { height: 36px; }
.u-gdlg-ico .u-gi, .u-gdlg-ico .u-ci { width: auto; height: 96px; }

/* hvězdy ve výsledku kvízu */
.u-qstars { gap: 4px; font-size: 0; }
.u-qstars span { width: 52px; height: 52px; background: url("../assets/ui/star.png") center / contain no-repeat; filter: grayscale(1) brightness(1.25) opacity(.55); }
.u-qstars .on { filter: drop-shadow(0 3px 2px rgba(154,89,22,.4)); }
.u-qwin { background: linear-gradient(180deg, #c897dd, #a370b9); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px #684677; color: #fff; text-shadow: 0 2px 0 rgba(67,41,78,.55); }
.u-qwin .u-ci { height: 40px; }

/* kvíz a nabídky: barevné dlaždice */
.u-qcat { border-radius: 26px; box-shadow: 0 0 0 4px var(--qc), 0 0 0 7px #fff, 0 9px 0 7px rgba(69,97,123,.28); background: #fff; margin: 4px; }
.u-qcat b { font-family: var(--font-d); font-weight: 400; font-size: 23px; letter-spacing: .03em; color: #55415d; }
.u-qa { box-shadow: 0 0 0 3px #fff, 0 5px 0 3px rgba(69,97,123,.3); }
.u-ql { background: #ba87d0; }
.u-qtext { color: #55415d; }

/* dny denní odměny */
.u-lr-day { border-radius: 24px; }
.u-lr-day.cur { box-shadow: 0 0 0 4px #f6ad3d, 0 0 0 7px #fff, 0 0 26px 6px rgba(247,187,86,.7), 0 9px 0 7px #c08531; }
.u-lr-day.done { opacity: .6; filter: grayscale(1); background: #ececec; box-shadow: 0 0 0 3px #fff, 0 5px 0 3px rgba(90,90,90,.25); pointer-events: none; }   /* už vyzvednuté dny: šedé, neaktivní */
.u-lr-day.done .u-lr-d, .u-lr-day.done small { color: #7a7a7a; }
.u-lr-day.grand { background: linear-gradient(135deg, #f7e5bd, #f6c87c 55%, #f7e5bd); }

/* ---------- hlášky a malé dialogy ---------- */
.u-gdlg-card, .p-dlg-card { border: solid transparent; border-width: 14px 14px 18px; border-image: url("../assets/ui/card.png") 44 fill / 14px 14px 18px stretch; border-radius: 0; background: none; box-shadow: none; overflow: visible; filter: drop-shadow(0 18px 30px rgba(38,26,43,.55)); }
.u-gdlg-head { margin: -34px auto 6px; padding: 0 20px; min-height: 52px; width: max-content; max-width: 100%; display: flex; align-items: center; justify-content: center; border: solid transparent; border-width: 0 20px; border-image: url("../assets/ui/rib_pink.png") 0 48 fill / 0 20px stretch; background: none; box-shadow: none; }
.u-gdlg-head h2 { color: #fff; font-size: 28px; text-shadow: none; -webkit-text-stroke: 5px #a72e38; paint-order: stroke fill; }
.u-gdlg-rew { background: var(--k-panel); box-shadow: inset 0 3px 8px rgba(120,84,70,.22); }
.p-dlg-head h2 { color: #55415d; }

/* ---------- pás úprav domečku (dole / na boku) ---------- */
.u-sheet { border: solid transparent; border-width: 12px 12px 16px; border-image: url("../assets/ui/card.png") 44 fill / 12px 12px 16px stretch; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 -6px 22px rgba(38,26,43,.4)); }
.u-sheet .u-tab { min-height: 46px; font-size: 15px; padding: 0 4px; }
.u-item { border-radius: 18px; background: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #eee3cd, 0 5px 0 5px rgba(69,97,123,.22); }
.u-item.equipped, .u-item.built { background: linear-gradient(180deg, #dbe2c4, #c4d299); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #8db04f, 0 5px 0 5px #5f793d; background-image: none; }
.u-item.prev { background: #f7ebca; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f6ad3d, 0 6px 0 5px #c08531; }
.u-item.locked { background: #f2eee5; }
.u-item b { font-family: var(--font); color: #55415d; }
.u-strip { background: var(--k-panel); border-radius: 18px; padding: 8px; box-shadow: inset 0 3px 8px rgba(76,114,141,.22); }
.u-back { background: linear-gradient(180deg, #fff4dd, #c6bbdd); }

/* ---------- co je kids-nepotřebný text, pryč: dlouhé popisy a nápovědy ---------- */
.u-qsub, .u-lq-desc, p.u-hint, .u-qhint, .u-cam-tab p, .u-cam-tips, .u-race-info small, .u-post-active small, .u-dq-note, .u-gnote, .u-lr-sub, .u-empty p { display: none !important; }
.u-race-info b, .u-qhint b { font-size: 18px; }
.u-dq-note:only-child { display: block !important; }

/* ---------- telefon: okna přes celou obrazovku ---------- */
@media (max-height: 520px), (pointer: coarse) and (max-width: 900px) {
  .u-modal:not(.u-packm) { padding: max(4px, var(--safe-t)) max(4px, var(--safe-r)) max(4px, var(--safe-b)) max(4px, var(--safe-l)); align-items: stretch; }
  .u-modal:not(.u-packm) .u-card, .u-modal[data-m] .u-card.u-wide, .u-modal[data-m] .u-card.u-narrow { width: 100% !important; max-width: none; height: 100%; max-height: none; }
  .u-card { border-width: 10px 10px 14px; border-image-width: 10px 10px 14px; }
  .u-card header { padding: 0 54px 2px 0; }
  .u-card h2 { min-height: 42px; font-size: 24px; min-width: 150px; margin-top: -4px; border-width: 0 16px; border-image-width: 0 16px; padding: 0 12px; -webkit-text-stroke-width: 4.5px; }
  .u-card > .u-x { top: 0; right: 4px; width: 46px; height: 50px; min-width: 46px; }
  .u-body { padding: 8px 10px 10px; }
  .u-tabs { padding: 6px 8px 6px; }
  .u-chip, .u-card header .u-chip { min-height: 34px; font-size: 17px; padding: 0 10px 0 6px; }
  .u-btn { font-size: 17px; min-height: 46px; } .u-tab { font-size: 15px; min-height: 46px; }
  .u-bar .u-ib { width: 46px; height: 46px; min-width: 46px; font-size: 27px; padding-bottom: 4px; }
  .u-bar .u-ib[data-act="exit"] { width: auto; padding: 0 14px 4px 10px; }
  .u-bar .u-ib[data-act="exit"] .u-lbl { font-size: 16px; }
  .u-coins { font-size: 24px; padding: 2px 16px 2px 8px; } .u-coins .u-ci { height: 28px; margin: -3px 0; }
  .u-setrow { min-height: 52px; margin-top: 0; } .u-switch { width: 80px; height: 40px; }
  .u-boxg { font-size: 110px; }
  .u-qgift, .u-qgift .u-gi { height: 56px; } .u-lr-pack .u-gi { height: 40px; }
  .u-qstars span { width: 40px; height: 40px; }
  .u-modal[data-m="shop"] .u-shopgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .u-sheet { border-width: 10px 10px 14px; border-image-width: 10px 10px 14px; }
}

/* batoh: dárek s počtem */
.u-packtab { padding: 6px 12px 10px; gap: 8px; }
.u-packbig { position: relative; font-size: 140px; line-height: 0; animation: u-qwob 1.6s ease-in-out infinite; }
.u-packbig .u-gi { height: 1.2em; }
.u-packn { position: absolute; right: -6px; bottom: 8px; min-width: 56px; height: 44px; padding: 0 10px; border-radius: 99px; display: grid; place-items: center; font-style: normal; font-family: var(--font-d); font-size: 28px; line-height: 1; color: #fff; background: #f24838; box-shadow: 0 0 0 4px #fff, 0 4px 0 4px #a02c24; text-shadow: 0 2px 0 rgba(114,4,0,.5); }
.u-big .u-gi, .u-big .u-ci { width: auto; height: 1.15em; }
.u-big.u-grey .u-gi { filter: grayscale(1) opacity(.5); }
.u-empty h3 { color: #55415d; }
.u-big { color: #ba87d0; }
@media (max-height: 520px) { .u-packbig { font-size: 112px; } .u-packn { height: 36px; font-size: 22px; min-width: 46px; } .u-big { font-size: 62px; } }

/* úkoly: bez malých popisků nad nadpisem */
.u-dq-body > small, .u-lq-head small { display: none; }
.u-dq h3, .u-lq-head h3 { color: #55415d; }

/* pás úprav domečku: kompaktní záložky a dlaždice */
.u-sheet .u-tab { border-width: 11px; border-image-width: 11px; min-height: 42px; font-size: 14px; padding: 0 2px; gap: 4px; -webkit-text-stroke-width: 3px; }
.u-sheet .u-tab .u-ti { font-size: 1.15em; }
.u-sheet-top { gap: 6px; }
.u-item { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #eee3cd, 0 4px 0 4px rgba(69,97,123,.2); }
.u-item.equipped, .u-item.built { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8db04f, 0 4px 0 4px #5f793d; }
.u-item.prev { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f6ad3d, 0 5px 0 4px #c08531; }
.u-strip { gap: 10px; padding: 8px 8px 10px; }

/* velké dlaždice nabídek: barevné, jako v kitu */
.u-qcat { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--qc) 55%, #fff), var(--qc) 70%); box-shadow: 0 0 0 3px #fff, 0 7px 0 3px color-mix(in srgb, var(--qc) 60%, #000), 0 12px 14px -6px rgba(46,30,52,.4); margin: 3px 3px 9px; }
.u-qcat b { color: #fff; -webkit-text-stroke: 4.5px color-mix(in srgb, var(--qc) 62%, #000); paint-order: stroke fill; }
.u-qcat small { color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.u-qcat .u-qi, .u-qcat .u-hcard-ico { filter: drop-shadow(0 3px 0 rgba(0,0,0,.22)); font-size: 46px; }
.u-qcat.off { filter: grayscale(.85) brightness(1.05); opacity: .8; }
.u-qdots i { background: rgba(255,255,255,.45); box-shadow: inset 0 2px 3px rgba(0,0,0,.2); } .u-qdots i.on { background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.18); }
.u-lr-banner { border-radius: 24px; }

.u-qcat .u-qi { color: #fff; }
.u-qcat small:empty { display: none; }
.u-qdaily { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; padding: 4px 16px; width: max-content; margin-inline: auto; border-radius: 99px; background: rgba(137,94,156,.85); box-shadow: 0 0 0 3px #fff; }
.u-qdaily span { width: 32px; height: 32px; background: url("../assets/ui/star.png") center / contain no-repeat; filter: grayscale(1) brightness(1.3) opacity(.45); }
.u-qdaily span.on { filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.u-qdaily .u-gi { height: 38px; margin-left: 6px; }

/* kvíz: odpovědi jsou velká barevná tlačítka */
.u-qa { --bi: var(--k-blue); --sc: #4d889f; box-sizing: border-box; border: solid transparent; border-width: 18px; border-image: var(--bi) 50 fill / 18px stretch; border-radius: 0; background: none !important; box-shadow: none !important; color: #fff; min-height: 74px; padding: 0 6px; -webkit-text-stroke: 0; }
.u-qa:nth-child(1) { --bi: var(--k-blue); --sc: #4d889f; border-image-source: var(--k-blue); }
.u-qa:nth-child(2) { --bi: var(--k-pink); --sc: #ba3f86; border-image-source: var(--k-pink); }
.u-qa:nth-child(3) { --bi: var(--k-green); --sc: #5f793d; border-image-source: var(--k-green); }
.u-qa b { color: #fff; font-size: 26px; -webkit-text-stroke: 4px var(--sc); paint-order: stroke fill; }
.u-ql { background: #fff; color: var(--sc); text-shadow: none; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.u-qa.say { border-image-source: var(--k-yellow); --sc: #bd7623; transform: scale(1.04); }
.u-qa.right { border-image-source: var(--k-green); --sc: #5f793d; animation: u-qwob2 .5s ease-in-out 2; }
.u-qa.wrong { border-image-source: var(--k-red); --sc: #ae2f26; opacity: .85; }
.u-qa[aria-disabled="true"]:not(.right):not(.wrong) { filter: grayscale(.7); opacity: .6; }
@keyframes u-qwob2 { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.u-qtext { font-size: 30px; }
@media (max-height: 460px) { .u-qa { min-height: 78px; border-width: 16px; border-image-width: 16px; } .u-qa b { font-size: 24px; } .u-qtext { font-size: 24px; } }

/* mapa: přiblížit / oddálit jsou zelené dlaždice s ikonou (ne červený křížek) */
#mapZoom .u-x, #mapZoom .u-x:hover:not(.primary) { width: 58px; height: 58px; min-width: 58px; display: grid; place-items: center; padding-bottom: 5px; font-size: 34px; color: #fff; background: url("../assets/ui/sq_green.png") center / 100% 100% no-repeat !important; }
#mapZoom .u-x .u-i { display: block; width: 1em; height: 1em; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
@media (pointer: coarse), (max-height: 520px) { #mapHint { display: none; } #mapSide { flex-basis: clamp(120px, 20vw, 200px); } }
.u-btn .u-gi, .u-btn .u-ci { height: 1.5em; margin: -.2em 0; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.u-bar .u-ib .u-gi { height: 40px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.u-dq-claim { font-size: 22px; }
@media (max-height: 520px) { .u-bar .u-ib .u-gi { height: 28px; } }
@media (max-height: 520px) { .u-lr-pack .u-gi { height: 54px; } .u-lr-coins .u-ci { height: 30px; } .u-lr-day { min-height: 92px; } }

.u-bar .u-ib.u-cam-hud { --sq: url("../assets/ui/sq_pink.png"); }

/* penízek letí do počítadla */
.u-flycoin { position: fixed; left: 0; top: 0; z-index: 40; width: 40px; height: 40px; height: auto; pointer-events: none; will-change: transform; filter: drop-shadow(0 3px 2px rgba(115,62,16,.4)) drop-shadow(0 0 8px rgba(247,193,86,.9)); }
.u-rewardfx { position: fixed; left: 50%; top: 42%; z-index: 42; display: flex; align-items: center; gap: 10px; pointer-events: none; will-change: transform; }
.u-giftfx { position: fixed; left: 0; top: 0; z-index: 43; width: 480px; pointer-events: none; }
.u-giftfx .u-gfx-svg { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 4px rgba(61,52,69,.45)) drop-shadow(0 0 22px rgba(255,214,102,.95)); }
.u-gfx-rays { position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; margin: -130% 0 0 -130%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,226,130,.55) 0 10deg, rgba(255,226,130,0) 10deg 22deg); -webkit-mask: radial-gradient(circle, #000 12%, transparent 62%); mask: radial-gradient(circle, #000 12%, transparent 62%); animation: u-gfxspin 3s linear infinite; }
@keyframes u-gfxspin { to { transform: rotate(360deg); } }
.u-gfx-ring { z-index: 43; width: 40px; height: 40px; margin: -20px 0 0 -20px; animation-name: u-gfxring; animation-duration: .9s; animation-fill-mode: both; }
@keyframes u-gfxring { from { transform: scale(.5); opacity: 1; } to { transform: scale(9); opacity: 0; } }
.u-rewardfx img { width: clamp(110px, 22vmin, 240px); height: auto; filter: drop-shadow(0 3px 2px rgba(115,62,16,.4)) drop-shadow(0 0 12px rgba(247,193,86,.95)); }
.u-rewardfx b { font-size: clamp(90px, 20vmin, 220px); line-height: 1; color: #ffe08a; -webkit-text-stroke: 3px #8a5214; paint-order: stroke fill; text-shadow: 0 4px 0 #8a5214, 0 0 18px rgba(247,193,86,.8); }
.u-fly-ring { position: fixed; z-index: 40; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none; border: 4px solid #f7ce65; box-shadow: 0 0 12px 2px rgba(247,206,101,.8); animation: u-flyring .45s ease-out forwards; }
@keyframes u-flyring { to { transform: scale(3.6); opacity: 0; } }

/* tajenka: slovo z písmenek vyskočí nahoře, nalezené písmenko do ní doletí */
.u-lw { position: fixed; z-index: 35; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px 12px; pointer-events: none; border-radius: 22px; background: linear-gradient(180deg, #c897dd, #a370b9); box-shadow: 0 0 0 3.5px #fff, 0 6px 0 3.5px #684677, 0 14px 24px -8px rgba(45,29,52,.6); animation: u-lwin .4s cubic-bezier(.2,1.5,.5,1) both; }
.u-lw.out { animation: u-lwout .4s ease-in forwards; }
.u-lw-row { display: flex; gap: 5px; }
.u-lw-t { width: 36px; height: 42px; display: grid; place-items: center; border-radius: 11px; font-family: var(--font-d); font-size: 26px; line-height: 1; color: transparent; background: rgba(255,255,255,.16); border: 2px dashed rgba(255,255,255,.5); }
.u-lw-t.got { color: #fff; border: 0; background: linear-gradient(180deg, #f7ce65, #ec9f3f 60%, #e47935); text-shadow: 0 2px 0 #b16227; box-shadow: 0 0 0 2px #fff, 0 3px 0 2px #b16227; }
.u-lw-t.land { animation: u-lwland .55s cubic-bezier(.2,1.6,.5,1) both; }
.u-lw.done .u-lw-t { animation: u-lwjump .7s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--n) * 70ms + .5s); }
.u-lw-fly { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; will-change: transform; width: 36px; height: 42px; display: grid; place-items: center; border-radius: 11px; font-family: var(--font-d); font-size: 26px; line-height: 1; color: #fff; background: linear-gradient(180deg, #f7ce65, #ec9f3f 60%, #e47935); text-shadow: 0 2px 0 #b16227; box-shadow: 0 0 0 2px #fff, 0 0 18px 6px rgba(247,193,86,.85); }
@keyframes u-lwin { from { opacity: 0; transform: translateY(-40px) scale(.7); } }
@keyframes u-lwout { to { opacity: 0; transform: translateY(-40px) scale(.8); } }
@keyframes u-lwland { 0% { transform: scale(.3); } 60% { transform: scale(1.35) rotate(-4deg); } 100% { transform: scale(1); } }
@keyframes u-lwjump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px) scale(1.15); } }
body.photo-mode .u-lw, body.photo-mode .u-lw-fly { display: none; }
@media (max-height: 520px) { .u-lw { padding: 6px 10px 8px; gap: 4px; } .u-lw-t, .u-lw-fly { width: 30px; height: 35px; font-size: 21px; } .u-lw-row { gap: 4px; } }

/* ===== PC v domečku: velké tlačítko ruky (když je u čeho) a štětec vpravo dole, jako na mobilu ===== */
@media (pointer: fine) {
  body.playing.in-home #touch { display: block; }
  body.in-home #touch > :not(#tAct):not(#tEdit) { display: none !important; }
  body.in-home #act { display: none !important; }
  body.in-home #touch #tAct:not(.ready) { display: none; }
  body.in-home #touch #tAct, body.in-home #touch #tEdit { width: 104px; height: 104px; font-size: 54px; opacity: 1; cursor: pointer; }
  body.in-home #touch #tEdit { width: 128px; height: 128px; font-size: 68px; right: calc(env(safe-area-inset-right, 0px) + 28px); bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); }
  body.in-home #touch #tAct { left: 50%; right: auto; top: 60%; bottom: auto; margin-left: -52px; --c1: #f7c978; --c2: #e89f3c; --cd: #ae7126; animation: u-hand-pop .45s cubic-bezier(.2,1.6,.5,1) both, u-qpulse .8s ease-in-out .45s infinite alternate; }
  body.in-home #touch #tAct::after { content: attr(data-l); position: absolute; left: 50%; top: calc(100% + 10px); translate: -50% 0; white-space: nowrap; padding: 4px 16px; border-radius: 99px; font: 900 18px var(--font); color: #fff; background: rgba(69,48,78,.82); box-shadow: 0 0 0 2px #fff; }
}
@keyframes u-hand-pop { from { transform: scale(.2) translateY(30px); opacity: 0; } }

/* denní diamanty: čtveřice přeletí přes obrazovku, nalezený zapadne na své místo */
.u-cw { position: fixed; z-index: 35; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); translate: -50% 0; display: flex; gap: 8px; padding: 10px 14px; pointer-events: none; border-radius: 24px; background: linear-gradient(180deg, #c897dd, #a370b9); box-shadow: 0 0 0 3.5px #fff, 0 6px 0 3.5px #684677, 0 14px 24px -8px rgba(45,29,52,.6); animation: u-cwin .5s cubic-bezier(.2,1,.4,1) both; }
.u-cw.out { animation: u-lwout .4s ease-in forwards; }
.u-cw-t { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.14); border: 2px dashed rgba(255,255,255,.45); }
.u-cw-t svg { width: 52px; height: 52px; opacity: 0; }
.u-cw-t.got { border: 0; background: radial-gradient(circle, color-mix(in srgb, var(--g) 70%, #fff), rgba(255,255,255,.12) 75%); box-shadow: 0 0 0 2px #fff; }
.u-cw-t.got svg { opacity: 1; filter: drop-shadow(0 0 8px var(--g)); }
.u-cw-t.land { animation: u-lwland .6s cubic-bezier(.2,1.6,.5,1) both; }
.u-cw.done .u-cw-t.got svg { animation: u-lwjump .7s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--n) * 90ms + .5s); }
.u-cw-fly { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; will-change: transform; width: 64px; height: 64px; display: grid; place-items: center; filter: drop-shadow(0 0 14px var(--g)) drop-shadow(0 0 28px var(--g)); }
.u-cw-fly svg { width: 52px; height: 52px; opacity: 1; }
.u-cw-spark { position: fixed; z-index: 41; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; background: var(--c); box-shadow: 0 0 10px 3px var(--c); animation: u-cwspark .7s ease-out forwards; }
@keyframes u-cwin { 0% { opacity: 0; transform: translateX(-120vw) rotate(-8deg); } 60% { opacity: 1; transform: translateX(14px) rotate(2deg); } 100% { transform: none; } }
@keyframes u-cwspark { to { transform: rotate(var(--a)) translateX(54px) scale(.2); opacity: 0; } }
body.photo-mode .u-cw, body.photo-mode .u-cw-fly { display: none; }
@media (max-height: 520px) { .u-cw { padding: 6px 10px; gap: 6px; } .u-cw-t, .u-cw-fly { width: 48px; height: 48px; } .u-cw-t svg, .u-cw-fly svg { width: 38px; height: 38px; } }

/* u dveří: kulaté tlačítko Odejít místo ruky */
#touch #tAct.is-exit { --c1: #f3a68e; --c2: #da6845; --cd: #a04730; }

/* ===== menu domečku: panel vpravo (i na PC), křížek vlevo, věci pod sebou v jednom sloupci ===== */
@media (min-aspect-ratio: 1/1) {
  .u-sheet { width: min(360px, 42vw); }
  .u-sheet .u-x-in { order: -1 !important; margin: 0 6px 0 0; }
  .u-sheet.buying .u-sheet-top { grid-template-columns: 46px minmax(0, 1fr) !important; }
  .u-sheet.buying .u-x-in { grid-column: 1 !important; justify-self: start !important; }
  .u-sheet.buying .u-buy { grid-column: 2 !important; }
  .u-strip, .u-sheet.buying .u-strip { grid-template-columns: minmax(0, 1fr) !important; gap: 8px; }
  .u-strip .u-item { flex-direction: row; justify-content: flex-start; align-items: center; text-align: left; gap: 10px; min-height: 62px; height: auto; padding: 6px 12px; }
  .u-strip .u-item b { flex: 1; min-width: 0; font-size: 15px; }
  .u-strip .u-item small { margin-left: auto; flex: none; font-size: 13px; }
  .u-strip .u-ii { font-size: 30px; flex: none; }
  .u-strip .u-sw { flex: none; width: 30px; height: 30px; }
  .u-strip .u-tier { margin: 0; }
}

/* ===== Malování (stojan v domečku) ===== */
.u-modal[data-m="paint"] .u-card { --rib: url("../assets/ui/rib_pink.png"); --hd: #a72e38; width: min(1100px, 100%); height: min(100%, 720px); }
.u-paintbody { padding: 8px; display: flex; min-height: 0; overflow: hidden; }
.pt-wrap { flex: 1; display: flex; gap: 10px; min-width: 0; min-height: 0; }
.pt-tools { flex: none; width: 124px; display: grid; grid-template-columns: repeat(2, 56px); grid-auto-rows: 56px; gap: 6px; align-content: start; overflow-y: auto; touch-action: pan-y; }
.pt-stage { flex: 1; min-width: 0; min-height: 0; position: relative; overflow: hidden; border-radius: 14px; background: repeating-conic-gradient(#f7f2e9 0 25%, #f2ebdd 0 50%) 0 0 / 24px 24px; box-shadow: inset 0 2px 6px rgba(69,97,123,.3); }
.pt-cv { position: absolute; left: 50%; top: 50%; translate: -50% -50%; background: #fff; touch-action: none; cursor: crosshair; box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(43,40,70,.35); border-radius: 2px; image-rendering: auto; }
.pt-side { flex: none; width: 152px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; touch-action: pan-y; }
.pt-b { width: 56px; height: 56px; padding: 0; border-radius: 14px; font-size: 28px; line-height: 1; display: grid; place-items: center; background: #fff; border: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #eee3cd, 0 4px 0 5px rgba(69,97,123,.2); -webkit-text-stroke: 0; }
.pt-b.sel { background: linear-gradient(180deg, #f7ebca, #f7c978); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f6ad3d, 0 4px 0 5px #c08531; }
.pt-b:active { transform: translateY(2px); }
.pt-b.arm { background: linear-gradient(180deg, #f3cfc3, #f29a86); animation: u-qpulse .4s ease-in-out infinite alternate; }
.pt-cur { flex: none; height: 38px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #eee3cd; padding: 4px; }
.pt-cur i { display: block; width: 100%; height: 100%; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.pt-pal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.pt-sw { aspect-ratio: 1; min-height: 26px; padding: 0; border: 0; border-radius: 8px; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(69,97,123,.35); }
.pt-sw.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 5px #f6ad3d, 0 0 10px 3px rgba(246,173,61,.7); transform: scale(1.1); }
.pt-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pt-sz { height: 38px; padding: 0; border: 0; border-radius: 10px; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #eee3cd; }
.pt-sz i { width: var(--s); height: var(--s); border-radius: 50%; background: #55415d; }
.pt-sz.sel { background: #f7ebca; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f6ad3d; }
.pt-save { margin-top: auto; min-height: 52px; padding: 0 8px; border: solid transparent; border-width: 16px; border-image: var(--k-green) 50 fill / 16px stretch; border-radius: 0; background: none; box-shadow: none; color: #fff; -webkit-text-stroke: 3.5px #5f793d; paint-order: stroke fill; font: 900 16px/1.1 var(--font); }
.pt-save.ok { border-image-source: var(--k-orange); -webkit-text-stroke-color: #ba6024; }
.pt-save.bad { border-image-source: var(--k-red); -webkit-text-stroke-color: #ae2f26; }
.pt-save:disabled { filter: grayscale(.4); }
@media (max-height: 520px) {
  .pt-tools { width: 116px; grid-template-columns: repeat(2, 52px); grid-auto-rows: 46px; gap: 5px; }
  .pt-b { width: 52px; height: 46px; font-size: 24px; }
  .pt-side { width: 140px; gap: 6px; } .pt-cur { height: 30px; } .pt-sw { min-height: 22px; } .pt-sz { height: 32px; }
  .pt-save { min-height: 46px; border-width: 13px; border-image-width: 13px; font-size: 14px; }
  .u-modal[data-m="paint"] .u-card { height: 100% !important; }
}

/* PC: menu domečku vpravo začíná pod ikonkami v rohu, aby je nezakrývalo */
@media (pointer: fine) and (min-aspect-ratio: 1/1) {
  .u-sheet { top: calc(env(safe-area-inset-top, 0px) + 96px) !important; }
}
/* Nadpisy oken přesně na střed: třetí (prázdný) sloupec hlavičky je pod křížkem, takže vpravo žádný odstup navíc nepotřebujeme */
.u-card header, .u-modal[data-m] .u-card header { padding-right: 0; }

/* bublina u zajímavostí jako konverzace: bílá bublina s ocáskem ke kočce, jmenovka nahoře a „vyskočení“ při zobrazení */
#info { position: absolute; border: 0; border-radius: 26px !important; background: rgba(255,255,255,.86) !important; padding: 20px 22px 12px !important; margin-top: 0; color: #55415d; text-align: left !important; box-shadow: 0 0 0 4px rgba(255,255,255,.86), 0 6px 0 4px rgba(69,97,123,.22), 0 14px 22px rgba(38,26,43,.3) !important; filter: none; transform-origin: 50% 0; }
#info b { position: absolute; top: -17px; left: 18px; display: inline-block; margin: 0; padding: 3px 14px 4px; border-radius: 999px; font-size: 15px; color: #fff; text-shadow: 0 2px 0 #b16227; background: linear-gradient(180deg, #f5b06f, #eb873a 60%, #d76f28); box-shadow: 0 0 0 3px #fff, 0 3px 0 3px #b16227; }
#info.show { animation: info-pop .35s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes info-pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
/* bublina zajímavostí: užší, rovnoměrně vyvážený text (vpravo není víc místa než vlevo) */
#info { width: var(--iw, min(440px, 86vw)) !important; padding: 20px 24px 12px !important; text-wrap: balance; }
#info > span { text-wrap: balance; }
@media (max-height: 520px) { #info { width: var(--iw, min(400px, 50vw)) !important; padding: 18px 20px 9px !important; } }

/* energie a mince: stejná výška a stejný grafický styl (bílý prstenec, tmavý spodní okraj, stín); energie vychází ze stylu mincí */
:root { --pill-h: 48px; }
@media (pointer: coarse), (max-height: 520px) { :root { --pill-h: 36px; } }
.u-coins { height: var(--pill-h); box-sizing: border-box; display: inline-flex; align-items: center; padding-top: 0 !important; padding-bottom: 0 !important; }
.u-energy { height: var(--pill-h) !important; box-sizing: border-box; border-radius: 999px; background: rgba(255,255,255,.86) !important;   /* podklad s průhledností jako bublina zajímavostí */ box-shadow: 0 0 0 3.5px #fff, 0 10px 14px -6px rgba(33,28,35,.45) !important;   /* jen bílý prstenec, bez tmavého okraje */ margin-top: calc((64px - var(--pill-h)) / 2) !important; }
.u-energy::after { left: 3px !important; top: 3px !important; bottom: 3px !important; width: auto !important; right: calc(100% - max(var(--p), 14px) + 3px) !important;   /* výplň odpovídá hodnotě; jen při 1–2 % je vidět malá špička */ background: linear-gradient(180deg, rgba(255,255,255,.55) 0 28%, rgba(255,255,255,0) 28%), linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 74%, #000)) !important; box-shadow: none !important; }
.u-energy[data-s="w"] { --c: #e6dcc8; }
@media (pointer: coarse), (max-height: 520px) { .u-energy::after { top: 3px !important; bottom: 3px !important; } .u-energy { margin-top: calc((46px - var(--pill-h)) / 2 + 4px) !important; } }

/* obchůdek na mobilu: bez počtu v batohu (5/5) u karet */
@media (pointer: coarse), (max-height: 520px) { .u-modal[data-m="shop"] .u-shopcard .u-num { display: none !important; } }

/* batoh: bez červené tečky upozornění */

/* červená (nízká) energie: bliká jen barevná výplň, bílý prstenec a podklad zůstávají celé (dřív blikal celý bar a prstenec mizel) */
.u-energy[data-s="r"] { animation: none !important; }
.u-energy[data-s="r"]::after { animation: u-blink .8s ease-in-out infinite; }

/* pošta na mobilu: dvě karty zásilek se protáhnou na celou výšku okna */
@media (pointer: coarse), (max-height: 520px) {
  .u-modal[data-m="post"] .u-body { display: flex; flex-direction: column; }
  .u-modal[data-m="post"] .u-post-cats { flex: 1; min-height: 0; grid-auto-rows: 1fr; }
  .u-modal[data-m="post"] .u-post-card { min-height: 0 !important; height: auto; justify-content: center; }
}

/* pošta: větší ikonky dopisu a balíčku (bez obtížnosti a výše odměny) */
.u-modal[data-m="post"] .u-post-card .u-qi { font-size: 84px !important; line-height: 1; }
@media (pointer: coarse), (max-height: 520px) { .u-modal[data-m="post"] .u-post-card .u-qi { font-size: 96px !important; } }
.u-modal[data-m="post"] .u-post-card b { font-size: 32px !important; }
.u-modal[data-m="post"] .u-post-card small { font-size: 17px !important; line-height: 1.25; max-width: 92%; text-align: center; }
@media (pointer: coarse), (max-height: 520px) { .u-modal[data-m="post"] .u-post-card b { font-size: 30px !important; } .u-modal[data-m="post"] .u-post-card small { font-size: 16px !important; } }

/* pošta: tlačítko „Přehraj“ vlevo nahoře ve výšce nadpisu (přehraje namluvené vysvětlení úkolu) */
.u-snd { position: absolute; top: -2px; left: 12px; z-index: 3; height: 50px; min-height: 0 !important; padding: 0 2px !important; border-width: 12px !important; border-image-width: 12px !important; display: inline-flex; align-items: center; gap: 6px; font-size: 18px; cursor: pointer; filter: drop-shadow(0 3px 3px rgba(62,45,69,.35)); }
.u-snd .u-i { display: block; width: 22px; height: 22px; flex: none; }
@media (pointer: coarse), (max-height: 520px) { .u-snd { top: -5px; height: 42px; border-width: 10px !important; border-image-width: 10px !important; font-size: 16px; } .u-snd .u-i { width: 20px; height: 20px; } }
.u-snd.on { --bi: var(--k-orange); --sc: #ba6024; border-image-source: var(--k-orange); }   /* přehrává se: oranžová */

/* oznámení o zrušení/ukončení: červený podklad */
#toast[data-kind="bad"] { background-image: var(--shine, none), linear-gradient(180deg, #f29380, #da5339 60%, #ba422b) !important; color: #fff; text-shadow: 0 2px 0 rgba(114,25,9,.6); }

/* panel doručování pošty nahoře: bez vzdálenosti, šipky a textu o ztrátě penízku */
.u-deliv[data-kind="post"] .u-dv-nav, .u-deliv[data-kind="post"] .u-dv-sub, .u-deliv[data-kind="hunt"] .u-dv-nav, .u-deliv[data-kind="hunt"] .u-dv-sub, .u-deliv[data-kind="hunt"] .u-dv-track, .u-deliv[data-kind="hunt"] .u-dv-rew { display: none !important; }
.u-deliv[data-kind="hunt"] { min-width: 380px; --c: #4f8a3a; }
.u-deliv[data-kind="hunt"] .u-dv-cp { font-size: 26px; text-align: center; }
.u-deliv[data-kind="hunt"] .u-dv-row { justify-content: center; }
/* telefon na šířku: panel úkolu myslivců vlevo hned vedle energie, ať nezakrývá foťák a tlačítka vpravo */
@media (pointer: coarse), (max-height: 520px) {
  .u-deliv[data-kind="hunt"] { left: calc(env(safe-area-inset-left, 0px) + 172px); translate: 0 0; width: min(340px, calc(100vw - 172px - 380px)); min-width: 270px; }
  .u-deliv[data-kind="hunt"] .u-dv-cp { font-size: 19px; }
  /* stejně vysoký jako tlačítka vpravo (46 px, stejný horní okraj a střed jako energie) */
  .u-deliv[data-kind="hunt"] { top: calc(env(safe-area-inset-top, 0px) + 12px); height: 46px; box-sizing: border-box; padding: 0 5px 0 40px; gap: 6px; }
  .u-deliv[data-kind="hunt"] .u-dv-ico { left: -6px; width: 46px; height: 46px; font-size: 26px; }
  .u-deliv[data-kind="hunt"] .u-dv-x { width: 36px; height: 36px; min-width: 36px; font-size: 18px; }
}
/* ikonka dopisu/balíčku v panelu doručování nebliká */
.u-deliv .u-dv-ico { animation: none !important; }
.u-deliv[data-kind="post"] { min-width: 380px; }
.u-deliv[data-kind="post"] .u-dv-rew { display: none !important; }   /* bez počtu mincí v panelu úkolu */
.u-deliv[data-kind="post"] .u-dv-cp { font-size: 26px; }
@media (max-height: 520px) { .u-deliv[data-kind="post"] { min-width: 320px; } .u-deliv[data-kind="post"] .u-dv-cp { font-size: 21px; } }
.u-deliv[data-kind="post"] .u-dv-row { justify-content: center; }
.u-deliv[data-kind="post"] .u-dv-cp { text-align: center; }

/* ===== Stavba v domečku: velké karty dole (obrázek + cena), pro děti bez čtení ===== */
.bt { position: fixed; z-index: 19; left: 50%; bottom: max(8px, env(safe-area-inset-bottom, 0px)); translate: -50% 0; width: min(700px, calc(100vw - 16px)); box-sizing: border-box; padding: 8px 12px 12px; border-radius: 28px; background: rgba(246,241,231,.96); box-shadow: 0 0 0 3px #fff, 0 6px 0 3px rgba(58,52,60,.22), 0 -10px 30px -8px rgba(58,52,60,.35); animation: bt-up .28s cubic-bezier(.2,1.3,.5,1) both; }
.bt[hidden] { display: none; }
@keyframes bt-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.bt-top { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.bt-tabs { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bt-tab { flex: none; height: 48px; min-width: 56px; padding: 0 14px; border-radius: 18px; border: 0; background: #fff; box-shadow: inset 0 0 0 3px rgba(58,52,60,.15); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 900 17px var(--font); color: var(--ink); cursor: pointer; }
.bt-tab.sel { background: #f7d496; box-shadow: inset 0 0 0 3px #ec9f3f; }
.bt-ti { font-size: 28px; line-height: 1; display: inline-flex; } .bt-ti .u-i { width: 30px; height: 30px; }
.bt .bt-x { position: static; flex: none; width: 52px; height: 52px; min-width: 52px; }
.bt-trash { flex: none; width: 48px; height: 48px; border-radius: 16px; border: 0; background: #fff; color: #84747e; box-shadow: inset 0 0 0 3px rgba(58,52,60,.18); display: grid; place-items: center; cursor: pointer; }
.bt-trash[hidden] { display: none; } .bt-trash .u-i { width: 26px; height: 26px; }
.bt-row { display: flex; gap: 12px; overflow-x: auto; padding: 10px 4px 8px; justify-content: safe center; scrollbar-width: none; touch-action: pan-x; scroll-snap-type: x proximity; }
.bt-card { flex: none; scroll-snap-align: center; width: clamp(108px, 28vw, 176px); border-radius: 24px; background: #fff; box-shadow: 0 0 0 4px var(--rc), 0 6px 0 4px rgba(58,52,60,.22); display: flex; flex-direction: column; align-items: center; overflow: hidden; transition: transform .15s; }
.bt-card.sel { transform: translateY(-6px) scale(1.04); box-shadow: 0 0 0 5px #fff, 0 0 0 9px #ec9f3f, 0 0 22px 6px rgba(237,177,82,.6); }
.bt-card.equipped { background: #d9dccc; }
.bt-face { all: unset; box-sizing: border-box; width: 100%; height: 96px; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bt-ico { font-size: 60px; line-height: 1; filter: drop-shadow(0 3px 0 rgba(58,52,60,.18)); }
.bt-sw { width: 68px; height: 68px; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(58,52,60,.25); }
.bt-sub { width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(58,52,60,.06); }
.bt-cost .u-cost { font-size: 24px; font-family: var(--font-d, var(--font)); gap: 5px; } .bt-cost .u-cost .u-i, .bt-cost .u-cost .u-ci { width: 28px; height: 28px; }
.bt-have, .bt-own { display: inline-flex; color: #5c794b; } .bt-have .u-i, .bt-own .u-i { width: 32px; height: 32px; } .bt-own { color: #e78d39; }
.bt-yes, .bt-no { width: 56px; height: 42px; border-radius: 16px; border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.22); }
.bt-yes { background: #729b6a; } .bt-no { background: #da6845; } .bt-yes[aria-disabled="true"] { background: #ada69d; }
.bt-yes .u-i, .bt-no .u-i { width: 28px; height: 28px; }
.bt-blocked { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font: 900 18px var(--font); color: var(--ink); } .bt-blocked .u-i { width: 34px; height: 34px; }
body.build-open #toast { left: 50% !important; top: calc(var(--safe-t, 0px) + 74px); max-width: calc(100% - 24px) !important; white-space: normal; text-align: center; }
@media (max-height: 520px) {
  .bt { padding: 5px 10px 8px; border-radius: 22px; } .bt-top { min-height: 42px; }
  .bt-tab { height: 42px; } .bt .bt-x { width: 44px; height: 44px; min-width: 44px; } .bt-trash { width: 42px; height: 42px; }
  .bt-row { padding: 6px 4px 6px; gap: 10px; }
  .bt-card { width: clamp(100px, 20vw, 150px); border-radius: 20px; }
  .bt-face { height: 72px; } .bt-ico { font-size: 46px; } .bt-sw { width: 52px; height: 52px; }
  .bt-sub { height: 42px; } .bt-cost .u-cost { font-size: 20px; } .bt-yes, .bt-no { height: 36px; width: 50px; }
}
.bt-img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; pointer-events: none; }
.bt-face { position: relative; overflow: hidden; }
.bt-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.bt-row { padding-top: 16px; }
.bt-trash { margin-right: 2px; }

/* --- styl podle vzoru: jen tři velké obrázky věcí, žádná hlavička uvnitř; ikonky a křížek plavou nad lištou --- */
.bt { padding: 6px; border-radius: 16px; background: rgba(243,236,222,.94); box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 6px 18px rgba(58,52,60,.3); width: min(620px, calc(100vw - 16px)); }
.bt-top { position: absolute; left: 0; right: 0; bottom: 100%; padding: 0 2px 8px; min-height: 0; pointer-events: none; }
.bt-top > * { pointer-events: auto; }
.bt-tabs { flex: 0 1 auto; }
.bt-tab { box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(58,52,60,.2); }
.bt-tab.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #ec9f3f; }
.bt-top .bt-trash { margin-left: auto; box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(58,52,60,.2); }
.bt-row { padding: 4px; gap: 8px; }
.bt-card { position: relative; width: clamp(120px, 31vw, 190px); border-radius: 12px; background: #f7eac7; box-shadow: none; overflow: hidden; border: 3px solid transparent; }
.bt-card.equipped { background: #9dd9a9; }
.bt-card.sel { background: #9dd9a9; border-color: #fff; transform: none; box-shadow: 0 0 0 3px #70b682; }
.bt-face { height: 112px; }
.bt-img { padding: 0; }
.bt-sub { position: absolute; left: 0; right: 0; bottom: 4px; height: auto; background: none; pointer-events: none; }
.bt-sub > * { pointer-events: auto; }
.bt-cost .u-cost, .bt-have, .bt-own { background: rgba(255,255,255,.92); border-radius: 99px; padding: 1px 10px 1px 6px; box-shadow: 0 2px 0 rgba(58,52,60,.2); }
.bt-cost .u-cost { font-size: 20px; } .bt-cost .u-cost .u-i, .bt-cost .u-cost .u-ci { width: 24px; height: 24px; }
.bt-have, .bt-own { padding: 2px 10px; } .bt-have .u-i, .bt-own .u-i { width: 26px; height: 26px; }
@media (max-height: 520px) { .bt { padding: 4px; } .bt-face { height: 92px; } .bt-card { width: clamp(110px, 22vw, 150px); } .bt-top .bt-tab { height: 40px; } }
.bt { background: none; box-shadow: none; padding: 0; }
.bt-top { padding-bottom: 10px; }
.bt-ti { position: relative; }
.bt-n { position: absolute; right: -8px; bottom: -6px; min-width: 20px; height: 20px; padding: 0 4px; box-sizing: border-box; border-radius: 99px; background: #ec9f3f; color: #fff; font: 900 14px/20px var(--font); text-align: center; font-style: normal; box-shadow: 0 0 0 2px #fff; }
.bt.wide { width: min(800px, calc(100vw - 16px)); }
.bt-row.many { gap: 6px; }
.bt-row.many .bt-card { flex: 1 1 0; min-width: 0; max-width: 128px; width: auto; }
.bt-row.many .bt-face { height: 84px; } .bt-row.many .bt-ico { font-size: 46px; }
.bt-row.many .bt-cost .u-cost { font-size: 17px; padding: 1px 7px 1px 4px; } .bt-row.many .bt-cost .u-cost .u-i, .bt-row.many .bt-cost .u-cost .u-ci { width: 20px; height: 20px; }
@media (max-height: 520px) { .bt-row.many .bt-face { height: 72px; } }

/* --- kategorie úprav pokoje: jen velké obrázky (assets/ui/build/<id>.png, id = wall floor rug window curtains picL picR picS); bez obrázku se ukáže ikonka --- */
.bt-top { gap: 12px; align-items: center; }
.bt-tabs { gap: 10px; justify-content: flex-start; overflow: visible; flex-wrap: nowrap; }
.bt-tab { width: 64px; height: 64px; min-width: 64px; padding: 0; border-radius: 20px; background: rgba(255,255,255,.9); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(58,52,60,.22); transition: transform .15s; }
.bt-tab.sel { background: #f7e4bc; transform: translateY(-4px) scale(1.12); box-shadow: 0 0 0 3px #fff, 0 0 0 6px #ec9f3f, 0 6px 0 6px rgba(58,52,60,.2); }
.bt-ti { position: relative; width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; }
.bt-ti .u-i { width: 38px; height: 38px; }
.bt-timg { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; pointer-events: none; background: #fff0; }
.bt-n { right: -4px; bottom: -4px; }
@media (max-height: 520px) { .bt-tab { width: 54px; height: 54px; min-width: 54px; border-radius: 17px; } .bt-ti { font-size: 28px; } .bt-ti .u-i { width: 32px; height: 32px; } .bt-top .bt-x { width: 46px; height: 46px; min-width: 46px; } }
@media (max-width: 760px) { .bt-top { gap: 8px; } .bt-tabs { gap: 7px; } .bt-tab { width: 50px; height: 50px; min-width: 50px; } }
.bt-ti.hasimg { font-size: 0; } .bt-ti.hasimg > .u-i { visibility: hidden; }
.bt-yes { width: 84px; }

/* vybraná zamčená věc: celá karta je oranžové tlačítko Koupit (cena + nákupní košík) */
button.bt-card.buy { all: unset; box-sizing: border-box; flex: none; width: clamp(120px, 31vw, 190px); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; cursor: pointer; overflow: hidden; background: linear-gradient(180deg, #f6b76d, #e7862e) !important; border: 3px solid #fff !important; border-image: none !important; box-shadow: 0 0 0 3px #e7862e, 0 5px 0 3px #ac5e1f !important; -webkit-tap-highlight-color: transparent; }
button.bt-card.buy:active { transform: translateY(3px); box-shadow: 0 0 0 3px #e7862e, 0 2px 0 3px #ac5e1f; }
.bt-card.buy .bt-face { height: 66px; width: 100%; pointer-events: none; position: relative; overflow: hidden; display: grid; place-items: center; }
.bt-card.buy .bt-sub { position: static; height: auto; padding: 0; pointer-events: none; }
.bt-card.buy .bt-cart { display: grid; place-items: center; height: 34px; color: #fff; filter: drop-shadow(0 2px 0 rgba(115,56,15,.4)); pointer-events: none; } .bt-card.buy .bt-cart .u-i { width: 30px; height: 30px; }
.bt-card.buy.poor { background: linear-gradient(180deg, #cfc6bc, #a49a90) !important; box-shadow: 0 0 0 3px #a49a90, 0 5px 0 3px #787066 !important; }
.bt-card.buy.poor .bt-cart { opacity: .7; }
.bt-row.many button.bt-card.buy { flex: 1 1 0; min-width: 0; max-width: 128px; width: auto; }
.bt-row.many .bt-card.buy .bt-face { height: 56px; }
@media (max-height: 520px) { .bt-card.buy .bt-face { height: 54px; } .bt-card.buy .bt-cart { height: 30px; } .bt-card.buy .bt-cart .u-i { width: 26px; height: 26px; } }
.bt-card.buy .bt-sw { width: 50px; height: 50px; } .bt-card.buy .bt-ico { font-size: 42px; }
button.bt-card.buy { justify-content: center; gap: 10px; }
.bt-card.buy .bt-cost .u-cost { font-size: 26px; } .bt-card.buy .bt-cart { height: 48px; } .bt-card.buy .bt-cart .u-i { width: 44px; height: 44px; }
@media (max-height: 520px) { .bt-card.buy .bt-cart { height: 40px; } .bt-card.buy .bt-cart .u-i { width: 38px; height: 38px; } .bt-card.buy .bt-cost .u-cost { font-size: 22px; } button.bt-card.buy { gap: 6px; } }
.bt-card.buy .bt-cost .u-cost, .bt-card.buy .bt-cost .u-cost.ok, .bt-card.buy .bt-cost .u-cost.miss { background: none !important; box-shadow: none !important; color: #fff !important; font-size: 34px; text-shadow: 0 3px 0 rgba(115,56,15,.45); padding: 0; }
.bt-card.buy .bt-cost .u-cost .u-i, .bt-card.buy .bt-cost .u-cost .u-ci { width: 38px; height: 38px; }
.bt-card.buy .bt-cost .u-cost { line-height: 1; gap: 6px; font-size: 30px; align-items: center; }
.bt-card.buy .bt-cost .u-cost .u-ci, .bt-card.buy .bt-cost .u-cost .u-coin { width: auto !important; height: 36px !important; object-fit: contain; }
.bt-card.buy .bt-cost .u-cost b { font-weight: 400; display: inline-block; transform: none; }
.u-coins.spend { animation: u-coinspend .5s ease-out; }
@keyframes u-coinspend { 0% { transform: scale(1); } 25% { transform: scale(.88) rotate(-3deg); } 55% { transform: scale(1.06) rotate(2deg); } 100% { transform: scale(1); } }
.u-plus.minus { color: #f37552 !important; }

/* ===== Sbírka: celá obrazovka jako police se 4 řadami ===== */
.shv { position: fixed; inset: 0; z-index: 30; background: radial-gradient(ellipse at 50% 30%, #856850, #483628 75%); animation: bt-up .25s ease-out both; }
.shv[hidden] { display: none; }
.shv .shv-x { position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); top: max(10px, env(safe-area-inset-top, 0px)); right: auto; z-index: 2; }
.shv-frame { position: absolute; left: calc(max(10px, env(safe-area-inset-left, 0px)) + 66px); right: max(12px, env(safe-area-inset-right, 0px)); top: max(10px, env(safe-area-inset-top, 0px)); bottom: max(10px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; box-sizing: border-box; padding: 8px 10px 0; border: 12px solid #9e6e49; border-radius: 10px; background: linear-gradient(180deg, #6a482f, #563c28); box-shadow: inset 0 0 30px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.5); }
.shv-row { flex: 1 1 0; min-height: 0; display: flex; align-items: flex-end; justify-content: space-evenly; gap: 4px; padding: 0 6px; border-bottom: 14px solid #b1794d; box-shadow: 0 6px 0 -2px rgba(0,0,0,.28); margin-bottom: 4px; }
.shv-row:last-child { border-bottom-color: #9e6e49; }
.shv-it { all: unset; box-sizing: border-box; position: relative; flex: 1 1 0; max-width: 110px; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; padding-bottom: 6px; -webkit-tap-highlight-color: transparent; }
.shv-base { position: absolute; left: 12%; right: 12%; bottom: 2px; height: 10px; border-radius: 50%; background: var(--rc); opacity: .9; }
.shv-it.miss .shv-base { background: #382a1f; opacity: .6; }
.shv-ico { position: relative; font-size: min(10vh, 62px); line-height: 1; filter: drop-shadow(0 4px 2px rgba(0,0,0,.35)); transition: transform .15s; }
.shv-it.got:active .shv-ico { transform: scale(1.12); }
.shv-it.miss .shv-ico { filter: grayscale(1) brightness(.28) contrast(1.1); opacity: .75; }
.shv-it.miss { visibility: hidden; pointer-events: none; }   /* nezískané věci se na polici nezobrazují (místo zůstane, ostatní se neposouvají) */
@media (max-height: 520px) { .shv-frame { border-width: 9px; padding-top: 4px; } .shv-ico { font-size: min(11vh, 48px); } .shv .shv-x { width: 46px; height: 46px; min-width: 46px; } .shv-frame { left: calc(max(10px, env(safe-area-inset-left, 0px)) + 58px); } }
.bt-soon { display: inline-flex; color: #84747e; } .bt-soon .u-i { width: 28px; height: 28px; }
.bt-card.soon { opacity: .6; }
.bt-power.on { background: #f3cfc5; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #da6845; } .bt-power .u-i { color: #3a343c; } .bt-power.on .u-i { color: #da6845; }
.bt-card.secret { background: #d3ccc1; cursor: default; }
.bt-card.secret .bt-face { pointer-events: none; display: grid; place-items: center; height: 112px; width: 100%; }
.bt-card.secret .bt-ico { filter: grayscale(1) brightness(.55); opacity: .6; }
.bt-secret { display: inline-flex; color: #866738; } .bt-secret .u-i { width: 28px; height: 28px; }
.bt-row.scroll { justify-content: flex-start; overflow-x: auto; }
.bt-row.scroll .bt-card, .bt-row.scroll button.bt-card.buy { flex: 0 0 96px; width: 96px; max-width: none; }
.bt-tabs { flex: 1 1 auto; min-width: 0; }
.bt-tabs .bt-power { margin-left: auto; }
.bt-tab.bt-power { width: auto; min-width: 0; padding: 0 18px 0 8px; gap: 4px; }
.bt-power .bt-ti { width: 44px; flex: none; }
.bt-ptx { font: 400 20px/1 var(--font-d, var(--font)); letter-spacing: .02em; color: #3a343c; white-space: nowrap; }
.bt-power.on .bt-ptx { color: #da6845; }
@media (max-height: 520px) { .bt-ptx { font-size: 17px; } .bt-power .bt-ti { width: 38px; } }
/* stejná výška karet ve všech kategoriích (nábytek, filmy, hry, desky) */
.bt .bt-row .bt-card .bt-face, .bt .bt-row .bt-card.secret .bt-face { height: 112px; }
.bt .bt-row { min-height: 136px; box-sizing: border-box; align-items: stretch; }
@media (max-height: 520px) { .bt .bt-row .bt-card .bt-face, .bt .bt-row .bt-card.secret .bt-face { height: 92px; } .bt .bt-row { min-height: 108px; } }
.bt .bt-row .bt-card .bt-ico { font-size: 60px; } .bt .bt-row.many .bt-card .bt-ico { font-size: 54px; }
@media (max-height: 520px) { .bt .bt-row .bt-card .bt-ico, .bt .bt-row.many .bt-card .bt-ico { font-size: 46px; } }
/* lišta je vždy stejně široká a vysoká, takže řada kategorií nad ní zůstává na stejném místě ve všech kategoriích */
.bt, .bt.wide { width: min(800px, calc(100vw - 16px)); }
.bt-tab.bt-power:not(.on) { background: linear-gradient(180deg, #a7c28a, #729b6a); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px #4c6b46; }
.bt-power:not(.on) .bt-ptx, .bt-power:not(.on) .u-i { color: #fff; text-shadow: 0 2px 0 rgba(54,79,50,.5); }
.bt-tab.blink { animation: bt-blink .5s ease-in-out infinite alternate; }
@keyframes bt-blink { from { background: #fff; box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(58,52,60,.22); transform: scale(1); } to { background: #f6c473; box-shadow: 0 0 0 3px #fff, 0 0 0 7px #e7862e, 0 0 18px 6px rgba(246,163,60,.8); transform: scale(1.14); } }
/* křížek: při najetí se zvětší jen on (transformem), kategorie vedle něj se nehýbou */
.bt .bt-top > .bt-x { flex: none; width: 52px !important; height: 52px !important; min-width: 52px !important; transition: transform .15s; }
.bt .bt-top > .bt-x:hover { transform: scale(1.18) !important; }
@media (max-height: 520px) { .bt .bt-top > .bt-x { width: 46px !important; height: 46px !important; min-width: 46px !important; } }
.bt .bt-top { min-height: 66px; align-items: center; }
@media (max-height: 520px) { .bt .bt-top { min-height: 60px; } }

/* ===== Úprava postavy: boční svislý panel ve stylu stavby ===== */
.bo { position: fixed; z-index: 19; right: max(8px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 66px); bottom: max(8px, env(safe-area-inset-bottom, 0px)); width: min(330px, 44vw); box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 8px; border-radius: 22px; background: rgba(243,236,222,.96); box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 6px 18px rgba(58,52,60,.3); animation: bo-in .25s cubic-bezier(.2,1.3,.5,1) both; }
.bo[hidden] { display: none; }
@keyframes bo-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.bo-top { display: flex; align-items: center; gap: 10px; flex: none; }
.bo .bo-x { position: static; flex: none; width: 48px; height: 48px; min-width: 48px; transition: transform .15s; } .bo .bo-x:hover { transform: scale(1.15); }
.bo .bt-tabs { flex: 1 1 auto; min-width: 0; gap: 8px; justify-content: flex-start; overflow: visible; }
.bo-grid { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; padding: 8px 4px 10px; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; }
.bo-grid .bt-card, .bo-grid button.bt-card.buy { width: auto !important; max-width: none !important; flex: none; min-width: 0; }
.bo-grid .bt-card .bt-face { height: 92px; }
.bo-grid button.bt-card.buy { min-height: 92px; }
@media (max-height: 520px) { .bo { top: calc(env(safe-area-inset-top, 0px) + 58px); padding: 8px 8px 6px; gap: 6px; } .bo .bo-x { width: 42px; height: 42px; min-width: 42px; } .bo .bt-tab { width: 48px; height: 48px; min-width: 48px; } .bo-grid .bt-card .bt-face { height: 76px; } .bo-grid button.bt-card.buy { min-height: 76px; } }
body.outfit-open #toast { left: calc((100% - min(330px, 44vw)) / 2) !important; top: calc(var(--safe-t, 0px) + 74px); max-width: calc(100% - min(330px, 44vw) - 24px) !important; white-space: normal; text-align: center; }
.bo-grid { grid-auto-rows: max-content; }
/* panel úpravy kočky přes celou výšku obrazovky, zakryje i tlačítka v rohu */
.bo { top: max(8px, env(safe-area-inset-top, 0px)) !important; z-index: 35; }
@media (max-height: 520px) { .bo { top: max(6px, env(safe-area-inset-top, 0px)) !important; } }
/* úprava kočky: 3 možnosti v řadě */
.bo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; }
.bo { width: min(380px, 50vw); }
.bo-grid .bt-card .bt-face { height: 78px; } .bo-grid .bt-card .bt-ico { font-size: 44px; } .bo-grid .bt-card .bt-sw { width: 52px; height: 52px; }
.bo-grid .bt-cost .u-cost { font-size: 16px; padding: 1px 6px 1px 3px; } .bo-grid .bt-cost .u-cost .u-i, .bo-grid .bt-cost .u-cost .u-ci { width: 18px; height: 18px; }
.bo-grid button.bt-card.buy { min-height: 78px; } .bo-grid .bt-card.buy .bt-cost .u-cost { font-size: 22px; }
@media (max-height: 520px) { .bo-grid .bt-card .bt-face { height: 66px; } .bo-grid .bt-card .bt-sw { width: 46px; height: 46px; } .bo-grid button.bt-card.buy { min-height: 66px; } }
body.outfit-open #uEnergy, body.outfit-open #uBattery { display: none !important; }
.bo-sep { grid-column: 1 / -1; height: 4px; margin: 4px 6px; border-radius: 4px; background: repeating-linear-gradient(90deg, #b1a18b 0 8px, transparent 8px 14px); opacity: .8; }
.bt-lock { display: inline-flex; color: #84747e; } .bt-lock .u-i { width: 40px; height: 40px; }
.bo-grid .bt-card.secret .bt-face { pointer-events: auto; cursor: pointer; display: grid; place-items: center; width: 100%; height: 78px; background: none; }
@media (max-height: 520px) { .bo-grid .bt-card.secret .bt-face { height: 66px; } .bt-lock .u-i { width: 32px; height: 32px; } }
.bo-info { position: fixed; z-index: 36; left: max(12px, env(safe-area-inset-left, 0px)); right: calc(min(380px, 50vw) + 24px); bottom: max(12px, env(safe-area-inset-bottom, 0px)); padding: 10px 18px; border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 0 0 3px #ec9f3f, 0 6px 14px rgba(0,0,0,.3); text-align: center; font: 900 18px/1.25 var(--font); color: var(--ink); animation: bt-up .2s ease-out both; }
.bo-info[hidden] { display: none; }

/* ===== Velká oslava získané trofeje (src/trophyFx.js) ===== */
.tfx { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 50%, rgba(39,31,43,.55), rgba(28,21,31,.82)); animation: tfx-bg .3s ease-out both; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent; }
.tfx.out { animation: tfx-out .26s ease-in both; }
.tfx-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tfx-rays { position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; background: repeating-conic-gradient(from 0deg, rgba(247,216,152,.22) 0 7deg, transparent 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 42%); mask: radial-gradient(circle, #000 0, transparent 42%); animation: tfx-spin 14s linear infinite; pointer-events: none; }
.tfx-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: min(520px, 90vw); text-align: center; font-family: var(--font, system-ui, sans-serif); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.tfx-cup { width: min(46vh, 52vw, 280px); height: auto; filter: drop-shadow(0 0 22px var(--tc)) drop-shadow(0 8px 12px rgba(0,0,0,.5)); animation: tfx-pop .9s cubic-bezier(.2,1.5,.4,1) both, tfx-bob 2.2s ease-in-out .9s infinite; }
.tfx-k { font: 900 clamp(14px, 3.4vh, 22px)/1 var(--font, system-ui); letter-spacing: .18em; color: #f7d496; margin-top: 4px; animation: tfx-up .4s .5s both; }
.tfx-n { font: 900 clamp(26px, 8vh, 52px)/1.05 var(--font, system-ui); animation: tfx-up .4s .65s both; }
.tfx-d { font: 700 clamp(13px, 3.4vh, 20px)/1.25 var(--font, system-ui); opacity: .92; animation: tfx-up .4s .8s both; }
.tfx-h { margin-top: 8px; font: 700 clamp(11px, 2.6vh, 14px)/1 var(--font, system-ui); opacity: .65; animation: tfx-up .4s 1.6s both; }
@keyframes tfx-bg { from { opacity: 0; } to { opacity: 1; } }
@keyframes tfx-out { to { opacity: 0; } }
@keyframes tfx-spin { to { transform: rotate(360deg); } }
@keyframes tfx-pop { 0% { transform: scale(.05) rotate(-25deg) translateY(60%); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(0) translateY(0); opacity: 1; } }
@keyframes tfx-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes tfx-up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tfx-rays, .tfx-cup { animation: none; } }

/* ===== Detail získané trofeje / figurky ve sbírce ===== */
.shd { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(39,31,43,.62); animation: tfx-bg .18s ease-out both; cursor: pointer; }
.shd-card { display: flex; align-items: center; gap: clamp(14px, 4vw, 32px); max-width: min(640px, 94vw); padding: clamp(12px, 3vh, 22px) clamp(16px, 4vw, 30px); border-radius: 24px; background: rgba(243,236,222,.97); box-shadow: 0 0 0 4px var(--tc), 0 10px 28px rgba(0,0,0,.45); animation: tfx-pop .45s cubic-bezier(.2,1.4,.4,1) both; }
.shd-art { flex: 0 0 auto; width: min(34vh, 30vw, 190px); display: flex; align-items: center; justify-content: center; }
.shd-art .tfx-cup { width: 100%; animation: none; filter: drop-shadow(0 0 12px var(--tc)) drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.shd-ico { font-size: min(24vh, 20vw, 120px); line-height: 1; filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
.shd-tx { color: var(--ink, #3a343c); text-align: left; }
.shd-k { font: 900 clamp(11px, 2.6vh, 14px)/1 var(--font, system-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--tc); filter: brightness(.8); }
.shd-tx h3 { margin: 4px 0 6px; font: 900 clamp(22px, 6vh, 38px)/1.05 var(--font, system-ui); }
.shd-tx p { margin: 0 0 8px; font: 700 clamp(14px, 3.6vh, 20px)/1.3 var(--font, system-ui); }
.shd-tx small { font: 700 clamp(11px, 2.6vh, 13px)/1 var(--font, system-ui); opacity: .55; }

/* --- obrázky věcí v nabídce domečku (assets/ui/build/<id>.png) --- */
.u-tp { display: grid; place-items: center; width: 48px; height: 48px; flex: none; }
.u-tp img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.u-strip .u-tp { width: 44px; height: 44px; }
@media (max-height: 520px) { .u-strip .u-tp { width: 46px; height: 46px; } }

/* ---------- výběr serveru (Server 01–04): kreslená tlačítka z kitu, ukazatel obsazení ---------- */
/* PROZATÍM SKRYTO: výběr serveru v menu (vrátit smazáním tohoto řádku) */
.worlds { display: none !important; }
.worlds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; width: min(560px, 100%); margin: 4px auto 12px; }
.worlds[hidden] { display: none; }
.worlds .world {
  --bi: var(--k-blue); --sc: #4d889f;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; min-height: 76px; padding: 0 2px; border: solid transparent; border-width: 16px; border-image: var(--bi) 50 fill / 16px stretch;
  border-radius: 0; background: none; box-shadow: none; cursor: pointer; color: #fff; font-family: var(--font);
  transition: transform .1s var(--pop), filter .15s;
}
.worlds .world b { font-size: 17px; font-weight: 900; line-height: 1; white-space: nowrap; -webkit-text-stroke: 3.5px var(--sc); paint-order: stroke fill; }
.worlds .world small { font-size: 12.5px; font-weight: 900; line-height: 1; white-space: nowrap; -webkit-text-stroke: 3px var(--sc); paint-order: stroke fill; }
.worlds .wmeter { display: block; width: 78%; height: 8px; border-radius: 99px; background: rgba(0,0,0,.28); box-shadow: inset 0 1px 2px rgba(0,0,0,.35); overflow: hidden; }
.worlds .wmeter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(180deg, #d7f58a, #7bc043); min-width: 4px; }
.worlds .world.busy .wmeter i { background: linear-gradient(180deg, #ffe08a, #f0a030); }
.worlds .world.full .wmeter i { background: linear-gradient(180deg, #ff9a8a, #d9463a); }
.worlds .world { --bi: var(--k-green); --sc: #5f793d; border-image-source: var(--k-green); }
.worlds .world.busy { --sc: #4d889f; border-image-source: var(--k-blue); }
.worlds .world.sel { --sc: #ba6024; border-image-source: var(--k-orange); transform: translateY(-3px) scale(1.04); filter: drop-shadow(0 6px 6px rgba(61,52,69,.35)); }
.worlds .world.full { --sc: #7a6680; border-image-source: var(--k-gray); filter: saturate(.7); }
.worlds .world.full.sel { --sc: #ba6024; border-image-source: var(--k-orange); }
.worlds .world:active { transform: translateY(2px); }
@media (hover: hover) { .worlds .world:not(.sel):hover { filter: brightness(1.07); transform: translateY(-2px); } }
@media (max-width: 460px) { .worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-height: 480px) { .worlds .world { min-height: 62px; border-width: 13px; border-image-width: 13px; } .worlds .world b { font-size: 15px; } .worlds { margin-bottom: 6px; } }

/* obecní úřad: karty nabídky přes celou výšku okna (jako na poště), v ostatních podoknech zůstává běžný seznam */
.u-modal[data-m="hall"] .u-body.hmenu { display: flex; flex-direction: column; }
.u-modal[data-m="hall"] .u-body.hmenu .u-hcards { flex: 1; min-height: 0; grid-auto-rows: 1fr; }
.u-modal[data-m="hall"] .u-body.hmenu .u-hcard { min-height: 0 !important; height: auto; justify-content: center; }
.u-modal[data-m="hall"] .u-hcard .u-qi { font-size: 84px !important; line-height: 1; }
.u-modal[data-m="hall"] .u-hcard b { font-size: 30px !important; }
.u-modal[data-m="hall"] .u-hcard small { font-size: 16px !important; line-height: 1.25; max-width: 92%; text-align: center; }
@media (pointer: coarse), (max-height: 520px) { .u-modal[data-m="hall"] .u-hcard .u-qi { font-size: 72px !important; } .u-modal[data-m="hall"] .u-hcard b { font-size: 26px !important; } .u-modal[data-m="hall"] .u-hcard small { font-size: 15px !important; } }

/* seznam hráčů: kompaktní řádky, víc hráčů najednou; stav online jen zelená/šedá tečka u obličeje */
.u-modal[data-m="hall"] .u-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 6px 8px; }
.u-modal[data-m="hall"] .u-prow { padding: 4px 8px !important; gap: 8px; min-height: 0; margin: 0; }
.u-modal[data-m="hall"] .u-pface { width: 34px; height: 34px; box-shadow: 0 0 0 2px #fff, 0 0 0 3.500px rgba(61,52,69,.15); }
.u-modal[data-m="hall"] .u-on { width: 12px; height: 12px; right: -3px; bottom: -3px; box-shadow: 0 0 0 2px #fff; }
.u-modal[data-m="hall"] .u-prow b { font-size: 16px; line-height: 1.1; }
.u-modal[data-m="hall"] .u-ptr { padding: 1px 7px; font-size: 13px; } .u-modal[data-m="hall"] .u-ptr b { font-size: 14px; }
.u-modal[data-m="hall"] .u-pme { font-size: 12px; padding: 2px 8px; }
.u-modal[data-m="hall"] .u-pvisit { min-height: 32px !important; padding: 0 4px; border-width: 9px; border-image-width: 9px; font-size: 14px; }

/* úvodní obrazovka: tlačítka serverů mají stejnou šířku jako tlačítko Pokračovat ve hře (.pick-menu) */
#pick .worlds { width: min(320px, 82vw); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-height: 480px) { #pick .worlds { width: min(460px, 88vw); grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* škola: čtyři testy jako dva nahoře a dva dole (i na telefonu na šířku) */
.u-modal[data-m="quiz"] .u-qcats { grid-template-columns: 1fr 1fr !important; grid-auto-rows: 1fr; gap: 10px; }
@media (max-height: 520px) { .u-modal[data-m="quiz"] .u-qcat { min-height: 92px; } .u-modal[data-m="quiz"] .u-qcats { gap: 8px; } }

/* škola: karty testů vyplní celou výšku okna (bez prázdného pruhu dole) */
.u-modal[data-m="quiz"] .u-body.qmenu { display: flex; flex-direction: column; }
.u-modal[data-m="quiz"] .u-body.qmenu .u-qcats { flex: 1; min-height: 0; }
.u-modal[data-m="quiz"] .u-body.qmenu .u-qcat { min-height: 0 !important; height: auto; justify-content: center; }

/* jídlo z chycené myši přeskočí do batohu */
.u-flyitem { position: fixed; left: 0; top: 0; z-index: 41; font-size: 46px; line-height: 1; pointer-events: none; will-change: transform; filter: drop-shadow(0 4px 3px rgba(61,52,69,.4)); }
.u-flyitem img { width: 1em; height: 1em; display: block; }
@keyframes u-bagpop { 0% { transform: scale(1); } 35% { transform: scale(1.3) rotate(-8deg); } 70% { transform: scale(.95) rotate(4deg); } 100% { transform: scale(1); } }
.u-bagpop { animation: u-bagpop .5s ease-out; }

/* denní odměna: dokud ji hráč nevyzvedne, okno nejde zavřít (bez křížku) */
.u-modal[data-m="loginrew"][data-must="1"] .u-x { display: none; }

/* ikonka před názvem úkolu v panelu (pro děti, které neumí číst) */
.u-dv-lead { width: 1.25em; height: 1.25em; vertical-align: -.28em; margin-right: .3em; display: inline-block; }
.u-deliv[data-kind="hunt"] { cursor: pointer; }
/* potvrzení ukončení úkolu: uprostřed obrazovky (vodorovně i svisle) */
.u-cfm { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(40,32,48,.45); }
.u-cfm[hidden] { display: none; }
.u-cfm-card { min-width: 260px; max-width: calc(100vw - 32px); padding: 18px 22px 20px; border-radius: 28px; text-align: center; background: linear-gradient(180deg, #fffdf4, var(--cream, #f6f1e7)); box-shadow: 0 0 0 3px #fff, 0 6px 0 3px rgba(61,52,69,.25), 0 18px 40px rgba(0,0,0,.35); animation: u-cfmin .22s ease-out both; }
@keyframes u-cfmin { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
.u-cfm-card h3 { margin: 0 0 14px; font-family: var(--font-d); font-weight: 400; font-size: 30px; letter-spacing: .03em; color: var(--ink, #3d3445); }
.u-cfm-btns { display: flex; gap: 14px; justify-content: center; }
.u-cfm-btns .u-btn { min-width: 100px; font-size: 22px; padding: 10px 18px; }
@media (max-height: 520px) { .u-cfm-card { padding: 12px 18px 14px; } .u-cfm-card h3 { font-size: 24px; margin-bottom: 10px; } .u-cfm-btns .u-btn { font-size: 19px; padding: 7px 14px; min-width: 88px; } }

.u-hcards.h3.h2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* kvíz: text „Otázka 2 z 5“ uprostřed řádku (puntíky postupu zůstávají vlevo) */
.u-qtop { position: relative; min-height: 22px; }
.u-qtop .u-qnum { position: absolute; left: 50%; top: 50%; translate: -50% -50%; white-space: nowrap; }

/* kvíz: užší pruh odpočtu a menší tlačítko pro opakování čtení otázky */
.u-qtimer { height: 14px !important; }
.u-qsay { width: 32px; height: 32px; min-width: 32px; font-size: 16px; }
.u-qsay svg { width: 18px; height: 18px; }
@media (max-height: 520px) { .u-qtimer { height: 11px !important; } .u-qsay { width: 30px; height: 30px; min-width: 30px; } }

/* telefon: všechny panely aktivního úkolu (myslivci, pošta, závod, okruh) mají stejný styl – 46 px vysoký pruh mezi energií a tlačítky vpravo (délku nastaví ui.js) */
@media (pointer: coarse), (max-height: 520px) {
  .u-deliv[data-kind="hunt"], .u-deliv[data-kind="post"], .u-deliv[data-kind="race"], .u-deliv[data-kind="circuit"] { left: calc(env(safe-area-inset-left, 0px) + 172px); translate: 0 0; width: min(340px, calc(100vw - 172px - 380px)); min-width: 270px; top: calc(env(safe-area-inset-top, 0px) + 12px); height: 46px; box-sizing: border-box; padding: 0 5px 0 40px; gap: 6px; }
  .u-deliv[data-kind="post"] .u-dv-ico, .u-deliv[data-kind="race"] .u-dv-ico, .u-deliv[data-kind="circuit"] .u-dv-ico { left: -6px; width: 46px; height: 46px; font-size: 26px; }
  .u-deliv[data-kind="post"] .u-dv-x, .u-deliv[data-kind="race"] .u-dv-x, .u-deliv[data-kind="circuit"] .u-dv-x { width: 36px; height: 36px; min-width: 36px; font-size: 18px; }
  .u-deliv[data-kind="post"] .u-dv-cp, .u-deliv[data-kind="race"] .u-dv-cp, .u-deliv[data-kind="circuit"] .u-dv-cp { font-size: 19px; }
  .u-deliv[data-kind="race"] .u-dv-track, .u-deliv[data-kind="circuit"] .u-dv-track { display: none; }
  .u-deliv[data-kind="race"] .u-dv-sub, .u-deliv[data-kind="circuit"] .u-dv-sub { display: none; }
  .u-deliv[data-kind="race"][data-s="r"], .u-deliv[data-kind="circuit"][data-s="r"] { height: auto; min-height: 46px; border-radius: 26px; padding-top: 3px; padding-bottom: 3px; }
  .u-deliv[data-kind="race"][data-s="r"] .u-dv-sub, .u-deliv[data-kind="circuit"][data-s="r"] .u-dv-sub { display: block; }
  .u-deliv[data-kind="race"] .u-dv-nav, .u-deliv[data-kind="circuit"] .u-dv-nav { font-size: 17px; }
  .u-deliv[data-kind="race"] .u-dv-arr, .u-deliv[data-kind="circuit"] .u-dv-arr { width: 20px; height: 20px; }
  .u-deliv[data-kind="race"] .u-dv-rew, .u-deliv[data-kind="circuit"] .u-dv-rew { font-size: 18px; padding: 1px 9px 1px 4px; }
  .u-deliv[data-kind="race"] .u-dv-rew .u-i, .u-deliv[data-kind="circuit"] .u-dv-rew .u-i { width: 22px; height: 22px; }
}
@media (pointer: coarse), (max-height: 520px) { .u-deliv[data-kind="race"], .u-deliv[data-kind="circuit"] { padding-left: 50px; } }

/* info okno budovy: přes celou stránku, velký text a Pokračovat */
.u-modal[data-m="binfo"] { padding: 0; }
.u-modal[data-m="binfo"] .u-card { width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; display: flex; flex-direction: column; }
.u-modal[data-m="binfo"] .u-body { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; }
.u-bi { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; max-width: 820px; margin: 0 auto; padding: 8px 20px 20px; text-align: center; }
.u-bi-star { font-size: 64px; line-height: 1; filter: drop-shadow(0 4px 4px rgba(61,52,69,.3)); animation: u-bistar 2.4s ease-in-out infinite; }
.u-bi-star img { width: 1em; height: 1em; display: block; }
@keyframes u-bistar { 50% { transform: translateY(-6px) rotate(6deg); } }
.u-bi-text { margin: 0; font-size: clamp(20px, 3.2vw, 30px); line-height: 1.35; font-weight: 800; color: var(--ink, #3d3445); }
.u-bi-go { min-width: 220px; }
@media (max-height: 520px) { .u-bi { gap: 8px; padding-bottom: 8px; } .u-bi-star { font-size: 40px; } .u-bi-text { font-size: clamp(16px, 2.4vw, 21px); line-height: 1.3; } .u-bi-go { min-width: 180px; } }

/* obchod: počet mincí dole pod všemi produkty */
.u-shopcoins { display: flex; justify-content: center; align-items: center; }
.u-shopcoins .u-chip { font-size: 20px; padding: 6px 16px; }
@media (max-height: 520px) { .u-shopcoins .u-chip { font-size: 17px; padding: 3px 12px; } .u-modal[data-m="shop"] .u-foot { padding-top: 4px; padding-bottom: 6px; } }

/* nákup v obchodě: čip s mincemi cukne a vedle vyskočí −cena */
@keyframes u-shopspend { 0% { transform: scale(1); } 30% { transform: scale(.88) rotate(-3deg); } 65% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1); } }
.u-shopcoins .u-chip.u-shopspend { animation: u-shopspend .45s ease-out; }
@keyframes u-shopminus { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -34px); } }
.u-shopminus { position: fixed; z-index: 45; pointer-events: none; font-family: var(--font-d); font-size: 26px; color: #e0675a; -webkit-text-stroke: 4px #fff; paint-order: stroke fill; animation: u-shopminus 1s ease-out forwards; }

/* objev nové budovy: hvězdičky a záblesk ze středu obrazovky */
.u-disc-star { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; will-change: transform; filter: drop-shadow(0 3px 3px rgba(61,52,69,.35)); }
@keyframes u-discflash { from { opacity: .9; transform: translate(-50%, -50%) scale(.2); } to { opacity: 0; transform: translate(-50%, -50%) scale(3.2); } }
.u-disc-flash { position: fixed; z-index: 69; width: 160px; height: 160px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255,236,150,.95) 0%, rgba(255,214,90,.5) 45%, rgba(255,214,90,0) 70%); animation: u-discflash .8s ease-out forwards; }

/* info okno budovy: věty na samostatných řádcích, vyvážené zalomení, bez osamocených předložek */
.u-bi-text { white-space: pre-line; text-wrap: balance; max-width: 34em; }

/* úřad – změna údajů: vlevo jméno, vpravo adresa */
.u-pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.u-pf-cols .u-lq { margin: 0 !important; display: flex; flex-direction: column; }
.u-pf-cols .u-pf-row { flex-wrap: wrap; margin-top: auto; }
.u-pf-cols .u-pf-in { flex: 1 1 100%; min-width: 0; width: 100%; box-sizing: border-box; }
.u-pf-cols .u-pf-row .u-btn { flex: 1 1 100%; }
@media (max-width: 520px) { .u-pf-cols { grid-template-columns: 1fr; } }
.u-pf-foot { margin-top: 12px; display: flex; justify-content: flex-start; }
.u-pf-foot .u-btn { margin: 0; }
.u-pf-wrap { display: flex; flex-direction: column; min-height: 100%; }
.u-pf-wrap .u-pf-foot { margin-top: auto; padding-top: 12px; }
.u-modal[data-m="hall"] .u-body:has(.u-pf-wrap) { display: flex; flex-direction: column; }
.u-modal[data-m="hall"] .u-body:has(.u-pf-wrap) .u-pf-wrap { flex: 1 1 auto; }
/* seznam hráčů: tlačítko Zpět dole vlevo, při dlouhém seznamu přilepené ke spodní hraně okna */
.u-pf-wrap .u-pf-foot { position: sticky; bottom: 0; z-index: 2; background: linear-gradient(180deg, rgba(240,232,214,0), rgba(240,232,214,.96) 40%); }

/* menu závodů: dvě velká tlačítka (Solo / Multiplayer) a Nejlepší časy */
.u-rbig { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 12px; }
.u-rbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: clamp(150px, 42dvh, 260px); padding: 10px 12px; border: 0; border-radius: 26px; cursor: pointer; font: inherit; color: var(--ink, #3d3445); text-align: center;
  background: linear-gradient(180deg, #fffdf4, #f1e6c9); box-shadow: 0 0 0 3px #fff, 0 6px 0 3px rgba(61,52,69,.22), 0 10px 18px -8px rgba(61,52,69,.4); transition: transform .12s, box-shadow .12s; }
.u-rbtn:active { transform: translateY(3px); box-shadow: 0 0 0 3px #fff, 0 3px 0 3px rgba(61,52,69,.22); }
.u-rbtn.mp { background: linear-gradient(180deg, #e9f6d6, #bfe08a); }
.u-rbtn[aria-disabled="true"] { opacity: .55; filter: grayscale(.4); cursor: not-allowed; }
.u-rico { font-size: clamp(40px, 12dvh, 72px); line-height: 1; letter-spacing: -.1em; filter: drop-shadow(0 4px 3px rgba(61,52,69,.3)); }
.u-rico img { width: 1em; height: 1em; display: inline-block; vertical-align: middle; }
.u-rbtn b { font-family: var(--font-d); font-weight: 400; font-size: clamp(24px, 6dvh, 34px); letter-spacing: .03em; }
.u-rbtn small { font-size: clamp(13px, 3dvh, 16px); font-weight: 800; color: var(--ink-2, #6b5f73); max-width: 92%; line-height: 1.2; }
.u-rbest-row { display: flex; justify-content: center; }
.u-rbest { min-width: 240px; }
@media (max-height: 520px) { .u-rbig { gap: 10px; margin: 0 0 8px; } .u-rbtn { min-height: 0; height: clamp(110px, 44dvh, 170px); border-radius: 22px; } }
@media (max-width: 520px) { .u-rbig { grid-template-columns: 1fr; } }

/* panel závodu nahoře: bez počtu penízků */
.u-deliv[data-kind="race"] .u-dv-rew, .u-deliv[data-kind="circuit"] .u-dv-rew { display: none !important; }
/* menu závodů: Solo je oranžové (Multiplayer zelené) */
.u-rbtn:not(.mp) { background: linear-gradient(180deg, #ffe7b0, #ffbe66); }
/* menu závodů: velká tlačítka vyplní celou výšku okna (nad tlačítkem Nejlepší časy) */
.u-modal[data-m="race"] .u-body:has(.u-rbig), .u-modal[data-m="circuit"] .u-body:has(.u-rbig), .u-modal[data-m="run"] .u-body:has(.u-rbig) { display: flex; flex-direction: column; }
.u-body:has(.u-rbig) .u-rbig { flex: 1 1 auto; min-height: 0; grid-auto-rows: 1fr; }
.u-body:has(.u-rbig) .u-rbtn { min-height: 0; height: auto; }
.u-body:has(.u-rbig) .u-rbest-row { flex: none; }
.u-body:has(.u-rbig) .u-rico { font-size: clamp(48px, 20dvh, 96px); }
.u-body:has(.u-rbig) .u-rbtn b { font-size: clamp(26px, 7dvh, 38px); }

/* panel závodu koloběžek: bez vzdálenosti a šipky; 🏁 1/3 a ⏱ čas uprostřed */
.u-deliv[data-kind="circuit"] .u-dv-nav { display: none !important; }
.u-deliv[data-kind="circuit"] .u-dv-row { justify-content: center; }
.u-deliv[data-kind="circuit"] .u-dv-cp { display: inline-flex; align-items: center; gap: 22px; }
.u-deliv[data-kind="circuit"] .u-cl-g { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.u-deliv[data-kind="circuit"] .u-cl-ic { font-style: normal; font-size: .95em; line-height: 1; }
.u-deliv[data-kind="circuit"] .u-cl-ic img { width: 1.05em; height: 1.05em; display: block; }
.u-deliv[data-kind="circuit"] .u-cl-g b { font-weight: inherit; }
/* panel okruhu: pevná šířka kola a času, ať se při změně číslic nic neposouvá */
.u-deliv[data-kind="circuit"] .u-dv-cp { justify-content: center; }
.u-deliv[data-kind="circuit"] .u-cl-n { display: inline-block; min-width: 2.2em; text-align: left; }
.u-deliv[data-kind="circuit"] .u-cl-t { display: inline-block; min-width: 4.6em; text-align: left; font-variant-numeric: tabular-nums; }
.u-deliv[data-kind="circuit"] .u-dv-cp { width: 10.4em; justify-content: flex-start; flex: none; }
/* panel závodu na skateboardu: čas (⏱) stejně jako u okruhu */
.u-deliv[data-kind="race"] .u-dv-cp { display: inline-flex; align-items: center; gap: 22px; }
.u-deliv[data-kind="race"] .u-cl-g { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.u-deliv[data-kind="race"] .u-cl-ic { font-style: normal; font-size: .95em; line-height: 1; }
.u-deliv[data-kind="race"] .u-cl-ic img { width: 1.05em; height: 1.05em; display: block; }
.u-deliv[data-kind="race"] .u-cl-g b { font-weight: inherit; }
.u-deliv[data-kind="race"] .u-cl-p { display: inline-block; min-width: 1.4em; text-align: left; }
.u-deliv[data-kind="race"] .u-cl-t { display: inline-block; min-width: 4.6em; text-align: left; font-variant-numeric: tabular-nums; }

/* galerie: náhledy fotek s tenkým rámečkem, bez popisků */
.u-al-card { box-shadow: 0 0 0 2px #fff, 0 3px 0 2px rgba(69,97,123,.28); }

/* galerie: fotka přes celý displej (lightbox), ovládání jen jako překryv nahoře a dole */
dialog#albumDlg { max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; background: #000; }
dialog#albumDlg[open] { display: block; animation: none; }
#albumDlg .p-dlg-card { position: absolute; inset: 0; max-height: none; width: auto; padding: 0; gap: 0; border: 0; border-image: none; background: none; box-shadow: none; filter: none; }
#albumDlg .u-adlg-frame { position: absolute; inset: 0; padding: 0; border-radius: 0; background: #000; box-shadow: none; }
#albumDlg .p-img { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; object-fit: contain; }
#albumDlg .p-dlg-head { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: max(10px, env(safe-area-inset-top)) max(64px, env(safe-area-inset-right)) 22px max(14px, env(safe-area-inset-left)); background: linear-gradient(rgba(0,0,0,.6), transparent); pointer-events: none; }
#albumDlg .p-dlg-head h2 { color: #fff; font-size: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
#albumDlg .p-dlg-head h2 .u-i { color: #ffd37a; }
#albumDlg .u-x { position: absolute; top: max(8px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); z-index: 4; pointer-events: auto; }
#albumDlg .u-adlg-actions { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 26px 14px max(10px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.6)); flex-wrap: nowrap; }
#albumDlg .u-adlg-ask { position: absolute; left: 0; right: 0; bottom: 74px; z-index: 3; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
#albumDlg .u-adlg-nav { z-index: 2; }
#albumDlg .u-adlg-actions { justify-content: flex-start; padding-left: max(14px, env(safe-area-inset-left)); }
#albumDlg .u-adlg-actions [data-act="album-close"] { display: none; }   /* zavírá křížek nahoře */
#albumDlg .u-adlg-ask { text-align: left; padding-left: max(14px, env(safe-area-inset-left)); }
#albumDlg .u-adlg-del { min-width: 0; width: 44px; height: 44px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; }
#albumDlg .u-adlg-del .u-i { width: 22px; height: 22px; }
#albumDlg .u-adlg-del { position: relative; }
#albumDlg .u-adlg-del .u-i { position: absolute; left: 50%; top: calc(50% - 3px); margin: 0; transform: translate(-50%, -50%); }   /* ikona uprostřed barevné plochy tlačítka (spodní okraj kitu je tlustší) */
/* lightbox fotky bez popisku: datum zůstává jen pro čtečky, nahoře bez ztmavení */
#albumDlg .p-dlg-head { background: none; padding-bottom: 0; }
#albumDlg .p-dlg-head h2 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
