/* RaeSessions — Rae Spordikooli värvid: must ja kollane.
   Ülesehitus: must päis vapiga, üks sisuveerg, all vahekaardid; telefonis menüü vasakult (kolm kriipsu).
   Meeldejääv osa: "Järgmisena" kaart — must tabloo suure kollase kellaajaga ja väljaku keskringiga. */
:root{
  --paper:#f3f4f0; --surface:#ffffff; --sunk:#e9ebe5; --ink:#141613; --muted:#5d625a; --line:#dcdfd7;
  --band:#000000; --band-ink:#f3f4f0; --yellow:#ffe100; --yellow-ink:#141613;
  --accent:#141613; --accent-ink:#ffe100; --soft:#fff4a6;
  --yes:#1d7a45; --yes-soft:#dcefe2; --no:#b3392c; --no-soft:#f6e0dc; --wait:#9a6700;
  --t-trenn:#1d7a45; --t-turniir:#b07415; --t-koosolek:#2f5d9e; --t-buss:#6b4fa0; --t-muu:#6b716a;
  --display:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;
  --body:"Source Sans 3",system-ui,-apple-system,"Segoe UI",sans-serif;
  --nav-h:66px; --r-sm:8px; --r:14px; --r-lg:20px;
  color-scheme:light;
}
html.dark{
  --paper:#0d0e0c; --surface:#171916; --sunk:#20231f; --ink:#ecede8; --muted:#a0a59c; --line:#2b2f29;
  --band:#000000; --band-ink:#ecede8;
  --accent:#ffe100; --accent-ink:#141613; --soft:#38330c;
  --yes:#5cc184; --yes-soft:#16301f; --no:#ec7a6c; --no-soft:#3a1d19; --wait:#e0a84a;
  --t-trenn:#4cb172; --t-turniir:#e0a84a; --t-koosolek:#79a3e0; --t-buss:#a98ad8; --t-muu:#9aa49e;
  color-scheme:dark}

/* ---------- alus ---------- */
*{box-sizing:border-box}
html,body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.45;-webkit-text-size-adjust:100%}
body{padding-bottom:calc(var(--nav-h) + 24px + env(safe-area-inset-bottom,0px))}
body.auth-mode{padding-bottom:0}
body.no-scroll{overflow:hidden}
h1,h2,h3,h4{margin:0;text-wrap:balance}
button,input,select,textarea{font:inherit;color:inherit}
a{color:inherit}
:focus-visible{outline:2px solid var(--yellow);outline-offset:2px;box-shadow:0 0 0 4px var(--ink)}
[hidden]{display:none!important}
svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.wrap{max-width:780px;margin:0 auto;padding-inline:16px}
.boot{min-height:100vh;display:grid;place-items:center;align-content:center;gap:8px;color:var(--muted)}
.muted{color:var(--muted)} .small{font-size:14px}

/* ---------- päis ---------- */
.band{background:var(--band);color:var(--band-ink);padding-top:env(safe-area-inset-top,0px);position:sticky;top:0;z-index:20;box-shadow:inset 0 -3px 0 var(--yellow)}
.band .wrap{display:flex;align-items:center;gap:12px;padding-block:10px 13px}
.band .crest{width:42px;height:42px;flex:none}
.brand{min-width:0;flex:1}
.word{font-family:var(--display);font-weight:800;font-size:25px;line-height:1;letter-spacing:.01em;text-transform:uppercase}
.word span{color:var(--yellow)}
.groupsel{margin-top:4px;max-width:100%;background:rgba(255,255,255,.1);border:0;border-radius:999px;color:var(--band-ink);font-size:14px;padding:2px 10px;cursor:pointer;appearance:none;-webkit-appearance:none;text-overflow:ellipsis}
.groupsel option{color:#141613;background:#fff}
.grouplabel{margin-top:2px;font-size:14px;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.avatar-btn{width:40px;height:40px;border-radius:50%;border:2px solid var(--yellow);background:transparent;color:var(--yellow);font-family:var(--display);font-weight:700;font-size:16px;cursor:pointer;flex:none;padding:0;overflow:hidden;display:grid;place-items:center}
.avatar-btn img{width:100%;height:100%;object-fit:cover}
.burger{display:none;width:40px;height:40px;border:0;border-radius:10px;background:transparent;cursor:pointer;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:0;margin-left:-6px;flex:none}
.burger span{display:block;width:20px;height:2px;border-radius:2px;background:var(--band-ink)}
.burger:hover{background:rgba(255,255,255,.08)}

/* ---------- pealkirjad ---------- */
main{padding-block:20px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.section-head h2{font-family:var(--display);font-size:34px;font-weight:800;line-height:1}
.sub-head{font-size:18px;font-weight:700;margin:26px 0 10px;display:flex;align-items:center;gap:8px}
.count{background:var(--sunk);color:var(--ink);border-radius:999px;font-size:13px;font-weight:700;padding:0 8px;min-width:22px;text-align:center}
.notice{background:var(--soft);border-radius:var(--r);padding:12px 14px;font-size:15px;margin-bottom:14px}

/* ---------- nupud ---------- */
.btn{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:9px 17px;cursor:pointer;font-weight:700;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:background .15s,border-color .15s}
.btn:hover{border-color:var(--muted)}
.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.btn.yellow{background:var(--yellow);color:var(--yellow-ink);border-color:var(--yellow)}
.btn.ghost{background:transparent;border-color:transparent}
.btn.ghost:hover{background:var(--sunk)}
.btn.danger{color:var(--no)}
.btn.sm{padding:6px 12px;font-size:14px}
.btn:disabled{opacity:.5;cursor:default}
.linkbtn{background:none;border:0;padding:0;color:inherit;font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:3px}

/* ---------- kava ---------- */
.kava-title{display:flex;align-items:center;gap:12px;min-width:0}
.filter-now{display:none;align-items:center;gap:6px;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:4px 12px 4px 9px;font-size:14px;font-weight:600;cursor:pointer}
.filter-now svg{width:16px;height:16px}
.kava-layout{display:grid;grid-template-columns:168px minmax(0,1fr);gap:24px;align-items:start}
.kava-list{min-width:0}
.side-menu{display:flex;flex-direction:column;gap:2px;position:sticky;top:calc(92px + env(safe-area-inset-top,0px))}
.side-menu > button{display:flex;align-items:center;gap:11px;border:0;background:transparent;text-align:left;padding:9px 12px;border-radius:12px;font-size:16px;font-weight:600;color:var(--muted);cursor:pointer}
.side-menu > button:hover{background:var(--sunk);color:var(--ink)}
.side-menu > button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:inset 3px 0 0 var(--yellow),0 1px 0 var(--line)}
.side-menu .ico{color:var(--tc,var(--ink));display:grid}

.day{margin-bottom:22px}
.day-label{font-size:17px;font-weight:700;margin:0 0 8px;display:flex;align-items:baseline;gap:8px}
.day-label span{font-weight:400;color:var(--muted);font-size:15px}
.day-label.today::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--yellow);box-shadow:0 0 0 2px var(--ink);align-self:center}

