/* UI vrstva (src/ui.js): HUD, modální karty, obchod, batoh, rozbalení packů, pás úprav domečku.
   Barvy a polštářkové tvary přebírá z :root v index.html (paleta světa: uhlí = --ink, tráva, dřevo = --sand/--orange, slunce = --sun).
   Pravidla: tlačítka min. 48×48 px, okraje podle výřezu displeje (safe-area), žádné ostré hrany. */

[hidden] { display: none !important; }
.u-i { width: 1em; height: 1em; flex: none; display: block; }
.u-coin { filter: drop-shadow(0 1.5px 0 rgba(199,141,26,.55)); }
.u-modal, .u-sheet, #hud .u-left, #hud .u-right { --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); }

/* ===== HUD: levý horní roh (energie + mince) ===== */
#hud .u-left { position: absolute; left: calc(var(--safe-l) + 12px); top: calc(var(--safe-t) + 12px); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
#hud .u-left > * { pointer-events: auto; }
#hud .u-left > .u-bars { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; pointer-events: none; }
#hud .u-bars > * { pointer-events: auto; }
#uBattery { cursor: default; }
#uBattery[data-s="g"] { --c: #8b5cf6; }   /* baterie koloběžky je fialová (energie kočky zelená); při nízkém stavu žlutá / bílá / červená jako u energie */
/* na koloběžce se místo energie kočky ukazuje baterie koloběžky (na stejném místě) */
#hud:has(#uBattery:not([hidden])) #uEnergy, #hud.has-bat #uEnergy { display: none !important; }
#hud[data-ctx="home"] #uBattery { display: none !important; }
.u-stat { display: flex; align-items: center; gap: 10px; border-radius: 999px; font-weight: 900; color: var(--ink); }
.u-energy { --c: #5f8d3f; --p: 100%; position: relative; flex: none; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: conic-gradient(from 0deg, var(--c) var(--p), rgba(61,52,69,.3) 0); box-shadow: 0 0 0 2px rgba(255,255,255,.8), var(--lift); }
.u-energy::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff7e6; box-shadow: inset 0 2px 4px rgba(61,52,69,.18); }
.u-energy[data-s="g"] { --c: #6e9a3e; } .u-energy[data-s="y"] { --c: #f2c230; } .u-energy[data-s="w"] { --c: #fff; } .u-energy[data-s="r"] { --c: #e5383b; }
.u-energy[data-s="w"] { background: conic-gradient(from 0deg, #fff var(--p), rgba(61,52,69,.3) 0); box-shadow: 0 0 0 2px rgba(61,52,69,.35), var(--lift); }
.u-ico { position: relative; font-size: 28px; line-height: 0; color: var(--ink); }
.u-energy[data-s="r"] { animation: u-blink .8s ease-in-out infinite; }
.u-energy[data-s="r"] .u-ico { color: #e5383b; }

.u-coins { position: relative; padding: 5px 18px 5px 8px; font-size: 22px; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #ffe9a6, #f9d56a); border-color: rgba(255,255,255,.8); box-shadow: var(--edge), 0 3px 0 #c78d1a, var(--lift); }
.u-coins .u-i { width: 32px; height: 32px; }
.u-coins.pop { animation: u-coinpop .45s var(--pop); }
.u-plus { position: absolute; left: 100%; top: 0; margin-left: 8px; font-style: normal; font-size: 18px; color: #9b6a0e; opacity: 0; pointer-events: none; text-shadow: 0 1px 0 #fff; }
.u-plus.show { animation: u-rise 1s ease-out; }

/* ===== HUD: pravý horní roh (lišta) a minimapa pod ní ===== */
#hud .u-right { position: absolute; right: calc(var(--safe-r) + 12px); top: calc(var(--safe-t) + 12px); pointer-events: none; }
.u-bar { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; pointer-events: auto; }
.u-ib { position: relative; width: 48px; height: 48px; min-width: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: linear-gradient(180deg, #fffdf4, var(--cream)); }
.u-ib.sel { background: linear-gradient(180deg, #f7dfa8, var(--sand)); box-shadow: inset 0 0 0 3px var(--orange), 0 3px 0 rgba(61,52,69,.2); }
.u-ib[data-act="exit"] { width: auto; padding: 0 16px 0 12px; border-radius: 999px; display: flex; gap: 6px; background: linear-gradient(180deg, #f9a050, var(--orange)); color: #fff; text-shadow: 0 1.5px 0 rgba(130,60,30,.5); box-shadow: 0 0 0 1.5px var(--orange-d), 0 3px 0 var(--orange-d), 0 8px 14px -8px rgba(176,90,72,.8); }
.u-ib .u-lbl { font-size: 16px; }
.u-ibi { display: grid; }
.u-dot { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; background: var(--berry); color: #fff; font-size: 12px; font-weight: 900; display: grid; place-items: center; border: 2px solid var(--paper); animation: u-pulse 1.6s ease-in-out infinite; }

/* ===== Tlačítka: nákup / potvrzení ===== */
.u-btn { min-height: 48px; padding: 10px 24px; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.u-btn .u-i { width: 1.25em; height: 1.25em; }
.u-primary { background: linear-gradient(180deg, #f9a050, var(--orange) 55%, #e06f26); color: #fff; border-color: rgba(255,222,180,.9); text-shadow: 0 2px 0 rgba(130,60,30,.55); box-shadow: 0 0 0 1.5px var(--orange-d), 0 4px 0 var(--orange-d), 0 12px 20px -8px rgba(176,90,72,.8); }
.u-primary:active { box-shadow: 0 0 0 1.5px var(--orange-d), 0 0 0 var(--orange-d), 0 3px 6px -2px rgba(176,90,72,.8); }
.u-lg { min-height: 56px; font-size: 20px; padding: 12px 34px; }
.is-off, .is-off:hover { background: #d9d2c4 !important; color: #8b8392 !important; text-shadow: none !important; border-color: transparent !important; box-shadow: 0 0 0 1.5px rgba(61,52,69,.12), 0 3px 0 rgba(61,52,69,.12) !important; cursor: default; transform: none !important; }
.is-off .u-coin { filter: grayscale(.8) opacity(.7); }
.u-x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 52px; height: 52px; min-width: 52px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: linear-gradient(180deg, #fffdf4, var(--cream)); }
.u-x-in { position: static; flex: none; margin-left: auto; }

/* ===== Modální karty ===== */
.u-modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: max(12px, var(--safe-t)) max(12px, var(--safe-r)) max(12px, var(--safe-b)) max(12px, var(--safe-l)); background: radial-gradient(ellipse at center, rgba(75,53,82,.34), rgba(61,52,69,.66)); animation: u-fade .2s both; }
@media (pointer: fine) { .u-modal { backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); } }
.u-card { position: relative; width: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: 28px; background: var(--paper); border: 1.5px solid rgba(255,255,255,.8); box-shadow: var(--edge), 0 24px 50px -14px rgba(61,52,69,.7); animation: u-in .34s var(--pop) both; text-align: left; overflow: hidden; }
.u-wide { width: min(780px, 100%); } .u-narrow { width: min(430px, 100%); }
.u-card header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 16px 76px 8px 22px; flex: none; }
.u-card h2 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.u-h-ico { font-size: 28px; }
.u-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.u-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 3px 14px; border-radius: 999px; background: rgba(61,52,69,.09); font-size: 16px; font-weight: 800; color: var(--ink); border: 0; box-shadow: none; font-variant-numeric: tabular-nums; }
.u-chip .u-i { width: 20px; height: 20px; } .u-chip small { font-size: 12px; font-weight: 700; opacity: .75; }
.u-gold { background: rgba(245,189,58,.3); }
.u-packchip { cursor: pointer; background: rgba(229,80,61,.16); }
.u-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 20px 22px; touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(61,52,69,.3) transparent; }
.u-foot { flex: none; padding: 10px 22px 14px; font-size: 13px; font-weight: 700; color: var(--ink-2); background: rgba(61,52,69,.05); }
.u-tabs { display: flex; gap: 8px; padding: 2px 20px 10px; flex: none; overflow-x: auto; touch-action: pan-x; scrollbar-width: none; }
.u-tabs::-webkit-scrollbar, .u-strip::-webkit-scrollbar { display: none; }
.u-tab { flex: none; position: relative; min-height: 48px; padding: 0 18px; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.u-tab.sel { background: linear-gradient(180deg, #f7dfa8, var(--sand)); box-shadow: inset 0 0 0 3px var(--orange), 0 3px 0 rgba(61,52,69,.2); }
.u-num { font-style: normal; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 900; display: inline-grid; place-items: center; }
.u-num.big { position: absolute; right: -4px; bottom: -2px; min-width: 32px; height: 28px; font-size: 16px; border: 2.5px solid var(--paper); }
.u-sec { margin: 14px 0 8px; font-size: 15px; font-weight: 900; color: var(--ink-2); }
.u-sec:first-child { margin-top: 4px; }
.u-hint { margin: 14px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: center; }

.u-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 4px 2px; }
.u-grid.u-sm { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.u-food { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 12px; text-align: center; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1.5px rgba(61,52,69,.09), 0 4px 0 rgba(61,52,69,.09); }
.u-food h3 { margin: 0; font-size: 18px; font-weight: 900; }
.u-fico { position: relative; font-size: 58px; line-height: 1.1; filter: drop-shadow(0 5px 3px rgba(61,52,69,.18)); }
.u-pill { padding: 3px 12px; border-radius: 99px; background: rgba(95,141,63,.17); color: #3f6a26; font-weight: 900; font-size: 14px; }
.u-note { margin: 0; font-size: 12.5px; line-height: 1.35; font-weight: 600; color: var(--ink-2); min-height: 2.7em; }
.u-food .u-btn { width: 100%; min-height: 54px; }
.u-buyb { background: linear-gradient(180deg, #f9a050, var(--orange) 55%, #e06f26); color: #fff; border-color: rgba(255,222,180,.9); font-size: 22px; text-shadow: 0 2px 0 rgba(130,60,30,.55); box-shadow: 0 0 0 1.5px var(--orange-d), 0 4px 0 var(--orange-d), 0 12px 20px -8px rgba(176,90,72,.8); }
.u-buyb .u-i { width: 26px; height: 26px; }
.u-miss { min-height: 1.2em; font-weight: 800; font-size: 12px; color: var(--red); }
.u-empty { text-align: center; padding: 28px 10px; color: var(--ink-2); } .u-empty h3 { margin: 6px 0; color: var(--ink); } .u-empty p { margin: 0; font-weight: 600; }
.u-big { font-size: 64px; } .u-empty-s { padding: 18px; font-weight: 700; color: var(--ink-2); }

.u-fig, .u-skin { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px 8px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 0 0 1.5px rgba(61,52,69,.1), 0 3px 0 rgba(61,52,69,.1); font-size: 13px; }
.u-fig { border-bottom: 5px solid var(--rc, #ddd); color: var(--ink); } .u-fig.none { opacity: .5; border-bottom-color: transparent; }
.u-fi { font-size: 34px; line-height: 1.1; } .u-fig small, .u-skin small { font-size: 11.5px; font-weight: 800; display: flex; gap: 4px; align-items: center; }
.u-fig b, .u-skin b { font-size: 13px; }
.u-sw { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px rgba(61,52,69,.3), 0 2px 0 rgba(61,52,69,.2); display: block; }
.u-skin { min-height: 104px; justify-content: center; } .u-skin .u-i { width: 14px; height: 14px; }
.u-skin.sel { background: linear-gradient(180deg, #f7dfa8, var(--sand)); box-shadow: inset 0 0 0 3px var(--orange), 0 3px 0 rgba(61,52,69,.2); }
.u-skin.lock { background: #e8dcc0; opacity: .75; }
.u-list { display: flex; flex-direction: column; gap: 8px; }
.u-row2 { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1.5px rgba(61,52,69,.09), 0 3px 0 rgba(61,52,69,.09); }
.u-row2 .u-fi { font-size: 30px; width: 42px; text-align: center; } .u-row2 b { display: block; font-size: 15px; font-weight: 900; } .u-row2 small { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.u-row2.done { background: #ece4c8; }
.u-mats { display: flex; flex-wrap: wrap; gap: 8px; }
.u-cost { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; font-size: 12.5px; } .u-cost .u-i { width: 15px; height: 15px; } .u-cost.miss { color: var(--red); } .u-cost.ok { color: var(--green); }

.u-packview { display: flex; align-items: center; gap: 26px; padding: 6px 4px; }
.u-packart { --g1:#d98a52; position: relative; flex: none; width: 170px; height: 170px; font-size: 170px; filter: drop-shadow(0 12px 10px rgba(61,52,69,.25)); }
.u-packtxt { flex: 1; } .u-packtxt h3 { margin: 0 0 4px; font-size: 22px; font-weight: 900; } .u-packtxt p { margin: 0 0 12px; font-weight: 600; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.u-pity { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.u-pity i { display: block; position: relative; flex: 0 0 110px; height: 10px; border-radius: 99px; background: rgba(61,52,69,.15); overflow: hidden; }
.u-pity i::after { content: ''; position: absolute; inset: 0; width: var(--p); border-radius: 99px; background: linear-gradient(90deg, #ffd569, #ffb81f); }

.u-who { margin: 0 0 6px; font-weight: 800; color: var(--ink-2); text-align: center; }
.u-setrow { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 60px; margin-top: 10px; padding: 10px 18px; border-radius: 20px; text-align: left; font-size: 18px; }
.u-setrow b { flex: 1; font-weight: 900; } .u-setrow .u-fi { font-size: 28px; width: 34px; text-align: center; }
.u-vol { display: flex; align-items: center; gap: 10px; margin: 6px 6px 0; padding: 4px 14px; font-size: 18px; transition: opacity .2s; } .u-vol.off { opacity: .45; }
.u-vol input { flex: 1; min-width: 0; height: 28px; margin: 0; accent-color: var(--orange); cursor: pointer; }
.u-keys { margin-top: 8px; padding: 8px 16px; border-radius: 16px; background: rgba(61,52,69,.06); font-size: 15px; font-weight: 600; }
.u-keys > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; }
.u-keys kbd { display: inline-block; min-width: 22px; margin-right: 3px; padding: 0 6px; text-align: center; font: inherit; font-size: 13px; font-weight: 800; line-height: 1.5; background: var(--paper, #fbf7ea); border-radius: 6px; box-shadow: 0 0 0 1px rgba(61,52,69,.28), 0 2px 0 rgba(61,52,69,.4); }
.u-setrow.danger { color: #9a2f2f; } .u-setrow.arm { background: linear-gradient(180deg, #ff9b8c, var(--berry)); color: #fff; }
.u-switch { position: relative; flex: none; width: 60px; height: 34px; border-radius: 99px; background: #bdb6aa; box-shadow: inset 0 2px 4px rgba(61,52,69,.3); transition: background .2s; }
.u-switch i { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(61,52,69,.4); transition: transform .2s var(--pop); }
.u-switch.on { background: var(--green); } .u-switch.on i { transform: translateX(26px); }

/* ===== Rozbalení secret packu ===== */
.u-packm { z-index: 30; background: radial-gradient(ellipse at center, rgba(75,53,82,.9), rgba(38,29,42,.97)); }
.u-packm > .u-x { position: fixed; top: calc(var(--safe-t) + 12px); right: calc(var(--safe-r) + 12px); }
.u-stage { --rc: #7ec96a; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; text-align: center; width: 100%; }
.u-box { position: relative; z-index: 1; display: grid; place-items: center; }
.u-boxg { display: block; font-size: 150px; line-height: 0; filter: drop-shadow(0 14px 18px rgba(0,0,0,.45)); }
.u-stage[data-s="idle"] .u-box, .u-stage[data-s="shake"] .u-box { display: grid; } .u-stage[data-s="flash"] .u-box, .u-stage[data-s="reveal"] .u-box { display: none; }
.u-stage[data-s="shake"] .u-box { animation: u-shake 1.55s ease-in both; }
.u-stage[data-s="shake"] .u-boxg { animation: u-glow 1.55s ease-in both; }
.u-reveal { display: none; position: relative; z-index: 1; flex-direction: column; align-items: center; gap: 4px; min-width: 250px; padding: 22px 40px 20px; border-radius: 28px; background: linear-gradient(180deg, #fffdf4, var(--cream)); color: var(--ink); box-shadow: 0 0 0 6px var(--rc), 0 0 64px 10px var(--rc), var(--lift); }
.u-stage[data-s="flash"] .u-reveal, .u-stage[data-s="reveal"] .u-reveal { display: flex; animation: u-cardpop .6s var(--pop) both; }
.u-rar { font-weight: 900; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--rc); }
.u-rico { font-size: 88px; line-height: 1.1; filter: drop-shadow(0 6px 4px rgba(61,52,69,.22)); }
.u-rnm { margin: 0; font-size: 26px; font-weight: 900; } .u-rnote { margin: 0; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.u-stage[data-r="legendary"] .u-reveal { background: linear-gradient(135deg, #fff6d0, #ffe08a 45%, #fff6d0); }
.u-actions { display: none; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; z-index: 1; }
.u-rays { position: absolute; left: 50%; top: 42%; width: min(900px, 140vmax); aspect-ratio: 1; translate: -50% -50%; opacity: 0; pointer-events: none; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 55%, transparent) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 5%, transparent 62%); mask: radial-gradient(circle, #000 5%, transparent 62%); }
.u-stage[data-s="flash"] .u-rays, .u-stage[data-s="reveal"] .u-rays { opacity: .85; animation: u-spin 14s linear infinite; }
.u-stage[data-r="common"] .u-rays { opacity: .4 !important; }
.u-flash { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 45%, #fff, rgba(255,255,255,.4) 45%, transparent 75%); opacity: 0; }
.u-stage[data-s="flash"] .u-flash { animation: u-flash .55s ease-out both; }

/* ===== Pás úprav domečku a postavy (dole, aby bylo vidět pokoj i kočku) ===== */
.u-sheet { position: fixed; z-index: 19; left: max(8px, var(--safe-l)); right: max(8px, var(--safe-r)); bottom: max(8px, var(--safe-b)); padding: 10px 12px 6px; border-radius: 26px; background: rgba(251,247,234,.95); border: 1.5px solid rgba(255,255,255,.85); box-shadow: var(--edge), 0 -6px 30px -10px rgba(61,52,69,.5); animation: u-up .3s var(--pop) both; }
.u-sheet-top { display: flex; align-items: center; gap: 10px; }
.u-cats { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; touch-action: pan-x; }
.u-sheet .u-tab { padding: 0 16px; }
.u-strip { display: flex; gap: 10px; overflow-x: auto; padding: 10px 2px 10px; scroll-snap-type: x proximity; touch-action: pan-x; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.u-item { flex: 0 0 98px; min-height: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 6px; border-radius: 20px; background: linear-gradient(180deg, #fffdf4, var(--cream)); scroll-snap-align: start; font-size: 12.5px; line-height: 1.2; text-align: center; }
.u-item b { font-size: 12.5px; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-item small { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; font-size: 11.5px; font-weight: 800; min-height: 1.3em; color: var(--ink-2); }
.u-item small .u-i { width: 13px; height: 13px; color: var(--green); }
.u-ii { font-size: 34px; line-height: 1.15; }
.u-item.equipped, .u-item.built { background: linear-gradient(180deg, #f7dfa8, var(--sand)); box-shadow: inset 0 0 0 3px var(--orange), 0 3px 0 rgba(61,52,69,.2); }
.u-item.locked { background: #e8dcc0; }
.u-item.prev { background: #fff3cf; box-shadow: inset 0 0 0 3px var(--sun), 0 0 0 3px rgba(245,189,58,.35), 0 3px 0 rgba(61,52,69,.2); transform: translateY(-4px); }
.u-item.soon, .u-item.missing { opacity: .5; }
.u-item[style*="--rc"] { border-bottom: 5px solid var(--rc); }
.u-tier { font-style: normal; font-size: 10.5px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; color: var(--rc, var(--ink-2)); filter: brightness(.8); margin-top: -2px; }
.u-back { flex-basis: 70px; background: linear-gradient(180deg, #e9e0f2, #d6c8e6); }
.u-back .u-ii { font-size: 40px; line-height: 1; font-weight: 900; }
.u-thing small { color: var(--ink-2); font-weight: 700; }
.u-thing.soon { opacity: .55; }
.u-empty-s { align-self: center; padding: 0 14px; font-weight: 800; color: var(--ink-2); }
/* tlačítko Uprav si domeček nahoře uprostřed */
.u-editbar { position: absolute; left: 50%; bottom: calc(var(--safe-b, env(safe-area-inset-bottom, 0px)) + 14px); transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 26px 0 18px; border-radius: 999px; pointer-events: auto; font-weight: 900; font-size: 16px; letter-spacing: .01em; white-space: nowrap; color: #fff; text-shadow: 0 2px 0 rgba(130,60,30,.55); background: linear-gradient(180deg, #f9a050, var(--orange, #ee8133) 55%, #e06f26); border: 2px solid rgba(255,222,180,.9); box-shadow: 0 0 0 1.5px var(--orange-d, #c0631f), 0 4px 0 var(--orange-d, #c0631f), 0 12px 20px -8px rgba(176,90,72,.8); }
.u-editbar[hidden] { display: none; }
.u-editbar:active { transform: translateX(-50%) translateY(2px); }
.u-eb-i { font-size: 22px; line-height: 1; }
body.in-home #place { top: 66px; }
/* menu úprav: dvě řady kompaktních karet, posouvá se do strany (prstem, tažením myší i kolečkem) */
.u-strip { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: max-content; gap: 8px; align-items: stretch; padding: 8px 2px 8px; overflow-x: auto; overflow-y: hidden; cursor: grab; }
.u-strip:active { cursor: grabbing; }
.u-strip .u-item { flex: none; width: 88px; min-height: 54px; padding: 4px 3px; gap: 1px; border-radius: 14px; justify-content: center; }
.u-strip .u-item b { font-size: 11px; line-height: 1.1; -webkit-line-clamp: 2; }
.u-strip .u-item small { font-size: 10px; min-height: 1.1em; gap: 3px; }
.u-strip .u-item small .u-i { width: 11px; height: 11px; }
.u-strip .u-ii { font-size: 19px; line-height: 1.05; }
.u-strip .u-sw { width: 20px; height: 20px; border-width: 2px; }
.u-strip .u-tier { font-size: 9px; margin-top: -1px; }
.u-strip .u-back, .u-strip .u-gl, .u-strip .u-empty-s { grid-row: 1 / span 2; }
.u-strip .u-back { width: 64px; }
.u-strip .u-back .u-ii { font-size: 34px; }
.u-strip .u-gl { padding: 6px 4px; font-size: 11px; }
.u-strip .u-empty-s { align-self: center; max-width: 220px; font-size: 12.5px; }
.u-sheet .u-tab { padding: 0 11px; height: 40px; min-height: 40px; font-size: 12.5px; }
.u-sheet { padding-top: 7px; }
.u-strip { padding: 6px 2px 6px; gap: 6px; }
.u-openpack { background: linear-gradient(180deg, #ffd5cb, #ffb7a8); box-shadow: 0 0 0 1.5px rgba(229,80,61,.4), 0 3px 0 rgba(229,80,61,.35); }
.u-gl { scroll-snap-align: start; flex: none; display: grid; place-items: center; padding: 8px 6px; border-radius: 14px; background: rgba(61,52,69,.07); writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11.5px; font-weight: 900; letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; }
.u-buy { flex: 1; min-width: 0; animation: u-up .25s var(--pop) both; }
.u-sheet.buying .u-cats, .u-sheet.buying .u-sheet-top > .u-chips { display: none; }
.u-buyin { display: flex; align-items: center; gap: 10px; padding: 2px 4px; }
.u-buyin > div:nth-child(2) { flex: 1; min-width: 0; } .u-buyin b { display: block; font-size: 16px; font-weight: 900; } .u-buyin small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.u-eye { font-size: 28px; } .u-costs { display: flex; gap: 8px; } .u-buyin .u-cost { font-size: 16px; } .u-buyin .u-cost .u-i { width: 20px; height: 20px; }

/* ===== Animace ===== */
@keyframes u-fade { from { opacity: 0; } }
@keyframes u-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes u-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes u-blink { 50% { opacity: .35; } }
@keyframes u-pulse { 50% { transform: scale(1.12); } }
@keyframes u-wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes u-coinpop { 40% { transform: scale(1.18) rotate(-2deg); } }
@keyframes u-rise { 0% { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes u-shake { 0% { transform: rotate(0) scale(1); } 15% { transform: rotate(-9deg); } 30% { transform: rotate(9deg) scale(1.05); } 45% { transform: rotate(-13deg) scale(1.1); } 60% { transform: rotate(13deg) scale(1.16); } 80% { transform: rotate(-17deg) scale(1.26); } 100% { transform: rotate(0) scale(1.45); } }
@keyframes u-glow { to { filter: drop-shadow(0 0 34px var(--rc)) drop-shadow(0 0 12px #fff) brightness(1.25); } }
@keyframes u-cardpop { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes u-flash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes u-spin { to { rotate: 360deg; } }

/* ===== Mobil na šířku: menší, ale pořád ≥ 48 px na dotyk ===== */
@media (pointer: coarse) {
  .u-coins { font-size: 20px; }
  #place { top: calc(env(safe-area-inset-top, 0px) + 70px); }
}
@media (max-height: 520px) {
  .u-card { border-radius: 22px; }
  .u-card header { padding: 10px 68px 4px 16px; } .u-card h2 { font-size: 21px; } .u-h-ico { font-size: 22px; }
  .u-x { width: 48px; height: 48px; min-width: 48px; top: 8px; right: 8px; }
  .u-body { padding: 4px 14px 14px; } .u-tabs { padding: 0 14px 8px; }
  .u-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .u-modal[data-m="bag"] .u-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* batoh: potraviny po 4 na řádek (ikonky se roztáhnou) */
  .u-food { padding: 10px 8px 8px; gap: 3px; } .u-fico { font-size: 40px; } .u-food h3 { font-size: 16px; } .u-note { min-height: 0; font-size: 12px; } .u-food .u-btn { min-height: 48px; }
  .u-packart { width: 110px; height: 110px; font-size: 110px; } .u-packview { gap: 16px; } .u-packtxt p { display: none; }
  .u-boxg { font-size: 100px; } .u-reveal { padding: 12px 30px 12px; } .u-rico { font-size: 58px; } .u-rnm { font-size: 22px; } .u-stage { gap: 8px; }
  .u-sheet { padding: 8px 10px 2px; border-radius: 22px; }
  .u-item { flex-basis: 90px; min-height: 92px; } .u-ii { font-size: 28px; } .u-sw { width: 32px; height: 32px; }
  .u-strip { padding: 6px 2px 6px; }
  .u-item { min-height: 86px; padding: 6px 4px; } .u-ii { font-size: 26px; } .u-sheet .u-tab { height: 42px; min-height: 42px; }
  .u-setrow { min-height: 54px; margin-top: 6px; }
}
@media (max-width: 620px) {
  .u-bar { gap: 4px; padding: 5px; } .u-ib .u-lbl { display: none; } .u-ib[data-act="exit"] { padding: 0; width: 48px; border-radius: 50%; justify-content: center; }
  .u-packview { flex-direction: column; text-align: center; } .u-pity { justify-content: center; }
}
.u-cat { margin: 14px 4px 6px; font-size: 15px; color: #3d3445; }
.u-tab.u-power { margin-left: 6px; background: linear-gradient(180deg, #e2f4d6, #bfe2a8); box-shadow: inset 0 0 0 2px #6fae52, 0 3px 0 rgba(61,52,69,.2); color: #2f5a1c; font-weight: 900; }
.u-tab.u-power.on { background: linear-gradient(180deg, #ffd8cf, #ffb3a2); box-shadow: inset 0 0 0 2px #e5503d, 0 3px 0 rgba(61,52,69,.2); color: #8a2b1c; }

/* ===== Vzhled z Colorful UI Kit (Smashy Tech), přebarvený na naši paletu =====
   font Digitalt na nadpisy/čísla/štítky, diagonální lesk na oranžových tlačítkách,
   přepínač ZAP/VYP a pruh postupu s leskem. Barvy zůstávají naše (oranž, tráva, uhlí). */
@font-face { font-family: "GamerStation"; src: url("../assets/fonts/GamerStation.otf") format("opentype"); font-display: swap; }
/* GamerStation nemá č ď ě ň ř ť ů (ani velká): doplněno vlastním malým fontem (tools/fonts/make_cs_glyphs.py), stejné jméno = prohlížeč si znak vezme odsud */
@font-face { font-family: "GamerStation"; src: url("../assets/fonts/GamerStation-cs.otf?v=2") format("opentype"); font-display: swap; unicode-range: U+010D, U+010F, U+011B, U+0148, U+0159, U+0165, U+016F, U+010C, U+010E, U+011A, U+0147, U+0158, U+0164, U+016E; }
:root { --font-d: "GamerStation", var(--font); --shine: linear-gradient(115deg, rgba(255,255,255,.26) 0 40%, rgba(255,255,255,0) 40%); }

.u-card h2, .u-rnm, .u-rar, .u-packtxt h3, .u-food h3, .u-empty h3,
.u-coins, .u-btn, .u-tab, .u-num, .u-dot, .u-chip, .u-editbar, .u-ib .u-lbl, .u-sec, .u-setrow b { font-family: var(--font-d); }
.u-card h2 { font-size: 30px; font-weight: 400; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(255,255,255,.7); }
.u-coins { font-size: 26px; font-weight: 400; letter-spacing: .03em; }
.u-btn, .u-editbar, .u-tab { font-weight: 400; letter-spacing: .04em; }
.u-btn { font-size: 20px; } .u-lg { font-size: 24px; } .u-buyb { font-size: 24px; }
.u-tab { font-size: 17px; } .u-sheet .u-tab { font-size: 14px; }
.u-chip { font-size: 18px; font-weight: 400; } .u-num, .u-dot { font-weight: 400; }
.u-setrow b { font-weight: 400; font-size: 21px; letter-spacing: .03em; }
.u-rar { font-weight: 400; font-size: 18px; } .u-rnm { font-weight: 400; font-size: 30px; }

/* diagonální lesk (jako na tlačítkách kitu) */
.u-primary, .u-buyb, .u-editbar, .u-ib[data-act="exit"] { background-image: var(--shine), linear-gradient(180deg, #f9a050, var(--orange) 55%, #e06f26); }
.u-ib.sel, .u-tab.sel, .u-item.equipped, .u-item.built, .u-skin.sel { background-image: var(--shine), linear-gradient(180deg, #f7dfa8, var(--sand)); }
.u-coins { background-image: var(--shine), linear-gradient(180deg, #ffe9a6, #f9d56a); }
.is-off, .is-off:hover { background-image: none !important; }

/* přepínač ZAP / VYP */
.u-switch { width: 86px; height: 42px; border-radius: 14px; background: #cfc7b8; box-shadow: 0 0 0 2px var(--ink), inset 0 2px 4px rgba(61,52,69,.25); }
.u-switch::before { content: "VYP"; position: absolute; right: 11px; top: 50%; translate: 0 -50%; font: 400 19px/1 var(--font-d); letter-spacing: .04em; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.u-switch i { top: 5px; left: 5px; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(180deg, #f1ece0, #ddd5c4); box-shadow: 0 0 0 3px #fff, 0 3px 0 3px #a79f90; }
.u-switch.on { background: linear-gradient(180deg, #78a850, var(--green)); box-shadow: 0 0 0 2px var(--ink), inset 0 2px 4px rgba(30,60,20,.3); }
.u-switch.on::before { content: "ZAP"; right: auto; left: 10px; }
.u-switch.on i { transform: translateX(44px); background-image: var(--shine), linear-gradient(180deg, #f9a050, var(--orange)); box-shadow: 0 0 0 3px #fff, 0 3px 0 3px var(--orange-d); }

/* pruh postupu: světlý pruh nahoře, jako v kitu */
.u-pity i { height: 14px; box-shadow: inset 0 2px 3px rgba(61,52,69,.25); }
.u-pity i::before { content: ''; position: absolute; left: 0; top: 2px; height: 4px; width: calc(var(--p) - 8px); min-width: 0; margin-left: 4px; border-radius: 99px; background: rgba(255,255,255,.55); z-index: 1; }

/* ===== Energie jako pruh (styl kitu): kulatý odznak s bleskem + pruh s leskem a číslem ===== */
.u-energy { --c: #5f8d3f; width: 156px; height: 38px; margin-left: 20px; border-radius: 999px; background: linear-gradient(180deg, #e9dfc6, #fff7e6); box-shadow: 0 0 0 2px #fff, inset 0 3px 5px rgba(61,52,69,.28), 0 3px 0 rgba(61,52,69,.22), var(--lift); display: block; overflow: visible; }
.u-energy::after { content: ""; position: absolute; left: 30px; top: 4px; bottom: 4px; width: calc(var(--p) * .78); border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.5) 0 30%, rgba(255,255,255,0) 30%), linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 78%, #000)); box-shadow: inset 0 -2px 0 rgba(0,0,0,.16); transition: width .35s var(--pop), background .2s; }
.u-energy .u-ico { position: absolute; left: -20px; top: 50%; translate: 0 -50%; z-index: 3; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; font-size: 28px; background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 3px var(--c), 0 0 0 5px #fff, 0 3px 0 5px rgba(61,52,69,.2); }
.u-energy[data-s="w"] { background: linear-gradient(180deg, #e9dfc6, #fff7e6); box-shadow: 0 0 0 2px #fff, inset 0 3px 5px rgba(61,52,69,.28), 0 3px 0 rgba(61,52,69,.22), var(--lift); }
.u-energy[data-s="w"] { --c: #b9b2a6; }
.u-energy[data-s="r"] .u-ico { box-shadow: 0 0 0 3px #e5383b, 0 0 0 5px #fff, 0 3px 0 5px rgba(61,52,69,.2); }
.u-energy.hit { animation: u-shake .45s ease-out; }
.u-energy::before { content: none; }

/* ===== Větší energie a mince, odsazené od sebe ===== */
:root { --bar-h: 96px; }
#hud .u-left { gap: 26px; }
.u-energy { width: 230px; height: 54px; margin-left: 30px; }
.u-energy::after { left: 46px; top: 6px; bottom: 6px; width: calc(var(--p) * .78); }
.u-energy .u-ico { left: -30px; width: 74px; height: 74px; font-size: 42px; box-shadow: 0 0 0 4px var(--c), 0 0 0 7px #fff, 0 4px 0 7px rgba(61,52,69,.2); }
.u-energy[data-s="r"] .u-ico { box-shadow: 0 0 0 4px #e5383b, 0 0 0 7px #fff, 0 4px 0 7px rgba(61,52,69,.2); }
.u-coins { font-size: 36px; padding: 7px 28px 7px 10px; gap: 12px; }
.u-coins .u-i { width: 46px; height: 46px; }
.u-plus { font-size: 26px; }

/* ===== Pravé menu: samostatná barevná tlačítka, nastavení tmavě v rohu ===== */
.u-bar.panel, .u-bar { gap: 14px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }
.u-bar .u-ib { --c1: #fff; --c2: #ddd; --cd: #999; width: 62px; height: 62px; min-width: 62px; border-radius: 21px; font-size: 38px; color: #fff; border: 0; background: var(--shine), linear-gradient(180deg, var(--c1), var(--c2)); box-shadow: 0 0 0 3px #fff, 0 5px 0 3px var(--cd), 0 12px 16px -4px rgba(61,52,69,.5); transition: transform .12s var(--pop), box-shadow .12s; }
.u-bar .u-ib:active { transform: translateY(4px); box-shadow: 0 0 0 3px #fff, 0 1px 0 3px var(--cd), 0 4px 8px -4px rgba(61,52,69,.5); }
.u-bar .u-ib .u-i { filter: drop-shadow(0 2px 0 rgba(0,0,0,.22)); }
.u-bar .u-ib.sel { filter: brightness(1.1); }
.u-bar .u-ib[data-act="bag"] { --c1: #ffd666; --c2: #f0a820; --cd: #b57510; }
.u-bar .u-ib[data-act="quests"] { --c1: #a0c8d5; --c2: #6eaac2; --cd: #507f94; }
.u-bar .u-ib[data-act="map"] { --c1: #a8d76e; --c2: #5f9a38; --cd: #3e6b22; }
.u-bar .u-ib[data-act="home"] { --c1: #ffa292; --c2: #e5503d; --cd: #a8332a; }
.u-bar .u-ib[data-act="edit"] { --c1: #cfa9d0; --c2: #a56aa6; --cd: #6f4577; }
.u-bar .u-ib[data-act="exit"] { --c1: #f9a050; --c2: #e06f26; --cd: #b05a48; width: auto; padding: 0 22px 0 16px; border-radius: 21px; gap: 8px; font-size: 34px; text-shadow: 0 2px 0 rgba(130,60,30,.55); }
.u-bar .u-ib .u-lbl { font-size: 22px; }
.u-bar .u-ib[data-act="settings"] { --cd: #3d3445; margin-left: 10px; color: #fbf7ea; background: linear-gradient(180deg, #5d4c67, #3d3445); box-shadow: 0 0 0 3px #fbf7ea, 0 5px 0 3px #261d2a, 0 12px 16px -4px rgba(38,29,42,.6); }
.u-bar .u-ib[data-act="settings"]:active { box-shadow: 0 0 0 3px #fbf7ea, 0 1px 0 3px #261d2a; }
.u-bar .u-dot { top: -8px; right: -8px; border-color: #fff; }
@media (max-height: 520px) {
  :root { --bar-h: 68px; }
  #hud .u-left { gap: 14px; }
  .u-energy { width: 150px; height: 35px; margin-left: 20px; }
  .u-energy::after { left: 31px; top: 4px; bottom: 4px; }
  .u-energy .u-ico { left: -20px; width: 48px; height: 48px; font-size: 27px; }
  .u-coins { font-size: 24px; padding: 5px 20px 5px 8px; } .u-coins .u-i { width: 30px; height: 30px; }
  .u-bar { gap: 8px; }
  .u-bar .u-ib { width: 42px; height: 42px; min-width: 42px; border-radius: 14px; font-size: 26px; }
  .u-bar .u-ib[data-act="exit"] { width: auto; padding: 0 13px 0 10px; border-radius: 14px; }
  .u-bar .u-ib .u-lbl { font-size: 17px; }
}
@media (max-width: 620px) { .u-bar .u-ib[data-act="exit"] { padding: 0 14px 0 10px; } .u-bar .u-ib .u-lbl { display: inline; } }
.u-energy { margin-top: 12px; margin-left: 40px; }
.u-energy .u-ico { left: -34px; }
@media (max-height: 520px) { .u-energy { margin-top: 6px; margin-left: 24px; } .u-energy .u-ico { left: -22px; } }

/* =====================================================================
   SJEDNOCENÍ (styl Colorful UI Kit v naší paletě, ikony Phosphor)
   Každé menu má barvu svého tlačítka: úkoly modrá, batoh žlutá, mapa zelená, obchod oranžová, nastavení tmavá.
   ===================================================================== */
[data-ph] { display: inline-grid; place-items: center; vertical-align: -.16em; }
.u-i { fill: currentColor; }
:root { --kit-ring: 0 0 0 4px #fff; --kit-edge: 0 6px 0 4px rgba(61,52,69,.26); }

/* ----- obecná tlačítka (index.html i UI): Digitalt, lesk, spodní hrana ----- */
button { font-family: var(--font-d); font-weight: 400; letter-spacing: .04em; font-size: 18px; }
button.primary { font-family: var(--font-d); font-weight: 400; font-size: 28px; letter-spacing: .05em; border-radius: 22px; background-image: var(--shine), linear-gradient(180deg, #f9a050, var(--orange) 55%, #e06f26); padding: 12px 48px; }
.u-green, .u-buyb, .u-food .u-primary, [data-act="home-buy"] { background-image: var(--shine), linear-gradient(180deg, #b4de7a, #78b04a 55%, #5f9a38) !important; color: #fff; border-color: rgba(230,255,200,.9); text-shadow: 0 2px 0 rgba(40,80,20,.55); box-shadow: 0 0 0 1.5px #3e6b22, 0 4px 0 #3e6b22, 0 12px 20px -8px rgba(62,107,34,.8); }
.u-green:active, .u-buyb:active, .u-food .u-primary:active, [data-act="home-buy"]:active { box-shadow: 0 0 0 1.5px #3e6b22, 0 0 0 #3e6b22, 0 3px 6px -2px rgba(62,107,34,.8); }
.is-off, .is-off:hover { background-image: none !important; }
.u-btn { border-radius: 20px; } .u-btn .u-i { width: 1.15em; height: 1.15em; }

/* ----- karty (modály i úvodní obrazovky): bílý rámeček + spodní hrana ----- */
.u-card, .card { border: 0; box-shadow: var(--kit-ring), var(--kit-edge), 0 34px 60px -18px rgba(61,52,69,.75); }
.u-card { border-radius: 32px; }

/* hlavička modálu = barevná stuha */
.u-modal[data-m="quests"] .u-card { --h1: #a0c8d5; --h2: #6eaac2; --hd: #507f94; }
.u-modal[data-m="bag"] .u-card { --h1: #ffd666; --h2: #f0a820; --hd: #b57510; }
.u-modal[data-m="shop"] .u-card { --h1: #f9a050; --h2: #e8742a; --hd: #a8501c; }
.u-modal[data-m="settings"] .u-card { --h1: #6b5a76; --h2: #3d3445; --hd: #261d2a; }
.u-card header { padding: 14px 84px 14px 24px; color: #fff; background: var(--shine), linear-gradient(180deg, var(--h1, #a0c8d5), var(--h2, #6eaac2)); box-shadow: inset 0 -5px 0 rgba(0,0,0,.16); }
.u-card h2 { color: #fff; font-size: 34px; text-shadow: 0 3px 0 var(--hd, #507f94); letter-spacing: .04em; }
.u-h-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; font-size: 30px; background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.7); filter: drop-shadow(0 2px 0 rgba(0,0,0,.18)); }
.u-card header .u-chip { color: #fff; background: rgba(38,29,42,.38); box-shadow: inset 0 2px 4px rgba(0,0,0,.25); font-size: 20px; min-height: 40px; }
.u-card header .u-chip .u-i { width: 24px; height: 24px; } .u-card header .u-en .u-i { color: #ffe27a; }
.u-card header .u-chip small { color: #fff; }

/* červený křížek (zavřít), všude stejně */
.u-x { color: #fff; border: 0; background: linear-gradient(180deg, #ff8a86, #e5383b); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px #a82626, 0 8px 14px -4px rgba(61,52,69,.5); }
.u-x:active { box-shadow: 0 0 0 3px #fff, 0 1px 0 3px #a82626; }
.u-x .u-i { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.u-card > .u-x { top: 12px; right: 14px; }
.u-x-in { box-shadow: 0 0 0 3px #fff, 0 4px 0 3px #a82626; }
#mapZoom .u-x { background: linear-gradient(180deg, #b4de7a, #5f9a38); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px #3e6b22, 0 8px 14px -4px rgba(61,52,69,.5); }

/* záložky */
.u-tabs { padding: 12px 20px 10px; }
.u-tab { border-radius: 18px; background-image: none; font-size: 19px; padding: 0 20px; box-shadow: 0 0 0 2px #fff, 0 3px 0 2px rgba(61,52,69,.22); }
.u-tab .u-ti { display: inline-grid; font-size: 1.3em; color: var(--orange-d); }
.u-tab.sel, .u-tab[aria-selected="true"] { color: #fff; text-shadow: 0 2px 0 rgba(130,60,30,.55); background-image: var(--shine), linear-gradient(180deg, #f9a050, var(--orange) 55%, #e06f26); box-shadow: 0 0 0 2px #fff, 0 3px 0 2px var(--orange-d); }
.u-tab[aria-selected="true"]::after { content: ""; position: absolute; inset: auto 14px 3px; border-block-end: 3px solid currentColor; border-radius: 2px; pointer-events: none; opacity: .7; }
.u-tab.sel .u-ti, .u-tab[aria-selected="true"] .u-ti { color: #fff; }
.u-sheet .u-tab { font-size: 15px; } .u-sheet .u-tab .u-ti { font-size: 1.25em; }
.u-tab.u-power .u-ti { color: inherit; }

/* těla karet */
.u-body { padding-top: 14px; }
.u-sec, .u-cat { font-family: var(--font-d); font-weight: 400; letter-spacing: .04em; font-size: 21px; color: var(--ink); }
.u-cat { margin: 18px 4px 8px; padding-left: 12px; border-left: 6px solid var(--orange); }
.u-foot { font-size: 14px; background: rgba(61,52,69,.07); }
.u-foot .u-i { width: 1.2em; height: 1.2em; vertical-align: -.2em; color: var(--orange-d); }
.u-food { border-radius: 24px; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(61,52,69,.1), 0 5px 0 3.5px rgba(61,52,69,.12); }
.u-food h3 { font-family: var(--font-d); font-weight: 400; font-size: 21px; letter-spacing: .03em; }
.u-pill { font-family: var(--font-d); font-weight: 400; font-size: 16px; letter-spacing: .03em; }
.u-big { display: grid; place-items: center; color: var(--orange); font-size: 78px; } .u-big .u-i { width: 1em; height: 1em; }
.u-empty h3 { font-family: var(--font-d); font-weight: 400; font-size: 24px; }
.u-num { background: var(--berry); }
.u-cost .u-i, .u-cat .u-i { width: 1.1em; height: 1.1em; vertical-align: -.2em; }

/* úkoly */
.u-row2 { gap: 14px; padding: 12px 16px; border-radius: 20px; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(61,52,69,.1), 0 5px 0 3.5px rgba(61,52,69,.12); }
.u-row2 .u-fi { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 16px; font-size: 30px; color: #fff; background: var(--shine), linear-gradient(180deg, #a0c8d5, #6eaac2); box-shadow: inset 0 -4px 0 rgba(0,0,0,.14), 0 0 0 2px #fff; }
.u-row2 .u-fi .u-i { filter: drop-shadow(0 2px 0 rgba(0,0,0,.2)); }
.u-row2.done .u-fi { background: var(--shine), linear-gradient(180deg, #b4de7a, #5f9a38); }
.u-row2 b { font-family: var(--font-d); font-weight: 400; font-size: 20px; letter-spacing: .03em; }
.u-row2.done { background: #e9f1d6; }

/* nastavení: každý řádek má barevný čtvereček s ikonou */
.u-setrow { border-radius: 22px; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(61,52,69,.12), 0 5px 0 3.5px rgba(61,52,69,.14); }
.u-setrow .u-fi { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; font-size: 26px; color: #fff; background: var(--shine), linear-gradient(180deg, var(--s1, #a0c8d5), var(--s2, #6eaac2)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.14); }
.u-setrow .u-fi .u-i { filter: drop-shadow(0 2px 0 rgba(0,0,0,.2)); }
.u-setrow[data-act="sound"] .u-fi { --s1: #a0c8d5; --s2: #6eaac2; }
.u-setrow[data-act="music"] .u-fi { --s1: #dcb4ee; --s2: #b070cc; }
.u-setrow[data-act="fps"] .u-fi { --s1: #b4de7a; --s2: #5f9a38; }
.u-setrow[data-act="controls"] .u-fi { --s1: #ffd666; --s2: #f0a820; }
.u-setrow[data-act="reload"] .u-fi { --s1: #f9a050; --s2: #e06f26; }
.u-setrow[data-act="logout"] .u-fi { --s1: #ff8a86; --s2: #e5383b; }
.u-setrow .u-car { display: grid; font-size: 24px; color: var(--ink-2); }
.u-vi { display: grid; font-size: 24px; color: var(--ink-2); }
.u-setrow.arm .u-fi { background: rgba(255,255,255,.3); }

/* pás úprav domečku */
.u-sheet { border-radius: 28px 28px 20px 20px; border: 0; background: rgba(251,247,234,.95); box-shadow: 0 0 0 3px #fff, 0 6px 0 3px rgba(61,52,69,.2), 0 -10px 36px -10px rgba(61,52,69,.5); }
.u-item { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(61,52,69,.1), 0 4px 0 3.5px rgba(61,52,69,.12); }
.u-item b { font-family: var(--font-d); font-weight: 400; letter-spacing: .02em; }
.u-eye { display: grid; font-size: 32px; color: var(--orange); } .u-buyin b { font-family: var(--font-d); font-weight: 400; font-size: 20px; }
.u-chip .u-i, .u-pity .u-i { width: 20px; height: 20px; }
.u-back .u-ii { display: grid; place-items: center; } .u-back .u-ii .u-i { width: 1em; height: 1em; }
.u-empty-s .u-i { width: 1.2em; height: 1.2em; vertical-align: -.2em; color: var(--orange-d); }

/* rozbalení packu */
.u-rar { font-family: var(--font-d); font-weight: 400; } .u-rnm { font-family: var(--font-d); font-weight: 400; font-size: 32px; }
.u-actions .u-btn .u-i { width: 1.2em; height: 1.2em; }

/* ----- úvodní obrazovky z index.html ----- */
.card { border-radius: 32px; }
.card h1, .card h2, #pick .logo, .ld-title { font-family: var(--font-d); font-weight: 400; letter-spacing: .03em; }
.card h1 { font-size: clamp(36px, 7vw, 58px); } .card h2 { font-size: 34px; }
#pick .logo { font-size: clamp(60px, 13vw, 118px); letter-spacing: .02em; }
.card .cat { display: flex; justify-content: center; gap: 10px; font-size: 88px; color: var(--orange); filter: drop-shadow(0 6px 0 rgba(176,90,72,.35)); }
.card .cat .u-i { width: 1em; height: 1em; } .card .cat span:first-child:not(:last-child) { color: var(--sun); }
.card p { font-size: 17px; }
#authTabs { border-radius: 20px; padding: 5px; background: rgba(61,52,69,.12); box-shadow: inset 0 2px 4px rgba(61,52,69,.15); }
#authTabs button { border-radius: 16px; font-size: 18px; padding: 8px 20px; }
#authTabs button.sel { color: #fff; text-shadow: 0 2px 0 rgba(130,60,30,.55); background: var(--shine), linear-gradient(180deg, #f9a050, #e06f26); box-shadow: 0 3px 0 var(--orange-d); }
#authForm label, #authForm .coatbox { font-family: var(--font-d); font-weight: 400; font-size: 17px; letter-spacing: .03em; }
#bReload, #bNew, #bNew2, #bCont { border-radius: 20px; }

/* ----- HUD v index.html: počítadla, místo, hlášky ----- */
#counters { border-radius: 24px; padding: 12px 16px; gap: 11px; min-width: 200px; box-shadow: 0 0 0 3px #fff, 0 5px 0 3px rgba(61,52,69,.2), var(--lift); }
#counters .nm, #counters b, #nearest, #place, #toast, #gbar { font-family: var(--font-d); font-weight: 400; letter-spacing: .03em; }
#counters .cnt { font-size: 17px; } #counters .ico { font-size: 22px; }
#counters .bar { height: 12px; border-radius: 99px; background: rgba(61,52,69,.16); box-shadow: inset 0 2px 3px rgba(61,52,69,.22); position: relative; }
#counters .bar i { border-radius: 99px; position: relative; }
#counters .bar i::after { content: ''; position: absolute; left: 4px; right: 4px; top: 2px; height: 3px; border-radius: 99px; background: rgba(255,255,255,.55); }
#place { font-size: 22px; padding: 8px 24px; box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(61,52,69,.2), var(--lift); }
#nearest { font-size: 17px; box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(61,52,69,.2), var(--lift); }
#toast { font-size: 26px; background-image: var(--shine), linear-gradient(180deg, #ffd569, var(--sun)); }
#info { box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(61,52,69,.2), var(--lift); }
#info b { font-family: var(--font-d); font-weight: 400; font-size: 1.3em; letter-spacing: .03em; }
#act { font-size: 24px; } #act .u-i, #gFind .u-i, button.primary .u-i { width: 1.15em; height: 1.15em; }
#gFind { font-size: 26px; }

/* ----- mapa (celá obrazovka) ----- */
#mapSide { background: var(--paper); }
#mapSide h2 { display: flex; align-items: center; gap: 8px; font-family: var(--font-d); font-weight: 400; font-size: 24px; letter-spacing: .04em; color: #fff; padding: 10px 14px; border-radius: 18px; text-shadow: 0 2px 0 #3e6b22; background: var(--shine), linear-gradient(180deg, #a8d76e, #5f9a38); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 0 0 2px #fff; }
#mapSide h2 .u-i { width: 1.1em; height: 1.1em; }
#mapPlayers > span { font-family: var(--font-d); font-size: 17px; letter-spacing: .02em; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px rgba(61,52,69,.08), 0 3px 0 rgba(61,52,69,.1); }
#mapHint { font-weight: 700; }
#bMapClose { top: 14px; right: 14px; }

/* ----- dotyková ovládání: kulatá barevná tlačítka s ikonami ----- */
#touch .tb, #tGift { --c1: #fff; --c2: #ddd; --cd: #999; color: #fff; border: 0; display: grid; place-items: center; font-size: 40px;
  background: var(--shine), linear-gradient(180deg, var(--c1), var(--c2)); box-shadow: 0 0 0 3px #fff, 0 5px 0 3px var(--cd), 0 10px 16px -4px rgba(61,52,69,.5); }
#touch .tb .u-i, #tGift .u-i { filter: drop-shadow(0 2px 0 rgba(0,0,0,.22)); }
#touch #tMeow { --c1: #ffa8c4; --c2: #ee6a98; --cd: #a8365f; }
#tMeow .t-apple { position: relative; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1; }   /* v běhu: jablíčko s počtem zbývajících */
#tMeow .t-apple img { width: 1.15em; height: 1.15em; }
#tMeow .t-apple b { position: absolute; right: -10px; bottom: -8px; min-width: 20px; padding: 0 4px; border-radius: 99px; background: #e5383b; color: #fff; font-size: 14px; font-weight: 900; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; }
#touch #tRun { --c1: #a0c8d5; --c2: #6eaac2; --cd: #507f94; } #touch #tRun.on { --c1: #f9a050; --c2: #e06f26; --cd: #b05a48; }
#touch #tJump { --c1: #ffd666; --c2: #f0a820; --cd: #b57510; }
#touch #tAct { --c1: #b4de7a; --c2: #5f9a38; --cd: #3e6b22; } #touch #tAct.ready { box-shadow: 0 0 0 3px #fff, 0 5px 0 3px #3e6b22, 0 0 18px 4px rgba(245,189,58,.7); }
#gBlind { font-family: var(--font-d); font-weight: 400; } #gBlind .n { font-size: 90px; }
/* ikony uvnitř textu: v řádku, ne jako blok */
.u-cat .u-i, .u-foot .u-i, .u-empty-s .u-i, .u-miss .u-i, .u-hint .u-i { display: inline-block; }

/* ===== Čitelnost: Digitalt jen na velké nadpisy a velká tlačítka, malý text zpět na zaoblené písmo ===== */
button, .u-btn, .u-tab, .u-sheet .u-tab, .u-chip, .u-pill, .u-item b, .u-food h3, .u-row2 b, .u-setrow b, .u-sec, .u-cat, .u-buyin b, .u-empty h3,
#counters .nm, #counters b, #nearest, #mapPlayers > span, #authForm label, #authForm .coatbox, #authTabs button, #info b, #gbar, .u-rar, .u-num, .u-dot { font-family: var(--font); font-weight: 800; letter-spacing: 0; }
.u-tab, .u-sheet .u-tab { font-size: 15px; } .u-setrow b { font-size: 18px; } .u-row2 b { font-size: 16px; } .u-food h3 { font-size: 18px; }
.u-chip { font-size: 16px; } .u-card header .u-chip { font-size: 17px; } .u-pill { font-size: 14px; } .u-item b { font-size: 12.5px; } .u-strip .u-item b { font-size: 11.5px; }
.u-cat { font-size: 17px; } .u-empty h3 { font-size: 20px; } .u-buyin b { font-size: 16px; }
#counters .cnt { font-size: 15px; } #nearest { font-size: 15px; } #mapPlayers > span { font-size: 15px; } #authForm label, #authForm .coatbox { font-size: 15px; } #authTabs button { font-size: 16px; } #info b { font-size: 1.1em; }
/* velká tlačítka a nadpisy zůstávají v Digitaltu */
button.primary, .u-primary, .u-buyb, .u-lg, .u-editbar, #act, #gFind, .u-bar .u-ib .u-lbl, #toast, #place, .u-coins, .u-card h2, .u-rnm, .card h1, .card h2, #pick .logo { font-family: var(--font-d); font-weight: 400; letter-spacing: .04em; }
.u-btn.u-primary, .u-buyb { font-size: 22px; } .u-buyb b { font-size: 1em; }

/* ===== Tlačítka: čitelné zaoblené písmo (Digitalt jen na nadpisech a číslech) ===== */
button, button.primary, .u-primary, .u-buyb, .u-btn, .u-lg, .u-editbar, #act, #gFind, .u-bar .u-ib .u-lbl, .u-tab, .u-setrow, .u-x { font-family: var(--font); font-weight: 900; letter-spacing: .01em; }
button.primary { font-size: 24px; } .u-btn { font-size: 18px; } .u-lg { font-size: 21px; } .u-btn.u-primary, .u-buyb { font-size: 20px; }
#act { font-size: 20px; } #gFind { font-size: 22px; } .u-editbar { font-size: 17px; } .u-bar .u-ib .u-lbl { font-size: 18px; }
.u-tab { font-size: 15px; } #authTabs button { font-size: 16px; }

/* batoh: celá karta jídla je tlačítko (klepnutí = sníst) */
button.u-eat { width: 100%; padding: 18px 12px 16px; border: 0; border-radius: 24px; background: #fff; color: var(--ink); gap: 8px; min-height: 150px; justify-content: center; cursor: pointer; font-family: var(--font); font-weight: 800; }
button.u-eat .u-fico { font-size: 70px; }
button.u-eat h3 { margin: 0; font-size: 19px; }
button.u-eat:active { transform: translateY(4px); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(61,52,69,.1), 0 1px 0 3.5px rgba(61,52,69,.12); }
@media (hover: hover) { button.u-eat:hover { transform: translateY(-2px); background: #f4fbe6; } }
/* batoh: barva karty podle kategorie jídla (kolik % energie přidá) */
button.u-eat[data-cat="1"] { background: linear-gradient(180deg, #f1f9e2, #d7edb0); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #9ccb5c, 0 5px 0 3.5px #7fb044; }
button.u-eat[data-cat="2"] { background: linear-gradient(180deg, #fff6d6, #ffe08a); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #f0b830, 0 5px 0 3.5px #d39a14; }
button.u-eat[data-cat="3"] { background: linear-gradient(180deg, #ffe6ea, #ffb9c6); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #ee7a92, 0 5px 0 3.5px #cc5670; }
button.u-eat[data-cat="1"]:active { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #9ccb5c, 0 1px 0 3.5px #7fb044; }
button.u-eat[data-cat="2"]:active { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #f0b830, 0 1px 0 3.5px #d39a14; }
button.u-eat[data-cat="3"]:active { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #ee7a92, 0 1px 0 3.5px #cc5670; }
@media (hover: hover) { button.u-eat[data-cat]:hover { filter: brightness(1.04); } }

/* ===== Obchod: vše na jednu obrazovku (monitor i telefon na šířku), karty jako tlačítka, barva podle kategorie ===== */
.u-modal[data-m="shop"] .u-card { width: min(900px, 100%); }
.u-shopgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.6vh, 14px); padding: 4px 2px 8px; }
button.u-shopcard { min-height: 0; padding: clamp(6px, 1.4vh, 14px) 8px; gap: clamp(2px, .6vh, 6px); }
button.u-shopcard .u-fico { font-size: clamp(34px, 8vh, 64px); line-height: 1.05; }
button.u-shopcard h3 { font-size: clamp(14px, 2.2vh, 18px); }
.u-price { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 70%; padding: clamp(3px, .8vh, 7px) 14px; border-radius: 14px; color: #fff; font-family: var(--font); font-weight: 900; font-size: clamp(16px, 2.8vh, 22px); text-shadow: 0 2px 0 rgba(40,80,20,.55); background-image: var(--shine), linear-gradient(180deg, #b4de7a, #5f9a38); box-shadow: 0 0 0 1.5px #3e6b22, 0 3px 0 #3e6b22; }
.u-price .u-i { width: 1.25em; height: 1.25em; }
button.u-shopcard.cant { filter: saturate(.55); opacity: .8; }
button.u-shopcard.cant .u-price { background-image: none; background: #b9b2a6; text-shadow: none; box-shadow: 0 0 0 1.5px #8b8392, 0 3px 0 #8b8392; }
.u-modal[data-m="shop"] .u-body { overflow-y: auto; padding: 12px 16px 14px; }
@media (max-height: 560px) {
  .u-modal[data-m="shop"] .u-card header { padding-top: 8px; padding-bottom: 8px; } .u-modal[data-m="shop"] .u-card h2 { font-size: 26px; }
  .u-modal[data-m="shop"] .u-body { padding: 8px 12px 10px; }
  button.u-shopcard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; row-gap: 2px; align-items: center; justify-items: start; text-align: left; padding: 5px 8px; }
  button.u-shopcard .u-fico { grid-row: 1 / span 2; font-size: 38px; }
  button.u-shopcard h3 { font-size: 14px; align-self: end; } .u-price { min-width: 0; padding: 2px 10px; font-size: 16px; align-self: start; }
}

/* ===== Najetí myší: barevná tlačítka zůstávají barevná (obecné button:hover je jinak vybělí) ===== */
@media (hover: hover) {
  .u-bar .u-ib:hover:not(.primary) { background: var(--shine), linear-gradient(180deg, var(--c1), var(--c2)); filter: brightness(1.07); transform: translateY(-2px); }
  .u-bar .u-ib[data-act="settings"]:hover:not(.primary) { background: linear-gradient(180deg, #5d4c67, #3d3445); }
  .u-x:hover:not(.primary) { background: linear-gradient(180deg, #ff8a86, #e5383b); filter: brightness(1.07); }
  .u-tab.sel:hover:not(.primary) { background-image: var(--shine), linear-gradient(180deg, #f9a050, var(--orange) 55%, #e06f26); }
  #touch .tb:hover:not(.primary), #tGift:hover:not(.primary) { background: var(--shine), linear-gradient(180deg, var(--c1), var(--c2)); }
  .u-editbar:hover:not(.primary) { background-image: var(--shine), linear-gradient(180deg, #f9a050, var(--orange) 55%, #e06f26); }
  #authTabs button.sel:hover:not(.primary) { background: var(--shine), linear-gradient(180deg, #f9a050, #e06f26); }
  #mapZoom .u-x:hover:not(.primary) { background: linear-gradient(180deg, #b4de7a, #5f9a38); }
}
/* odznak u batohu: jen červený puntík, bez čísla */
.u-bar .u-dot { min-width: 0; width: 18px; height: 18px; padding: 0; font-size: 0; }

.u-grade { margin-top: 10px; padding: 10px 14px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1.5px rgba(61,52,69,.09), 0 3px 0 rgba(61,52,69,.09); }
.u-grade > b { display: block; font-size: 16px; font-weight: 900; margin-bottom: 6px; }
.u-grade > div { display: flex; gap: 6px; flex-wrap: wrap; }
.u-grade button { flex: 1; min-width: 40px; padding: 8px 6px; border-radius: 14px; font-weight: 900; font-size: 15px; background: #ece4c8; color: var(--ink); }
.u-grade button.sel { background: var(--green); color: #fff; }

.u-gnote { margin: 8px 2px 0; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.u-gwarn { margin-top: 10px; padding: 10px 12px; border-radius: 16px; background: #fff3d6; box-shadow: 0 0 0 2px #f0b94a; }
.u-gwarn p { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.u-gwarn div { display: flex; gap: 8px; }
.u-gwarn button { flex: 1; padding: 9px; border-radius: 14px; font-weight: 900; font-size: 15px; background: #ece4c8; color: var(--ink); }
.u-gwarn button[data-act="grade-yes"] { background: var(--green); color: #fff; }

/* ---------- školní kvíz ---------- */
.u-quiz .u-body { padding-bottom: 14px; }
.u-qsub { margin: 0 2px 12px; font-size: 15px; font-weight: 700; color: var(--ink-2); line-height: 1.4; } .u-qsub svg { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -.25em; }
.u-qcats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.u-qcat { --qc: var(--orange); display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 132px; padding: 12px 8px; border-radius: 24px; color: var(--ink); background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 3px var(--qc), 0 5px 0 rgba(61,52,69,.22); }
.u-qcat:active { transform: translateY(2px); } .u-qcat b { font-size: 21px; font-weight: 400; } .u-qcat small { font-size: 13px; font-weight: 700; color: var(--ink-2); font-family: var(--font); }
.u-qi { font-size: 40px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(61,52,69,.2)); }
.u-qdots { display: flex; gap: 6px; } .u-qdots i { width: 14px; height: 14px; border-radius: 50%; background: #d6cdbd; box-shadow: inset 0 2px 3px rgba(61,52,69,.25); } .u-qdots i.on { background: var(--qc); box-shadow: 0 0 0 2px #fff, 0 2px 0 rgba(61,52,69,.25); }
.u-qcat.off { opacity: .55; box-shadow: 0 0 0 3px #bdb6aa, 0 5px 0 rgba(61,52,69,.15); filter: grayscale(.6); }
.u-qtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.u-qprog { display: flex; gap: 6px; } .u-qprog i { width: 26px; height: 10px; border-radius: 99px; background: #d6cdbd; } .u-qprog i.cur { background: var(--orange); } .u-qprog i.ok { background: #78b04a; } .u-qprog i.bad { background: #e0675a; }
.u-qnum { font-family: var(--font-d); font-size: 17px; color: var(--ink-2); }
.u-qtimer { height: 12px; border-radius: 99px; background: #e8e0d0; box-shadow: inset 0 2px 3px rgba(61,52,69,.25); overflow: hidden; margin-bottom: 14px; }
.u-qtimer i { display: block; height: 100%; width: 100%; border-radius: 99px; background: #78b04a; transform-origin: left; animation: u-qt linear forwards; }
@keyframes u-qt { 0% { transform: scaleX(1); background: #78b04a; } 70% { background: #78b04a; } 100% { transform: scaleX(0); background: #ee8133; } }
.u-qtext { margin: 0 0 14px; font-family: var(--font-d); font-weight: 400; font-size: 27px; line-height: 1.2; letter-spacing: .02em; text-align: center; color: var(--ink); min-height: 66px; display: flex; align-items: center; justify-content: center; }
.u-qans { display: grid; gap: 10px; }
.u-qa { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 14px; border-radius: 20px; text-align: left; color: var(--ink); background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 2px rgba(61,52,69,.18), 0 4px 0 rgba(61,52,69,.18); }
.u-qa:active { transform: translateY(2px); } .u-qa b { flex: 1; font-family: var(--font); font-weight: 800; font-size: 21px; letter-spacing: 0; }
.u-ql { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fff; background: var(--orange); text-shadow: 0 2px 0 rgba(130,60,30,.5); }
.u-qa.right { background: linear-gradient(180deg, #d4f0b0, #a9d97b); box-shadow: 0 0 0 3px #5f9a38, 0 4px 0 #3e6b22; } .u-qa.right .u-ql { background: #5f9a38; }
.u-qa.wrong { background: linear-gradient(180deg, #ffd8d0, #f4a99c); box-shadow: 0 0 0 3px #d9594a, 0 4px 0 #9a2f2f; } .u-qa.wrong .u-ql { background: #d9594a; }
.u-qa[aria-disabled="true"]:not(.right):not(.wrong) { opacity: .55; }
.u-qmsg { min-height: 24px; margin: 10px 0 0; text-align: center; font-size: 16px; font-weight: 800; color: var(--ink-2); }
.u-qres { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.u-qres h3 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 32px; letter-spacing: .03em; }
.u-qstars { display: flex; gap: 6px; font-size: 40px; color: #d6cdbd; text-shadow: 0 2px 0 rgba(61,52,69,.15); } .u-qstars .on { color: #f5bd3a; animation: u-qpop .5s var(--pop) both; } .u-qstars span:nth-child(2) { animation-delay: .08s; } .u-qstars span:nth-child(3) { animation-delay: .16s; } .u-qstars span:nth-child(4) { animation-delay: .24s; } .u-qstars span:nth-child(5) { animation-delay: .32s; }
@keyframes u-qpop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.u-qscore { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink-2); }
.u-qwin { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; border-radius: 99px; background: #fff3d6; box-shadow: 0 0 0 2px #f0b94a; font-family: var(--font-d); font-size: 28px; } .u-qwin svg { width: 32px; height: 32px; }
.u-qpackbox { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 18px 12px; border-radius: 22px; background: linear-gradient(180deg, #fff3d6, #ffe2a8); box-shadow: 0 0 0 3px #f0b94a; }
.u-qpackbox p, .u-qgot, .u-qhint { margin: 0; font-size: 16px; font-weight: 700; } .u-qhint { color: var(--ink-2); font-size: 14px; }
.u-qgift { --g1: #d98a52; --g2: #ee8133; --g3: #f5bd3a; display: block; width: 64px; height: 64px; animation: u-qwob 1.2s ease-in-out infinite; } .u-qgift svg { width: 100%; height: 100%; }
@keyframes u-qwob { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.u-actions2 { margin-top: 6px; display: flex; gap: 10px; }
@media (max-height: 520px) { .u-qtext { font-size: 22px; min-height: 40px; margin-bottom: 8px; } .u-qa { min-height: 46px; } .u-qa b { font-size: 17px; } .u-qcat { min-height: 104px; } .u-qi { font-size: 32px; } .u-qans { gap: 6px; } .u-qtimer { margin-bottom: 8px; } .u-qres h3 { font-size: 26px; } .u-qstars { font-size: 30px; } }
@media (max-height: 460px) {
  .u-quiz .u-body { padding: 6px 12px 8px; } .u-qtop { margin-bottom: 4px; } .u-qtimer { height: 9px; margin-bottom: 6px; }
  .u-qtext { font-size: 20px; min-height: 0; margin-bottom: 8px; }
  .u-qans { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .u-qa { flex-direction: column; justify-content: center; text-align: center; gap: 4px; min-height: 74px; padding: 6px 8px; } .u-qa b { flex: none; font-size: 16px; line-height: 1.15; } .u-ql { width: 28px; height: 28px; font-size: 16px; }
  .u-qmsg { min-height: 18px; margin-top: 6px; font-size: 14px; }
  .u-qcats { grid-template-columns: repeat(var(--qn, 4), 1fr); gap: 8px; } .u-qcat { min-height: 96px; padding: 6px 4px; } .u-qcat b { font-size: 16px; } .u-qcat small { font-size: 11px; } .u-qsub { margin-bottom: 8px; font-size: 13px; }
  .u-qres { gap: 4px; } .u-qpackbox { padding: 6px 14px 8px; } .u-qgift { width: 40px; height: 40px; } .u-qwin { font-size: 22px; padding: 2px 14px; }
}
/* čtení otázky nahlas (1. třída): čtená část se rozsvítí */
.u-qtext { gap: 10px; transition: color .15s; } .u-qtext.say { color: #c2570f; }
.u-qsay { flex: none; width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: linear-gradient(180deg, #9fc5d1, #74a7bc); color: #fff; box-shadow: 0 0 0 2px #558599, 0 3px 0 #558599; } .u-qsay svg { width: 26px; height: 26px; }
.u-qtext.say .u-qsay { animation: u-qpulse .6s ease-in-out infinite alternate; }
.u-qa { transition: transform .15s, box-shadow .15s, background .15s; }
.u-qa.say { transform: scale(1.03); background: linear-gradient(180deg, #fff6c9, #ffe27a); box-shadow: 0 0 0 4px #f5a623, 0 0 18px 4px rgba(255,190,60,.75), 0 4px 0 #b8741a; } .u-qa.say .u-ql { background: #f5a623; }
@keyframes u-qpulse { from { transform: scale(1); } to { transform: scale(1.12); } }

/* Tlačítko akce (domeček) je jen v domečku, sprint jen venku; `#touch .tb {display:grid}` je jinak přebíjelo a překrývala se */
#touch #tAct { display: none; }
#touch #tEdit { display: none; --c1: #cfa9d0; --c2: #a56aa6; --cd: #6f4577; }
#tGift { display: none; --c1: #ff9eb5; --c2: #e5507a; --cd: #a8264c; }
#tGift.off { --c1: #dcd4c4; --c2: #b8b0a0; --cd: #7f786b; opacity: .78; }
#tGift:active { transform: translateY(3px); box-shadow: 0 0 0 3px #fff, 0 2px 0 3px var(--cd), 0 4px 10px -4px rgba(61,52,69,.5); }
body.in-home #touch #tAct, body.in-home #touch #tEdit { display: grid; }
body.in-home #touch #tRun, body.in-home #touch #tMeow { display: none; }
body.playing.in-home.in-visit #tGift { display: grid; }
body.in-home.in-visit #touch #tEdit { display: none; }
body.home-open #tGift, body.photo-mode #tGift { display: none !important; }

/* Obchod: počet v batohu je vedle ceny, ne přes ikonku produktu */
.u-pr { display: flex; align-items: center; justify-content: center; gap: 6px; }
.u-pr .u-num { height: 24px; font-size: 15px; box-shadow: 0 0 0 2px #fff; }
@media (max-height: 560px) { button.u-shopcard .u-pr { align-self: start; justify-self: start; } }
.u-bagcard .u-pr .u-num { height: 28px; min-width: 40px; font-size: 18px; }

/* ===== Telefon na šířku (nízká obrazovka): úkoly a nastavení ve dvou sloupcích, aby se vešlo víc ===== */
@media (max-height: 520px) {
  .u-modal[data-m="quests"] .u-card { width: min(820px, 100%); }
  .u-modal[data-m="quests"] .u-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .u-row2 { gap: 10px; padding: 7px 12px; } .u-row2 .u-fi { width: 40px; height: 40px; font-size: 24px; border-radius: 13px; }
  .u-row2 b { font-size: 17px; line-height: 1.1; } .u-row2 small { font-size: 15px; font-weight: 800; margin-top: 2px; }
  .u-modal[data-m="settings"] .u-card { width: min(700px, 100%); }
  .u-modal[data-m="settings"] .u-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; align-content: start; }
  .u-modal[data-m="settings"] .u-body > .u-who, .u-modal[data-m="settings"] .u-body > .u-grade, .u-modal[data-m="settings"] .u-body > .u-vol, .u-modal[data-m="settings"] .u-body > .u-keys { grid-column: 1 / -1; }
  .u-setrow { min-height: 48px; margin-top: 0; padding: 6px 14px; } .u-setrow .u-fi { width: 38px; height: 38px; font-size: 22px; } .u-setrow b { font-size: 18px; }
}
/* klávesová nápověda nedává na dotykovém zařízení smysl */
@media (pointer: coarse) { .u-setrow[data-act="controls"], .u-keys { display: none !important; } }
@media (max-height: 520px) {
  .u-modal[data-m="settings"] .u-who { margin: 0; font-size: 14px; }
  .u-modal[data-m="settings"] .u-grade { margin-top: 0; padding: 6px 12px; display: flex; align-items: center; gap: 10px; }
  .u-modal[data-m="settings"] .u-grade > b { margin: 0; } .u-modal[data-m="settings"] .u-grade > div { flex: 1; flex-wrap: nowrap; } .u-modal[data-m="settings"] .u-grade button { padding: 6px 4px; }
  .u-modal[data-m="settings"] .u-vol { margin: 0; padding: 0 14px; grid-column: 1 / -1; }
}
@media (max-height: 560px) { button.u-shopcard .u-fico { font-size: 50px; line-height: 1; } button.u-shopcard { padding-top: 4px; padding-bottom: 4px; } }

/* ===== Domeček na telefonu (nízká obrazovka): větší dlaždice, písmo i vzorníky, aby šly dobře vidět a trefit ===== */
@media (max-height: 520px) {
  .u-strip { gap: 8px; padding: 6px 2px 8px; }
  .u-strip .u-item { width: 100px; min-height: 66px; padding: 5px 4px; gap: 2px; border-radius: 16px; }
  .u-strip .u-item b { font-size: 14px; line-height: 1.1; }
  .u-strip .u-item small { font-size: 13px; min-height: 1.1em; gap: 4px; }
  .u-strip .u-item small .u-i { width: 14px; height: 14px; }
  .u-strip .u-ii { font-size: 26px; line-height: 1.05; }
  .u-strip .u-sw { width: 28px; height: 28px; border-width: 2.5px; }
  .u-strip .u-tier { font-size: 11px; }
  .u-strip .u-back { width: 72px; } .u-strip .u-back .u-ii { font-size: 38px; }
  .u-strip .u-gl { font-size: 13px; } .u-strip .u-empty-s { font-size: 14px; }
  .u-sheet .u-tab { height: 44px; min-height: 44px; font-size: 16px; }
}
/* při náhledu před koupí je dole jen jeden řádek věcí, ať je vidět, co se kupuje */
@media (max-height: 520px) { .u-sheet.buying .u-strip { grid-template-rows: auto; } .u-sheet.buying .u-strip .u-back, .u-sheet.buying .u-strip .u-gl, .u-sheet.buying .u-strip .u-empty-s { grid-row: 1; } }

/* ===== Telefon na šířku: úpravy domečku jsou panel na pravém boku, aby bylo vidět, co se upravuje ===== */
@media (min-aspect-ratio: 1/1) {
  .u-sheet { left: auto; right: max(8px, var(--safe-r)); top: calc(var(--safe-t) + 66px); bottom: max(8px, var(--safe-b)); width: min(330px, 42vw); display: flex; flex-direction: column; padding: 8px 8px 6px; border-radius: 22px; animation: none; }
  .u-sheet-top { flex-wrap: wrap; gap: 6px; flex: none; }
  .u-cats { order: 1; flex: 1; min-width: 0; } .u-sheet .u-x-in { order: 2; width: 44px; height: 44px; min-width: 44px; margin-left: 0; }
  .u-chips { order: 3; width: 100%; } .u-buy { order: 3; flex: 1 1 100%; }
  .u-sheet .u-tab { padding: 0 8px; font-size: 14px; }
  .u-buyin { flex-wrap: wrap; gap: 6px; } .u-buyin > div:nth-child(2) { flex: 1 1 90px; } .u-buyin .u-eye { font-size: 24px; }
  .u-buyin .u-costs { margin-left: auto; } .u-buyin .u-btn, .u-buyin button { min-height: 44px; padding: 0 12px; }
  .u-strip, .u-sheet.buying .u-strip { flex: 1; min-height: 0; display: grid; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; align-content: start; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; overscroll-behavior-y: contain; padding: 6px 2px 8px; }
  .u-strip .u-item { width: auto; min-height: 66px; }
  .u-strip .u-back, .u-strip .u-gl, .u-strip .u-empty-s, .u-sheet.buying .u-strip .u-back, .u-sheet.buying .u-strip .u-gl, .u-sheet.buying .u-strip .u-empty-s { grid-column: 1 / -1; grid-row: auto; width: auto; flex-direction: row; min-height: 48px; gap: 8px; }
  .u-strip .u-back .u-ii { font-size: 26px; }
}
@media (min-aspect-ratio: 1/1) { .u-sheet .u-chips { display: none; } .u-sheet { top: calc(var(--safe-t) + 64px); } }
@media (min-aspect-ratio: 1/1) {
  .u-sheet .u-buy { order: 1; flex: 1 1 0; } .u-sheet.buying .u-x-in { order: 2; }
  .u-buyin .u-eye, .u-buyin small { display: none; } .u-buyin b { font-size: 16px; }
  .u-buyin .u-costs { margin-left: 0; }
}
@media (min-aspect-ratio: 1/1) {
  .u-sheet { top: max(8px, var(--safe-t)); z-index: 25; }
  .u-strip .u-item { min-height: 84px; height: auto; }
  .u-strip, .u-sheet.buying .u-strip { grid-auto-rows: min-content; }
}

/* ===== Telefon: menší energie a mince v rohu, ať nezakrývají hru ===== */
@media (pointer: coarse), (max-height: 520px) {
  #hud .u-left { gap: 12px; left: calc(var(--safe-l) + 8px); top: calc(var(--safe-t) + 8px); }
  #hud .u-bars { gap: 8px; max-width: calc(100vw - 220px); }
  .u-energy { width: 126px; height: 29px; margin-top: 5px; margin-left: 21px; }
  .u-energy::after { left: 27px; top: 3px; bottom: 3px; width: calc(var(--p) * .76); }
  .u-energy .u-ico { left: -18px; width: 42px; height: 42px; font-size: 24px; box-shadow: 0 0 0 2.5px var(--c), 0 0 0 4px #fff, 0 2.5px 0 4px rgba(61,52,69,.2); }
  .u-energy[data-s="r"] .u-ico { box-shadow: 0 0 0 2.5px #e5383b, 0 0 0 4px #fff, 0 2.5px 0 4px rgba(61,52,69,.2); }
  .u-coins { font-size: 20px; padding: 3px 16px 3px 6px; gap: 6px; } .u-coins .u-i { width: 27px; height: 27px; }
  .u-plus { font-size: 20px; margin-left: 6px; }
}

/* při úpravách domečku (výběr věcí, skinů) nejsou dotyková tlačítka skoku a sprintu potřeba */
body.home-open #touch .tb { display: none !important; }

/* panel na boku, náhled před koupí: nahoře název s cenou a křížek, pod tím dvě stejně velká tlačítka vedle sebe */
@media (min-aspect-ratio: 1/1) {
  .u-sheet.buying .u-sheet-top { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; gap: 6px 8px; }
  .u-sheet.buying .u-buy { grid-column: 1; grid-row: 1; flex: none; order: 0; }
  .u-sheet.buying .u-x-in { grid-column: 2; grid-row: 1; order: 0; justify-self: end; }
  .u-sheet.buying .u-buyin { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0; align-items: center; }
  .u-sheet.buying .u-buyin > div:nth-child(2) { grid-column: 1; min-width: 0; } .u-sheet.buying .u-buyin b { font-size: 17px; line-height: 1.1; }
  .u-sheet.buying .u-buyin .u-costs { grid-column: 2; justify-content: flex-end; margin: 0; }
  .u-sheet.buying .u-buyin .u-btn { grid-row: 2; width: 100%; min-height: 46px; height: 46px; padding: 0 8px; font-size: 18px; justify-content: center; }
  .u-sheet.buying .u-buyin [data-act="home-buy"] { grid-column: 1; } .u-sheet.buying .u-buyin [data-act="home-cancel"] { grid-column: 2; }
}

/* ---------- Pošta: doručování zásilek ---------- */
.u-post-cats { grid-template-columns: 1fr 1fr; }
.u-post-card { gap: 6px; min-height: 158px; padding: 14px 12px; }
.u-post-card b { font-size: 26px; }
.u-post-badge { padding: 3px 12px; border-radius: 99px; font-family: var(--font); font-size: 12.5px; font-weight: 900; color: #fff; letter-spacing: .02em; }
.u-post-badge.easy { background: #6e9a3e; }
.u-post-badge.hard { background: #ee8133; }
.u-post-rew { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; padding: 4px 12px; border-radius: 99px; background: #fff3d6; box-shadow: 0 0 0 1.5px #f0b94a; font-family: var(--font); font-size: 14px; font-weight: 800; color: var(--ink); }
.u-post-rew .u-i { width: 18px; height: 18px; }
.u-post-rew b { font-family: var(--font-d); font-size: 18px; }
.u-post-active { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 10px 14px; border-radius: 18px; background: #e2f6e9; box-shadow: 0 0 0 2px #2ecc71; }
.u-post-active b { font-size: 16px; font-weight: 900; }
.u-post-active small { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.u-post-res { margin-bottom: 10px; padding: 9px 14px; border-radius: 16px; background: #fff3d6; box-shadow: 0 0 0 2px #f0b94a; font-size: 15px; font-weight: 700; text-align: center; }
@media (max-height: 520px) {
  .u-post-cats { grid-template-columns: 1fr 1fr !important; }
  .u-post-card { min-height: 118px; padding: 8px 8px; gap: 3px; }
  .u-post-card b { font-size: 20px; }
  .u-post-rew b { font-size: 15px; }
}

/* telefon na šířku: popisky skupin v nabídce jsou vodorovně (v úzkém bočním panelu se jinak psaly svisle) */
@media (min-aspect-ratio: 1/1) {
  .u-strip .u-gl { writing-mode: horizontal-tb; transform: none; padding: 4px 8px; justify-content: start; text-align: left; font-size: 13px; }
}
/* při otevřené nabídce domečku se upozornění (nákup apod.) ukáže nahoře ve volném místě, ne pod panelem */
body.home-open #toast { bottom: auto; top: calc(var(--safe-t, 0px) + 74px); z-index: 60; }
@media (min-aspect-ratio: 1/1) { body.home-open #toast { left: calc((100% - min(330px, 42vw)) / 2); max-width: calc(100% - min(330px, 42vw) - 24px); white-space: normal; text-align: center; } }

/* ===== Pošta: HUD doručování (nahoře uprostřed) a velký předstartovní odpočet ===== */
@keyframes u-dvin { from { opacity: 0; transform: translateY(-18px) scale(.92); } }
@keyframes u-ctpop { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 55% { transform: scale(1.18) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.u-deliv { --c: #6e9a3e; position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 18px); translate: -50% 0; z-index: 5; display: flex; align-items: center; gap: 12px; width: min(480px, calc(100vw - 580px)); min-width: 330px; padding: 8px 10px 8px 54px; border-radius: 999px; color: var(--ink); background: linear-gradient(180deg, #e9dfc6, #fff7e6); box-shadow: 0 0 0 2px #fff, inset 0 3px 5px rgba(61,52,69,.22), 0 3px 0 rgba(61,52,69,.22), var(--lift); pointer-events: auto; contain: layout style; will-change: transform; animation: u-dvin .4s var(--pop) both; }
.u-deliv[data-s="y"] { --c: #f2c230; } .u-deliv[data-s="r"] { --c: #e5383b; }
.u-dv-ico { position: absolute; left: -24px; top: 50%; translate: 0 -50%; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 4px var(--c), 0 0 0 7px #fff, 0 4px 0 7px rgba(61,52,69,.2); transition: box-shadow .2s; }
.u-deliv[data-s="r"][data-phase="run"] .u-dv-ico { animation: u-blink .8s ease-in-out infinite; }
.u-dv-em { font-style: normal; line-height: 1; filter: drop-shadow(0 2px 0 rgba(61,52,69,.2)); }
.u-dv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.u-dv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.u-dv-cp { font-family: var(--font-d); font-weight: 400; font-size: 27px; letter-spacing: .03em; line-height: 1.05; white-space: nowrap; text-shadow: 0 2px 0 rgba(255,255,255,.7); }
.u-dv-nav { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-d); font-size: 24px; letter-spacing: .03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.u-dv-nav em { font-style: normal; }
.u-dv-arr { width: 28px; height: 28px; flex: none; color: #22b55b; filter: drop-shadow(0 2px 0 rgba(61,52,69,.3)); transition: transform .12s linear; will-change: transform; }
.u-deliv[data-phase="prep"] .u-dv-arr { display: none; }
.u-dv-track { --f: 1; height: 15px; border-radius: 99px; overflow: hidden; background: rgba(61,52,69,.22); box-shadow: inset 0 2px 3px rgba(61,52,69,.3); }
.u-dv-fill { display: block; height: 100%; width: calc(var(--f) * 100%); border-radius: 99px; background: linear-gradient(180deg, rgba(255,255,255,.5) 0 30%, rgba(255,255,255,0) 30%), linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 78%, #000)); box-shadow: inset 0 -2px 0 rgba(0,0,0,.16); transition: width .2s linear, background .2s; }
.u-dv-sub { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-deliv.arm .u-dv-sub { font-size: 0; }
.u-deliv.arm .u-dv-sub::after { content: "Klepni znovu = zrušit úkol"; font-size: 12.5px; color: #c4302b; }
.u-dv-rew { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 16px 3px 6px; border-radius: 999px; font-family: var(--font-d); font-size: 32px; line-height: 1; background: linear-gradient(180deg, #ffe9a6, #f9d56a); box-shadow: 0 0 0 2px #fff, 0 3px 0 #c78d1a, var(--lift); }
.u-dv-rew .u-i { width: 36px; height: 36px; }
.u-dv-rew.hit { animation: u-coinpop .45s var(--pop); }
.u-dv-x { flex: none; width: 52px; height: 52px; min-width: 52px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #fff; background: var(--shine), linear-gradient(180deg, #ff9b8c, var(--berry)); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px #a8332a, 0 8px 12px -4px rgba(61,52,69,.5); transition: transform .12s var(--pop), box-shadow .12s; }
.u-dv-x:active { transform: translateY(3px); box-shadow: 0 0 0 3px #fff, 0 1px 0 3px #a8332a; }
.u-deliv.arm .u-dv-x { animation: u-pulse .5s ease-in-out infinite; }
.u-deliv[data-phase="prep"] .u-dv-rew { opacity: .85; }

.u-count { position: absolute; left: 50%; top: 44%; translate: -50% -50%; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; text-align: center; }
.u-ct-n { font-family: var(--font-d); font-weight: 400; font-size: 160px; line-height: 1; color: var(--sun); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 7px 0 #c78d1a, 0 16px 28px rgba(61,52,69,.5); animation: u-ctpop .55s var(--pop) both; }
.u-ct-sub { padding: 6px 24px; border-radius: 999px; font-family: var(--font-d); font-size: 27px; letter-spacing: .03em; color: var(--ink); background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 3px #fff, 0 4px 0 3px rgba(61,52,69,.2), var(--lift); white-space: nowrap; }
.is-off .u-qi { filter: grayscale(.7) opacity(.7); }

/* telefon na šířku: menší karta; na užším displeji se přesune pod pravé menu, aby nepřekrývala energii a tlačítka */
@media (pointer: coarse), (max-height: 520px) {
  .u-deliv { top: calc(env(safe-area-inset-top, 0px) + 10px); gap: 8px; padding: 6px 8px 6px 40px; width: min(400px, calc(100vw - 500px)); min-width: 270px; }
  .u-dv-ico { left: -20px; width: 54px; height: 54px; font-size: 28px; box-shadow: 0 0 0 3px var(--c), 0 0 0 5px #fff, 0 3px 0 5px rgba(61,52,69,.2); }
  .u-dv-cp { font-size: 21px; } .u-dv-nav { font-size: 19px; } .u-dv-arr { width: 22px; height: 22px; }
  .u-dv-track { height: 11px; } .u-dv-sub { font-size: 11px; } .u-deliv.arm .u-dv-sub::after { font-size: 11px; }
  .u-dv-rew { font-size: 24px; padding: 2px 12px 2px 5px; } .u-dv-rew .u-i { width: 28px; height: 28px; }
  .u-dv-x { width: 48px; height: 48px; min-width: 48px; font-size: 24px; }
  .u-ct-n { font-size: 100px; -webkit-text-stroke-width: 5px; } .u-ct-sub { font-size: 20px; padding: 4px 18px; }
  .u-count { top: 46%; }
}
@media (max-width: 760px) and (max-height: 520px) {
  .u-deliv { left: auto; right: calc(env(safe-area-inset-right, 0px) + 10px); top: calc(env(safe-area-inset-top, 0px) + 84px); translate: none; width: 300px; min-width: 0; }
}
.u-deliv .u-dv-x:hover:not(.primary) { background: var(--shine), linear-gradient(180deg, #ffb0a4, #ee5e4b); }

/* ---------- obecní úřad ---------- */
.u-modal[data-m="hall"] .u-card { --h1: #a6bcd1; --h2: #6f90b3; --hd: #4a637f; }
.u-hall .u-body { padding-bottom: 14px; }
.u-hcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.u-hcard { position: relative; min-height: 130px; text-align: center; } .u-hcard small { line-height: 1.25; padding: 0 4px; }
.u-hcard .u-qi { font-size: 48px; }
.u-halert { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--font-d); font-size: 18px; color: #fff; background: #e5383b; box-shadow: 0 0 0 3px #fff, 0 3px 0 3px #a82626; animation: u-qpulse .6s ease-in-out infinite alternate; }
.u-hback { margin: 0 0 10px; min-height: 40px; padding: 6px 16px; border-radius: 99px; font-size: 16px; background: linear-gradient(180deg, #fffdf4, var(--cream)); color: var(--ink); box-shadow: 0 0 0 2px rgba(61,52,69,.2), 0 3px 0 rgba(61,52,69,.2); display: inline-flex; align-items: center; gap: 6px; }
.u-hback svg { width: 1.1em; height: 1.1em; }
.u-prow { gap: 12px; } .u-prow > div { flex: 1; min-width: 0; } .u-prow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-prow.me { background: #fff3d6; }
.u-pface { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(61,52,69,.15), 0 3px 0 5px rgba(61,52,69,.12); }
.u-pface .u-face { display: block; width: 100%; height: 100%; border-radius: 50%; }
.u-on { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; background: #b8b0a2; box-shadow: 0 0 0 3px #fff; } .u-on.on { background: #4fc23a; }
.u-ptr { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 99px; background: #fff3d6; box-shadow: 0 0 0 2px #f0b94a; font-size: 18px; } .u-ptr b { font-size: 20px; display: inline; }
.u-pme { flex: none; font-size: 14px; font-weight: 800; color: var(--ink-2); padding: 0 8px; }
.u-pvisit { flex: none; min-height: 44px; padding: 6px 16px; font-size: 17px; }
.u-bsec { margin-bottom: 14px; } .u-bsec h3 { margin: 0 0 8px; font-family: var(--font-d); font-weight: 400; font-size: 22px; letter-spacing: .03em; color: var(--ink); } .u-bsec h3 span { font-size: 16px; color: var(--ink-2); margin-left: 6px; }
.u-bsec:last-child { margin-bottom: 0; }
.u-dq { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 26px; background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 3px #6f90b3, 0 5px 0 rgba(61,52,69,.22); }
.u-dq.done { box-shadow: 0 0 0 3px #f5a623, 0 0 20px 3px rgba(255,190,60,.5), 0 5px 0 rgba(61,52,69,.22); } .u-dq.claimed { box-shadow: 0 0 0 3px #78b04a, 0 5px 0 rgba(61,52,69,.22); background: #eef6dc; }
.u-dq-ico { flex: none; width: 92px; height: 92px; display: grid; place-items: center; font-size: 54px; border-radius: 26px; background: linear-gradient(180deg, #f7ebd4, #9cb4cc); box-shadow: inset 0 -5px 0 rgba(0,0,0,.12), 0 0 0 3px #fff; }
.u-dq-body { flex: 1; min-width: 0; } .u-dq-body > small { font-size: 13px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.u-dq h3 { margin: 2px 0 10px; font-family: var(--font-d); font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: .02em; }
.u-dq-bar { position: relative; height: 26px; border-radius: 99px; background: #e8e0d0; box-shadow: inset 0 2px 3px rgba(61,52,69,.25); overflow: hidden; }
.u-dq-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(180deg, #a0c8d5, #6eaac2); transition: width .4s; } .u-dq.done .u-dq-bar i { background: linear-gradient(180deg, #ffd666, #f0a820); } .u-dq.claimed .u-dq-bar i { background: linear-gradient(180deg, #b4de7a, #5f9a38); }
.u-dq-bar span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-d); font-size: 16px; color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.u-dq-barrow { display: flex; align-items: center; gap: 12px; } .u-dq-barrow .u-dq-bar { flex: 1; min-width: 0; } .u-dq-prize { flex: none; font-size: 18px; }   /* odměna stojí na konci lišty, lišta se plní směrem k ní */
.u-dq-rew { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .u-dq-rew small { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.u-dq-rew .u-chip { color: var(--ink); background: rgba(61,52,69,.09); box-shadow: none; }
.u-dq-note { margin: 10px 0 0; font-size: 15px; font-weight: 800; color: var(--ink-2); }
.u-pf-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.u-pf-in { flex: 1 1 160px; min-height: 42px; padding: 6px 14px; border-radius: 14px; border: 0; font: inherit; font-size: 17px; font-weight: 800; color: var(--ink); background: #fffdf4; box-shadow: 0 0 0 2px rgba(61,52,69,.25); }
.u-pf-in:disabled { opacity: .55; }
.u-dq-claim { margin-top: 10px; min-height: 50px; padding: 8px 22px; font-size: 21px; animation: u-qpulse .7s ease-in-out infinite alternate; }
@media (max-width: 640px) { .u-hcards { grid-template-columns: 1fr; } .u-hcard { min-height: 100px; } .u-dq { flex-direction: column; text-align: center; } .u-dq-rew { justify-content: center; } }
@media (max-height: 520px) {
  .u-hcards { grid-template-columns: repeat(4, 1fr); gap: 8px; } .u-hcard { min-height: 110px; } .u-hcard .u-qi { font-size: 36px; } .u-hcard b { font-size: 17px; } .u-hcard small { font-size: 11.5px; }
  .u-modal[data-m="hall"] .u-card { width: min(820px, 100%); }
  .u-plist, .u-bsec .u-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .u-prow { padding: 6px 10px; gap: 8px; } .u-pface { width: 42px; height: 42px; } .u-ptr { padding: 2px 8px; font-size: 15px; } .u-ptr b { font-size: 16px; } .u-pvisit { min-height: 36px; padding: 4px 10px; font-size: 14px; } .u-pme { font-size: 12px; }
  .u-dq { padding: 8px 12px; gap: 12px; } .u-dq-ico { width: 64px; height: 64px; font-size: 38px; border-radius: 18px; } .u-dq h3 { font-size: 20px; margin-bottom: 6px; } .u-dq-bar { height: 22px; } .u-dq-claim { min-height: 40px; font-size: 17px; margin-top: 6px; }
  .u-hback { min-height: 34px; padding: 3px 12px; font-size: 14px; margin-bottom: 6px; } .u-bsec h3 { font-size: 18px; margin-bottom: 6px; }
}

/* úkoly: písmenka UHELNÁ PŘÍBRAM */
.u-lq { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 26px; background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 3px #b070cc, 0 5px 0 rgba(61,52,69,.22); }
.u-lq.done { box-shadow: 0 0 0 3px #78b04a, 0 5px 0 rgba(61,52,69,.22); background: #eef6dc; }
.u-lq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.u-lq-head small { font-size: 13px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.u-lq-head h3 { margin: 2px 0 0; font-family: var(--font-d); font-weight: 400; font-size: 25px; line-height: 1.15; }
.u-lq-head .u-chip { flex: none; color: var(--ink); background: rgba(61,52,69,.09); box-shadow: none; }
.u-lq-desc { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.u-lwords { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; padding: 8px 4px; }
.u-lword { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.u-ltile { width: 42px; height: 48px; display: grid; place-items: center; border-radius: 13px; font-family: var(--font-d); font-size: 26px; letter-spacing: .02em; color: rgba(61,52,69,.32); background: rgba(61,52,69,.06); border: 2px dashed rgba(61,52,69,.24); transition: transform .2s var(--pop); }
.u-ltile.got { color: #fff; border: 0; text-shadow: 0 2px 0 #b85d12; background: var(--shine), linear-gradient(180deg, #ffe14d, #f5a623 60%, #ee6c1f); box-shadow: 0 0 0 2px #fff, 0 4px 0 2px #b85d12, 0 6px 12px -4px rgba(238,108,31,.55); transform: translateY(-2px); }
.u-lq-sw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(61,52,69,.25); flex: none; }
.u-modal[data-m="quests"] .u-card { width: min(720px, 100%); }
.u-quests-list { display: flex; flex-direction: column; }
.u-curio-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.u-curio-tag { font-size: 13.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(61,52,69,.07); color: var(--ink); }
.u-qhint { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: rgba(61,52,69,.05); font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 4px; }
.u-qhint-i { font-size: 22px; flex: none; }
.u-race-qacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
@media (max-height: 520px) {
  .u-lq { padding: 10px 14px; gap: 8px; }
  .u-lq-head h3 { font-size: 20px; }
  .u-ltile { width: 34px; height: 38px; font-size: 20px; border-radius: 10px; }
  .u-lwords { gap: 8px 14px; padding: 4px 2px; }
}

.u-crystal-card { box-shadow: 0 0 0 3px #bb6bd9, 0 5px 0 rgba(61,52,69,.22); }
.u-crystal-card.done { box-shadow: 0 0 0 3px #78b04a, 0 5px 0 rgba(61,52,69,.22); background: linear-gradient(180deg, #ffffff 0%, #f3faec 100%); }
/* 4 krystaly bez popisků: nenalezený je šedý, nalezený barevný */
.u-cr-list { display: flex; justify-content: center; gap: clamp(14px, 4vw, 34px); margin: 4px 0 2px; }
.u-cr-gem { display: inline-flex; align-items: center; justify-content: center; flex: none; transition: filter .25s; filter: grayscale(1) brightness(1.35) opacity(.5); }
.u-cr-gem svg { width: 56px; height: 56px; }
.u-cr-gem.got { filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
@media (max-height: 520px) { .u-cr-gem svg { width: 42px; height: 42px; } }

/* ---------- Batoh: Foťák + Album + režim fotografování ---------- */
.u-cam-tab { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 16px 20px; color: var(--ink-2); }
.u-cam-tab h3 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 25px; letter-spacing: .03em; color: var(--ink); }
.u-cam-tab p { margin: 0; max-width: 440px; font-weight: 600; line-height: 1.45; }
.u-cam-go { margin-top: 6px; min-height: 54px; padding: 10px 28px; font-size: 20px; }
.u-cam-tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin-top: 6px; font-size: 13px; font-weight: 700; }
.u-cam-tips span { padding: 5px 12px; border-radius: 999px; background: rgba(61,52,69,.08); color: var(--ink-2); }
.u-cam-tips b { color: var(--ink); font-weight: 900; }

.u-al-bar { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.u-al-bar b { font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: 999px; background: rgba(61,52,69,.09); color: var(--ink); }
.u-al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; padding: 2px; }
.u-al-card { display: flex; flex-direction: column; padding: 3px; gap: 0; border-radius: 14px; border: 0; text-align: left; background: #fff;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(61,52,69,.1), 0 5px 0 3.5px rgba(61,52,69,.12); }
.u-al-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 11px; overflow: hidden; background: linear-gradient(135deg, #eae4d7, #efe6cc); }
.u-al-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.u-al-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 4px 2px; font-size: 12.5px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.u-al-meta i { font-style: normal; padding: 1px 8px; border-radius: 999px; background: rgba(238,129,51,.16); color: var(--orange-d); font-size: 11px; font-weight: 900; }
.u-al-cta { margin-top: 14px; }
@media (max-height: 520px) {
  .u-cam-tab { padding: 12px 12px 14px; gap: 6px; }
  .u-al-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
}

body.photo-mode #uLeft,
body.photo-mode #uRight,
body.photo-mode #mapwrap,
body.photo-mode #nearest,
body.photo-mode #counters,
body.photo-mode #help,
body.photo-mode #act,
body.photo-mode #tRun,
body.photo-mode #tMeow,
body.photo-mode #tEdit,
body.photo-mode #tAct,
body.photo-mode #tJump { display: none !important; }

#photoHud { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.p-grid { position: absolute; inset: 18px; border-radius: 16px; border: 1.5px solid rgba(255,255,255,.55);
  box-shadow: 0 0 0 1px rgba(43,34,50,.28), inset 0 0 0 1px rgba(43,34,50,.22);
  background-image:
    linear-gradient(to right, transparent calc(33.333% - 1.5px), rgba(43,34,50,.26) calc(33.333% - 1px), rgba(255,255,255,.72) 33.333%, rgba(43,34,50,.26) calc(33.333% + 1px), transparent calc(33.333% + 1.5px)),
    linear-gradient(to right, transparent calc(66.666% - 1.5px), rgba(43,34,50,.26) calc(66.666% - 1px), rgba(255,255,255,.72) 66.666%, rgba(43,34,50,.26) calc(66.666% + 1px), transparent calc(66.666% + 1.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 1.5px), rgba(43,34,50,.26) calc(33.333% - 1px), rgba(255,255,255,.72) 33.333%, rgba(43,34,50,.26) calc(33.333% + 1px), transparent calc(33.333% + 1.5px)),
    linear-gradient(to bottom, transparent calc(66.666% - 1.5px), rgba(43,34,50,.26) calc(66.666% - 1px), rgba(255,255,255,.72) 66.666%, rgba(43,34,50,.26) calc(66.666% + 1px), transparent calc(66.666% + 1.5px)); }
.p-reticle { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; transform: translate(-50%, -50%); border-radius: 10px;
  border: 2px solid rgba(255,255,255,.78); box-shadow: 0 0 0 1.5px rgba(43,34,50,.35), inset 0 0 0 1.5px rgba(43,34,50,.28); opacity: .82; }
.p-reticle::before, .p-reticle::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,.9); box-shadow: 0 0 2px rgba(43,34,50,.7); }
.p-reticle::before { width: 12px; height: 2px; }
.p-reticle::after { width: 2px; height: 12px; }
.p-corners i { position: absolute; width: 46px; height: 46px; border: 4.5px solid #fff; filter: drop-shadow(0 0 3px rgba(43,34,50,.75)); }
.p-corners i:nth-child(1) { top: calc(env(safe-area-inset-top, 0px) + 16px); left: calc(env(safe-area-inset-left, 0px) + 16px); border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.p-corners i:nth-child(2) { top: calc(env(safe-area-inset-top, 0px) + 16px); right: calc(env(safe-area-inset-right, 0px) + 16px); border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.p-corners i:nth-child(3) { bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); left: calc(env(safe-area-inset-left, 0px) + 16px); border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.p-corners i:nth-child(4) { bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); right: calc(env(safe-area-inset-right, 0px) + 16px); border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.p-flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.p-flash.go { animation: p-flash .32s ease-out both; }
@keyframes p-flash { from { opacity: .92; } to { opacity: 0; } }

.p-top { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); left: calc(env(safe-area-inset-left, 0px) + 16px); right: calc(env(safe-area-inset-right, 0px) + 16px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-badge { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: rgba(43,34,50,.68); color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.28), inset 0 0 0 1.5px rgba(255,255,255,.24); }
.p-badge .u-i { width: 20px; height: 20px; color: var(--sun); }
.p-badge b { font-variant-numeric: tabular-nums; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 14px; }
.p-close { position: static; pointer-events: auto; }

.p-controls { position: absolute; right: calc(env(safe-area-inset-right, 0px) + 22px); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); display: flex; align-items: center; gap: 14px; pointer-events: none; }
.p-zoom { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); pointer-events: auto; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(43,34,50,.7); box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 0 0 1.5px rgba(255,255,255,.22); }
.p-zb, .p-zp { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 0; box-shadow: none; background: transparent; color: #fff; font-size: 15px; font-weight: 800; display: grid; place-items: center; }
.p-zb:hover:not(.primary), .p-zp:hover:not(.primary) { background: rgba(255,255,255,.16); }
.p-zp.sel { background: linear-gradient(180deg, #ffd569, var(--sun)); color: var(--ink); box-shadow: 0 2px 0 #c78d1a; }
.p-shutter-row { display: flex; align-items: center; gap: 12px; pointer-events: none; }
.p-flip { position: fixed; left: calc(env(safe-area-inset-left, 0px) + 22px); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); pointer-events: auto; width: 82px; height: 82px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #fff;
  background: rgba(43,34,50,.72); border: 2px solid rgba(255,255,255,.55); box-shadow: 0 6px 16px rgba(0,0,0,.38); }
.p-flip:hover:not(.primary) { background: rgba(65,52,75,.86); }
.p-flip.sel { background: linear-gradient(180deg, #f9a050, var(--orange)); border-color: #fff; box-shadow: 0 0 0 3px rgba(245,189,58,.55), 0 6px 16px rgba(0,0,0,.38); }
.p-shutter { pointer-events: auto; width: 82px; height: 82px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 32px; color: var(--ink);
  background: linear-gradient(180deg, #fffdf4, #efe6cc); border: 4px solid var(--paper);
  box-shadow: 0 0 0 4px rgba(43,34,50,.55), 0 6px 18px rgba(0,0,0,.45); }
.p-shutter:hover:not(.primary) { background: #fff; }
.p-shutter:active { transform: scale(.93); box-shadow: 0 0 0 4px rgba(43,34,50,.55), 0 2px 8px rgba(0,0,0,.45); }
.p-hint { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); transform: translateX(-50%); padding: 6px 16px; border-radius: 999px;
  background: rgba(43,34,50,.62); color: rgba(255,255,255,.92); font-size: 13px; font-weight: 700; white-space: nowrap; }
@media (pointer: coarse) {
  .p-hint { display: none; }
  .p-controls { right: calc(env(safe-area-inset-right, 0px) + 18px); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); gap: 10px; }
  .p-shutter { width: 76px; height: 76px; font-size: 28px; }
  .p-flip { width: 76px; height: 76px; font-size: 28px; left: calc(env(safe-area-inset-left, 0px) + 18px); bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); }
}
@media (max-width: 680px) {
  .p-controls { flex-direction: column-reverse; align-items: flex-end; gap: 10px; }
}
@media (pointer: coarse) { .p-zoom { bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); } }

dialog.p-dlg { border: 0; padding: 0; margin: auto; max-width: min(820px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: transparent; overflow: visible; }
dialog.p-dlg[open] { display: flex; align-items: center; justify-content: center; animation: u-in .28s var(--pop) both; }
dialog.p-dlg:modal { overscroll-behavior: contain; }
dialog.p-dlg::backdrop { overflow: hidden; overscroll-behavior: contain; background: radial-gradient(ellipse at center, rgba(75,53,82,.45), rgba(38,29,42,.82)); }
.p-dlg-card { position: relative; width: 100%; max-height: calc(100dvh - 24px); display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px;
  border-radius: 28px; background: var(--paper); border: 1.5px solid rgba(255,255,255,.85); box-shadow: var(--edge), 0 24px 50px -14px rgba(61,52,69,.75); }
.p-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 54px; }
.p-dlg-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 900; color: var(--ink); }
.p-dlg-head h2 .u-i { color: var(--orange); }
.p-frame { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #2b2232; border-radius: 18px; padding: 6px; box-shadow: inset 0 2px 6px rgba(0,0,0,.35); overflow: hidden; }
.p-img { display: block; max-width: 100%; max-height: min(60dvh, 480px); width: auto; height: auto; border-radius: 12px; object-fit: contain; }
.p-dlg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.p-save[disabled] { opacity: .65; cursor: progress; }
.u-adlg-frame { position: relative; touch-action: pan-y; user-select: none; overflow: hidden; }
.u-adlg-frame .u-adlg-img { will-change: transform; -webkit-user-drag: none; }
.u-adlg::backdrop { background: rgba(14,10,20,.88); }
.u-adlg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(43,34,50,.68); color: #fff; border: 2px solid rgba(255,255,255,.65); box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.u-adlg-nav:hover:not(.primary) { background: rgba(65,52,75,.9); transform: translateY(-50%) scale(1.06); }
.u-adlg-nav:active { transform: translateY(-50%) scale(.95); }
.u-adlg-prev { left: 12px; }
.u-adlg-next { right: 12px; }
.u-adlg-ask { margin: 0; min-height: 1.3em; text-align: center; font-size: 14px; font-weight: 800; color: var(--red); visibility: hidden; }
.u-adlg-ask.show { visibility: visible; }
.u-adlg-yes { background: linear-gradient(180deg, #ff8a86, #e5383b); color: #fff; box-shadow: 0 0 0 2px #fff, 0 3px 0 2px #a82626; }
.u-adlg-yes:hover:not(.primary) { background: linear-gradient(180deg, #ff9995, #eb4649); }
@media (max-height: 520px) {
  .p-dlg-card { padding: 10px 14px 12px; gap: 8px; }
  .p-dlg-head h2 { font-size: 19px; }
  .p-img { max-height: 54dvh; }
  .u-adlg-ask { font-size: 12.5px; }
}

/* ---------- Skateboardový závod + Top 10 žebříček ---------- */
.u-modal[data-m="race"] .u-card { --h1: #ffb36b; --h2: #eb5e28; --hd: #a83710; }
.u-deliv[data-kind="race"] .u-dv-arr { color: #ff7b29; }
.u-deliv[data-kind="race"] .u-dv-cp { font-variant-numeric: tabular-nums; }
.u-race-info { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 12px 16px; border-radius: 20px; background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 2px #f0b94a, 0 4px 0 rgba(61,52,69,.16); }
.u-race-info b { font-size: 17px; color: var(--ink); }
.u-race-info small { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); line-height: 1.35; }
.u-race-go { flex: none; min-height: 48px; padding: 8px 20px; font-size: 18px; }
.u-race-res { font-size: 16px; }
.u-race-lb h3 { margin: 4px 0 8px; }
.u-race-list { display: flex; flex-direction: column; gap: 6px; }
.u-race-row { gap: 12px; padding: 8px 14px; }
.u-race-row.me { background: #fff3d6; }
.u-race-row.just { box-shadow: 0 0 0 2.5px #eb5e28, 0 3px 0 rgba(61,52,69,.2); }
.u-race-rank { flex: none; width: 34px; text-align: center; font-family: var(--font-d); font-size: 22px; color: var(--ink); }
.u-race-who { flex: 1; min-width: 0; }
.u-race-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-race-time { flex: none; font-family: var(--font-d); font-size: 23px; letter-spacing: .03em; font-variant-numeric: tabular-nums; color: #b84208; }
@media (max-width: 640px) { .u-race-info { flex-direction: column; align-items: stretch; text-align: center; } }
@media (max-height: 520px) {
  .u-race-info { padding: 8px 12px; gap: 10px; margin-bottom: 8px; }
  .u-race-info small { font-size: 12px; }
  .u-race-go { min-height: 40px; padding: 6px 14px; font-size: 15px; }
  .u-race-row { padding: 5px 10px; }
  .u-race-rank { width: 28px; font-size: 18px; }
  .u-race-time { font-size: 19px; }
}

/* ---------- Denní odměna za přihlášení ---------- */
.u-bar .u-ib.u-lr-hud { --c1: #ffaa96; --c2: #e85642; --cd: #a8332a; }
.u-modal[data-m="loginrew"] .u-card { --h1: #ffd46b; --h2: #ee8133; --hd: #a84910; }
.u-lr-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.u-lr-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 10px; border-radius: 22px; background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(61,52,69,.12), 0 4px 0 3.5px rgba(61,52,69,.12); text-align: center; }
.u-lr-d { font-family: var(--font-d); font-size: 17px; letter-spacing: .03em; color: var(--ink-2); }
.u-lr-rew { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; }
.u-lr-coins, .u-lr-pack { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-d); font-size: 24px; color: var(--ink); }
.u-lr-coins .u-i { width: 28px; height: 28px; }
.u-lr-pack { --g1: #d98a52; --g2: #ee8133; --g3: #f5bd3a; font-size: 20px; color: #9c3d12; }
.u-lr-pack .u-i { width: 32px; height: 32px; }
.u-lr-day small { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.u-lr-day.grand { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; padding: 14px 20px; background: linear-gradient(135deg, #fff6d0, #ffe299 55%, #fff6d0); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #e8a825, 0 5px 0 3.5px #b57510; }
.u-lr-day.grand .u-lr-d { font-size: 21px; color: #8c4b0c; }
.u-lr-day.done { background: #e9f1d6; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #78b04a, 0 4px 0 3px #4e7d2c; }
.u-lr-day.done .u-lr-d, .u-lr-day.done small { color: #3e6b22; }
.u-lr-day.cur { background: linear-gradient(180deg, #fff8d6, #ffe99e); box-shadow: 0 0 0 3px #fff, 0 0 0 6px #f5a623, 0 0 22px 4px rgba(245,189,58,.55), 0 5px 0 5px #c78d1a; }
.u-lr-day.cur .u-lr-d { color: #b84208; }
.u-lr-day.cur small { color: #b84208; padding: 2px 10px; border-radius: 99px; background: rgba(238,129,51,.18); }
.u-lr-foot { display: flex; justify-content: center; margin-top: 14px; }
.u-lr-btn { min-height: 56px; padding: 10px 28px; font-size: 22px; animation: u-qpulse .7s ease-in-out infinite alternate; }
.u-lr-btn .u-coin { width: 1.25em; height: 1.25em; }
.u-lr-done { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
.u-lr-done-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: #e9f1d6; color: #3e6b22; font-family: var(--font-d); font-size: 18px; box-shadow: inset 0 0 0 2px #78b04a; }
.u-lr-done-badge .u-i { width: 20px; height: 20px; }

.u-lr-banner { position: relative; width: 100%; margin-top: 12px; padding: 12px 18px; border-radius: 22px; border: 0; display: flex; align-items: center; gap: 14px; text-align: left; color: var(--ink); background: linear-gradient(180deg, #fff8dc, #ffe7a3); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #e8a825, 0 4px 0 3.5px #b57510; }
.u-lr-banner.claim { background: linear-gradient(180deg, #fff4cc, #ffd875); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #ee8133, 0 4px 0 3.5px #a84910; }
.u-lr-bico { flex: none; font-size: 34px; line-height: 1; }
.u-lr-banner b { display: block; font-size: 19px; letter-spacing: .02em; }
.u-lr-banner small { display: block; font-family: var(--font); font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 520px) {
  .u-lr-grid { grid-template-columns: repeat(3, 1fr); }
  .u-lr-day.grand { flex-direction: column; padding: 12px 10px; }
}
@media (max-height: 520px) {
  .u-lr-grid { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .u-lr-day { padding: 7px 6px; gap: 3px; border-radius: 16px; }
  .u-lr-d { font-size: 14px; }
  .u-lr-coins, .u-lr-pack { font-size: 18px; gap: 4px; }
  .u-lr-coins .u-i { width: 20px; height: 20px; }
  .u-lr-pack { font-size: 15px; } .u-lr-pack .u-i { width: 22px; height: 22px; }
  .u-lr-day small { font-size: 10.5px; }
  .u-lr-day.grand { grid-column: 1 / -1; flex-direction: row; padding: 7px 14px; }
  .u-lr-day.grand .u-lr-d { font-size: 14px; }
  .u-lr-foot { margin-top: 10px; }
  .u-lr-btn { min-height: 44px; padding: 6px 20px; font-size: 18px; }
  .u-lr-banner { margin-top: 8px; padding: 8px 12px; gap: 10px; border-radius: 18px; }
  .u-lr-bico { font-size: 26px; } .u-lr-banner b { font-size: 16px; } .u-lr-banner small { font-size: 12px; }
}

/* ---------- Okno rozbaleného dárečku z návštěvy (<dialog>) ---------- */
dialog.u-gdlg { border: 0; padding: 0; margin: auto; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: transparent; overflow: visible; }
dialog.u-gdlg[open] { display: flex; flex-direction: column; animation: u-in .32s var(--pop) both; }
dialog.u-gdlg:modal { overscroll-behavior: contain; }
dialog.u-gdlg::backdrop { overflow: hidden; overscroll-behavior: contain; background: radial-gradient(ellipse at center, rgba(75,53,82,.45), rgba(38,29,42,.78)); }
.u-gdlg-card { position: relative; border-radius: 32px; background: var(--paper); overflow: hidden; box-shadow: var(--kit-ring), var(--kit-edge), 0 34px 60px -18px rgba(61,52,69,.78); text-align: center; }
.u-gdlg-head { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; color: #fff; background: var(--shine), linear-gradient(180deg, #ff9eb5, #e5507a); box-shadow: inset 0 -5px 0 rgba(0,0,0,.15); }
.u-gdlg-head h2 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 30px; letter-spacing: .04em; text-shadow: 0 3px 0 #a8264c; }
.u-gdlg-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 22px 20px; }
.u-gdlg-from { display: inline-flex; align-items: center; gap: 6px; padding: 5px 16px; border-radius: 999px; background: rgba(61,52,69,.08); font-size: 15px; font-weight: 800; color: var(--ink-2); }
.u-gdlg-from b { color: var(--ink); font-weight: 900; }
.u-gdlg-rew { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 14px 18px; border-radius: 24px; background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 3px #f0b94a, 0 5px 0 rgba(61,52,69,.16); }
.u-gdlg-ico { font-size: 72px; line-height: 1.05; filter: drop-shadow(0 6px 6px rgba(61,52,69,.2)); animation: u-qpop .45s var(--pop) both; }
.u-gdlg-ico .u-i { width: 72px; height: 72px; }
.u-gdlg-name { margin: 2px 0 0; font-family: var(--font-d); font-weight: 400; font-size: 30px; letter-spacing: .03em; color: var(--ink); }
.u-gdlg-note { margin: 0; font-size: 14.5px; font-weight: 800; color: var(--ink-2); line-height: 1.35; }
.u-gdlg-act { margin-top: 6px; }
@media (max-height: 520px) {
  .u-gdlg-head { padding: 10px 20px; } .u-gdlg-head h2 { font-size: 24px; }
  .u-gdlg-body { padding: 12px 18px 14px; gap: 8px; }
  .u-gdlg-rew { padding: 10px 14px; }
  .u-gdlg-ico { font-size: 52px; } .u-gdlg-ico .u-i { width: 52px; height: 52px; }
  .u-gdlg-name { font-size: 24px; }
}

/* ---------- Závod na okruhu (modal + decentní pozvánka do MP lobby) ---------- */
.u-modal[data-m="circuit"] .u-card { --h1: #86c4cc; --h2: #54929f; --hd: #37606b; }
.u-deliv[data-kind="circuit"] .u-dv-arr { color: #62b5c0; }
.u-deliv[data-kind="circuit"] .u-dv-cp { font-variant-numeric: tabular-nums; }
.u-ctabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.u-csec { margin-bottom: 12px; }
.u-clabel { font-size: 13px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.u-crow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.u-clap { flex-direction: column; gap: 2px; padding: 8px 10px; min-height: 52px; }
.u-clap b { font-size: 17px; }
.u-clap small { font-size: 12px; opacity: .85; font-weight: 700; }
.u-ccol { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; min-height: 46px; }
.u-ccol.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5.5px #54929f, 0 4px 0 5px #37606b; background: #fbf5e8; }
.u-cdot { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-family: var(--font-d); font-size: 16px; box-shadow: 0 0 0 2px #fff, 0 2px 0 rgba(61,52,69,.3); }
.u-cacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; justify-content: space-between; }
.u-clb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.u-clb-head h3 { margin: 0; }
.u-clb-tabs { display: flex; gap: 6px; }
.u-sm { min-height: 34px; padding: 4px 12px; font-size: 14px; }

/* Decentní upozornění na MP závod v pravém horním rohu pod HUD (neblokuje hru) */
.u-cinv { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 74px); right: calc(env(safe-area-inset-right, 0px) + 14px); z-index: 16; pointer-events: auto;
  display: flex; align-items: center; gap: 12px; max-width: min(390px, calc(100vw - 28px)); padding: 10px 14px; border-radius: 20px;
  background: rgba(255, 253, 244, .97);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #54929f, 0 8px 20px -4px rgba(43,34,50,.38); animation: u-in .26s var(--pop) both; }
.u-cinv[hidden] { display: none; }
.u-cinv-txt { flex: 1; min-width: 0; }
.u-cinv-txt b { display: block; font-size: 15px; color: var(--ink); line-height: 1.2; }
.u-cinv-txt small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); line-height: 1.25; }
.u-cinv-acts { display: flex; gap: 6px; flex: none; }
@media (max-width: 640px) {
  .u-crow { grid-template-columns: 1fr; }
  .u-cinv { flex-direction: column; align-items: stretch; gap: 8px; }
  .u-cinv-acts { justify-content: flex-end; }
}

/* Finální tabulka po dojetí závodu na okruhu */
.u-cfin-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 12px; padding: 16px 18px; border-radius: 24px;
  background: linear-gradient(180deg, #fffdf4, var(--cream)); box-shadow: 0 0 0 3px #54929f, 0 5px 0 rgba(61,52,69,.18); }
.u-cfin-hero.win { background: linear-gradient(180deg, #fff9dc, #ffebb0); box-shadow: 0 0 0 3px #f0a820, 0 0 22px 2px rgba(245,189,58,.45), 0 5px 0 rgba(61,52,69,.18); }
.u-cfin-badge { font-size: 46px; line-height: 1; }
.u-cfin-title { font-family: var(--font-d); font-size: 26px; letter-spacing: .03em; color: var(--ink); }
.u-cfin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 4px; }
.u-cfin-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 12px; border-radius: 18px; background: rgba(255,255,255,.78); box-shadow: 0 0 0 2px rgba(61,52,69,.12); }
.u-cfin-stat small { font-size: 12.5px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.u-cfin-stat b { font-family: var(--font-d); font-size: 30px; font-variant-numeric: tabular-nums; color: #b84208; line-height: 1.1; }
.u-cfin-stat.rew b { color: #2d7d2e; }
.u-cfin-stat span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.u-cfin-pb, .u-cfin-trophy { padding: 6px 14px; border-radius: 999px; background: rgba(245,189,58,.28); font-size: 14px; font-weight: 800; color: #7a4208; }
.u-cfin-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; }
@media (max-width: 520px) { .u-cfin-stats { grid-template-columns: 1fr; } }

/* výběr fotky z alba na obraz v domečku */
.u-pdlg { width: min(720px, 94vw); }
.u-pdlg-body { flex: 1; min-height: 0; max-height: min(58dvh, 440px); overflow: auto; padding: 2px; }

/* jednoduchá navigace k značce z mapy: šipka uprostřed obrazovky + vzdálenost */
#navArrow { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 20; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#navArrow[hidden] { display: none; }
#navArrow svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); will-change: transform; }
#navArrow b { font: 900 14px "Trebuchet MS", sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }

/* ===== Jednotná karta úkolu (menu Úkoly): vlevo ikonka úkolu, nahoře uprostřed nadpis, vpravo dlaždice stejné velikosti s odměnou ===== */
.u-qc { --qt: 92px; --qc: #b070cc; display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 12px; border-radius: 24px; background: linear-gradient(180deg, #ffffff, #fbf8ee); box-shadow: 0 0 0 3px var(--qc), 0 5px 0 rgba(61,52,69,.22); }
.u-qc.u-crystal-card { --qc: #bb6bd9; }
.u-qc.done { --qc: #f5a623; box-shadow: 0 0 0 3px #f5a623, 0 0 18px 3px rgba(255,190,60,.45), 0 5px 0 rgba(61,52,69,.22); }
.u-qc.claimed { --qc: #78b04a; background: #eef6dc; box-shadow: 0 0 0 3px #78b04a, 0 5px 0 rgba(61,52,69,.22); }
.u-qc-tile { flex: none; width: var(--qt); height: var(--qt); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: inset 0 -5px 0 rgba(0,0,0,.12), 0 0 0 3px #fff; }
.u-qc-ico { font-size: 52px; line-height: 1; background: linear-gradient(180deg, #ffe27a, #ffb931); }
.u-qc-rew { gap: 2px; padding: 4px; background: linear-gradient(180deg, #fff6d6, #ffe7a0); color: var(--ink); }
.u-qc-ri { font-size: 30px; line-height: 1; display: inline-flex; } .u-qc-ri svg { width: 32px; height: 32px; }
.u-qc-rew b { font-family: var(--font-d); font-weight: 400; font-size: 22px; line-height: 1.1; }
.u-qc-rew small { font-size: 10.5px; font-weight: 800; line-height: 1.15; color: var(--ink-2); display: block; }
.u-qc-rew .u-lq-sw { display: inline-block; width: 11px; height: 11px; vertical-align: -1px; }
.u-qc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.u-qc-body h3 { margin: 0; text-align: center; font-family: var(--font-d); font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: .02em; color: #59306b; }
.u-qc-body .u-dq-bar { width: 100%; }
.u-qc-body .u-lwords, .u-qc-body .u-curio-tags, .u-qc-body .u-race-qacts { justify-content: center; }
.u-qc-note { margin: 0; text-align: center; font-size: 14px; font-weight: 800; color: var(--ink-2); }
.u-qc-body .u-dq-claim { margin: 0 auto; }
@media (max-height: 520px), (max-width: 640px) {
  .u-qc { --qt: 64px; gap: 10px; padding: 8px 12px; margin-bottom: 8px; border-radius: 20px; }
  .u-qc-tile { border-radius: 16px; } .u-qc-ico { font-size: 36px; }
  .u-qc-ri { font-size: 20px; } .u-qc-ri svg { width: 22px; height: 22px; } .u-qc-rew b { font-size: 17px; } .u-qc-rew small { font-size: 8.5px; }
  .u-qc-body { gap: 5px; } .u-qc-body h3 { font-size: 19px; } .u-qc-body .u-dq-bar { height: 22px; }
}
.u-qc-rew .u-qc-ri:only-child { font-size: 52px; } .u-qc-rew .u-qc-ri:only-child svg, .u-qc-rew .u-qc-ri:only-child img { width: 54px; height: 54px; }
.u-qc .u-ltile.got { color: #fff; background: var(--shine), linear-gradient(180deg, #ffb35c, #f5821f 60%, #e0650f) !important; box-shadow: 0 0 0 2px #fff, 0 4px 0 2px #b85d12 !important; }   /* nalezená písmenka mají oranžový podklad */
.u-qc-rew:has(> .u-qc-ri:only-child) .u-qc-ri { font-size: 52px; }   /* dlaždice jen s ikonkou (dárek, skin = hlava kočky) */
.u-qc > .u-qc-rew + .u-qc-rew { margin-left: -6px; }
.u-grade button { min-height: 38px !important; font-size: 16px; }   /* nastavení: boxy s třídami lehce nižší */
.u-info { margin-top: 8px; padding: 10px 16px; border-radius: 16px; background: rgba(61,52,69,.06); font-size: 15px; font-weight: 600; line-height: 1.4; }
.u-info h3 { margin: 0 0 4px; font-family: var(--font-d); font-weight: 400; font-size: 20px; letter-spacing: .04em; }
.u-info p { margin: 0 0 6px; } .u-info p:last-child { margin-bottom: 0; }
.u-modal[data-m="settings"] .u-body > .u-info { grid-column: 1 / -1; }

/* stránka Informace */
.u-infopage { display: flex; flex-direction: column; gap: 14px; }
.u-infopage section { padding: 12px 16px; border-radius: 18px; background: rgba(61,52,69,.06); }
.u-infopage h3 { margin: 0 0 6px; font-family: var(--font-d); font-weight: 400; font-size: 21px; letter-spacing: .03em; }
.u-infopage p, .u-infopage li { margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.45; }
.u-infopage ul { margin: 0; padding-left: 20px; }
.u-infopage .u-keys { margin-top: 0; background: transparent; padding: 0; }
.u-infolinks { display: flex; flex-wrap: wrap; gap: 10px; }
.u-infolinks a { text-decoration: none; display: inline-flex; align-items: center; }
/* Nastavení na počítači: větší okno v poměru 16:9, položky ve dvou sloupcích */
@media (pointer: fine) and (min-height: 521px) {
  .u-modal[data-m="settings"] .u-card { width: min(1000px, calc(100vw - 40px), calc((100vh - 40px) * 16 / 9)); aspect-ratio: 16 / 9; max-height: calc(100vh - 40px); }
  .u-modal[data-m="settings"] .u-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-content: start; overflow-y: auto; }
  .u-modal[data-m="settings"] .u-body > .u-who, .u-modal[data-m="settings"] .u-body > .u-grade, .u-modal[data-m="settings"] .u-body > .u-keys { grid-column: 1 / -1; }
  .u-modal[data-m="settings"] .u-grade, .u-modal[data-m="settings"] .u-setrow { margin-top: 0; }
}

/* energie nahoře: jen barevný pruh, bez kulaté ikonky s bleskem */
.u-energy .u-ico { display: none !important; }
.u-energy { margin-left: 0 !important; }
.u-energy::after { left: 5px !important; top: 5px !important; bottom: 5px !important; width: calc(var(--p) * .965) !important; }
@media (pointer: coarse), (max-height: 520px) { .u-energy::after { top: 4px !important; bottom: 4px !important; } }
/* energie vyrovnaná na střed s řadou ikonek vpravo nahoře (dřív visela níž) */
.u-energy { margin-top: 5px !important; }
@media (pointer: coarse), (max-height: 520px) { .u-energy { margin-top: 12.5px !important; } }

.u-ct-sub:empty { display: none; }

/* doručení zásilky: velká ikonka uprostřed, z ní letí penízky na kredit */
.u-dd { position: fixed; left: 50%; top: 34%; z-index: 70; pointer-events: none; font-size: 110px; line-height: 1; filter: drop-shadow(0 8px 10px rgba(39,12,50,.4)); animation: u-ddpop 1.5s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes u-ddpop { 0% { transform: translate(-50%,-50%) scale(.2); opacity: 0; } 22% { transform: translate(-50%,-50%) scale(1.25); opacity: 1; } 38% { transform: translate(-50%,-50%) scale(1); } 80% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(.7); opacity: 0; } }
@media (max-height: 520px) { .u-dd { font-size: 84px; } }

/* otázky s obrázkem (myslivci): obrázek vlevo, text a odpovědi vpravo */
.u-qbody.img { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); grid-template-areas: "txt txt" "pic ans" "pic msg"; grid-template-rows: auto auto 1fr; gap: 8px 14px; align-items: start; }
.u-qbody.img .u-qmain { display: contents; }
.u-qbody.img .u-qpic { grid-area: pic; } .u-qbody.img .u-qtext { grid-area: txt; } .u-qbody.img .u-qans { grid-area: ans; } .u-qbody.img .u-qmsg { grid-area: msg; }
.u-qpic { border-radius: 20px; overflow: hidden; background: #e9e2cf; box-shadow: 0 0 0 3px #a67c52, 0 4px 0 rgba(61,52,69,.22); aspect-ratio: 4 / 3; }
.u-qpic img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.u-qbody.img .u-qtext { font-size: 22px; min-height: 0; margin-bottom: 8px; }
.u-qbody.img .u-qans { grid-template-columns: 1fr; gap: 6px; }
.u-qbody.img .u-qa { flex-direction: row; text-align: left; min-height: 44px; padding: 6px 10px; gap: 8px; } .u-qbody.img .u-qa b { font-size: 15px; line-height: 1.15; }
@media (max-width: 640px) and (orientation: portrait) { .u-qbody.img { grid-template-columns: 1fr; grid-template-areas: "txt" "pic" "ans" "msg"; grid-template-rows: none; } }

/* ===== Úvodní menu hry (#pick): texty v dekorativním písmu Gamer Station ===== */
#pick .pick-menu button, #pick .pick-menu button.primary, #pick .pick-who, #pick .pick-out { font-family: var(--font-d); font-weight: 400; letter-spacing: .04em; }

/* ===== Obecní úřad: dvě velké dlaždice vedle sebe (jako na poště) ===== */
.u-hcards { grid-template-columns: 1fr 1fr !important; gap: 12px; }
.u-hcard { min-height: 158px; padding: 14px 12px; gap: 6px; } .u-hcard b { font-size: 26px; } .u-hcard .u-qi { font-size: 52px; } .u-hcard small { font-size: 14px; }
@media (max-height: 520px) {
  .u-hcards { gap: 8px; } .u-hcard { min-height: 118px; padding: 8px; gap: 3px; } .u-hcard b { font-size: 20px; } .u-hcard .u-qi { font-size: 38px; } .u-hcard small { font-size: 12px; }
}
/* úřad: dlaždice vyplní okno i do výšky */
.u-hcard { min-height: clamp(160px, 50vh, 360px); min-height: clamp(160px, 50dvh, 360px); justify-content: center; gap: 10px; }
.u-hcard .u-qi { font-size: 72px; } .u-hcard b { font-size: 30px; } .u-hcard small { font-size: 15px; }
@media (max-height: 520px) {
  .u-hcard { min-height: 56vh; min-height: 56dvh; gap: 6px; } .u-hcard .u-qi { font-size: 52px; } .u-hcard b { font-size: 24px; } .u-hcard small { font-size: 13px; }
}
@media (max-height: 460px) {
  .u-qbody.img { grid-template-columns: minmax(0, 33%) minmax(0, 1fr); gap: 5px 10px; align-items: start; }
  .u-qbody.img .u-qpic { border-radius: 14px; }
  .u-qbody.img .u-qtext { font-size: 16px; margin-bottom: 0; justify-content: center; text-align: center; }
  .u-qbody.img .u-qans { gap: 4px; }
  .u-qbody.img .u-qa { min-height: 36px; padding: 3px 8px; } .u-qbody.img .u-qa b { font-size: 14px; } .u-qbody.img .u-ql { width: 24px; height: 24px; font-size: 14px; }
  .u-qbody.img .u-qmsg { min-height: 14px; margin-top: 3px; font-size: 12px; }
}

/* myslivna: tři velká tlačítka vedle sebe (Foto zvěře, Sčítání zvěře, Test myslivců) */
.u-hcards.h3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; }
.u-hcards.h3 .u-hcard { min-height: clamp(150px, 42dvh, 300px); padding: 10px 8px; } .u-hcards.h3 .u-hcard b { font-size: 24px; } .u-hcards.h3 .u-hcard .u-qi, .u-hcards.h3 .u-hcard-ico { font-size: 54px; } .u-hcards.h3 .u-hcard small { font-size: 13px; }
@media (max-height: 460px) { .u-hcards.h3 { gap: 8px; } .u-hcards.h3 .u-hcard { min-height: 120px; } .u-hcards.h3 .u-hcard b { font-size: 18px; } .u-hcards.h3 .u-hcard-ico { font-size: 38px; } .u-hcards.h3 .u-hcard small { font-size: 11.5px; } }

/* hlavní nabídka myslivny: tlačítka přes celou výšku okna */
.u-hunt .u-body { display: flex; flex-direction: column; }
.u-hcards.h3.full { flex: 1 1 auto; min-height: 0; }
.u-hcards.h3.full .u-hcard { min-height: 0; height: 100%; }
.u-hcards.h3.full .u-hcard b { font-size: 30px; } .u-hcards.h3.full .u-hcard-ico { font-size: 80px; }
@media (max-height: 460px) { .u-hcards.h3.full .u-hcard b { font-size: 22px; } .u-hcards.h3.full .u-hcard-ico { font-size: 56px; } }
