/* dogovori.se: jedna kolona u širini telefona na „mapi“; boja kluba (--club) postavlja se iz JS-a i sve se izvodi iz nje */
:root{
  --bg:#eef0ea; --surface:#fbfbf8; --surface2:#e3e8df; --line:#cfd6c8;
  --fg:#18211d; --muted:#5a665f; --soft:#38443e;
  --club:#ff5a1f; --club-ink:#ffffff;
  --club-text:color-mix(in oklab, var(--club) 70%, var(--fg));
  --club-soft:color-mix(in oklab, var(--club) 14%, var(--surface));
  --blue:#1f62c4; --blue-soft:color-mix(in oklab, var(--blue) 14%, var(--surface)); --blue-text:color-mix(in oklab, var(--blue) 75%, var(--fg));
  --ok:#1f8f55; --warn:#c2620e; --bad:#c93a3a;
  --display:'Archivo','Arial Narrow',sans-serif;
  --body:'Figtree',system-ui,-apple-system,sans-serif;
  --r-lg:18px; --r-md:12px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0f1715; --surface:#16201d; --surface2:#1e2a26; --line:#2c3a35;
  --fg:#e9efe9; --muted:#95a59c; --soft:#bccabf;
  --blue:#5c9bf0; --ok:#3fbf7f; --warn:#ff9a4d; --bad:#ff6b6b; color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0f1715; --surface:#16201d; --surface2:#1e2a26; --line:#2c3a35;
  --fg:#e9efe9; --muted:#95a59c; --soft:#bccabf;
  --blue:#5c9bf0; --ok:#3fbf7f; --warn:#ff9a4d; --bad:#ff6b6b; color-scheme:dark}
*{box-sizing:border-box}
html,body{margin:0}
html{overscroll-behavior-y:none;-webkit-text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh}
body{background:var(--bg);color:var(--fg);font-family:var(--body);font-size:15px;line-height:1.45;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--club-text)}
:focus-visible{outline:2px solid var(--club);outline-offset:2px}
[hidden]{display:none!important}
img{max-width:100%}

.boot{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:2}
.boot .wm{font-size:34px;opacity:.85}