.ev{display:grid;grid-template-columns:auto 1fr;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px;margin-bottom:10px}
.ev.clickable{cursor:pointer;transition:border-color .15s}
.ev.clickable:hover{border-color:var(--muted)}
.ev.past{opacity:.6}
.clock{min-width:58px;font-family:var(--display);text-align:left;font-variant-numeric:tabular-nums;align-self:start;border-right:1px solid var(--line);padding-right:10px}
.clock .h{font-size:26px;font-weight:800;line-height:1}
.clock .e{font-size:14px;color:var(--muted);margin-top:2px}
.ev-body{min-width:0;display:flex;flex-direction:column;gap:5px}
.ev-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ev-title{font-weight:700;font-size:18px;line-height:1.25;overflow-wrap:anywhere}
.tag{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:700;padding:2px 9px 2px 6px;border-radius:999px;color:var(--tc,var(--t-muu));background:color-mix(in srgb,var(--tc,var(--t-muu)) 13%,transparent)}
.tag svg{width:15px;height:15px}
.meta{font-size:15px;color:var(--muted);display:flex;gap:4px 14px;flex-wrap:wrap}
.notes{font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}
.notes.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted)}
.open-hint{font-size:14px;font-weight:600;color:var(--muted);margin-top:2px}

.rsvp{margin-top:6px;display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--line);padding-top:10px}
.rsvp-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rsvp-row .who{font-weight:600;flex:1;min-width:90px}
.seg{display:inline-flex;background:var(--sunk);border-radius:999px;padding:3px;gap:3px}
.seg button{border:0;background:transparent;border-radius:999px;padding:6px 14px;font-size:14px;font-weight:600;cursor:pointer;min-width:80px;color:var(--muted)}
.seg button:hover{color:var(--ink)}
.seg button.yes[aria-pressed="true"]{background:var(--yes);color:var(--surface)}
.seg button.no[aria-pressed="true"]{background:var(--no);color:var(--surface)}
.tally{display:flex;gap:6px;flex-wrap:wrap;font-size:13px;font-variant-numeric:tabular-nums}
.tp{border-radius:999px;padding:1px 9px;background:var(--sunk);color:var(--muted)}
.tp b{font-weight:800}
.tp.y{background:var(--yes-soft);color:var(--yes)}
.tp.n{background:var(--no-soft);color:var(--no)}

