:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-soft: #e8efff;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 14px;
  --nav-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.splash { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---------- Rozloženie ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--bg);
  padding: calc(env(safe-area-inset-top) + 14px) 16px 10px;
  display: flex; align-items: center; gap: 10px; }
.top h1 { font-size: 22px; margin: 0; flex: 1; }
.top .back { border: 0; background: none; font-size: 26px; padding: 0 6px 0 0; line-height: 1; }
main { padding: 0 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 90px); max-width: 640px; margin: 0 auto; }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--nav);
  border-top: 1px solid var(--line); display: flex;
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
nav.tabs button { flex: 1; border: 0; background: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); position: relative; }
nav.tabs button .ic { font-size: 22px; line-height: 1; }
nav.tabs button.on { color: var(--primary); font-weight: 600; }
.badge { position: absolute; top: 6px; left: 55%; background: var(--danger); color: #fff; border-radius: 10px;
  font-size: 10px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; font-weight: 700; }

.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 9;
  width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--primary); color: #fff;
  font-size: 30px; box-shadow: 0 6px 18px rgba(37, 99, 235, .4); }

/* ---------- Karty a zoznamy ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card h2 { font-size: 15px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; overflow-wrap: anywhere; }
.row .sub { font-size: 13px; color: var(--muted); }
.row.done .title { text-decoration: line-through; color: var(--muted); }
.check { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; border: 2px solid var(--line2); background: var(--card);
  display: grid; place-items: center; color: #fff; font-size: 16px; padding: 0; }
.check.on { background: var(--ok); border-color: var(--ok); }
.icon-btn { border: 0; background: none; font-size: 18px; color: var(--muted); padding: 6px; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: 15px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.who { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--soft); margin: 2px 4px 0 0; }
.who.ok { background: #dcfce7; }

/* ---------- Tlačidlá a formuláre ---------- */
.btn { border: 0; border-radius: 12px; padding: 12px 16px; background: var(--primary); color: #fff; font-weight: 600; }
.btn.light { background: var(--primary-soft); color: var(--primary); }
.btn.danger { background: #fee2e2; color: var(--danger); }
.btn.block { width: 100%; display: block; }
.btn:disabled { opacity: .5; }
.field { margin-bottom: 14px; }
.field label, .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  background: var(--input); font-size: 16px; }
textarea.input { min-height: 70px; resize: vertical; }
.inline { display: flex; gap: 8px; }
.inline > * { flex: 1; }
.addbar { display: flex; gap: 8px; margin-bottom: 12px; }
.addbar .input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 14px; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.seg { display: flex; background: var(--seg); border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.warn { background: var(--warn-bg); color: var(--warn-fg); border-radius: 12px; padding: 12px; font-size: 14px; margin-bottom: 12px; }

/* ---------- Prihlásenie ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.login h1 { margin: 0 0 6px; font-size: 28px; }
.login p { margin: 0 0 24px; color: var(--muted); }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 360px; }
.who-btn { border: 0; border-radius: 18px; padding: 22px 10px; color: #fff; font-size: 20px; font-weight: 700; }
.pin-dots { display: flex; gap: 14px; margin: 18px 0 22px; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #94a3b8; }
.pin-dots span.on { background: var(--text); border-color: var(--text); }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.keypad button { height: 76px; border-radius: 50%; border: 0; background: var(--card); font-size: 28px; font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.keypad button.ghost { background: none; box-shadow: none; font-size: 16px; color: var(--muted); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------- Domov ---------- */
.hello { font-size: 15px; color: var(--muted); margin: -4px 0 14px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tile { border: 0; background: var(--card); border-radius: var(--radius); padding: 16px 14px; text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tile .ic { font-size: 26px; }
.tile .t { font-weight: 600; margin-top: 6px; }
.tile .s { font-size: 13px; color: var(--muted); }

/* ---------- Kalendár ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 17px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dn { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal .d { border: 0; background: var(--card2); border-radius: 10px; min-height: 46px; padding: 4px 2px; font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cal .d.out { opacity: .35; }
.cal .d.today { outline: 2px solid var(--primary); }
.cal .d.sel { background: var(--primary); color: #fff; }
.cal .d .dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.cal .d .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }

/* ---------- Modálne okno ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 18px); }
.sheet h3 { margin: 0 0 14px; font-size: 20px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 8px; }
.sheet .actions > * { flex: 1; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 90px);
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 60; font-size: 14px; max-width: 90%; text-align: center; }

.pw { font-family: ui-monospace, Menlo, monospace; letter-spacing: .05em; }

/* ---------- Rozvrh ---------- */
.mini-les { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.mini-les span { font-size: 12px; font-weight: 700; padding: 3px 6px; border-radius: 6px; color: #1f2937; }
.daychips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.daychips button { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 0 6px; font-weight: 700;
  font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.daychips button i { font-style: normal; font-size: 10px; font-weight: 600; color: var(--primary); }
.daychips button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.daychips button.on i { color: #dbeafe; }
.les-list { padding: 8px 10px; }
.les { display: flex; gap: 10px; align-items: stretch; padding: 5px 0; }
.les-t { width: 74px; flex: 0 0 74px; display: flex; flex-direction: column; justify-content: center; }
.les-t b { font-size: 16px; }
.les-t span { font-size: 12px; color: var(--muted); }
.les-s { flex: 1; border-radius: 12px; padding: 10px 12px; position: relative; min-height: 54px; color: #1f2937; }
.les-s .abbr { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.les-s .nm { font-size: 13px; color: #475569; }
.les-s .room { position: absolute; top: 8px; right: 10px; font-size: 11px; font-weight: 700; color: #475569;
  background: rgba(255,255,255,.6); padding: 1px 6px; border-radius: 6px; }
table.week { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
table.week th { font-size: 12px; color: var(--muted); font-weight: 700; }
table.week th small { display: block; font-size: 9px; font-weight: 500; }
table.week tr th:first-child { width: 26px; text-align: left; font-size: 13px; color: var(--text); }
table.week tr.today th:first-child { color: var(--primary); }
table.week td { padding: 0; height: 44px; }
table.week .wk { height: 100%; min-height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 11px; font-weight: 800; line-height: 1.15; color: #1f2937; }
table.week tr.today .wk { box-shadow: inset 0 0 0 2px var(--primary); }
.les-sep { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  margin: 10px 0 2px; padding-top: 8px; border-top: 1px dashed var(--line); }
.les-s.kruzok { background: #fde2f3; }
table.week th.krh { width: 46px; }
table.week .wk.kr { background: #fde2f3; font-size: 10px; font-weight: 700; }
table.week td.krc { vertical-align: top; }
table.week td.krc .wk.kr { min-height: 21px; height: auto; margin-bottom: 2px; font-size: 9.5px; padding: 3px 1px; }

/* ---------- Zdieľané ---------- */
nav.tabs button { font-size: 10.5px; }
.newposts { display: flex; align-items: center; gap: 8px; background: var(--primary-soft); color: var(--text); }
.newposts .sub { margin-left: auto; }
.post { padding: 12px 12px 8px; }
.post-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 800; display: grid; place-items: center; flex: 0 0 36px; }
.post-t { margin-bottom: 8px; overflow-wrap: anywhere; }
.post-t a { color: var(--primary); }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 12px;
  overflow: hidden; background: #000; margin-bottom: 8px; }
.yt img, .yt iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.yt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 46px; border-radius: 12px;
  background: #ff0033; color: #fff; font-size: 22px; display: grid; place-items: center; }
.pgrid { display: grid; gap: 4px; margin-bottom: 8px; border-radius: 12px; overflow: hidden; }
.pgrid.n1 { grid-template-columns: 1fr; }
.pgrid.n2, .pgrid.n3, .pgrid.n4 { grid-template-columns: 1fr 1fr; }
.pgrid.n3 .pimg:first-child { grid-column: span 2; }
.pimg { border: 0; padding: 0; aspect-ratio: 1 / 1; background: var(--soft) center / cover no-repeat; position: relative; }
.pgrid.n1 .pimg { aspect-ratio: 4 / 3; }
.pgrid.n3 .pimg:first-child { aspect-ratio: 2 / 1; }
.pimg span { position: absolute; inset: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 26px; font-weight: 800; display: grid; place-items: center; }
.pvid { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; margin-bottom: 8px; display: block; }
.pfile { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--soft); border-radius: 12px; margin-bottom: 8px;
  color: var(--text); text-decoration: none; }
.pfile span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pfile small { color: var(--muted); }
.post-f { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.react { border: 0; background: none; font-size: 18px; padding: 4px 6px; border-radius: 10px; }
.react.on { background: #fee2e2; }
.post-h .grow { flex: 1; min-width: 0; }
.aud { display: inline-block; font-size: 12px; font-weight: 600; color: #7c2d12; background: #ffedd5; border-radius: 999px; padding: 3px 10px; margin-bottom: 8px; }

/* ---------- Profilové fotky ---------- */
img.avatar { border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; background: var(--soft); }
span.avatar { display: inline-grid; place-items: center; vertical-align: middle; }
.row .sub .avatar { margin-right: 2px; }
.hdr-av { border: 0; background: none; padding: 0; border-radius: 50%; }
.prof-av .avatar { box-shadow: 0 0 0 4px var(--card), 0 4px 14px rgba(0,0,0,.12); }
.who-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.who-btn img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.85); }
.login-av { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.seg3 button { font-size: 12.5px; padding: 9px 4px; }

/* ---------- Hádzaná – zápasy ---------- */
.match .mk { width: 30px; flex: 0 0 30px; font-weight: 800; color: var(--muted); text-align: center; }
.match.past { opacity: .45; }
.match.next { background: var(--ok-soft); margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.match .nx { font-size: 11px; font-weight: 700; color: #fff; background: var(--ok); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.mplace { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #fef3c7; white-space: nowrap; }
.mplace.home { background: #dcfce7; }
.card.matches { border-left: 4px solid var(--ok); margin-top: -4px; }
.alert-cta { margin-bottom: 12px; padding: 14px 16px; text-align: left; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.alert-cta span { margin-left: auto; font-weight: 500; font-size: 13px; opacity: .85; }
.top .btn.light + .btn.light { margin-left: 6px; }

/* ---------- Autá ---------- */
.car-h { display: flex; align-items: center; gap: 12px; }
.car-ic { font-size: 30px; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); display: grid; place-items: center; }

/* ---------- Karty členov ---------- */
.members { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.mtile { border: 0; background: var(--card); border-radius: var(--radius); padding: 14px 10px 12px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.05); border-top: 4px solid var(--mc); text-align: center; }
.mtile.me { grid-column: span 2; flex-direction: row; text-align: left; padding: 12px 14px; }
.mtile.me .mt-s { margin-left: auto; }
.mt-n { font-weight: 700; font-size: 16px; }
.mt-n small { font-weight: 500; color: var(--muted); }
.mt-s { font-size: 12px; color: var(--muted); }
.mhead { display: flex; align-items: center; gap: 14px; border-left: 5px solid var(--mc); }
.card.private { border: 2px dashed var(--line2); }
.privchk { display: flex !important; align-items: center; gap: 8px; font-size: 15px !important; color: var(--text) !important; font-weight: 600; }
.privchk input { width: 20px; height: 20px; }
.switch { width: 50px; height: 30px; flex: 0 0 50px; border-radius: 999px; border: 0; background: var(--line2); position: relative; padding: 0; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.switch.on { background: var(--ok); }
.switch.on i { left: 23px; }

/* ---------- Domov: rozbaľovacie karty ---------- */
.fold { padding: 0; overflow: hidden; }
.fold-h { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; }
.fold-ic { font-size: 24px; }
.fold-t { display: block; font-weight: 700; font-size: 16px; }
.fold-ch { color: var(--muted); font-size: 12px; }
.fold-b { padding: 0 14px 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.fold-h .grow { flex: 1; min-width: 0; }


/* =====================================================================
   DIZAJN 2.0 – farby, hĺbka, typografia, tmavý režim
   ===================================================================== */
:root {
  --bg: #f4f6fb; --card: #ffffff; --card2: #ffffff; --text: #0f172a; --muted: #64748b;
  --line: #e8ecf3; --line2: #cbd5e1; --soft: #f1f5f9; --seg: #e8edf6; --input: #f8fafc;
  --nav: rgba(255,255,255,.86);
  --primary: #3b5bdb; --primary-2: #7048e8; --primary-soft: #eaefff;
  --ok: #12b886; --ok-soft: #e6fcf5; --danger: #e03131;
  --warn-bg: #fff4e6; --warn-fg: #9c3d00;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 30px rgba(15,23,42,.14);
  --hero: linear-gradient(135deg, #3b5bdb 0%, #7048e8 55%, #c2255c 130%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020; --card: #151b2e; --card2: #1b2238; --text: #e7ecf6; --muted: #94a3b8;
    --line: #243049; --line2: #3a4764; --soft: #1e2740; --seg: #1b2238; --input: #10162a;
    --nav: rgba(21,27,46,.86); --primary: #6b8cff; --primary-2: #9775fa; --primary-soft: #1f2a4d;
    --ok: #38d9a9; --ok-soft: #0f2e27; --warn-bg: #3a2410; --warn-fg: #ffc078;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --hero: linear-gradient(135deg, #364fc7 0%, #5f3dc4 60%, #a61e4d 130%);
  }
}
html, body { font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
body { background: var(--bg); }

/* hlavička */
.top { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); padding-bottom: 12px; }
.top h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.top .back { width: 38px; height: 38px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; font-size: 24px; padding: 0 0 2px; margin-right: 4px; color: var(--text); }

/* karty */
.card { border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 12px; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.row { border-bottom-color: var(--line); }
.title { color: var(--text); }
main { animation: pageIn .22s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* tlačidlá */
.btn { border-radius: 14px; padding: 13px 18px; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent);
  transition: transform .08s ease, filter .15s; }
.btn.light, .btn.danger { box-shadow: none; }
.btn.danger { background: color-mix(in srgb, var(--danger) 14%, var(--card)); }
.btn:active, .tile:active, .mtile:active, .fold-h:active, .row[data-act]:active, .chip:active { transform: scale(.97); }
.row[data-act] { cursor: pointer; border-radius: 12px; transition: background .12s; }
.row[data-act]:active { background: var(--soft); }
.input, select.input, textarea.input { border-radius: 14px; border-color: var(--line); color: var(--text); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.chip { transition: background .12s, color .12s; }
.seg { border-radius: 14px; padding: 4px; }
.seg button { border-radius: 11px; }
.seg button.on { box-shadow: 0 1px 3px rgba(15,23,42,.12); }

/* plávajúce spodné menu */
nav.tabs { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 66px; padding: 0 4px;
  border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); }
nav.tabs button { font-size: 10px; gap: 3px; }
nav.tabs button .ic { font-size: 20px; width: 44px; height: 30px; border-radius: 12px; display: grid; place-items: center; transition: background .15s; }
nav.tabs button.on .ic { background: var(--primary-soft); }
nav.tabs button.on { color: var(--primary); }
.badge { top: 4px; left: 58%; box-shadow: 0 0 0 2px var(--card); }
main { padding-bottom: calc(66px + 10px + env(safe-area-inset-bottom) + 90px); }
.fab { bottom: calc(66px + 22px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 45%, transparent); }
.toast { bottom: calc(66px + 90px + env(safe-area-inset-bottom)); border-radius: 14px; box-shadow: var(--shadow-lg); }

/* úvod – hero */
.hero { background: var(--hero); color: #fff; border-radius: 24px; padding: 18px 18px 16px; margin: 4px 0 16px;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 35%, transparent); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.12); }
.hero-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.hero h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; flex: 1; }
.hero .hdr-av .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.hero-d { position: relative; z-index: 1; margin-top: 6px; font-size: 14px; opacity: .92; }
.hero-d::first-letter { text-transform: uppercase; }
.hero-m { position: relative; z-index: 1; display: inline-block; margin-top: 10px; font-size: 13px; background: rgba(255,255,255,.18);
  padding: 5px 11px; border-radius: 999px; }

/* karty členov */
.members { gap: 12px; }
.mtile { border-top: 0; border-radius: 20px; padding: 16px 10px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.mtile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 44%; background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 22%, transparent), transparent); }
.mtile > * { position: relative; }
.mtile .avatar { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--mc); }
.mtile.me { padding: 14px 16px; }
.mtile.me::before { inset: 0 auto 0 0; width: 45%; height: auto; background: linear-gradient(90deg, color-mix(in srgb, var(--mc) 22%, transparent), transparent); }
.mt-n { color: var(--text); }

/* dlaždice */
.tiles { gap: 12px; }
.tile { border-radius: 20px; box-shadow: var(--shadow); padding: 16px; }
.tile .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: color-mix(in srgb, var(--tc, var(--primary)) 16%, var(--card)); }
.tile .t { color: var(--text); margin-top: 10px; }

/* rozbaľovacie karty */
.fold .fold-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); font-size: 22px; }
.fold-t { color: var(--text); }
.fold-ch { width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }

/* modálne okno */
.modal { background: rgba(8,12,24,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .15s ease-out; }
.sheet { border-radius: 26px 26px 0 0; animation: sheetUp .22s cubic-bezier(.2,.8,.2,1); position: relative; padding-top: 26px; }
.sheet::before { content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 42px; height: 5px; border-radius: 3px; background: var(--line2); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* prihlásenie */
.login { background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent), var(--bg); }
.login h1 { font-weight: 800; letter-spacing: -.02em; font-size: 30px; }
.who-btn { border-radius: 22px; box-shadow: 0 8px 20px rgba(15,23,42,.15); transition: transform .08s; }
.who-btn:active { transform: scale(.96); }
.keypad button { box-shadow: var(--shadow); color: var(--text); }
.keypad button:active { background: var(--primary-soft); }

/* kalendár */
.cal .d { border-radius: 12px; color: var(--text); }
.cal .d.today { outline: 0; box-shadow: inset 0 0 0 2px var(--primary); }
.cal .d.sel { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 35%, transparent); }

/* drobnosti */
.check { transition: background .12s, border-color .12s; }
.check.on { background: var(--ok); border-color: var(--ok); }
.empty { padding: 22px 0; }
.hint { line-height: 1.45; }
a { color: var(--primary); }
@media (prefers-color-scheme: dark) {
  .les-s, .mini-les span, table.week .wk, .mplace, .aud { color: #1f2937; }
  .les-s .nm, .les-s .room { color: #334155; }
  .yt { background: #000; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.top-spacer { height: calc(env(safe-area-inset-top) + 12px); }
.seg5 button { font-size: 13px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.1; }
.seg5 button small { font-size: 11px; font-weight: 800; color: var(--primary); }
.hero-w { display: block; width: fit-content; max-width: 100%; margin-top: 6px; }
.hero-date { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.hero-date .hero-d { margin-top: 0; font-size: 20px; font-weight: 800; opacity: 1; letter-spacing: -.01em; }
.calic { width: 46px; height: 50px; border-radius: 11px; background: #fff; color: #1f2937; display: flex; flex-direction: column;
  overflow: hidden; flex: 0 0 46px; box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.calic i { font-style: normal; background: #e03131; color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; text-align: center; padding: 2px 0 1px; }
.calic b { flex: 1; display: grid; place-items: center; font-size: 21px; font-weight: 800; line-height: 1; }

/* ---------- Nákup: rýchle pridanie ---------- */
.sug { padding: 12px 14px; }
.sug-h { width: 100%; border: 0; background: none; display: flex; justify-content: space-between; align-items: center; padding: 2px 0 8px; font-weight: 700; color: var(--text); font-size: 15px; }
.sug-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin: 0 -14px 6px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.sug-cats::-webkit-scrollbar { display: none; }
.sug-cats .chip { white-space: nowrap; flex: 0 0 auto; }
.sug-items { display: flex; flex-wrap: wrap; gap: 8px; }
.sug-i { border: 1px dashed var(--line2); background: var(--soft); color: var(--text); border-radius: 12px; padding: 8px 11px; font-size: 14px; transition: transform .08s; }
.sug-i:active { transform: scale(.95); }
.sug-i.on { border-style: solid; border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.sug-h { display: flex; align-items: center; gap: 8px; padding: 0 0 8px; }
.sug-ht { flex: 1; border: 0; background: none; text-align: left; font-weight: 700; color: var(--text); font-size: 15px; padding: 4px 0; }
.sug-eb { padding: 6px 12px; font-size: 13px; }
.sug-i.edit b { color: var(--danger); margin-left: 4px; }
.sug-i.off { opacity: .55; text-decoration: line-through; border-style: dashed; }
.chip.hid { opacity: .5; text-decoration: line-through; }
.card.sug.editing { box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
.mtile.me { gap: 16px; }
.fold .fold-ic:has(img) { width: 54px; height: 54px; flex: 0 0 54px; background: #fff; padding: 3px; border-radius: 14px; box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.fold .fold-ic img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 10px; }
.hz-sub { border: 1px solid var(--line); border-radius: 16px; margin-top: 10px; overflow: hidden; background: var(--soft); }
.hz-sub.open { background: var(--card); }
.hz-sh { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 12px; text-align: left; color: var(--text); }
.hz-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); font-size: 20px; flex: 0 0 38px; }
.hz-sb { padding: 0 12px 12px; }