/* ---------- splash ---------- */
#splash{position:fixed;inset:0;z-index:70;background:#08100e;color:#f3f6f2;overflow:hidden;transition:transform .9s cubic-bezier(.7,0,.2,1)}
#splash.gone{transform:translateY(-100%)}
#splash canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.sp-ui{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:0 24px calc(56px + env(safe-area-inset-bottom,0px));pointer-events:none;background:linear-gradient(to top, rgba(8,16,14,.85) 0%, rgba(8,16,14,0) 45%)}
.wordmark{font-family:var(--display);font-weight:900;font-stretch:108%;font-size:clamp(36px,11.5vw,96px);line-height:.9;letter-spacing:-1.5px;margin:0;display:flex}
.wordmark span{display:inline-block}
.wordmark .go{color:#ff5a1f}
.sp-tag{font-size:16px;color:#c7d3cb;margin:14px 0 0;max-width:30ch}
.sp-skip{position:absolute;top:calc(16px + env(safe-area-inset-top,0px));right:16px;height:40px;padding:0 14px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(8,16,14,.4);color:#f3f6f2;font-size:13px;font-weight:600}
.sp-km{position:absolute;left:24px;top:calc(22px + env(safe-area-inset-top,0px));font-family:var(--display);font-stretch:75%;font-weight:600;font-size:14px;color:#9fb3a8;font-variant-numeric:tabular-nums}
@media (prefers-reduced-motion:no-preference){
  #splash.ready .wordmark span{animation:rise .7s cubic-bezier(.2,.8,.2,1) both}
  #splash .sp-tag{animation:fadein .6s .9s both}
}
@keyframes rise{from{opacity:0;transform:translateY(40%)}}
@keyframes fadein{from{opacity:0}}

/* ---------- shell ---------- */
.topo{position:fixed;top:0;left:0;z-index:0;pointer-events:none;-webkit-mask-image:linear-gradient(to bottom,#000 0%,rgba(0,0,0,.55) 55%,rgba(0,0,0,.25) 100%);mask-image:linear-gradient(to bottom,#000 0%,rgba(0,0,0,.55) 55%,rgba(0,0,0,.25) 100%)}
.app{position:relative;z-index:1;max-width:560px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
header.top{position:sticky;top:0;z-index:5;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px));display:flex;align-items:center;gap:12px;box-shadow:inset 0 -4px 0 var(--club);background:color-mix(in oklab, var(--bg) 94%, transparent);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px)}
.brand{display:flex;flex-direction:column;min-width:0;flex:1}
.brand b{font-family:var(--display);font-weight:800;font-stretch:112%;font-size:19px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wm{font-family:var(--display);font-weight:900;font-stretch:112%;font-size:22px;letter-spacing:-.5px;white-space:nowrap}
.wm i{font-style:normal;color:var(--club)}
main{padding:18px max(16px,env(safe-area-inset-right,0px)) 18px max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:14px;flex:1;min-width:0}
h1{font-family:var(--display);font-weight:800;font-stretch:112%;font-size:30px;margin:0;line-height:1.04;letter-spacing:-.5px;text-wrap:balance;overflow-wrap:anywhere}
h2{font-family:var(--display);font-weight:700;font-stretch:105%;font-size:19px;margin:0;line-height:1.15;text-wrap:balance}
h3{font-size:15px;margin:0;font-weight:700}
.sub{color:var(--muted);font-size:13px;margin:0}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.row{display:flex;align-items:center;gap:10px;min-width:0}
.between{justify-content:space-between}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.pill{font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--surface2);color:var(--soft);white-space:nowrap}
.pill.club{background:var(--club-soft);color:var(--club-text)}
.pill.blue{background:var(--blue-soft);color:var(--blue-text)}
.pill.warn{background:color-mix(in oklab,var(--warn) 16%,var(--surface));color:color-mix(in oklab,var(--warn) 75%,var(--fg))}
.btn{min-height:44px;padding:0 16px;border-radius:var(--r-md);border:1px solid var(--line);background:var(--surface2);font-weight:600;font-size:14px;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;color:var(--fg);text-align:center}
.btn.primary{background:var(--club);border-color:var(--club);color:var(--club-ink)}
.btn.ghost{background:transparent}
.btn.danger{border-color:var(--bad);color:var(--bad);background:transparent}
.btn.block{width:100%}
.btn.sm{min-height:36px;padding:0 12px;font-size:13px}
.btn:disabled{opacity:.45;cursor:default}
.link{background:none;border:none;color:var(--club-text);font-weight:600;padding:0;text-decoration:underline;text-underline-offset:3px}
.back{background:none;border:none;color:var(--club-text);font-weight:600;padding:0;min-height:36px;text-align:left;align-self:flex-start}
.empty{color:var(--muted);font-size:14px;text-align:center;padding:14px}
.crest{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-family:var(--display);font-weight:800;font-stretch:110%;font-size:16px;flex:none;overflow:hidden;background-size:cover;background-position:center}
.crest.sm{width:28px;height:28px;border-radius:8px;font-size:11px}
.crest.lg{width:96px;height:96px;border-radius:26px;font-size:34px}
.av{width:32px;height:32px;border-radius:50%;background:var(--club-soft);color:var(--club-text);display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex:none}

/* forme */
input[type=text],input[type=email],input[type=password],input[type=number],input[type=search],input[type=url],input[type=date],textarea,select.f{width:100%;min-width:0;min-height:46px;border-radius:var(--r-md);border:1px solid var(--line);background:var(--bg);padding:0 12px;color:var(--fg);font-size:16px}
textarea{min-height:90px;padding:10px 12px;resize:vertical}
label.l{font-size:13px;font-weight:600;color:var(--soft)}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (max-width:380px){.grid2{grid-template-columns:minmax(0,1fr)}}
.toggle{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:44px}
.toggle input{width:22px;height:22px;accent-color:var(--club);flex:none}
.seg{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));gap:4px;padding:4px;border-radius:var(--r-md);background:var(--surface2)}
.seg button{min-height:40px;border:none;border-radius:9px;background:transparent;color:var(--muted);font-weight:600;font-size:14px;padding:0 6px}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--fg);box-shadow:0 1px 0 var(--line)}
.chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:13px;font-weight:600;color:var(--soft)}
.chip[aria-pressed="true"]{background:var(--club);border-color:var(--club);color:var(--club-ink)}

