:root{
  --bg:#f4f5f7; --surface:#ffffff; --surface2:#f2f3f5; --surface3:#e9ebee; --text:#14181f; --muted:#69717d; --line:#e3e6ea;
  --accent:#d4561f; --accent-soft:#fbeee7; --accent2:#2f6f9f; --ok:#1f7a45; --warn:#9a6b00; --bad:#b3261e;
  --c-MCR:#7b2cbf; --c-A:#d62839; --c-B:#f77f00; --c-P:#0a9396; --c-C:#e0b100; --c-D:#3a9d23; --c-E:#2d6cdf; --c-x:#8a94a3; --c-zr:#b5bcc6;
  --shadow:0 1px 2px rgba(16,24,40,.06),0 8px 24px rgba(16,24,40,.12); --shadow-s:0 1px 2px rgba(16,24,40,.08),0 2px 8px rgba(16,24,40,.08);
  --r:18px; --top:calc(env(safe-area-inset-top) + 10px);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0f1216; --surface:#191d23; --surface2:#222730; --surface3:#2b313b; --text:#eef1f5; --muted:#9aa3af; --line:#2c323c;
  --accent-soft:#3a2418; --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.45); --shadow-s:0 2px 8px rgba(0,0,0,.4); color-scheme:dark}}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);color:var(--text);font:15px/1.45 -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,sans-serif;-webkit-text-size-adjust:100%}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
svg{width:20px;height:20px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round;flex:none}
svg .fill{fill:currentColor;stroke:none}
#map{position:fixed;inset:0;background:var(--surface3)}
.leaflet-container{font:inherit}
.leaflet-tile-pane{filter:saturate(.45) contrast(.92) brightness(1.04)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .leaflet-tile-pane{filter:invert(.92) hue-rotate(180deg) saturate(.35) brightness(.95) contrast(.9)}}
.leaflet-control-attribution{font-size:10px;background:rgba(255,255,255,.75)!important;border-radius:8px 0 0 0}

/* horní lišta */
.topbar{position:fixed;top:var(--top);left:10px;right:10px;z-index:900;display:flex;gap:8px;align-items:center;
  background:var(--surface);border-radius:16px;box-shadow:var(--shadow);padding:6px 6px 6px 10px;height:52px}
.logo{width:26px;height:26px;border-radius:50%;flex:none;background:radial-gradient(circle at 30% 30%,#ffb38a,var(--accent) 60%);position:relative;overflow:hidden}
.logo:before,.logo:after{content:"";position:absolute;top:-4px;bottom:-4px;width:16px;border:2px solid rgba(255,255,255,.9);border-radius:50%}
.logo:before{left:-11px}.logo:after{right:-11px}
.searchbox{flex:1;display:flex;align-items:center;gap:6px;background:var(--surface2);border-radius:12px;padding:0 10px;height:40px;color:var(--muted);min-width:0}
.searchbox input{flex:1;min-width:0;border:0;background:none;font:inherit;font-size:16px;color:var(--text);outline:none;height:100%}
.iconbtn{position:relative;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--text);background:var(--surface)}
.topbar .iconbtn{background:var(--surface2)}
.iconbtn.on{background:var(--accent)!important;color:#fff}
.iconbtn.flat{background:transparent;width:36px;height:36px}
.badge{position:absolute;top:-4px;right:-4px;background:var(--accent);color:#fff;border-radius:10px;font-size:11px;font-weight:700;line-height:18px;min-width:18px;padding:0 5px;text-align:center;border:2px solid var(--surface)}
.quick{position:fixed;top:calc(var(--top) + 60px);left:0;right:0;z-index:850;display:flex;gap:6px;overflow-x:auto;padding:2px 10px 6px;scrollbar-width:none}
.quick::-webkit-scrollbar{display:none}
.quick button{flex:none;height:34px;padding:0 13px;border-radius:17px;background:var(--surface);box-shadow:var(--shadow-s);font-size:14px;font-weight:500;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.quick button.on{background:var(--text);color:var(--surface)}
.quick button.date{color:var(--accent);font-weight:600}
.mapctl{position:fixed;right:10px;top:calc(var(--top) + 108px);z-index:850;display:flex;flex-direction:column;gap:8px}
.mapctl .iconbtn{width:44px;height:44px;box-shadow:var(--shadow-s)}
.legend{position:fixed;right:62px;top:calc(var(--top) + 108px);z-index:860;background:var(--surface);padding:12px 14px;border-radius:14px;box-shadow:var(--shadow);font-size:13px;width:220px}
.legend b{display:block;margin-bottom:4px}
.legend div{display:flex;align-items:center;gap:8px;margin:4px 0}
.legend i{width:12px;height:12px;border-radius:50%;flex:none}
.legend i.ring{background:transparent!important;border:2px dashed var(--muted)}
.hint{position:fixed;left:50%;transform:translateX(-50%);top:calc(var(--top) + 108px);z-index:870;background:var(--text);color:var(--surface);padding:9px 16px;border-radius:20px;font-size:13px;box-shadow:var(--shadow);max-width:calc(100% - 40px);text-align:center}

/* spodní panel (mobil) */
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:950;background:var(--surface);border-radius:22px 22px 0 0;box-shadow:0 -4px 24px rgba(16,24,40,.14);
  height:var(--vis, 128px);max-height:calc(100dvh - var(--top) - 8px);display:flex;flex-direction:column;transition:height .28s cubic-bezier(.2,.8,.2,1)}
.sheet.dragging{transition:none}
.sheethead{flex:none;padding:0 14px 8px;touch-action:none;cursor:grab}
.grip{display:grid;place-items:center;height:20px}
.grip span{width:40px;height:5px;border-radius:3px;background:var(--surface3)}
.headrow{display:flex;align-items:center;gap:6px;min-height:36px}
.summary{flex:1;font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.summary small{font-weight:400;color:var(--muted)}
.back{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--surface2)}
.sheet[data-snap="peek"] #btnMin svg{transform:rotate(180deg)}
.seg{display:flex;background:var(--surface2);border-radius:12px;padding:3px;gap:3px;margin-top:6px}
.seg button{flex:1;height:34px;border-radius:9px;font-size:14px;font-weight:500;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:6px}
.seg button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow-s)}
.seg button b{font-size:11px;background:var(--surface3);color:var(--muted);border-radius:8px;padding:0 6px;line-height:17px;font-weight:600}
.seg button b:empty{display:none}
.seg.small{margin:0 0 10px}
.seg.small button{height:30px;font-size:13px}
.sheetbody{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:4px 14px calc(16px + env(safe-area-inset-bottom))}
.panel{display:none}.panel.on{display:block}
.sheet.detail #tabs{display:none}

@media (min-width:900px){
  .topbar{right:auto;width:400px;left:12px;top:12px}
  .quick{left:424px;top:14px;right:12px}
  .mapctl{top:62px;right:12px}
  .legend{top:62px;right:66px}
  .hint{top:62px}
  .sheet{top:74px;bottom:12px;left:12px;right:auto;width:400px;height:auto!important;max-height:none;border-radius:var(--r);box-shadow:var(--shadow)}
  .sheet[data-snap="peek"] .sheetbody{display:none}
  .sheet[data-snap="peek"]{bottom:auto}
  .grip{display:none}
  .sheethead{cursor:default;padding-top:10px}
}

/* filtry */
.fsec{padding:12px 0;border-bottom:1px solid var(--line)}
.fsec:last-of-type{border-bottom:0}
.fsec h3{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--muted);letter-spacing:.02em}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.field{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted)}
input[type=date],.placeform input{width:100%;font:inherit;font-size:16px;padding:0 10px;height:42px;border:1px solid var(--line);border-radius:11px;background:var(--surface2);color:var(--text);outline:none}
input[type=date]:focus,.placeform input:focus{border-color:var(--accent)}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.chips:first-child{margin-top:0}
.chips button{height:34px;border-radius:17px;padding:0 12px;background:var(--surface2);font-size:14px;display:inline-flex;align-items:center;gap:6px;border:1px solid transparent}
.chips button.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);font-weight:600}
.chips button small{color:var(--muted);font-size:12px;font-weight:400}
.chips button .dot{width:9px;height:9px;border-radius:50%}
.chips button[disabled]{opacity:.4}
.more{margin-top:10px}
.more summary{font-size:13px;color:var(--accent2);cursor:pointer;list-style:none}
.more summary::-webkit-details-marker{display:none}
.more summary:before{content:"▸ "}.more[open] summary:before{content:"▾ "}
.subgrp{margin-top:8px}.subgrp h4{margin:0;font-size:12px;color:var(--muted);font-weight:600}
.placeform{display:flex;gap:6px;margin-top:10px}
.placeform button{border-radius:11px;padding:0 14px;background:var(--surface2);font-weight:500}
.placeres button{display:block;width:100%;text-align:left;border-bottom:1px solid var(--line);padding:10px 2px;font-size:14px}
.range{display:block;margin-top:10px;font-size:14px}
.range input{width:100%;accent-color:var(--accent);height:30px}
.range.off{opacity:.4}
.switch{display:flex;align-items:center;gap:10px;padding:7px 0;font-size:14px;cursor:pointer}
.switch input{position:absolute;opacity:0;pointer-events:none}
.switch i{width:38px;height:22px;border-radius:11px;background:var(--surface3);position:relative;flex:none;transition:background .2s}
.switch i:after{content:"";position:absolute;left:2px;top:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
.switch input:checked+i{background:var(--accent)}
.switch input:checked+i:after{transform:translateX(16px)}
.muted{color:var(--muted);font-size:13px;margin-top:6px}
.sticky{position:sticky;bottom:calc(-16px - env(safe-area-inset-bottom));display:flex;gap:8px;padding:12px 0 calc(12px + env(safe-area-inset-bottom));background:linear-gradient(transparent,var(--surface) 30%);margin-top:4px}
.sticky button{flex:1;height:46px;border-radius:13px;font-weight:600}
.primary{background:var(--accent);color:#fff}
.ghost{background:var(--surface2)}
.rowbtns{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.rowbtns button{flex:1 1 auto;height:36px;border-radius:10px;background:var(--surface2);font-size:13px;font-weight:500;padding:0 10px}
.rowbtns button.on{background:var(--accent-soft);color:var(--accent)}

/* seznam – kompaktní řádky */
.item{display:flex;gap:10px;align-items:stretch;padding:10px 4px;border-bottom:1px solid var(--line);cursor:pointer}
.item:active{background:var(--surface2)}
.item .bar{width:4px;border-radius:2px;flex:none}
.item .main{flex:1;min-width:0}
.item .t{font-weight:600;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .s{color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .m{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.item.zr .t{text-decoration:line-through;color:var(--muted)}
.pill{font-size:11.5px;font-weight:600;border-radius:7px;padding:1px 7px;background:var(--surface2);color:var(--muted);white-space:nowrap}
.pill.cls{color:#fff}
.pill.zr{background:#fde7e5;color:var(--bad)}
.pill.new{background:#e4effa;color:var(--accent2)}
.pill.full{background:#fde7e5;color:var(--bad)}
.star{flex:none;align-self:center;width:36px;height:36px;display:grid;place-items:center;color:var(--muted);border-radius:10px}
.star.on{color:var(--accent)}.star.on svg{fill:var(--accent)}
.empty{color:var(--muted);padding:28px 0;text-align:center}

/* detail místa */
.venue h2{margin:2px 0 2px;font-size:19px;line-height:1.25}
.venue .addr{color:var(--muted);font-size:13.5px}
.prec{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;border-radius:8px;padding:3px 9px;margin-top:8px}
.prec:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.prec.ok{background:#e5f4ea;color:var(--ok)}.prec.mid{background:#fdf3d7;color:var(--warn)}.prec.bad{background:#fde7e5;color:var(--bad)}
.links{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.links a{font-size:13px;font-weight:500;padding:7px 11px;border-radius:10px;background:var(--surface2);color:var(--text);text-decoration:none;display:inline-flex;align-items:center;gap:5px}
.links a.pri{background:var(--accent);color:#fff}
.group{margin-top:16px}
.group h4{margin:0 0 4px;font-size:14px}
.concur{font-size:12px;color:var(--accent);font-weight:600;margin-bottom:4px}
.card{border:1px solid var(--line);border-radius:14px;padding:12px;margin:8px 0;background:var(--surface)}
.card.zr{opacity:.7}.card.zr .nm{text-decoration:line-through}
.card .top{display:flex;gap:10px;align-items:flex-start}
.card .badgecls{flex:none;min-width:34px;height:26px;border-radius:8px;color:#fff;font-weight:700;font-size:12px;display:grid;place-items:center;padding:0 6px}
.card .nm{font-weight:600;line-height:1.25}
.card .sub{color:var(--muted);font-size:13px}
.occ{margin-top:8px;display:grid;gap:6px}
.occ div{font-size:13px;display:flex;justify-content:space-between;gap:8px}
.occ .bar5{height:5px;border-radius:3px;background:var(--surface3);overflow:hidden;margin-top:3px}
.occ .bar5 i{display:block;height:100%;background:var(--accent2);border-radius:3px}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;margin-top:10px;font-size:13px}
.facts span{color:var(--muted);display:block;font-size:11.5px}
.note{font-size:13px;color:var(--bad);margin-top:8px}
details.group summary{cursor:pointer;color:var(--accent2);font-size:14px}
.toast{position:fixed;left:50%;bottom:calc(150px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--text);color:var(--surface);padding:10px 16px;border-radius:20px;z-index:2000;font-size:14px;max-width:90%;pointer-events:none;box-shadow:var(--shadow)}

/* špendlíky */
.pin{position:relative;width:30px;height:40px}
.pin svg{width:30px;height:40px;stroke:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}
.pin svg .h{fill:#fff}
.pin b{position:absolute;top:5px;left:0;width:30px;text-align:center;color:#fff;font:800 13px/18px system-ui,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.25)}
.pin b.long{font-size:9.5px;letter-spacing:-.2px}
.pin .cnt{position:absolute;top:-7px;right:-9px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--text);color:var(--surface);font:700 10px/17px system-ui,sans-serif;font-style:normal;text-align:center;border:1.5px solid var(--surface)}
.pin.fav:after{right:auto;left:-8px}
.pin.guess svg path:first-child{stroke:#fff;stroke-width:2;stroke-dasharray:3 2}
.pin.fav:after{content:"★";position:absolute;right:-7px;top:-7px;color:var(--accent);font-size:14px;text-shadow:0 0 3px #fff}
.cluster{background:var(--text);color:var(--surface);border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:13px;border:3px solid rgba(255,255,255,.9);box-shadow:var(--shadow-s)}
.center-dot{width:16px;height:16px;border-radius:50%;background:var(--accent2);border:3px solid #fff;box-shadow:0 0 0 2px var(--accent2)}
.focuspin{position:relative;width:44px;height:58px}
.focuspin svg{width:44px;height:58px;stroke:none;filter:drop-shadow(0 4px 6px rgba(0,0,0,.35))}
.focuspin:before{content:"";position:absolute;left:12px;bottom:-6px;width:20px;height:10px;border-radius:50%;background:rgba(212,86,31,.35);animation:pulse 1.6s ease-out infinite}
.focuslabel{position:absolute;left:50%;bottom:64px;transform:translateX(-50%);background:var(--text);color:var(--surface);font:600 12px/1.3 system-ui,sans-serif;padding:5px 9px;border-radius:9px;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;box-shadow:var(--shadow-s)}
@keyframes pulse{0%{transform:scale(.6);opacity:1}100%{transform:scale(2.6);opacity:0}}

/* nahlášení problému */
.seg .bugtab{flex:0 0 44px;color:var(--muted)}
.seg .bugtab.on{color:var(--accent)}
.ptitle{font-size:18px;margin:6px 0 4px}
.ctxbox{background:var(--surface2);border-radius:12px;padding:10px 12px;font-size:13px;line-height:1.4;margin-bottom:6px}
.ctxbox b{display:block;font-size:14px}
.ctxbox .muted{margin:2px 0 0}
#repType button.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);font-weight:600}
textarea{width:100%;font:inherit;font-size:16px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface2);color:var(--text);resize:vertical;outline:none}
textarea:focus{border-color:var(--accent)}
.filebtn{flex:1 1 auto;height:36px;border-radius:10px;background:var(--surface2);font-size:13px;font-weight:500;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.shot{position:relative;margin-top:8px}
.shot img{width:100%;max-height:260px;object-fit:contain;border-radius:12px;border:1px solid var(--line);background:var(--surface2)}
.shot button{position:absolute;top:6px;right:6px;width:30px;height:30px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:18px}
.sticky.col{flex-direction:column}
.sticky.col button{flex:none;width:100%}
.reportlink{font-size:12.5px;color:var(--muted);text-decoration:underline;cursor:pointer;margin-top:8px;display:inline-block}

/* třídy: vybraná = plná barva třídy (filtr i legenda) */
#fClass button.on{background:var(--c);border-color:var(--c);color:#fff}
#fClass button.on .dot{background:#fff!important}
#fClass button.on small{color:rgba(255,255,255,.85)}
.legend b small{font-weight:400;color:var(--muted)}
.legend button.lg{display:flex;align-items:center;gap:8px;width:100%;padding:5px 6px;margin:2px 0;border-radius:9px;text-align:left;font-size:13px}
.legend button.lg i{width:20px;height:20px;border-radius:50%;flex:none;color:#fff;font:800 10px/20px system-ui,sans-serif;font-style:normal;text-align:center}
.legend button.lg small{margin-left:auto;color:var(--muted)}
.legend button.lg.on{background:var(--c);color:#fff}
.legend button.lg.on small{color:rgba(255,255,255,.85)}
.legend button.lg.on i{background:#fff!important;color:var(--c)}

/* návrhy při hledání (hráči) */
.suggest{position:fixed;top:calc(var(--top) + 58px);left:10px;right:10px;z-index:960;background:var(--surface);border-radius:16px;box-shadow:var(--shadow);max-height:min(60vh,460px);overflow:auto;padding:6px}
@media (min-width:900px){.suggest{right:auto;width:400px;left:12px;top:66px}}
.suggest .sh{font-size:12px;font-weight:600;color:var(--muted);padding:6px 10px 4px}
.suggest .sg{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 10px;border-radius:10px}
.suggest .sg:hover,.suggest .sg:active{background:var(--surface2)}
.suggest .sg span{flex:1;min-width:0;display:flex;flex-direction:column}
.suggest .sg b{font-weight:600}
.suggest .sg small{color:var(--muted);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.suggest .sg em{font-style:normal;font-size:11.5px;color:var(--muted);white-space:nowrap}
.suggest .sg em.has{color:var(--accent);font-weight:600}
.suggest .sg.all{border-top:1px solid var(--line);border-radius:0 0 10px 10px;margin-top:4px;color:var(--accent2);font-size:14px}
.quick button.player{background:var(--accent);color:#fff}
.quick button.player svg{width:16px;height:16px}
.quick button .x{margin-left:2px;opacity:.85;padding:0 2px}
.pill.pl{background:var(--accent-soft);color:var(--accent);display:inline-flex;align-items:center;gap:3px}
.pill.pl svg{width:12px;height:12px}
.summary svg{width:16px;height:16px;vertical-align:-2px}
input.txt{width:100%;font:inherit;font-size:16px;padding:0 12px;height:44px;border:1px solid var(--line);border-radius:12px;background:var(--surface2);color:var(--text);outline:none;margin-top:8px}
input.txt:focus{border-color:var(--accent)}
/* o aplikaci */
.about{font-size:14.5px;line-height:1.55}
.about h3{font-size:13px;color:var(--muted);margin:16px 0 4px;font-weight:600}
.about ul{padding-left:18px;margin:4px 0}
.about li{margin:4px 0}
.about a{color:var(--accent2)}
.disclaimer{background:var(--surface2);border-left:3px solid var(--accent);padding:10px 12px;border-radius:8px}
button.logo{border:0;padding:0;cursor:pointer}

/* výběr sezóny */
.quick button.season{background:var(--accent2);color:#fff;font-weight:600}
.quick button.season.arch{background:var(--text);color:var(--surface)}
.seasonmenu{position:fixed;top:calc(var(--top) + 100px);left:10px;z-index:980;background:var(--surface);border-radius:16px;box-shadow:var(--shadow);padding:6px;min-width:260px}
@media (min-width:900px){.seasonmenu{left:424px;top:56px}}
.seasonmenu .sh{font-size:12px;font-weight:600;color:var(--muted);padding:6px 10px 4px}
.seasonmenu button{display:flex;flex-direction:column;align-items:flex-start;width:100%;text-align:left;padding:9px 12px;border-radius:10px}
.seasonmenu button.on{background:var(--accent-soft);color:var(--accent)}
.seasonmenu button small{color:var(--muted);font-size:12.5px}