/* "Järgmisena" tabloo */
.hero{position:relative;overflow:hidden;background:var(--band);color:#f3f4f0;border-radius:var(--r-lg);padding:18px 18px 16px;margin-bottom:26px;cursor:pointer;isolation:isolate}
.hero::before{content:"";position:absolute;right:-70px;top:50%;width:220px;height:220px;border:2px solid rgba(255,255,255,.09);border-radius:50%;transform:translateY(-50%);z-index:-1}
.hero::after{content:"";position:absolute;right:39px;top:0;bottom:0;border-left:2px solid rgba(255,255,255,.09);z-index:-1}
.hero-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hero-kicker{font-weight:700;color:var(--yellow);font-size:15px}
.hero .tag{--tc:#f3f4f0;background:rgba(255,255,255,.12);color:#f3f4f0}
.hero-main{display:flex;align-items:flex-end;gap:18px;margin-top:10px;flex-wrap:wrap}
.hero-time{display:flex;flex-direction:column;line-height:1}
.hero-day{font-family:var(--display);font-weight:600;font-size:20px;color:#c9ccc4}
.hero-clock{font-family:var(--display);font-weight:800;font-size:68px;color:var(--yellow);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.hero-info{min-width:0;flex:1;padding-bottom:6px}
.hero-title{font-weight:700;font-size:20px;line-height:1.2;overflow-wrap:anywhere}
.hero-meta{color:#c9ccc4;font-size:15px}
.hero-rsvp{border-top-color:rgba(255,255,255,.14);margin-top:12px}
.hero .seg{background:rgba(255,255,255,.1)}
.hero .seg button{color:#c9ccc4}
.hero .seg button.yes[aria-pressed="true"]{background:#2e9e5e;color:#fff}
.hero .seg button.no[aria-pressed="true"]{background:#d4503f;color:#fff}
.hero .tp{background:rgba(255,255,255,.1);color:#c9ccc4}
.hero .tp.y{background:rgba(46,158,94,.25);color:#8be0ad}
.hero .tp.n{background:rgba(212,80,63,.25);color:#f5a89d}

/* ---------- treeningu sisu ---------- */
.plan{display:flex;flex-direction:column;gap:12px}
.ex{border-left:3px solid var(--yellow);padding:2px 0 2px 12px}
.ex h4{margin:0 0 4px;font-size:16px}
.ex h4 .min{font-weight:400;color:var(--muted)}
.ex dl{margin:0;display:grid;gap:2px}
.ex dt{font-size:13px;font-weight:700;color:var(--muted)}
.ex dd{margin:0 0 6px;font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}

/* ---------- tühi olek, kaardid, vormid ---------- */
.empty{text-align:center;padding:34px 18px;border:1.5px dashed var(--line);border-radius:var(--r-lg);color:var(--muted)}
.empty h3{font-size:20px;color:var(--ink);margin-bottom:6px}
.empty .btn{margin-top:14px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;margin-bottom:12px}
.card h3{font-size:18px;font-weight:700;margin-bottom:12px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.full{grid-column:1/-1}
label.f{display:flex;flex-direction:column;gap:5px;font-size:14px;font-weight:600;color:var(--muted);min-width:0}
input[type=text],input[type=search],input[type=email],input[type=tel],input[type=password],input[type=number],input[type=date],input[type=time],select,textarea{border:1px solid var(--line);background:var(--paper);border-radius:10px;padding:10px 12px;font-size:16px;width:100%;min-width:0;color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--ink);background:var(--surface)}
textarea{resize:vertical;min-height:64px}
.check{display:flex;align-items:center;gap:8px;font-size:15px}
.check input{width:18px;height:18px;accent-color:var(--ink)}
.row-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.inline{display:flex;gap:8px;flex-wrap:wrap}
.inline > *{flex:1;min-width:140px}
.inline .btn{flex:none}
@media (max-width:460px){.grid{grid-template-columns:1fr}}

/* ---------- inimesed ---------- */
.person{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.person:last-child{border-bottom:0}
.person .x{flex:1;min-width:0}
.person .x b{display:block;overflow-wrap:anywhere}
.person .x .small{overflow-wrap:anywhere}
.person .acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.person.req{flex-direction:column;align-items:stretch}
.person.req .acts{justify-content:flex-start}
.status{font-size:13px;font-weight:700;padding:2px 9px;border-radius:999px;white-space:nowrap}
.status.pending{background:var(--soft);color:var(--wait)}
.status.approved{background:var(--yes-soft);color:var(--yes)}
.status.rejected{background:var(--no-soft);color:var(--no)}
.memberships{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}

/* pildid ja initsiaalid */
.ini{width:32px;height:32px;border-radius:50%;flex:none;display:grid;place-items:center;font-family:var(--display);font-weight:700;font-size:14px;background:var(--sunk);color:var(--ink)}
.ini.coach{background:var(--yellow);color:var(--yellow-ink)}
img.pic{object-fit:cover;display:block}
.ini.lg{width:48px;height:48px;font-size:18px}
.ini.xl{width:88px;height:88px;font-size:30px}
.ini.xs{width:22px;height:22px;font-size:10px}
.profile-pic{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.photo-btn{border:0;background:none;padding:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;flex:none}
.photo-edit{font-size:12px;font-weight:600;color:var(--muted);text-decoration:underline}

/* ---------- vestlus ---------- */
.chat{display:flex;flex-direction:column;gap:10px;min-height:200px}
.msg{display:flex;gap:8px;align-items:flex-end;max-width:86%}
.bubble{background:var(--surface);border:1px solid var(--line);border-radius:18px 18px 18px 6px;padding:8px 12px;min-width:0}
.bubble .n{font-size:13px;font-weight:700;color:var(--muted)}
.bubble .n em{font-style:normal;background:var(--yellow);color:var(--yellow-ink);border-radius:999px;padding:0 6px;margin-left:6px;font-size:11px}
.bubble .t{white-space:pre-wrap;overflow-wrap:anywhere}
.bubble .ts{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.msg.mine{align-self:flex-end;flex-direction:row-reverse}
.msg.mine .bubble{background:var(--ink);color:var(--paper);border-color:transparent;border-radius:18px 18px 6px 18px}
.msg.mine .bubble .ts,.msg.mine .del{color:color-mix(in srgb,var(--paper) 65%,transparent)}
.chat-day{align-self:center;font-size:13px;font-weight:600;color:var(--muted);background:var(--sunk);border-radius:999px;padding:2px 10px}
.composer{position:sticky;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom,0px));display:flex;gap:8px;margin-top:14px;background:var(--paper);padding-block:10px}
.composer textarea{min-height:48px;height:48px;flex:1;border-radius:24px;padding:12px 16px}
.del{background:none;border:0;color:var(--muted);font-size:12px;cursor:pointer;padding:0;margin-left:6px;text-decoration:underline}

/* ---------- tabelid ---------- */
.table-wrap{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-size:15px}
th,td{text-align:left;padding:9px 8px;border-bottom:1px solid var(--line);vertical-align:top}
th{font-size:13px;color:var(--muted);font-weight:700}
td.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.st{font-weight:700} .st.y{color:var(--yes)} .st.n{color:var(--no)} .st.q{color:var(--muted);font-weight:400}
.bar{height:6px;border-radius:3px;background:var(--sunk);overflow:hidden;min-width:60px;margin-top:4px}
.bar i{display:block;height:100%;background:var(--yes)}

.att-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);cursor:pointer}
.att-row input{width:22px;height:22px;accent-color:var(--yes);flex:none}
.att-row .ini{width:34px;height:34px}
.att-row .x{flex:1;min-width:0}
.att-row .x b{display:block}

.ex-edit{border:1px solid var(--line);border-radius:var(--r);padding:12px;display:grid;gap:8px;background:var(--paper)}
.ex-edit .head{display:flex;gap:8px;align-items:flex-end}
.ex-edit .head label:first-child{flex:1}
.ex-edit .head label:nth-child(2){width:90px}

/* ---------- dialoog ---------- */
dialog{border:0;padding:0;border-radius:var(--r-lg);background:var(--surface);color:var(--ink);width:min(640px,calc(100% - 24px));max-height:calc(100% - 24px)}
dialog::backdrop{background:rgba(0,0,0,.55)}
.dlg{padding:20px;display:flex;flex-direction:column;gap:12px}
.dlg-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.dlg-head h2{font-family:var(--display);font-size:28px;font-weight:800;line-height:1.05;overflow-wrap:anywhere}
.x-btn{background:var(--sunk);border:0;width:36px;height:36px;border-radius:50%;font-size:22px;line-height:1;cursor:pointer;color:var(--ink);flex:none}
.detail{display:flex;flex-direction:column;gap:14px}
.facts{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;margin:0;font-size:16px}
.facts dt{color:var(--muted)}
.facts dd{margin:0;font-weight:600}
.detail-sec{border-top:1px solid var(--line);padding-top:14px;display:flex;flex-direction:column;gap:12px}
.who-head{font-size:16px;font-weight:700;display:flex;align-items:center;gap:8px}
.who-head.y{color:var(--yes)} .who-head.n{color:var(--no)} .who-head.q{color:var(--muted)}
.who-list{display:flex;flex-direction:column;gap:6px}
.chips-list{display:flex;flex-wrap:wrap;gap:6px}
.pchip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:3px 11px 3px 4px;font-size:14px;background:var(--sunk)}
.pchip.y{background:var(--yes-soft);color:var(--yes);font-weight:600}
.pchip.n{background:var(--no-soft);color:var(--no)}
.danger-zone{border-top:1px solid var(--line);padding-top:12px;margin-top:4px}
.danger-zone summary{color:var(--no);cursor:pointer;font-weight:600}
.danger-zone p{color:var(--muted)}
details summary{cursor:pointer}

/* ---------- alumine menüü ---------- */
nav.bottom{position:fixed;left:0;right:0;bottom:0;z-index:20;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom,0px)}
nav.bottom .wrap{display:flex;height:var(--nav-h);padding-inline:4px}
nav.bottom button{flex:1;border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:12px;font-weight:700;color:var(--muted);cursor:pointer;position:relative;min-width:0}
nav.bottom svg{width:22px;height:22px;padding:4px 14px;box-sizing:content-box;border-radius:999px;transition:background .15s}
nav.bottom button[aria-current="true"]{color:var(--ink)}
nav.bottom button[aria-current="true"] svg{background:var(--yellow);color:var(--yellow-ink)}
.badge{position:absolute;top:5px;left:calc(50% + 10px);background:var(--no);color:#fff;border-radius:999px;font-size:11px;min-width:18px;height:18px;line-height:18px;padding:0 5px;text-align:center}

/* ---------- vasakult avanev menüü (telefon) ---------- */
.drawer{position:fixed;top:0;left:0;bottom:0;width:min(82vw,320px);z-index:60;background:var(--surface);padding:calc(14px + env(safe-area-inset-top,0px)) 12px calc(16px + env(safe-area-inset-bottom,0px));box-shadow:6px 0 30px rgba(0,0,0,.25);transform:translateX(-105%);transition:transform .26s ease;overflow-y:auto;display:flex;flex-direction:column;gap:2px}
.drawer.open{transform:none}
.drawer-head{display:flex;align-items:center;gap:10px;padding:2px 4px 14px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.drawer-head img{width:36px;height:36px}
.drawer-head .word{flex:1;font-size:22px}
.drawer-head .word span{color:var(--ink);background:var(--yellow);padding:0 3px;border-radius:3px}
.drawer-sec{font-size:13px;font-weight:700;color:var(--muted);padding:14px 12px 4px}
.drawer > button{display:flex;align-items:center;gap:12px;border:0;background:transparent;text-align:left;padding:11px 12px;border-radius:12px;font-size:17px;font-weight:600;color:var(--ink);cursor:pointer}
.drawer > button:hover{background:var(--sunk)}
.drawer > button[aria-current="true"]{background:var(--sunk);box-shadow:inset 3px 0 0 var(--yellow)}
.drawer .ico{display:grid;place-items:center;width:24px}
.drawer .tico{display:grid;color:var(--tc,var(--ink))}
.scrim{position:fixed;inset:0;z-index:59;background:rgba(0,0,0,.45);opacity:0;pointer-events:none;transition:opacity .26s}
.scrim.open{opacity:1;pointer-events:auto}

@media (max-width:700px){
  .burger{display:flex}
  .filter-now{display:inline-flex}
  .kava-layout{display:block}
  .side-menu{display:none}
  .ev{gap:12px;padding:12px}
  .clock{min-width:50px;padding-right:8px}
  .clock .h{font-size:22px}
  .hero-clock{font-size:58px}
}
@media (min-width:701px){.wrap{max-width:980px}}

/* ---------- sisselogimine ---------- */
.auth{min-height:100vh;display:grid;grid-template-rows:auto 1fr}
.auth-hero{position:relative;overflow:hidden;background:var(--band);color:var(--band-ink);padding:calc(30px + env(safe-area-inset-top,0px)) 16px 30px;text-align:center;box-shadow:inset 0 -3px 0 var(--yellow);isolation:isolate}
.auth-hero::before{content:"";position:absolute;left:50%;top:50%;width:300px;height:300px;border:2px solid rgba(255,255,255,.08);border-radius:50%;transform:translate(-50%,-50%);z-index:-1}
.auth-hero::after{content:"";position:absolute;left:0;right:0;top:50%;border-top:2px solid rgba(255,255,255,.08);z-index:-1}
.auth-hero img{width:96px;height:96px}
.auth-hero .word{font-size:44px;margin-top:10px}
.auth-hero p{margin:6px 0 0;opacity:.8}
.auth-box{width:100%;max-width:440px;margin:0 auto;padding:24px 16px 40px;display:flex;flex-direction:column;gap:14px}
.auth-box h2{font-family:var(--display);font-size:28px}
.tabs{display:flex;background:var(--sunk);border-radius:999px;padding:4px;gap:4px}
.tabs button{flex:1;border:0;background:transparent;border-radius:999px;padding:9px;cursor:pointer;font-weight:700;color:var(--muted)}
.tabs button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.rolepick{border:1px solid var(--line);border-radius:var(--r);padding:10px 14px 12px;margin:0;display:flex;gap:18px;flex-wrap:wrap}
.rolepick legend{font-size:14px;font-weight:600;color:var(--muted);padding:0 4px}
.err{color:var(--no);font-size:15px;min-height:1em;margin:0}

.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--nav-h) + 18px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--paper);padding:10px 16px;border-radius:999px;font-size:15px;font-weight:600;z-index:80;max-width:calc(100% - 32px);box-shadow:0 6px 20px rgba(0,0,0,.2)}
@media (prefers-reduced-motion:reduce){.drawer,.scrim,.btn,nav.bottom svg{transition:none}}

/* ---------- pildi sättimine ---------- */
.crop-wrap{display:grid;place-items:center}
.crop-canvas{width:min(300px,76vw);height:auto;aspect-ratio:1;border-radius:var(--r);background:#000;touch-action:none;cursor:grab}
.crop-canvas:active{cursor:grabbing}
.crop-zoom-row{display:flex;align-items:center;gap:10px;color:var(--muted)}
.crop-zoom{flex:1;accent-color:var(--ink)}
/* ---------- mitmepäevane ajakava ---------- */
.sched-edit{display:flex;flex-direction:column;gap:8px}
.sched-row{display:grid;grid-template-columns:72px 92px 92px minmax(0,1fr);gap:6px;align-items:center}
.sched-day{font-weight:700;color:var(--ink);font-size:14px}
.sched-row input{padding:8px}
@media (max-width:520px){.sched-row{grid-template-columns:64px 1fr 1fr}.sched-row input[type=text]{grid-column:1/-1}}
.sched{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0;font-size:15px}
.sched dt{color:var(--muted)}
.sched dd{margin:0}
.pick-list{flex-basis:100%;display:flex;flex-direction:column;gap:0;margin-top:6px;max-height:320px;overflow-y:auto;border-top:1px solid var(--line);padding-top:6px}
/* ---------- konto menüü ja grupi vahetus ---------- */
.groupsel{display:inline-flex;align-items:center;gap:4px;font-weight:600}
.groupsel svg{width:16px;height:16px}
.acct-head{display:flex;align-items:center;gap:12px}
.acct-head b{display:block;font-size:17px}
.acct-sec{font-size:14px;font-weight:700;color:var(--muted);margin-top:6px}
.acct-list{display:flex;flex-direction:column;gap:6px}
.acct-item{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:var(--r);padding:12px 14px;cursor:pointer}
.acct-item:hover{border-color:var(--muted)}
.acct-item .x{display:flex;flex-direction:column;min-width:0}
.acct-item[aria-current="true"]{border-color:var(--ink);box-shadow:inset 3px 0 0 var(--yellow)}
.acct-radio{width:20px;height:20px;border-radius:50%;border:2px solid var(--line);flex:none}
.acct-item[aria-current="true"] .acct-radio{border:6px solid var(--ink);background:var(--yellow)}
/* ---------- sõnumid: grupp ja privaatsed ---------- */
.msg-tabs{display:flex;background:var(--sunk);border-radius:999px;padding:4px;gap:4px;margin-bottom:14px;max-width:420px}
.msg-tabs button{flex:1;border:0;background:transparent;border-radius:999px;padding:9px 12px;cursor:pointer;font-weight:700;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;gap:6px}
.msg-tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.count.hot{background:var(--no);color:#fff}
.msg-note{margin:0 0 12px}
.dm-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.dm-list{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.dm-item{display:flex;align-items:center;gap:12px;text-align:left;border:0;border-bottom:1px solid var(--line);background:transparent;padding:12px 14px;cursor:pointer}
.dm-item:last-child{border-bottom:0}
.dm-item:hover{background:var(--paper)}
.dm-item .x{flex:1;min-width:0;display:flex;flex-direction:column}
.dm-last{font-size:14px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm-item.unread .dm-last{color:var(--ink);font-weight:600}
.dm-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}
.dm-head{display:flex;align-items:center;gap:10px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.dm-head .x{display:flex;flex-direction:column;min-width:0}
.dm-head .btn svg{width:18px;height:18px}
/* ---------- sündmuse vorm telefonis: täisekraan, kerib ühtlaselt ---------- */
.form-sec{font-size:16px;font-weight:800;margin:10px 0 -2px;padding-top:12px;border-top:1px solid var(--line)}
.type-pick{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:6px}
.type-pick button{display:flex;align-items:center;justify-content:center;gap:6px;border:1.5px solid var(--line);background:var(--surface);border-radius:12px;padding:10px 8px;font-weight:700;font-size:15px;cursor:pointer;color:var(--muted)}
.type-pick button[aria-checked="true"]{border-color:var(--ink);color:var(--ink);background:var(--soft)}
.type-pick .tico{display:grid;color:var(--tc)}
input[type=date],input[type=time]{-webkit-appearance:none;appearance:none;min-height:46px;display:block;text-align:left;line-height:1.2}
input::-webkit-date-and-time-value{text-align:left}
dialog .dlg{overscroll-behavior:contain}
.sheet-actions{position:sticky;bottom:0;background:var(--surface);padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px));margin-top:8px;border-top:1px solid var(--line);z-index:2}
@media (max-width:700px){
  dialog.sheet{width:100%;max-width:100%;height:100%;max-height:100%;margin:0;border-radius:0;inset:0}
  dialog.sheet .dlg{min-height:100%;padding:0 16px}
  dialog.sheet .dlg-head{position:sticky;top:0;z-index:3;background:var(--surface);padding:calc(12px + env(safe-area-inset-top,0px)) 0 10px;border-bottom:1px solid var(--line);margin:0 0 4px}
  dialog.sheet .grid{grid-template-columns:1fr 1fr}
  dialog.sheet .grid > label.f:not(.full){grid-column:auto}
}
/* vorm ei tohi kunagi külgsuunas kerida */
dialog{overflow-x:hidden}
dialog.sheet{touch-action:pan-y}
dialog .grid > *,dialog .inline > *,.ex-edit > *,.sched-row > *{min-width:0}
dialog input,dialog select,dialog textarea{max-width:100%}
.ex-edit .head label:nth-child(2){width:80px;flex:none}
@media (max-width:700px){
  .sched-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}
  .sched-row .sched-day{grid-column:1/-1}
  .sched-row input[type=text]{grid-column:1/-1}
  .pick-list .inline{flex-wrap:wrap}
}
.type-pick{grid-template-columns:repeat(3,minmax(0,1fr))}
.type-pick button{flex-direction:column;gap:4px;padding:10px 4px;font-size:14px}
.type-pick svg{width:22px;height:22px}
/* ---------- treeneri / lapsevanema vaade ---------- */
.view-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:var(--sunk);border-radius:14px;padding:4px;margin:4px 0}
.view-switch button{display:flex;align-items:center;justify-content:center;gap:6px;border:0;background:transparent;border-radius:10px;padding:10px 6px;font-weight:700;font-size:14px;color:var(--muted);cursor:pointer}
.view-switch button[aria-checked="true"]{background:var(--ink);color:var(--yellow)}
.view-switch svg{width:18px;height:18px}
.drawer .view-switch{margin:4px 4px 6px}
.brand-sub{display:flex;align-items:center;gap:6px;min-width:0}
.brand-sub .groupsel,.brand-sub .grouplabel{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.view-pill{margin-top:4px;flex:none;border:0;border-radius:999px;background:var(--yellow);color:var(--yellow-ink);font-size:12px;font-weight:800;padding:2px 8px;cursor:pointer}
/* ---------- sõnumid nagu Messengeris ---------- */
.fab-plus{width:44px;height:44px;border-radius:50%;border:0;background:var(--yellow);color:var(--yellow-ink);display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.fab-plus svg{width:24px;height:24px;stroke-width:2.4}
.fab-plus:disabled{opacity:.4;cursor:default}
.chat-search{margin-bottom:12px;border-radius:999px!important;padding-left:16px!important}
.ini.grp{background:var(--ink);color:var(--yellow)}
.ini.grp svg{width:60%;height:60%}
.grp-tag{display:inline-block;margin-left:6px;font-size:11px;font-weight:800;background:var(--yellow);color:var(--yellow-ink);border-radius:999px;padding:0 6px;vertical-align:2px}
/* ---------- telefoni paigaldamine ---------- */
.install-banner{display:flex;align-items:center;gap:12px;background:var(--band);color:#f3f4f0;border-radius:var(--r);padding:12px;margin-bottom:16px}
.install-banner img{width:40px;height:40px;flex:none}
.install-banner .x{flex:1;min-width:0;display:flex;flex-direction:column}
.install-banner .small{color:#c9ccc4}
.install-banner .x-btn{background:rgba(255,255,255,.12);color:#f3f4f0;width:30px;height:30px;font-size:18px}
.steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.steps li{display:flex;gap:12px;align-items:flex-start;font-size:16px}
.step-n{width:28px;height:28px;border-radius:50%;background:var(--yellow);color:var(--yellow-ink);font-weight:800;display:grid;place-items:center;flex:none}
/* ---------- grupi vaade ja eelvaade ---------- */
.group-card{display:flex;align-items:center;gap:16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:16px;margin-bottom:8px}
.group-card .x{min-width:0;display:flex;flex-direction:column;gap:2px}
.group-card h2{font-family:var(--display);font-size:32px;font-weight:800;line-height:1}
.group-stats{display:flex;gap:4px 16px;flex-wrap:wrap;font-size:15px;margin-top:4px}
.preview-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:var(--soft);border:1.5px dashed var(--ink);border-radius:var(--r);padding:10px 12px;margin-bottom:14px;font-size:15px}
.view-switch.three{grid-template-columns:repeat(3,1fr)}
/* ---------- KKK: puhas kaheveeruline nimekiri joontega ---------- */
.faq-head{text-align:center;margin:8px 0 22px}
.faq-head h2{font-family:var(--display);font-size:56px;font-weight:800;line-height:1;letter-spacing:.01em}
.faq-head p{margin:8px auto 0;color:var(--muted);max-width:46ch}
.faq-list{max-width:900px;margin:0 auto;column-gap:56px}
@media (min-width:760px){.faq-list{column-count:2}}
.faq{break-inside:avoid}
.faq{border-top:1px solid var(--line)}
.faq:last-child{border-bottom:1px solid var(--line)}
.faq summary{list-style:none;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 2px;font-weight:700;font-size:16px;line-height:1.35;color:var(--ink);cursor:pointer}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font-size:22px;line-height:1;color:var(--muted);flex:none;transition:transform .2s}
.faq[open] summary::after{content:"–";color:var(--ink)}
.faq summary:hover{color:var(--muted)}
.faq-a{padding:0 2px 20px;display:flex;flex-direction:column;gap:8px}
.faq-a p{margin:0;color:var(--muted);max-width:60ch}
.faq-a .btn{align-self:flex-start}
@media (max-width:460px){.person{flex-wrap:wrap}.person .acts{flex-basis:100%;justify-content:flex-start;padding-left:60px}}
.kind-seg{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.kind-seg button{display:flex;flex-direction:column;align-items:center;gap:1px;border:1.5px solid var(--line);background:var(--surface);border-radius:12px;padding:9px 6px;cursor:pointer;color:var(--muted)}
.kind-seg button[aria-checked="true"]{border-color:var(--ink);color:var(--ink);background:var(--soft)}
.kind-seg .small{font-size:12px}
/* ---------- aadressi otsing ja nädalapäevad ---------- */
.ac{position:relative}
.ac-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:20;background:var(--surface);border:1px solid var(--ink);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.18);overflow:hidden;max-height:320px;overflow-y:auto}
.ac-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);background:transparent;padding:10px 12px;cursor:pointer;color:var(--ink)}
.ac-item:hover,.ac-item.on{background:var(--soft)}
.ac-item .x{display:flex;flex-direction:column;min-width:0}
.ac-item b{font-weight:700;font-size:15px}
.ac-item svg{width:18px;height:18px;color:var(--muted)}
.ac-foot{font-size:11px;color:var(--muted);padding:6px 12px}
.day-chips{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-top:4px}
.day-chips button{height:42px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);font-weight:800;font-size:15px;cursor:pointer;color:var(--muted)}
.day-chips button[aria-pressed="true"]{background:var(--ink);color:var(--yellow);border-color:var(--ink)}
/* ---------- lapsevanema ja mängija sidumine ---------- */
.link-ok{margin-top:10px;font-size:14px;color:var(--yes);background:var(--yes-soft);border-radius:10px;padding:8px 10px}
.link-box{margin-top:10px;display:flex;flex-direction:column;gap:8px;align-items:flex-start;border-top:1px solid var(--line);padding-top:10px}
.link-code{display:flex;flex-direction:column;align-items:flex-start}
.link-code b{font-family:var(--display);font-size:34px;letter-spacing:.18em;background:var(--yellow);color:var(--yellow-ink);border-radius:10px;padding:2px 12px}
/* ---------- logo = avaleht ---------- */
.crest-btn{border:0;background:none;padding:0;cursor:pointer;flex:none;border-radius:50%;display:grid}
.crest-btn:hover .crest{transform:rotate(-8deg)}
.crest{transition:transform .2s}
/* ---------- arvutis: menüü alati vasakul (sama mis telefonis kolme kriipsu all) ---------- */
@media (min-width:1000px){
  :root{--side:270px}
  body{padding-left:var(--side);padding-bottom:40px}
  nav.bottom,.burger,.scrim{display:none!important}
  .drawer{transform:none;top:calc(65px + env(safe-area-inset-top,0px));width:var(--side);box-shadow:none;border-right:1px solid var(--line);z-index:15;padding-top:14px;transition:none}
  .drawer .drawer-head{display:none}
  .band{margin-left:calc(-1 * var(--side))}
  .band .wrap{max-width:none;padding-inline:22px}
  main.wrap{max-width:900px;padding-inline:32px}
  .kava-layout{display:block}
  .side-menu{display:none}
  .filter-now{display:inline-flex}
  .composer{bottom:0}
  .toast{bottom:28px}
  dialog.sheet{width:min(720px,calc(100% - 40px));height:auto;max-height:calc(100% - 40px);border-radius:var(--r-lg)}
}
.drawer .view-switch button{flex-direction:column;gap:3px;font-size:12px;padding:8px 2px;text-align:center;line-height:1.15}
.drawer .view-switch svg{width:18px;height:18px}
/* ---------- kohad pildiga ---------- */
.hero.has-photo{background-image:linear-gradient(180deg,rgba(0,0,0,.45),rgba(0,0,0,.82)),var(--hero-img);background-size:cover;background-position:center}
.venue-banner{height:150px;border-radius:var(--r);background-size:cover;background-position:center;display:flex;align-items:flex-end;padding:10px 12px;position:relative;overflow:hidden}
.venue-banner::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 40%,rgba(0,0,0,.7))}
.venue-banner span{position:relative;color:#fff;font-weight:800;font-size:17px}
.ev-body.with-thumb{position:relative;padding-right:76px}
.ev-body.with-thumb::after{content:"";position:absolute;right:0;top:0;width:64px;height:64px;border-radius:12px;background-image:var(--thumb);background-size:cover;background-position:center}
.venue-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.venue-row:last-child{border-bottom:0}
.venue-row .x{flex:1;min-width:0;display:flex;flex-direction:column}
.venue-row .acts{display:flex;gap:6px;flex-wrap:wrap}
.venue-thumb{width:72px;height:48px;border-radius:8px;background:var(--sunk) center/cover;flex:none}
/* ---------- kontakt ---------- */
.contact-list{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.contact{display:flex;align-items:center;gap:12px;padding:14px;border-bottom:1px solid var(--line)}
.contact:last-child{border-bottom:0}
.contact .x{flex:1;min-width:0}
.contact .x b{display:block;font-size:16px}
.contact-acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.contact-list > p{padding:14px;margin:0}
@media (max-width:460px){.contact{flex-wrap:wrap}.contact-acts{flex-basis:100%;justify-content:flex-start;padding-left:60px}}

/* KKK: kasulikud lingid */
.links-title{max-width:900px;margin:34px auto 12px;font-family:var(--display);font-size:24px;text-transform:uppercase;letter-spacing:.02em}
.link-list{max-width:900px;margin:0 auto 30px;display:grid;gap:10px}
@media (min-width:760px){.link-list{grid-template-columns:1fr 1fr}}
.link-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:13px 16px;color:var(--ink);text-decoration:none;transition:border-color .15s}
.link-row:hover{border-color:var(--yellow)}
.link-text{display:flex;flex-direction:column;min-width:0}
.link-text small{color:var(--muted);font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.link-row svg{flex:none;width:20px;height:20px;color:var(--muted)}

/* Admin: vahekaardid ja lahtikäivad grupid */
.admin-tabs{display:flex;gap:4px;background:var(--sunk);border-radius:999px;padding:4px;margin:0 0 18px;overflow-x:auto;scrollbar-width:none}
.admin-tabs button{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;border-radius:999px;padding:9px 14px;font-size:15px;font-weight:700;color:var(--muted);cursor:pointer;white-space:nowrap}
.admin-tabs button:hover{color:var(--ink)}
.admin-tabs button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12),inset 0 -3px 0 var(--yellow)}
.admin-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.admin-bar .btn{flex:none}
.admin-list{display:grid;gap:8px}
.admin-item{background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}
.admin-item[open]{border-color:var(--muted)}
.admin-item summary{list-style:none;display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer}
.admin-item summary::-webkit-details-marker{display:none}
.admin-item summary::after{content:"";flex:none;width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:-4px 4px 0 auto;transition:transform .15s}
.admin-item[open] summary::after{transform:rotate(-135deg);margin-top:4px}
.ai-main{display:flex;flex-direction:column;min-width:0}
.ai-main small{color:var(--muted);font-size:14px}
.ai-body{padding:0 16px 14px;border-top:1px solid var(--line);padding-top:12px}
.ai-danger{display:flex;justify-content:flex-end;margin-top:12px;padding-top:10px;border-top:1px dashed var(--line)}
.empty-box{display:flex;flex-direction:column;gap:4px;align-items:center;text-align:center;padding:36px 16px;background:var(--surface);border:1px dashed var(--line);border-radius:var(--r)}
@media (max-width:560px){.venue-row{flex-wrap:wrap}.venue-row .acts{width:100%;justify-content:flex-end}}
.venue-preview{margin-top:6px;height:140px;border-radius:12px;background:var(--sunk) center/cover no-repeat;display:grid;place-items:center;border:1px solid var(--line)}
.venue-row.clickable{cursor:pointer}

/* Admin: kasutajad */
.user-row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;cursor:pointer;color:var(--ink);font:inherit}
.user-row:hover{border-color:var(--muted)}
.user-row .ai-main{flex:1}
.user-row .ai-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-search{width:100%;margin-bottom:12px}
.role-chip{flex:none;font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--sunk);color:var(--ink);white-space:nowrap}
.role-chip.r-admin{background:var(--yellow);color:#000}
.role-chip.r-coach{background:#111;color:var(--yellow)}
.role-chip.r-player{background:#e3efff;color:#1d4f91}
.role-chip.s-approved{background:#e2f4e9;color:#1d6b3d}
.role-chip.s-pending{background:#fff4c2;color:#6b5600}
.role-chip.s-rejected{background:#fde4e0;color:#a12f20}
.user-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.grid.three{grid-template-columns:1fr 1fr 110px}
@media (max-width:460px){.grid.three{grid-template-columns:1fr 1fr}.grid.three > :last-child{grid-column:1/-1}}
.kid-card{border-left:4px solid var(--yellow)}
.user-dlg .card{margin-bottom:12px}
.user-search{margin-bottom:12px;border-radius:999px !important;padding-left:16px !important}
@media (max-width:460px){.admin-tabs{gap:2px}.admin-tabs button{padding:8px 9px;font-size:14px;gap:5px}.admin-tabs .count{padding:0 6px;min-width:18px}}

/* =====================================================================
   Heledam kujundus: kollane päis, soojem taust, värvilised sündmused
   ===================================================================== */
:root{
  --paper:#f8f6ef; --sunk:#efece2; --line:#e3dfd2; --muted:#5f5d55;
  --head:#ffe100; --head-ink:#111111;
  --t-trenn:#17914d; --t-turniir:#e07b00; --t-koosolek:#2563c9; --t-muu:#6b716a;
}
html.dark{
  --paper:#0f100d; --sunk:#22241f; --line:#2f322b; --muted:#a3a79c;
  --head:#000000; --head-ink:#ecede8;
  --t-trenn:#45c27a; --t-turniir:#ffa53a; --t-koosolek:#6fa2f2;
}

/* Päis: klubi kollane, must tekst */
.band{background:var(--head);color:var(--head-ink);box-shadow:0 1px 0 rgba(0,0,0,.08),0 6px 18px -12px rgba(0,0,0,.35)}
.band .word span{color:var(--head-ink);opacity:.62}
.band .groupsel{background:rgba(0,0,0,.08);color:var(--head-ink)}
.band .grouplabel{color:var(--head-ink)}
.band .view-pill{background:var(--head-ink);color:var(--head)}
.band .avatar-btn{border-color:var(--head-ink);color:var(--head-ink);background:rgba(255,255,255,.35)}
.band .burger span{background:var(--head-ink)}
.band .burger:hover{background:rgba(0,0,0,.07)}
html.dark .band{box-shadow:inset 0 -3px 0 var(--yellow)}
html.dark .band .word span{color:var(--yellow);opacity:1}
html.dark .band .groupsel{background:rgba(255,255,255,.1)}
html.dark .band .view-pill{background:var(--yellow);color:#111}
html.dark .band .avatar-btn{border-color:var(--yellow);color:var(--yellow);background:transparent}
.auth-hero{background:var(--head);color:var(--head-ink);box-shadow:none}
.auth-hero .word span{color:var(--head-ink);opacity:.62}
.auth-hero::before{border-color:rgba(0,0,0,.09)}
.auth-hero::after{border-top-color:rgba(0,0,0,.09)}
html.dark .auth-hero .word span{color:var(--yellow);opacity:1}
html.dark .auth-hero::before{border-color:rgba(255,255,255,.08)}
html.dark .auth-hero::after{border-top-color:rgba(255,255,255,.08)}

/* Rohkem kollast */
.section-head h2{position:relative;padding-bottom:6px}
.section-head h2::after{content:"";position:absolute;left:0;bottom:0;width:42px;height:5px;border-radius:3px;background:var(--yellow)}
.day-label.today{background:var(--yellow);color:#111;border-radius:999px;padding:3px 12px 3px 10px;width:max-content}
.day-label.today span{color:#111;opacity:.7}
.day-label.today::before{box-shadow:none;background:#111}

/* Värvilised sündmused: triip servas, kellaaeg ja ikoon tüübi värvi */
.ev{position:relative;overflow:hidden;padding-left:19px;border-color:color-mix(in srgb,var(--tc,var(--line)) 22%,var(--line))}
.ev::before{content:"";position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--tc,var(--t-muu))}
.ev.clickable:hover{border-color:var(--tc,var(--muted))}
.ev .clock{border-right-color:color-mix(in srgb,var(--tc,var(--line)) 30%,transparent)}
.ev .clock .h{color:var(--tc,var(--ink))}
.ev .tag{background:var(--tc,var(--t-muu));color:#fff;padding:3px 10px 3px 7px}
.ev .tag svg{stroke:#fff}
.ev.t-turniir{background:linear-gradient(100deg,color-mix(in srgb,var(--t-turniir) 9%,var(--surface)),var(--surface) 55%)}
.ev.t-koosolek{background:linear-gradient(100deg,color-mix(in srgb,var(--t-koosolek) 7%,var(--surface)),var(--surface) 55%)}
.ev.past::before{background:var(--line)}
.band .word span,.auth-hero .word span{opacity:1;font-weight:600}
.band .crest,.auth-hero img{border-radius:50%;box-shadow:0 0 0 2px #111}
html.dark .band .word span,html.dark .auth-hero .word span{font-weight:800}
html.dark .band .crest,html.dark .auth-hero img{box-shadow:none}

/* Sisselogimine: päeva pilt + kollane riba (ka tumedas režiimis) */
body.auth-mode{padding-left:0!important}
.auth{grid-template-rows:auto auto 1fr}
.auth-photo{height:clamp(190px,34vh,360px);background:#111 var(--auth-img) center 42%/cover no-repeat;position:relative}
.auth-photo::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.15),rgba(0,0,0,0) 40%,rgba(0,0,0,.25))}
.auth-photo + .auth-hero{background:var(--yellow);color:#111;padding:0 16px 24px;box-shadow:0 8px 20px -14px rgba(0,0,0,.5)}
.auth-photo + .auth-hero::before,.auth-photo + .auth-hero::after{display:none}
.auth-photo + .auth-hero img{width:104px;height:104px;margin-top:-56px;position:relative;box-shadow:0 0 0 4px var(--yellow),0 8px 20px rgba(0,0,0,.35)}
.auth-photo + .auth-hero .word{margin-top:8px;color:#111}
.auth-photo + .auth-hero .word span{color:#111;font-weight:600;opacity:1}
.auth-photo + .auth-hero p{color:#111;opacity:.75}
.auth .auth-hero{display:flex;flex-direction:column;align-items:center;text-align:center}
.auth-box{margin-inline:auto}
@media (min-width:1000px){.auth-photo{height:clamp(260px,42vh,460px)}}
.auth-photo + .auth-hero{position:relative;z-index:1}
.auth-hero{background:var(--yellow)!important;color:#111!important}
.auth-hero::before,.auth-hero::after{display:none}
.auth-hero .word,.auth-hero .word span{color:#111!important}
.auth-hero .word span{font-weight:600!important}
.auth-hero img{box-shadow:0 0 0 2px #111}
.auth-photo + .auth-hero{overflow:visible}
.theme-seg{display:flex;gap:4px;background:var(--sunk);border-radius:999px;padding:4px;margin-bottom:14px}
.theme-seg button{flex:1;border:0;background:transparent;border-radius:999px;padding:8px 6px;font-weight:700;font-size:14px;color:var(--muted);cursor:pointer}
.theme-seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12),inset 0 -3px 0 var(--yellow)}
html.dark .view-switch button[aria-checked="true"]{background:var(--yellow);color:#111}

/* E-kiri */
.mail-card{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);overflow:hidden}
.mail-row{display:grid;grid-template-columns:70px 1fr;gap:10px;align-items:start;padding:10px 12px;border-bottom:1px solid var(--line)}
.mail-k{font-size:14px;color:var(--muted);font-weight:700;padding-top:8px}
.mail-v{min-width:0}
.mail-to summary{cursor:pointer;font-weight:700;padding:8px 0}
.mail-to .chips-list{margin-top:4px}
.mail-row input{background:transparent;border:0;padding:8px 0;font-weight:700;border-radius:0}
.mail-body textarea{border:0;border-radius:0;background:var(--surface);min-height:300px;padding:14px;font-size:15px;line-height:1.5;resize:vertical}
.mail-actions{display:flex;flex-direction:column;margin-top:14px}
.btn.big{padding:14px 20px;font-size:17px;width:100%}

/* Turniiri lisad */
.opt-list{display:grid;gap:8px}
.opt{border:1px solid var(--line);border-radius:var(--r);padding:10px 12px;background:var(--surface)}
.opt:has(input:checked){border-color:var(--t-turniir);box-shadow:inset 4px 0 0 var(--t-turniir)}
.opt-body{margin-top:10px}
.games-edit{display:grid;gap:8px}
.game-row{display:grid;grid-template-columns:96px 1fr 1fr 34px;gap:6px;align-items:center}
.game-row.with-day{grid-template-columns:96px 90px 1fr 1fr 34px}
@media (max-width:560px){.game-row{grid-template-columns:118px 1fr 34px}.game-row input:nth-of-type(3){grid-column:1/3}.game-row.with-day{grid-template-columns:1fr 1fr 34px}.game-row.with-day input[type=text]{grid-column:1/3}}
.games-view{display:grid;gap:6px}
.game-v{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;padding:8px 10px;border-radius:10px;background:var(--sunk)}
.game-v .gt{color:var(--t-turniir);font-variant-numeric:tabular-nums;min-width:52px}

/* ---------- Lihtsam sündmuse vorm ---------- */
dialog .grid:has(> .trio){gap:14px 12px}
.type-pick{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;background:var(--sunk);border-radius:12px;padding:4px}
.type-pick button{flex-direction:row;gap:6px;padding:9px 4px;border:0;border-radius:9px;background:transparent;font-size:15px;color:var(--muted)}
.type-pick button[aria-checked="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.type-pick svg{width:18px;height:18px}
.kind-seg{gap:4px;background:var(--sunk);border-radius:12px;padding:4px}
.kind-seg button{border:0;border-radius:9px;background:transparent;padding:7px 6px}
.kind-seg button[aria-checked="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.form-sec{display:none}
.trio{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:8px}
.trio input{padding-inline:8px}
@media (max-width:420px){.trio{grid-template-columns:1fr 1fr}.trio > :first-child{grid-column:1/-1}}
.check-row{display:flex;gap:18px;flex-wrap:wrap;margin-top:-4px}
.check-row .check{font-size:14px;color:var(--muted)}
.sub-f{margin-top:-6px}
.sub-f input{font-size:15px;padding-block:8px}
.seg2{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:var(--sunk);border-radius:12px;padding:4px;margin-top:6px}
.seg2 button{border:0;background:transparent;border-radius:9px;padding:8px;font-weight:700;font-size:14px;color:var(--muted);cursor:pointer}
.seg2 button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.pick-list{border-top:0;max-height:none;padding-top:8px;margin-top:2px}
.pick-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.pick-head span{font-size:13px;color:var(--muted)}
.link-btn{border:0;background:none;padding:0;font-weight:700;font-size:13px;text-decoration:underline;cursor:pointer;color:var(--ink)}
.kid-chips{display:flex;flex-wrap:wrap;gap:6px}
.kid-chip{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 12px;font-size:14px;font-weight:600;cursor:pointer;color:var(--ink)}
.kid-chip[aria-pressed="true"]{background:var(--ink);color:var(--surface);border-color:var(--ink)}
.kid-chip[aria-pressed="true"]::before{content:"✓ "}
.adds-lbl{margin-bottom:-6px}
.adds-bar{display:flex;flex-wrap:wrap;gap:6px}
.add-chip{border:1px dashed var(--muted);background:transparent;border-radius:999px;padding:6px 12px;font-size:14px;font-weight:600;cursor:pointer;color:var(--ink)}
.add-chip:hover{border-style:solid;background:var(--surface)}
.adds-box{display:grid;gap:10px}
.adds-box:empty{display:none}
.add-sec{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface)}
.add-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.add-sec .opt-body{margin-top:0}
.x-btn.sm{width:28px;height:28px;font-size:16px}
.check.quiet{font-size:14px;color:var(--muted)}
div.f.full{display:flex;flex-direction:column;gap:5px;font-size:14px;font-weight:600;color:var(--muted);min-width:0}
div.f.full .kid-chip,div.f.full .seg2 button{font-size:14px}
/* Sisselogimise taustavideo */
.auth-photo{overflow:hidden}
.auth-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 60%;transform:scale(1.06);transform-origin:center 40%}
.auth-photo::after{z-index:1}
@media (min-width:1000px){.auth-photo{height:clamp(300px,48vh,520px)}}

/* Alumine menüü: + nupp keskel */
nav.bottom .nav-add{color:var(--ink)}
nav.bottom .nav-add .plus{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:var(--ink);color:var(--yellow);margin-top:-22px;box-shadow:0 4px 12px rgba(0,0,0,.25),0 0 0 4px var(--surface)}
nav.bottom .nav-add .plus svg{width:24px;height:24px;padding:0;stroke-width:2.6;background:none!important;color:var(--yellow)!important}
html.dark nav.bottom .nav-add .plus{background:var(--yellow)}
html.dark nav.bottom .nav-add .plus svg{color:#111!important}
@media (max-width:999px){.add-desk{display:none!important}}

/* Lükka vasakule → kustuta */
.swipe{position:relative;margin-bottom:10px;border-radius:var(--r);overflow:hidden}
.swipe > .ev{margin-bottom:0;position:relative;z-index:1;touch-action:pan-y}
.swipe-del{position:absolute;right:0;top:0;bottom:0;width:96px;border:0;background:var(--no);color:#fff;font-weight:800;font-size:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;opacity:0;transition:opacity .15s}
.swipe.open .swipe-del{opacity:1}
.swipe-del svg{stroke:#fff}
@media (min-width:1000px){.swipe-del{display:none}}
.toast.has-action{display:flex;align-items:center;gap:14px;padding-right:8px}
.toast-act{border:0;background:var(--yellow);color:#111;font-weight:800;border-radius:999px;padding:6px 12px;cursor:pointer}
.toast-act{white-space:nowrap}
.swipe > .hero{margin-bottom:0;position:relative;z-index:1;touch-action:pan-y}
.swipe:has(> .hero){border-radius:var(--r-lg);margin-bottom:26px}