/* trke */
.race{text-align:left;width:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:0;display:grid;grid-template-columns:72px minmax(0,1fr);overflow:hidden;color:var(--fg)}
.bib{position:relative;overflow:hidden;background:color-mix(in oklab, var(--t,var(--club)) 15%, var(--surface));display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 4px;border-right:1px dashed color-mix(in oklab, var(--t,var(--club)) 30%, var(--line));font-family:var(--display)}
.bib > span{position:relative;z-index:1}
.bib .d{font-weight:900;font-stretch:80%;font-size:32px;line-height:1;color:var(--tt);font-variant-numeric:tabular-nums}
.bib .m{font-weight:600;font-size:12px;color:var(--soft)}
.race .body{padding:11px 13px;display:flex;flex-direction:column;gap:3px;min-width:0}
.race .t{font-family:var(--display);font-weight:800;font-stretch:106%;font-size:18px;line-height:1.15;overflow-wrap:anywhere}
.race.past{opacity:.85}
.race.past .bib{background:var(--surface2)}
.race.past .bib .d{color:var(--soft)}
.meta{font-size:13px;color:var(--soft)}
.going{font-size:13px;color:var(--muted)}
.going b{color:var(--club-text)}
.month{position:sticky;top:var(--hh,58px);z-index:3;display:flex;justify-content:space-between;align-items:baseline;font-family:var(--display);font-weight:800;font-stretch:90%;font-size:13px;letter-spacing:1.5px;text-transform:uppercase;color:var(--fg);margin:6px -16px 0;padding:8px 16px;background:color-mix(in oklab, var(--bg) 92%, transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.month .mc{font-family:var(--body);font-weight:600;font-size:12px;letter-spacing:0;text-transform:none;color:var(--muted)}
.hero{position:relative;overflow:hidden;text-align:left;border:none;border-radius:22px;padding:18px 18px 24px;background:var(--club);color:var(--club-ink);display:flex;flex-direction:column;gap:2px;width:100%;min-height:160px;box-shadow:0 18px 40px -22px var(--club)}
.hero > span{position:relative;z-index:1}
.hero-k{font-size:13px;font-weight:600;opacity:.85}
.hero-n{font-family:var(--display);font-stretch:85%;font-weight:700;font-size:20px;line-height:1;display:flex;align-items:baseline;gap:6px}
.hero-n b{font-size:68px;font-weight:900;letter-spacing:-3px;font-variant-numeric:tabular-nums;line-height:.9}
.hero-t{font-family:var(--display);font-weight:800;font-stretch:110%;font-size:22px;margin-top:8px;line-height:1.1}
.hero-m{font-size:13px;opacity:.9}
.hero svg{position:absolute;pointer-events:none}
.people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.person{display:flex;align-items:center;gap:8px;padding:8px;border-radius:var(--r-md);background:var(--surface2);font-size:14px;min-width:0;border:none;text-align:left;width:100%;color:var(--fg)}
.person .tv{display:block;font-size:11px;font-weight:600;color:var(--muted);margin-top:1px}
.person .tv-drive{color:var(--club-text)}
.person .tv-ride{color:var(--warn)}
.person span.n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
button.person:hover{background:var(--club-soft)}
.lock{border:1px dashed var(--line);border-radius:var(--r-md);padding:12px;display:flex;gap:10px;align-items:center}
.kv{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 14px;font-size:14px}
.kv dt{color:var(--muted)}
.kv dd{margin:0;overflow-wrap:anywhere}
.wx{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:8px}
.wx div{background:var(--surface2);border-radius:var(--r-md);padding:8px;text-align:center;font-size:12px}
.wx b{display:block;font-family:var(--display);font-size:18px}
.bar{height:8px;border-radius:999px;background:var(--surface2);overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px;background:var(--club)}
.big{font-family:var(--display);font-weight:800;font-stretch:90%;font-size:22px;font-variant-numeric:tabular-nums}

/* chat */
.chat{display:flex;flex-direction:column;gap:8px;max-height:56vh;overflow:auto;padding:2px}
.msg{background:var(--surface2);border-radius:14px 14px 14px 4px;padding:8px 10px;font-size:14px;max-width:85%;align-self:flex-start;overflow-wrap:anywhere;white-space:pre-wrap}
.msg.me{align-self:flex-end;background:var(--club-soft);border-radius:14px 14px 4px 14px}
.msg small{display:flex;gap:6px;align-items:center;color:var(--muted);font-size:11px;font-weight:600;margin-bottom:2px;white-space:normal}
.compose{display:flex;gap:8px;align-items:flex-end}
.compose textarea{min-height:46px;max-height:140px;padding:11px 12px}
.thread{text-align:left;width:100%;border:1px solid var(--line);background:var(--surface);border-radius:var(--r-lg);padding:12px;display:flex;gap:12px;align-items:center;color:var(--fg)}
.thread.flat{border:none;background:transparent;padding:8px 4px;border-radius:var(--r-md)}
.thread.flat:hover{background:var(--surface2)}
.tline{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dot{width:10px;height:10px;border-radius:50%;background:var(--club);flex:none}
.crests{display:flex}
.crests .crest{border:2px solid var(--surface);margin-left:-8px}
.crests .crest:first-child{margin-left:0}

/* nav */
nav#nav{position:fixed;left:0;right:0;bottom:0;z-index:6;background:var(--surface);border-top:1px solid var(--line);padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
#navin{max-width:560px;margin:0 auto;display:grid;grid-template-columns:repeat(var(--n,5),minmax(0,1fr))}
#navin button{height:62px;border:none;background:transparent;color:var(--muted);font-size:11.5px;font-weight:600;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;position:relative}
#navin button[aria-current="page"]{color:var(--club-text)}
#navin button[aria-current="page"]::before{content:"";position:absolute;top:0;left:28%;right:28%;height:3px;border-radius:0 0 3px 3px;background:var(--club)}
#navin svg{width:22px;height:22px}
.badge{position:absolute;top:7px;left:calc(50% + 4px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--club);color:var(--club-ink);font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}

/* toast, sheet */
#toasts{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(92px + env(safe-area-inset-bottom,0px));z-index:80;display:flex;flex-direction:column;gap:6px;align-items:center;pointer-events:none;width:calc(100vw - 32px);max-width:460px}
.toast{background:var(--fg);color:var(--bg);padding:10px 16px;border-radius:12px;font-weight:600;font-size:14px;text-align:center}
.toast.err{background:var(--bad);color:#fff}
.sheet-bg{position:fixed;inset:0;background:rgba(10,16,14,.55);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--surface);width:100%;max-width:560px;border-radius:22px 22px 0 0;padding:18px max(16px,env(safe-area-inset-right,0px)) calc(18px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:12px;max-height:92vh;overflow:auto}
.sheet .grab{width:40px;height:4px;border-radius:4px;background:var(--line);align-self:center}
.swatches{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.sw{aspect-ratio:1;max-width:100%;border-radius:12px;border:2px solid transparent;min-height:40px}
.sw[aria-pressed="true"]{border-color:var(--fg);box-shadow:inset 0 0 0 3px var(--surface)}
.choice{text-align:left;width:100%;border:1px solid var(--line);background:var(--surface);border-radius:var(--r-lg);padding:14px;display:flex;gap:12px;align-items:center;color:var(--fg)}
.choice b{display:block;font-family:var(--display);font-weight:700;font-stretch:105%;font-size:17px}
.choice .ic{width:44px;height:44px;border-radius:12px;background:var(--club-soft);color:var(--club-text);display:flex;align-items:center;justify-content:center;flex:none}
pre.json{background:var(--bg);border-radius:12px;padding:10px;font-size:12px;overflow:auto;max-height:260px;margin:0}

/* 3D staza */
.map3d{position:relative;height:340px;border-radius:var(--r-md);overflow:hidden;background:var(--surface2)}
.map3d .maplibregl-canvas{outline:none}
.prof{width:100%;height:70px;display:block}
.stats3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stats3 div{background:var(--surface2);border-radius:var(--r-md);padding:8px}
.stats3 small{display:block;font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.4px}
.stats3 b{font-family:var(--display);font-stretch:88%;font-size:19px;font-variant-numeric:tabular-nums}

/* prijava */
#auth{position:fixed;inset:0;z-index:60;background:var(--bg);overflow:auto;display:flex;justify-content:center;padding:calc(28px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) calc(28px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));transition:opacity .45s ease, transform .6s cubic-bezier(.7,0,.2,1)}
#auth.out{opacity:0;transform:translateY(-6%);pointer-events:none}
#auth .topo-l{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
.lg{position:relative;width:100%;max-width:440px;display:flex;flex-direction:column;gap:14px;margin:auto 0}
.lg .wm{font-size:34px}
.lg h1{font-size:38px}
.lg .or{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;font-weight:600}
.lg .or::before,.lg .or::after{content:"";flex:1;height:1px;background:var(--line)}
.lg .social{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.lg .social .btn{background:var(--surface);min-height:52px}
.lg .pw{position:relative}
.lg .pw input{padding-right:52px}
.lg .pw button{position:absolute;right:4px;top:50%;transform:translateY(-50%);min-height:42px;min-width:44px;border:none;background:none;color:var(--muted)}
.lg .err{color:var(--bad);font-size:13px;font-weight:600;min-height:18px;margin:0}
.lg .submit{min-height:56px;font-size:16px}
.spin{width:22px;height:22px;border-radius:50%;border:3px solid color-mix(in oklab,var(--club-ink) 35%,transparent);border-top-color:var(--club-ink);animation:spin .7s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}
.welcome-x{position:relative;width:100%;max-width:440px;margin:auto 0;display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px}
.welcome-x .bigw{font-family:var(--display);font-weight:900;font-stretch:118%;font-size:clamp(42px,13vw,70px);line-height:.95;letter-spacing:-1px;text-wrap:balance}
.welcome-x .bigw i{font-style:normal;color:var(--club)}
.fly-l,.fly-r,.fly-u{opacity:1}
.spark{position:fixed;width:8px;height:8px;border-radius:2px;pointer-events:none;z-index:90}
@media (prefers-reduced-motion:no-preference){
  .fly-l{animation:flyL .7s cubic-bezier(.2,.9,.25,1.15) both}
  .fly-r{animation:flyR .7s cubic-bezier(.2,.9,.25,1.15) both}
  .fly-u{animation:flyU .6s cubic-bezier(.2,.8,.2,1) both}
  @keyframes flyL{from{opacity:0;transform:translateX(-110vw) rotate(-6deg)}}
  @keyframes flyR{from{opacity:0;transform:translateX(110vw) rotate(6deg)}}
  @keyframes flyU{from{opacity:0;transform:translateY(40px)}}
  .shake{animation:shk .45s}
  @keyframes shk{20%,60%{transform:translateX(-10px)}40%,80%{transform:translateX(10px)}}
  .welcome-x .crest{animation:crestin .9s cubic-bezier(.3,1.6,.5,1) both}
  .welcome-x .bigw{animation:flyU .6s .15s cubic-bezier(.2,.8,.2,1) both}
  .welcome-x .sub{animation:flyU .6s .35s cubic-bezier(.2,.8,.2,1) both}
  @keyframes crestin{from{transform:scale(.4) rotate(-20deg);opacity:0}}
  .enter > *{animation:enter .45s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0) * 45ms)}
  @keyframes enter{from{opacity:0;transform:translateY(12px)}}
  .toast{animation:up .22s ease}@keyframes up{from{opacity:0;transform:translateY(8px)}}
  .sheet{animation:sheet .26s cubic-bezier(.2,.8,.2,1)}@keyframes sheet{from{transform:translateY(30px);opacity:.4}}
  .btn.pop{animation:pop .45s cubic-bezier(.3,1.8,.5,1)}@keyframes pop{40%{transform:scale(1.06)}}
}
.install{display:flex;gap:12px;align-items:center;background:var(--club-soft);border-radius:var(--r-lg);padding:12px 14px}
.legal h2{margin-top:10px}
.legal p,.legal li{font-size:14px;color:var(--soft)}

/* ---------- filteri i kalendar ---------- */
.flag{width:20px;height:15px;border-radius:3px;object-fit:cover;flex:none;box-shadow:0 0 0 1px rgba(0,0,0,.08);vertical-align:-2px;margin-right:6px;display:inline-block}
.flag.globe{box-shadow:none;font-size:16px;line-height:15px;text-align:center}
.fbar{display:flex;flex-direction:column;gap:8px;position:relative}
.sbox{position:relative;display:flex;align-items:center}
.sbox svg{position:absolute;left:13px;color:var(--muted);pointer-events:none}
.sbox input[type=search]{padding-left:40px;border-radius:999px;background:var(--surface)}
.drops{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
.drops::-webkit-scrollbar{display:none}
.drop{flex:none;display:inline-flex;align-items:center;gap:2px;min-height:38px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:13.5px;font-weight:600;color:var(--fg);white-space:nowrap}
.drop i{font-style:normal;font-size:11px;color:var(--muted);margin-left:6px}
.drop.on{background:var(--club-soft);border-color:color-mix(in oklab, var(--club) 45%, transparent);color:var(--club-text)}
.drop.on i{color:var(--club-text)}
.seg.sm{display:inline-grid;grid-template-columns:repeat(2,auto);padding:3px;gap:2px}
.seg.sm button{min-height:30px;font-size:13px;padding:0 12px;border-radius:8px}
.picks{display:flex;flex-direction:column;gap:2px;margin:0 -6px}
.pick{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 10px;border:none;border-radius:12px;background:transparent;color:var(--fg);font-size:15px;font-weight:500;text-align:left;width:100%}
.pick .flag{width:24px;height:18px;margin-right:0}
.pick .cnt{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;font-weight:600}
.pick .ck{color:var(--club-text);font-weight:800;width:16px;text-align:center}
.pick[aria-pressed="true"]{background:var(--club-soft);font-weight:700}
.solo{display:flex;gap:10px;align-items:flex-start;padding:12px 12px 12px 14px;border-radius:var(--r-lg);background:var(--club-soft);border:1px solid color-mix(in oklab, var(--club) 25%, transparent)}
.solo b{display:block;font-size:15px;margin-bottom:2px}
.solo .sub{display:block}
.solo .x{flex:none;width:30px;height:30px;border:none;border-radius:50%;background:transparent;color:var(--muted);font-size:14px}
.hero-sm{min-height:0;padding:14px 18px 16px}
.hero-sm .hero-n b{font-size:44px;letter-spacing:-2px}
.race .meta{display:flex;align-items:center;flex-wrap:wrap}
.rmap{height:min(62vh,520px);border-radius:var(--r-lg);overflow:hidden;border:1px solid var(--line);background:var(--surface2);z-index:0}
.leaflet-popup-content{font-family:var(--body);font-size:13px;line-height:1.4}
.leaflet-popup-content .btn{color:var(--club-ink)}
.duo{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}

/* ---------- boje i šare po vrsti trke ---------- */
:root{--tt-mix:var(--fg)}
.race,.rhead{--tt:color-mix(in oklab, var(--t,var(--club)) 80%, var(--fg))}
.race{transition:transform .12s ease, box-shadow .12s ease;border-left:0}
.race:active{transform:scale(.985)}
@media (hover:hover){.race:hover{box-shadow:0 8px 22px -16px color-mix(in oklab, var(--t,var(--club)) 70%, transparent)}}
.pill.tp{background:color-mix(in oklab, var(--t,var(--club)) 16%, var(--surface));color:var(--tt)}
.pill.soon{background:var(--t,var(--club));color:#fff}
.pill.hot{background:color-mix(in oklab, #ff7a1a 18%, var(--surface));color:color-mix(in oklab, #d4570a 85%, var(--fg))}
.bib::before,.rband::before{content:"";position:absolute;inset:0;background:var(--t,var(--club));opacity:.22;-webkit-mask-size:64px 64px;mask-size:64px 64px;pointer-events:none}
.p-topo::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M-4 20c10-8 22-8 34 0s24 8 38 0M-4 36c10-8 22-8 34 0s24 8 38 0M-4 52c10-8 22-8 34 0s24 8 38 0M-4 4c10-8 22-8 34 0s24 8 38 0'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M-4 20c10-8 22-8 34 0s24 8 38 0M-4 36c10-8 22-8 34 0s24 8 38 0M-4 52c10-8 22-8 34 0s24 8 38 0M-4 4c10-8 22-8 34 0s24 8 38 0'/%3E%3C/svg%3E")}
.p-peaks::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M0 44l14-18 10 10 14-22 26 30M0 64l14-18 10 10 14-22 26 30'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M0 44l14-18 10 10 14-22 26 30M0 64l14-18 10 10 14-22 26 30'/%3E%3C/svg%3E")}
.p-road::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='3' stroke-dasharray='8 8'%3E%3Cpath d='M-8 72L72 -8M-40 72L40 -8M24 72L104 -8'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='3' stroke-dasharray='8 8'%3E%3Cpath d='M-8 72L72 -8M-40 72L40 -8M24 72L104 -8'/%3E%3C/svg%3E")}
.p-mud::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23000'%3E%3Ccircle cx='8' cy='10' r='4'/%3E%3Ccircle cx='38' cy='6' r='2.5'/%3E%3Ccircle cx='54' cy='26' r='5'/%3E%3Ccircle cx='22' cy='34' r='3'/%3E%3Ccircle cx='10' cy='54' r='2.5'/%3E%3Ccircle cx='42' cy='50' r='4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23000'%3E%3Ccircle cx='8' cy='10' r='4'/%3E%3Ccircle cx='38' cy='6' r='2.5'/%3E%3Ccircle cx='54' cy='26' r='5'/%3E%3Ccircle cx='22' cy='34' r='3'/%3E%3Ccircle cx='10' cy='54' r='2.5'/%3E%3Ccircle cx='42' cy='50' r='4'/%3E%3C/svg%3E")}
.p-grid::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M0 16h64M0 32h64M0 48h64M16 0v64M32 0v64M48 0v64'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Cpath d='M0 16h64M0 32h64M0 48h64M16 0v64M32 0v64M48 0v64'/%3E%3C/svg%3E")}
.p-stars::before{opacity:.35;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23000'%3E%3Ccircle cx='10' cy='12' r='1.6'/%3E%3Ccircle cx='44' cy='8' r='1.1'/%3E%3Ccircle cx='28' cy='28' r='1.3'/%3E%3Ccircle cx='56' cy='38' r='1.7'/%3E%3Ccircle cx='14' cy='48' r='1.1'/%3E%3Ccircle cx='40' cy='56' r='1.4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23000'%3E%3Ccircle cx='10' cy='12' r='1.6'/%3E%3Ccircle cx='44' cy='8' r='1.1'/%3E%3Ccircle cx='28' cy='28' r='1.3'/%3E%3Ccircle cx='56' cy='38' r='1.7'/%3E%3Ccircle cx='14' cy='48' r='1.1'/%3E%3Ccircle cx='40' cy='56' r='1.4'/%3E%3C/svg%3E")}
.kms{display:flex;flex-wrap:wrap;gap:5px;margin-top:3px}
.km{display:inline-flex;align-items:baseline;gap:2px;padding:2px 8px;border-radius:7px;background:var(--surface2);font-family:var(--display);font-weight:800;font-stretch:90%;font-size:13px;color:var(--fg);font-variant-numeric:tabular-nums}
.km small{font-family:var(--body);font-weight:600;font-size:10px;color:var(--muted)}
.km.txt{font-family:var(--body);font-weight:600;font-size:12px;color:var(--soft)}
.km.more{color:var(--muted)}
/* detalj trke */
.rhead{position:relative;overflow:hidden;padding-top:22px}
.rband{position:absolute;left:0;right:0;top:0;height:8px;background:var(--t,var(--club))}
.rband::before{opacity:0}
.h1link{color:inherit;text-decoration:none}
.h1link h1 .ext{display:inline-block;font-size:.6em;margin-left:6px;color:var(--tt);vertical-align:.25em}
.h1link:active h1{opacity:.7}
.disc{display:flex;flex-direction:column;gap:6px;margin-top:4px;padding:10px;border-radius:var(--r-md);background:color-mix(in oklab, var(--t,var(--club)) 7%, var(--surface2))}
.disc-h{font-size:12px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;color:var(--muted);display:flex;gap:6px}
.disc-h span{color:var(--tt)}
.drow{display:flex;align-items:center;gap:10px;min-height:34px}
.dkm{min-width:58px;font-family:var(--display);font-weight:900;font-stretch:85%;font-size:20px;color:var(--tt);font-variant-numeric:tabular-nums}
.dkm small{font-family:var(--body);font-size:11px;font-weight:600;color:var(--muted);margin-left:2px}
.dkm.txt{font-size:16px}
.drow .grow{font-size:14px;font-weight:600}
.btn.reg{flex-direction:column;gap:0;min-height:52px;background:var(--t,var(--club));border-color:transparent;color:#fff}
.btn.reg small{font-weight:500;font-size:12px;opacity:.85}
