:root {
  --bg: #faf9f6;
  --bg2: #faf9f6;
  --card: #ffffff;
  --soft: #f4f2ed;
  --hl: #eff3ec;
  --topbg: #faf9f6;
  --link: #4a7358;
  --money: #4a7358;
  --ink: #2f2e2b;
  --ink2: #77756e;
  --line: #e9e6df;
  --green: #5b8a6a;
  --green-d: #4a7358;
  --red: #c0584d;
  --gold: #c2a062;
  --sky: #6f9bb5;
  --pink: #c98aa5;
  --purple: #9a86b8;
  --family: #c2a062;
  --dovolenka: #6fa8a0;
  --tesime: #c98a66;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.35;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; }

/* ---------- logo a názov ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand img, .brand svg { width: 40px; height: 40px; }
.word { font-weight: 600; font-size: 26px; letter-spacing: .5px; }
.word b { font-weight: 600; }
.word .s { font-weight: 500; opacity: .85; }

/* ---------- prihlásenie ---------- */
.login { max-width: 560px; margin: 0 auto; padding: 40px 16px 60px; text-align: center; }
.login .brand { flex-direction: column; gap: 6px; }
.login .brand img, .login .brand svg { width: 120px; height: 120px; }
.login .word { font-size: 46px; }
.login p.sub { color: var(--ink2); margin: 4px 0 28px; }
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.profile {
  background: var(--card); border-radius: var(--radius); padding: 18px 10px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 500; font-size: 20px;
  border: 3px solid transparent; transition: transform .15s;
}
.profile:active { transform: scale(.96); }
.profile:hover { border-color: var(--c); }

.avatar {
  --size: 64px;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: var(--c); display: grid; place-items: center; font-size: calc(var(--size) * .5);
  position: relative; flex: none; color: #fff;
}
.avatar svg { width: 62%; height: 62%; }
.avatar.sm { --size: 34px; }
.avatar.md { --size: 48px; }
.avatar.lg { --size: 88px; }
.avatar .badge {
  position: absolute; right: -6px; bottom: -6px; background: #fff; border-radius: 50%;
  width: calc(var(--size) * .5); height: calc(var(--size) * .5); display: grid; place-items: center;
  font-size: calc(var(--size) * .32);
}

.pinbox { max-width: 340px; margin: 0 auto; }
.pindots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 22px; }
.pindots i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--c); }
.pindots i.on { background: var(--c); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pinpad button {
  background: var(--card); border-radius: 22px; height: 68px; font-size: 28px; font-weight: 500;
}
.pinpad button:active { transform: scale(.94); background: #f4f0ff; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }

/* ---------- rozloženie ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--topbg);
}
.top .word { font-size: 22px; }
.top .brand img { width: 34px; height: 34px; }
.top .acts { display: flex; gap: 8px; align-items: center; }
.round {
  width: 44px; height: 44px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; font-size: 22px;
}
.round.sos { background: #ffe1dd; }
main { max-width: 760px; margin: 0 auto; padding: 6px 16px calc(110px + env(safe-area-inset-bottom)); }
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; gap: 4px; background: var(--card); padding: 6px; border-radius: 30px;
  width: min(560px, calc(100% - 24px));
}
.nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 2px; border-radius: 24px;
  font-size: 13px; font-weight: 500; color: var(--ink2);
}
.nav button span { font-size: 24px; line-height: 1.1; }
.nav button.on { background: var(--navc, #eafbe6); color: #2b2340; }

/* ---------- karty ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card h2 { font-size: 22px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card h2 .t { display: flex; gap: 8px; align-items: center; }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.empty { color: var(--ink2); text-align: center; padding: 10px 0 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 18px;
  background: var(--green); color: #fff; font-weight: 500; transition: transform .1s;
}
.btn:active { transform: translateY(3px); }
.btn.sec { background: var(--soft); color: var(--ink); }
.btn.red { background: var(--red); }
.btn.gold { background: var(--gold); color: #4a3300; }
.btn.sm { padding: 6px 12px; font-size: 15px; border-radius: 14px; }
.btn.block { width: 100%; }
.link { color: var(--link); font-weight: 500; font-size: 15px; }

/* ---------- vianoce ---------- */
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px 20px; margin-bottom: 16px; color: #fff;
  background: var(--card);
}
#app { position: relative; z-index: 2; }

/* ---------- nálady ---------- */
.moods { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mood {
  display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; border-radius: 18px; background: var(--soft);
  border: 3px solid transparent; transition: transform .15s;
}
.mood span { font-size: 36px; line-height: 1.1; }
.mood small { font-size: 12px; font-weight: 500; color: var(--ink2); }
.mood:active { transform: scale(.9); }
.mood.on { border-color: var(--green); background: var(--hl); transform: scale(1.06); }
.ask { }
.family { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.family .who { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; }
.moodtable { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 22px; text-align: center; }
.moodtable th { font-size: 12px; color: var(--ink2); font-weight: 500; }
.moodtable td:first-child { text-align: left; }
.moodtable td.e { opacity: .25; font-size: 14px; }
.moodscroll { overflow-x: auto; }

/* ---------- odpočty ---------- */
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.count { border-radius: 20px; padding: 12px; color: #fff; background: var(--cc, var(--green)); position: relative; overflow: hidden; }
.count .n { font-size: 40px; font-weight: 600; line-height: 1; }
.count .u { font-size: 14px; font-weight: 500; opacity: .9; }
.count .l { font-weight: 500; margin-top: 4px; line-height: 1.15; }
.count .e { position: absolute; right: 8px; top: 4px; font-size: 30px; opacity: .9; }

/* ---------- zoznamy ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--soft); }
.item .ic { font-size: 26px; width: 34px; text-align: center; flex: none; }
.item .tt { font-weight: 500; }
.item.done .tt { text-decoration: line-through; opacity: .55; }
.check {
  width: 30px; height: 30px; border-radius: 10px; border: 3px solid var(--green); display: grid; place-items: center; flex: none;
  font-size: 18px; color: #fff;
}
.check.on { background: var(--green); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 500; background: var(--soft); }
.pill.gold { background: #fff0c8; color: #8a5b00; }
.pill.green { background: #dcf5d8; color: #1f6f2a; }
.pill.red { background: #ffe1dd; color: #a2241b; }
.money { font-weight: 600; color: var(--money); white-space: nowrap; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.tabs button { padding: 8px 14px; border-radius: 99px; background: var(--card); font-weight: 500; white-space: nowrap; }
.tabs button.on { background: var(--green); color: #fff; }
.sekcia { font-weight: 600; font-size: 14px; color: var(--ink2); margin: 12px 0 6px; }
.sekcia:first-child { margin-top: 0; }
.vyber { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vz { background: var(--soft); border-radius: 16px; padding: 10px; text-align: left; color: var(--ink); }
.vz .e { font-size: 24px; line-height: 1.2; }
.vz b { display: block; font-weight: 600; font-size: 15px; margin-top: 2px; }
.vz span { font-size: 12.5px; color: var(--ink2); line-height: 1.25; display: block; margin-top: 2px; }
.vz.vlastna { background: none; border: 2px dashed var(--line); }
table.seria { width: 100%; border-collapse: separate; border-spacing: 3px; }
table.seria th { font-size: 12px; font-weight: 500; color: var(--ink2); text-align: center; }
table.seria th.dnes { color: var(--green); font-weight: 700; }
.bod { height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.bod.a { background: #dfeee4; color: #3c6b4b; }
.bod.n { background: #f7dcd8; color: #a33a2d; }
.bod.d { border: 2px solid var(--green); }
.bod.t { border: 2px dashed var(--line); }
.pruh { height: 8px; background: var(--soft); border-radius: 9px; overflow: hidden; margin: 8px 0 4px; }
.pruh i { display: block; height: 100%; background: var(--green); }
.odpocet { text-align: center; padding: 8px 0 6px; }
.odpocet .cas { font-size: 36px; font-weight: 700; color: var(--green); }
.ludia, .poradie { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.clovek { display: flex; align-items: center; gap: 8px; }
.clovek .pt { font-weight: 700; color: var(--green); margin-left: auto; }
.pozvanka { background: var(--hl); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.odmena { background: #f6ecd2; color: #6d520b; border-radius: 12px; padding: 7px 10px; font-size: 14px; margin-top: 10px; }
.vnutri { background: var(--soft); border-radius: 14px; padding: 2px 10px 10px; margin-top: 8px; }
.kazdych { display: flex; align-items: center; gap: 8px; }
.kazdych .cislo { width: 68px; text-align: center; flex: none; }
.najblizsie { font-size: 13.5px; color: var(--ink2); margin-top: 8px; line-height: 1.35; }
.najblizsie b { color: var(--ink); font-weight: 600; }
.fam-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 16px; background: var(--soft); width: 100%; text-align: left; color: var(--ink); }
.fam-row.vsetci { background: var(--hl); }
.fam-row .grow { min-width: 0; }
.fam-ava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: var(--card); flex: none; }
.fam-logo { background: #f6f8f3; box-shadow: 0 0 0 1px rgba(91, 138, 106, .28); overflow: hidden; }
.fam-logo img { width: 86%; height: 86%; display: block; }
.fam-ava.mala { width: 30px; height: 30px; font-size: 15px; }
.fam-akc { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--green-d); flex: none; position: relative; }
.fam-akc svg { width: 18px; height: 18px; }
.fam-akc.off { opacity: .3; }
.fam-n { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 17px; text-align: center; }
.chat-riadok .tt, .chat-naposledy { display: block; }
.chat-naposledy { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-riadok.nova .tt { font-weight: 700; }
.chat-riadok.nova .chat-naposledy { font-weight: 700; color: var(--ink); }
.chat-vpravo { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.fam-poc { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.chatwrap { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border-radius: 16px; }
.chatwrap.ja { align-items: flex-end; }
.chatsp { cursor: pointer; }
.chatsp.plan { opacity: .65; border: 2px dashed var(--line); }
.chatsp a { color: inherit; text-decoration: underline; }
.chat-foto { display: block; }
.chat-foto img { display: block; max-width: 100%; max-height: 300px; border-radius: 10px; margin-bottom: 4px; }
.chat-hlas { display: block; width: 230px; max-width: 100%; height: 40px; margin-bottom: 2px; }
.chat-subor { display: block; font-weight: 500; }
.chat-subor small { display: inline; opacity: .7; }
.chat-cit { display: block; width: 100%; text-align: left; font-size: 13px; color: inherit; opacity: .85; border-left: 3px solid currentColor; padding: 1px 0 1px 7px; margin-bottom: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-cit b { font-weight: 600; }
.chat-fw { font-size: 12px; font-style: italic; opacity: .75; margin-bottom: 2px; }
.chat-zamok { font-size: 14px; opacity: .75; }
.chat-reakcie { display: flex; gap: 4px; flex-wrap: wrap; margin-top: -1px; }
.chat-reakcie button { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 7px; font-size: 13px; line-height: 22px; color: var(--ink); }
.chat-reakcie button.moja { border-color: var(--green); background: var(--hl); }
.chat-akcie { display: flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; max-width: 94%; }
.chat-akcie > button { padding: 4px 9px; border-radius: 10px; background: var(--soft); font-size: 13px; color: var(--ink); }
.chat-akcie > button.zle { color: var(--red); }
.chat-smajl { display: flex; gap: 2px; width: 100%; margin-bottom: 2px; }
.chat-smajl button { flex: 1; font-size: 19px; padding: 2px 0; border-radius: 9px; }
.chat-pise { min-height: 17px; font-size: 12.5px; color: var(--ink2); padding: 0 4px; }
.chat-pruh { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 10px; padding: 5px 9px; margin-bottom: 6px; font-size: 13px; }
.chat-pruh .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pruh img { width: 40px; height: 40px; object-fit: cover; border-radius: 7px; flex: none; }
.chat-pruh .in { flex: 1; min-width: 0; margin: 0; padding: 5px 8px; font-size: 14px; }
.chat-menu { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 6px; }
.chat-m { display: block; width: 100%; text-align: left; padding: 9px 11px; border-radius: 10px; font-size: 15px; color: var(--ink); cursor: pointer; }
.chat-plus { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 24px; line-height: 1; flex: none; display: grid; place-items: center; }
.chat-q { margin-bottom: 10px; }
#chat-hits:empty { display: none; }
.chat-hl { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chat-hl .grow { min-width: 0; }
.chat-spat { font-size: 26px; line-height: 1; color: var(--ink2); padding: 0 6px 2px 0; }
.sheet.s-chat { display: flex; flex-direction: column; height: min(88vh, 720px); height: min(88dvh, 720px); overflow: hidden; }
.chat-log { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px 10px; }
.chat-log > :first-child { margin-top: auto; }
.chatsp { max-width: 86%; align-self: flex-start; background: var(--soft); border-radius: 16px 16px 16px 5px; padding: 7px 11px; font-size: 15px; overflow-wrap: anywhere; }
.chatsp.ja { align-self: flex-end; background: var(--green); color: #fff; border-radius: 16px 16px 5px 16px; }
.chatsp small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; opacity: .75; margin-top: 2px; }
.chat-del { color: inherit; display: inline-grid; place-items: center; padding: 0 2px; }
.chat-del svg { width: 13px; height: 13px; }
.chat-od { font-size: 12px; color: var(--ink2); margin: 4px 0 -3px 4px; }
.chat-prec { align-self: flex-end; font-size: 12px; color: var(--ink2); margin-top: -2px; }
.chat-den { align-self: center; font-size: 12px; color: var(--ink2); margin: 4px 0; }
.chat-pis { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.chat-pis .in { margin: 0; flex: 1; min-width: 0; }
.chat-posl { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.chat-posl svg { width: 19px; height: 19px; }
.card h2.sipkou .t { flex: 1; min-width: 0; }
.sipka { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink2); background: var(--soft); }
.sipka svg { width: 16px; height: 16px; }
.card.min { padding-top: 10px; padding-bottom: 10px; cursor: pointer; }
.card.min .sipka svg { transform: rotate(180deg); }
.karta-hl { display: flex; align-items: center; gap: 8px; }
.karta-hl .grow { min-width: 0; }
.karta-hl .tt { display: block; font-weight: 500; }
.zhrnutie { display: block; font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nove { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; flex: none; }
.item.kartu { width: 100%; text-align: left; color: var(--ink); }
.item.kartu.skryta .tt, .item.kartu.skryta .ic { opacity: .5; }
.item.rec { flex-direction: column; align-items: stretch; gap: 6px; }
.rec-hore { display: flex; align-items: center; gap: 10px; }
.rec-hore .grow { min-width: 0; }
.rec-kto { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 6px; }
.stav { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.stav.ok { background: #dfeee4; color: #3c6b4b; }
.stav.caka { background: #f6ecd2; color: #80600f; }
.stav.po { background: #f7dcd8; color: #a33a2d; }
.hist { display: flex; gap: 4px; padding-left: 40px; }
.hist i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.hist i.a { background: #dfeee4; color: #3c6b4b; }
.hist i.n { background: #f7dcd8; color: #a33a2d; }
.hist i.t { border: 2px dashed var(--line); }
.blik { outline: 3px solid var(--gold); outline-offset: 1px; animation: blik 1.3s ease-in-out 2; }
@keyframes blik { 50% { outline-color: transparent; } }
.dnes-r { padding-top: 8px; padding-bottom: 8px; gap: 10px; }
.dnes-cas { flex: 0 0 42px; font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }
/* zvýraznenie novinky a cieľa zo zvončeka: karta sa na chvíľu sfarbí do zelenej aplikácie a pomaly zbledne */
.nov-pulz, .ciel-pulz { position: relative; z-index: 2; animation: novzelena 3.9s ease-out 1; }
.ciel-pulz { animation-duration: 4.2s; }
@keyframes novzelena {
  0%, 70% { background-color: var(--hl); box-shadow: 0 0 0 1.5px var(--green); }
}
@media (prefers-reduced-motion: reduce) { .nov-pulz, .ciel-pulz { animation: none; background-color: var(--hl); box-shadow: 0 0 0 1.5px var(--green); } }
.subn { display: inline-block; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 800; vertical-align: 1px; }

.piggy {
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px; color: #4a3300;
  background: var(--card);
  display: flex; align-items: center; gap: 14px;
}
.piggy .big { font-size: 44px; font-weight: 600; line-height: 1; }
.piggy .pig { font-size: 60px; }

.request { border-radius: 20px; padding: 14px; background: #ffe9e5; border: 3px dashed #f19b90; margin-bottom: 10px; }
.request.taken { background: #fff6d8; border-color: #f3cf62; }

/* ---------- kalendár ---------- */
.calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calhead h2 { font-size: 26px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dn { text-align: center; font-size: 13px; font-weight: 500; color: var(--ink2); }
.day {
  min-height: 64px; border-radius: 14px; background: var(--soft); padding: 4px; text-align: left; display: flex; flex-direction: column;
  gap: 2px; overflow: hidden; border: 2px solid transparent;
}
.day.out { opacity: .35; }
.day.today { border-color: var(--green); background: var(--hl); }
.day .d { font-weight: 600; font-size: 15px; }
.day .bar { height: 6px; border-radius: 3px; }
.day .emo { font-size: 13px; line-height: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 4px; vertical-align: -1px; }

/* ---------- okno (sheet) ---------- */
.sheetbg { position: fixed; inset: 0; background: rgba(43,35,64,.35); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet {
  background: var(--bg); width: min(620px, 100%); max-height: 92vh; overflow: auto; border-radius: 28px 28px 0 0;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); animation: up .25s;
}
.sheet h2 { font-size: 24px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
label.f { display: block; font-weight: 500; margin: 12px 0 6px; font-size: 15px; }
.in {
  width: 100%; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); outline: none; font-size: 17px;
}
.in:focus { border-color: var(--green); }
textarea.in { min-height: 70px; resize: vertical; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { padding: 8px 14px; border-radius: 99px; background: var(--card); border: 2px solid var(--line); font-weight: 500; }
.choice.on { border-color: var(--green); background: var(--green); color: #fff; }
.pickers { display: flex; gap: 10px; flex-wrap: wrap; }
.picker { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; opacity: .4; transition: .15s; }
.picker.on { opacity: 1; transform: scale(1.06); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- srdiečka ---------- */
.heartfly { position: fixed; z-index: 60; pointer-events: none; font-size: 40px; }
.heartmsg {
  position: fixed; z-index: 61; left: 50%; top: 40%; transform: translate(-50%, -50%); background: var(--card); border-radius: 28px;
  padding: 22px 26px; text-align: center; animation: pop .4s; max-width: 86vw;
}
.heartmsg .h { font-size: 70px; line-height: 1; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
.emojis { display: flex; gap: 8px; flex-wrap: wrap; }
.emojis button { font-size: 30px; width: 52px; height: 52px; border-radius: 16px; background: var(--card); border: 3px solid transparent; }
.emojis button.on { border-color: var(--pink); }
.emojis .choice { padding: 0; display: grid; place-items: center; font-size: 28px; border-radius: 16px; }
.emojis .choice.on { background: #ffe4f1; border-color: var(--pink); color: inherit; }

#toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: #2b2340; color: #fff; padding: 10px 18px; border-radius: 16px; font-weight: 500; opacity: 0; transition: .25s; z-index: 70;
  pointer-events: none; max-width: 90vw; text-align: center;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 420px) {
  .mood span { font-size: 30px; }
  .xmasbox .big { font-size: 54px; }
  .day { min-height: 54px; }
  .word { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.mood { position: relative; }
.mood .num { position: absolute; top: 2px; left: 7px; font-size: 12px; color: var(--ink2); }
.mood small { white-space: nowrap; font-size: 11px; }

/* ---------- stiahnutie appky ---------- */
.install {
  border-radius: var(--radius); padding: 16px; margin: 0 0 18px; color: #fff; text-align: left;
  background: var(--card);
}
.install .tt { font-weight: 600; font-size: 19px; }
.install .appicon { width: 56px; height: 56px; border-radius: 14px; background: #fff; }
.install .steps { margin: 14px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.install .key { display: inline-block; background: rgba(255,255,255,.25); border-radius: 8px; padding: 0 6px; }

/* ---------- zvonček ---------- */
.round.bell { position: relative; background: var(--hl); }
.round.bell .count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 600; display: grid; place-items: center;
  border: 2px solid #fff; animation: pop .3s;
}
.item.notif { width: 100%; }
.item.notif.new { background: var(--hl); }
.item.notif .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); flex: none; }
.top .acts { gap: 6px; }
@media (max-width: 420px) {
  .top .round { width: 40px; height: 40px; font-size: 19px; }
  .top .word { font-size: 19px; }
  .top .brand img { width: 28px; height: 28px; }
}

/* ---------- témy ---------- */
.request, .piggy { color: #2b2340; }
.request .muted { color: #6d6585; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme {
  border-radius: 20px; padding: 0; overflow: hidden; text-align: left; border: 3px solid transparent;
  background: var(--card); transition: transform .15s;
}
.theme:active { transform: scale(.96); }
.theme.on { border-color: var(--green); }
.theme .sw { height: 70px; display: grid; place-items: center; font-size: 34px; position: relative; }
.theme .sw i { position: absolute; bottom: 6px; left: 8px; right: 8px; height: 10px; border-radius: 5px; }
.theme .nm { padding: 8px 10px; font-weight: 500; font-size: 15px; line-height: 1.15; }
.theme .ds { font-size: 12px; color: var(--ink2); font-weight: 600; }
.grp { margin: 18px 0 8px; font-size: 16px; font-weight: 600; color: var(--ink2); }
.themecur { display: flex; align-items: center; gap: 12px; }
.themecur .sw { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; flex: none; }

.btn { white-space: nowrap; }

/* ---------- veľký mesačný kalendár ---------- */
body[data-tab="kalendar"] main { max-width: 1180px; }
.calwho { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.calwho button {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--soft);
  font-weight: 500; font-size: 14px; white-space: nowrap; border: 2px solid transparent;
}
.calwho button.on { border-color: var(--mc, var(--green)); background: var(--card); }
.calwho .avatar.sm { --size: 28px; }
.cal.big { gap: 3px; }
.cal.big .day { min-height: 118px; padding: 5px 4px; gap: 3px; cursor: pointer; }
.cal.big .day.we { background: color-mix(in srgb, var(--soft) 70%, var(--hl)); }
.cal.big .day .d { font-size: 15px; display: flex; align-items: center; gap: 4px; }
.cal.big .dm { font-size: 13px; }
.cchip {
  display: flex; align-items: center; gap: 3px; min-width: 0; border-radius: 7px; padding: 2px 4px 2px 2px;
  font-size: 12px; line-height: 1.25; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--c) 16%, var(--card)); border-left: 3px solid var(--c);
}
.cchip .ct { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cchip .ct b { font-weight: 600; }
.cchip .ca {
  flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--c); display: grid; place-items: center;
  font-size: 10px; font-style: normal; color: #fff; margin-right: -6px;
}
.cchip .ca:last-of-type { margin-right: 1px; }
.cchip .ca svg { width: 62%; height: 62%; }
.cal.big .more { font-size: 11px; font-weight: 600; color: var(--ink2); padding-left: 4px; }
@media (max-width: 600px) {
  main { padding-left: 8px; padding-right: 8px; }
  body[data-tab="kalendar"] .card { padding: 12px 6px; }
  .cal.big { gap: 2px; }
  .cal.big .day { min-height: 86px; padding: 3px 2px; border-radius: 9px; }
  .cal.big .day .d { font-size: 13px; }
  .cchip { font-size: 9.5px; padding: 1px 2px 1px 1px; border-left-width: 2px; border-radius: 5px; gap: 2px; }
  .cchip .ca { width: 13px; height: 13px; font-size: 8px; margin-right: -5px; }
  .cchip .ct b { display: none; }
}
.wday + .wday { margin-top: 12px; }
.wdh { font-weight: 600; font-size: 15px; color: var(--ink2); margin: 0 0 6px 2px; }
@media (max-width: 600px) {
  .cchip .ca ~ .ca { display: none; }
  .cchip .ca { margin-right: 1px; }
  .cchip .ct { font-size: 9.5px; letter-spacing: -.2px; }
}
.req { font-size: 11px; font-weight: 600; color: #fff; background: var(--red); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.pickers.need { outline: 3px dashed var(--red); outline-offset: 6px; border-radius: 12px; animation: shake .4s; }
a.btn { text-decoration: none; }
.news + .news { margin-top: 16px; }
.news .nh { font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.news .item .grow { font-size: 15px; line-height: 1.35; }

/* ---------- viac smajlíkov za deň ---------- */
.moodday { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 10px; }
.mchip { display: flex; align-items: center; gap: 4px; background: var(--hl); border-radius: 99px; padding: 3px 10px 3px 6px; }
.mchip span { font-size: 24px; line-height: 1; }
.mchip small { font-weight: 500; color: var(--ink2); font-size: 12px; }
.mchip i { font-style: normal; font-size: 11px; color: var(--ink2); opacity: .6; }
.moodday .arrow { color: var(--ink2); font-weight: 600; }
.moodtable td.multi { font-size: 13px; letter-spacing: -2px; white-space: nowrap; }
.counts.next3 { grid-template-columns: repeat(3, 1fr); margin: -4px 0 16px; gap: 8px; }
.counts.next3 .count { padding: 10px; }
.counts.next3 .n { font-size: 32px; }
.counts.next3 .l { font-size: 14px; }
@media (max-width: 420px) { .counts.next3 .n { font-size: 26px; } .counts.next3 .l { font-size: 12.5px; } .counts.next3 .e { font-size: 22px; } }

/* ---------- ikonky v hlavičke (bez krúžkov) ---------- */
.ticon {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center; background: none; border-radius: 12px;
  transition: transform .15s;
}
.ticon svg { width: 32px; height: 32px; }
.ticon:hover { transform: translateY(-2px) scale(1.06); }
.ticon:active { transform: scale(.9); }
.ticon.ring svg { transform-origin: 50% 12%; }
.ticon .count {
  position: absolute; top: 0; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center;
  border: 2px solid var(--bg); animation: pop .3s;
}
@media (max-width: 420px) { .ticon { width: 36px; height: 38px; } .ticon svg { width: 28px; height: 28px; } }

/* ---------- diktovanie a čítanie nahlas ---------- */
.dict-btn {
  position: fixed; z-index: 65; height: 32px; min-width: 32px; padding: 0 6px; display: inline-flex; align-items: center;
  justify-content: center; gap: 3px; border-radius: 99px; background: var(--hl); color: var(--green-d);
}
.dict-btn[hidden] { display: none; }
.dict-btn svg { width: 20px; height: 20px; }
.dict-btn.rec { background: #ffe1dd; color: #d6322a; padding: 0 10px; }
.dict-btn.rec svg { width: 14px; height: 14px; margin-left: 4px; }
.voice-bar { display: inline-block; width: 3px; height: 14px; border-radius: 2px; background: currentColor; }
.voice-bar:nth-child(2) { animation-delay: .15s; } .voice-bar:nth-child(3) { animation-delay: .3s; } .voice-bar:nth-child(4) { animation-delay: .45s; }
@keyframes voice-pulse { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
.dict-tip {
  position: fixed; z-index: 66; max-width: 260px; padding: 6px 10px; border-radius: 10px; background: #2b2340; color: #fff;
  font-size: 13px; line-height: 1.4; pointer-events: none;
}
.dict-tip[hidden] { display: none; }
.sheet { position: relative; }
.say {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; vertical-align: middle;
  background: #fff3c8; color: #c27b00; margin-left: 6px;
}
.say svg { width: 18px; height: 18px; }
.say.on { background: #ffb627; color: #fff; }
.count .say, .xmasbox .say { position: absolute; right: 8px; bottom: 8px; background: rgba(255,255,255,.9); }
.request, .count, .xmasbox { position: relative; }
.popt i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--green) 22%, transparent); transition: width .4s; }
.popt > span { position: relative; }
.popt .pw { display: flex; }
.popt .pw .avatar { margin-left: -6px; }
.popt.on { border-color: var(--green); }
.popt.win { border-color: var(--gold); background: var(--hl); }
.poll.closed .popt { cursor: default; }

/* ===================== ZHUTNENIE (viac na jednu obrazovku) ===================== */
body { font-size: 15.5px; }
main { padding-top: 2px; }
.card { padding: 12px 14px; margin-bottom: 10px; border-radius: 18px; }
.card h2 { font-size: 17.5px; margin-bottom: 8px; }
.top { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 6px; }
.item { padding: 7px 10px; border-radius: 14px; gap: 8px; }
.item .ic { font-size: 21px; width: 26px; }
.list { gap: 6px; }
.btn { padding: 8px 14px; border-radius: 14px; }
.btn.sm { padding: 5px 10px; font-size: 14px; }
.tabs { margin-bottom: 10px; }
.tabs button { padding: 6px 12px; font-size: 14.5px; }
.nav { bottom: calc(8px + env(safe-area-inset-bottom)); padding: 4px; }
.nav button { padding: 4px 2px; font-size: 12px; }
.nav button span { font-size: 21px; }
main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.empty { padding: 4px 0 2px; font-size: 14.5px; }
label.f { margin: 9px 0 4px; font-size: 14px; }
.in { padding: 9px 12px; border-radius: 13px; font-size: 16px; }

/* odpočty v jednom riadku */
.cdrow { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; padding-bottom: 2px; scrollbar-width: none; }
.cdrow::-webkit-scrollbar { display: none; }
.cd {
  flex: 1 0 auto; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 5px; align-items: center;
  padding: 5px 10px; border-radius: 14px; color: #fff; background: var(--cc, var(--green));
}
.cd b { grid-row: span 2; font-size: 22px; font-weight: 600; line-height: 1; }
.cd small { font-size: 10.5px; font-weight: 500; opacity: .9; line-height: 1; }
.cd span { font-size: 11.5px; font-weight: 500; line-height: 1.1; white-space: nowrap; }
.cd.xmas { background: var(--card); }

/* nálady menšie */
.moods { gap: 4px; }
.mood { padding: 5px 0 2px; border-radius: 14px; }
.mood span { font-size: 28px; }
.mood small { font-size: 10.5px; }
.mood .num { font-size: 10px; top: 1px; left: 5px; }
.mchip span { font-size: 20px; }
.family .who { font-size: 12.5px; }
.family .avatar.md { --size: 42px; }

/* odpočty „Na čo sa teším“ menšie */
.counts { gap: 6px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.count { padding: 8px 10px; border-radius: 14px; }
.count .n { font-size: 26px; }
.count .u { font-size: 12px; }
.count .l { font-size: 13px; }
.count .e { font-size: 20px; }

/* stiahnutie appky – jeden riadok */
.install { padding: 10px 12px; margin-bottom: 10px; border-radius: 16px; }
.install .appicon { width: 36px; height: 36px; border-radius: 10px; }
.install .tt { font-size: 15px; }
.install .small { font-size: 12.5px; }
.install .btn { margin-top: 8px !important; padding: 6px 12px; }
.login .install { margin-top: 12px; }

/* ankety, prespávačky, srdiečka */
.popt { min-height: 36px; padding: 4px 10px; margin-bottom: 4px; border-radius: 12px; }
.piggy { padding: 12px 14px; margin-bottom: 10px; }
.piggy .big { font-size: 32px; }
.piggy .pig { font-size: 42px; }
.chipcard { padding: 9px 14px; font-size: 15px; }
.chipcard > span:first-child { font-size: 22px; }
.request { padding: 10px 12px; margin-bottom: 8px; }
.cal.big .day { min-height: 104px; }
@media (max-width: 600px) { .cal.big .day { min-height: 76px; } }
.install { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.install > .row { flex: 1 1 180px; min-width: 0; }
.install > .btn { margin-top: 0 !important; width: auto; flex: 0 0 auto; }
.install .steps { flex-basis: 100%; }
@media (max-width: 420px) { .install > .row .small { display: none; } }
.item.bought { background: color-mix(in srgb, var(--green) 9%, var(--soft)); }
.item.bought .tt { text-decoration: line-through; opacity: .6; }
.item.bought .who { color: var(--money); font-weight: 500; }
.avpick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; justify-items: center; }
.avpick button { padding: 4px; border-radius: 50%; border: 3px solid transparent; }
.avpick button.on { border-color: var(--green); }
.avpick .avatar.md { --size: 54px; }
.avpick { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.avpick button { padding: 2px; }
.avpick .avatar.md { --size: 48px; }

/* kalendár na počítači cez celú obrazovku */
@media (min-width: 900px) {
  body[data-tab="kalendar"] main { max-width: none; padding-left: 20px; padding-right: 20px; }
  body[data-tab="kalendar"] .cal.big .day { min-height: max(112px, calc((100vh - 330px) / 6)); }
  body[data-tab="kalendar"] .cchip { font-size: 13px; padding: 3px 6px 3px 3px; }
  body[data-tab="kalendar"] .cchip .ca { width: 19px; height: 19px; font-size: 11px; }
  body[data-tab="kalendar"] .calwho { justify-content: center; }
}

/* ===== tablet a počítač: celá šírka obrazovky ===== */
@media (min-width: 700px) {
  main, body[data-tab="kalendar"] main { max-width: none; padding-left: 20px; padding-right: 20px; }
  body[data-tab="kalendar"] .cal.big .day { min-height: max(104px, calc((100vh - 330px) / 6)); }
  body[data-tab="kalendar"] .cchip { font-size: 12.5px; padding: 3px 6px 3px 3px; }
  body[data-tab="kalendar"] .cchip .ca { width: 18px; height: 18px; font-size: 10.5px; }
  .top { padding-left: 20px; padding-right: 20px; }
}
/* ostatné obrazovky: karty v stĺpcoch (2 na tablete na šírku / počítači, 3 na veľkom monitore) */
@media (min-width: 900px) {
  body:not([data-tab="kalendar"]):not([data-tab="login"]) main { column-count: 2; column-gap: 14px; }
  main > * { break-inside: avoid; }
  main > .tabs, main > .cdrow, main > .install, main > .request, main > .piggy, main > .chipcard, main > .btn.block { column-span: all; }
}
@media (min-width: 1400px) {
  body:not([data-tab="kalendar"]):not([data-tab="login"]) main { column-count: 3; }
}

/* ---------- zobrazenia kalendára ---------- */
.calviews { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 14px; margin-bottom: 10px; }
.calviews button { flex: 1; padding: 6px 4px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink2); }
.calviews button.on { background: var(--card); color: var(--ink); }
/* týždeň: na mobile pod sebou, na tablete a počítači 7 stĺpcov */
.weekgrid { display: flex; flex-direction: column; gap: 8px; }
.wcol { background: var(--soft); border-radius: 14px; padding: 8px; border: 2px solid transparent; }
.wcol.today { border-color: var(--green); background: var(--hl); }
.wcol.we { background: color-mix(in srgb, var(--soft) 70%, var(--hl)); }
.wch { display: block; width: 100%; text-align: left; font-size: 14px; margin-bottom: 6px; }
.wcol .list .item { background: var(--card); }
.wcol .link { margin-top: 4px; }
@media (min-width: 700px) {
  .weekgrid { display: grid; grid-template-columns: repeat(var(--ndays, 7), minmax(0, 1fr)); }
  .wcol { min-height: calc(100vh - 330px); }
  .wcol .item { flex-wrap: wrap; padding: 6px; }
  .wcol .item .ic { display: none; }
  .wcol .item .row, .wcol .item .round { display: none; }
  .wcol .item .tt { font-size: 13.5px; }
  .wcol .item .small { font-size: 11.5px; }
}
/* deň: časová os */
.timeline { display: flex; flex-direction: column; gap: 6px; }
.tl { display: flex; gap: 8px; align-items: stretch; }
.tlh { flex: none; width: 48px; font-weight: 600; color: var(--green-d); padding-top: 10px; text-align: right; border-right: 3px solid var(--line); padding-right: 8px; }
/* rok: 12 malých mesiacov */
.yeargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ym { background: var(--soft); border-radius: 14px; padding: 8px; }
.ymh { display: block; width: 100%; text-align: left; font-weight: 600; text-transform: capitalize; margin-bottom: 4px; }
.ymd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.ymd b { font-size: 10px; color: var(--ink2); }
.yd { font-size: 11px; line-height: 1; padding: 3px 0; border-radius: 6px; font-weight: 500; color: var(--ink2); }
.yd.has { color: #fff; background: var(--yc, var(--ink2)); }
.yd.today { outline: 2px solid var(--green); }
@media (min-width: 900px) { .yeargrid { grid-template-columns: repeat(4, 1fr); } .yd { font-size: 12.5px; padding: 5px 0; } }
.calhead h2 { text-transform: none; }

/* ---------- týždeň s časovou osou (tablet a počítač) ---------- */
.wtg { display: none; }
@media (min-width: 0px) {
  .wtg { display: block; }
  .wtg + .weekgrid { display: none; }
  .trow, .tbody { display: grid; grid-template-columns: 30px repeat(var(--ndays, 7), minmax(0, 1fr)); gap: 0 4px; }
  .thead { padding: 6px 4px; border-radius: 10px; font-size: 14px; text-align: center; }
  .thead.today { background: var(--green); color: #fff; }
  .tcorner { font-size: 11px; color: var(--ink2); text-align: right; padding: 6px 6px 0 0; font-weight: 500; }
  .tall { display: flex; flex-direction: column; gap: 2px; padding: 3px 0; min-height: 26px; border-bottom: 2px solid var(--line); }
  .tbody { margin-top: 4px; max-height: calc(100vh - 290px); overflow-y: auto; }
  .thours { position: relative; }
  .thours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11.5px; font-weight: 500; color: var(--ink2); }
  .thours span:first-child { transform: none; }
  .tcol {
    position: relative; border-radius: 10px; cursor: copy;
    background: repeating-linear-gradient(to bottom, var(--soft) 0, var(--soft) 45px, var(--line) 45px, var(--line) 46px);
  }
  .tcol.we { background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--soft) 70%, var(--hl)) 0, color-mix(in srgb, var(--soft) 70%, var(--hl)) 45px, var(--line) 45px, var(--line) 46px); }
  .tcol.today { outline: 2px solid var(--green); }
  .tblock {
    position: absolute; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 5px; text-align: left;
    border-radius: 8px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 22%, var(--card)); color: var(--ink); cursor: pointer; z-index: 1;
  }
  .tblock:hover { z-index: 2; }
  .tbt { font-size: 11px; font-weight: 600; opacity: .8; }
  .tbn { font-size: 12.5px; font-weight: 500; line-height: 1.15; }
  .tbw { display: flex; margin-top: auto; }
  .tbw .ca { width: 16px; height: 16px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 9px; font-style: normal; color: #fff; margin-right: -4px; }
  .tbw .ca svg { width: 62%; height: 62%; }
  .tnow { position: absolute; left: -2px; right: -2px; height: 2px; background: var(--red); z-index: 3; pointer-events: none; }
  .tnow::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
}

/* týždeň: avatary vpravo v bloku, povinne prítomní so zlatým krúžkom */
@media (min-width: 0px) {
  .tblock { flex-direction: row; align-items: flex-start; gap: 4px; padding: 3px 4px 3px 6px; }
  .tbx { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; overflow: hidden; }
  .tbn { overflow: hidden; text-overflow: ellipsis; }
  .tbw { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; }
  .tbw.row { flex-direction: row; gap: 0; }
  .tbw.row .ca { margin-left: -5px; }
  .tbw .ca { width: 20px; height: 20px; font-size: 11px; margin: 0; position: relative; }
  .tbw .ca.req { }
  .tbw .ca.req::after { content: '!'; position: absolute; right: -4px; top: -5px; width: 11px; height: 11px; border-radius: 50%; background: #ffb627; color: #4a3300; font-size: 9px; font-weight: 600; line-height: 11px; text-align: center; }
  .tbw .ca.more { background: var(--ink2); font-size: 9px; font-weight: 600; }
}
select.in.tsel { appearance: none; -webkit-appearance: none; cursor: pointer; font-weight: 500; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

/* ťahanie udalostí v týždni */
@media (min-width: 700px) {
  .tblock { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
  .tblock.dragging { cursor: grabbing; opacity: .9; z-index: 6; transition: none; }
  .tres { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; cursor: ns-resize; }
  .tres::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: var(--c); opacity: .6; }
  .tblock:hover .tres::after { opacity: 1; }
}
.evrow { cursor: pointer; } .evrow:hover { filter: brightness(.98); } .cchip[data-act] { cursor: pointer; }
@media (min-width: 700px) {
  .tghost { position: absolute; left: 2px; right: 2px; border-radius: 8px; background: color-mix(in srgb, var(--green) 30%, transparent);
    border: 2px dashed var(--green); color: var(--ink); font-size: 12px; font-weight: 600; padding: 2px 6px; pointer-events: none; z-index: 4; }
  .tcol { user-select: none; -webkit-user-select: none; }
}

/* ---------- kalendár: zhustený vrch, nadpis a účastníci v jednom riadku ---------- */
.wkno { font-size: .7em; font-weight: 600; color: var(--green-d); background: var(--hl); padding: 1px 8px; border-radius: 8px; vertical-align: 2px; margin-right: 4px; }
.calbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.calbar .calhead { margin-bottom: 0; flex: 0 1 auto; gap: 8px; }
.calbar .calwho { margin: 0; flex: 1 1 320px; }
@media (max-width: 699px) { .calbar .calhead { flex: 1 1 100%; } }
@media (min-width: 700px) {
  body[data-tab="kalendar"] .top { padding-top: calc(3px + env(safe-area-inset-top)); padding-bottom: 3px; }
  body[data-tab="kalendar"] .top .brand img { width: 24px; height: 24px; }
  body[data-tab="kalendar"] .top .word { font-size: 17px; }
  body[data-tab="kalendar"] .ticon { width: 34px; height: 34px; }
  body[data-tab="kalendar"] .ticon svg { width: 24px; height: 24px; }
  body[data-tab="kalendar"] .top .avatar.md { --size: 34px; }
  body[data-tab="kalendar"] main > .card:first-child { padding: 8px 12px; }
  .calviews { margin-bottom: 6px; padding: 3px; }
  .calviews button { padding: 3px 4px; font-size: 13px; }
  .calbar .calhead h2 { font-size: 18px; }
  .calbar .calhead .round { width: 32px; height: 32px; font-size: 18px; }
  .calbar .calwho { justify-content: flex-end; }
  .calbar .calwho button { padding: 2px 10px 2px 2px; font-size: 13px; }
  .calbar .calwho .avatar.sm { --size: 24px; }
  .tbody { max-height: calc(100vh - 230px); }
  .wcol { min-height: calc(100vh - 260px); }
}



/* ---------- vlastné výbery času a dátumu ---------- */
.pickbtn { text-align: left; font-weight: 500; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickbtn:focus { border-color: var(--green); }
.popx {
  position: fixed; z-index: 80; background: var(--card); color: var(--ink); border-radius: 18px; padding: 10px; border: 1px solid var(--line); animation: pop .15s;
}
.popx.time { width: 250px; max-height: min(360px, 70vh); overflow-y: auto; }
.popx.date { width: 290px; }
.popx button { border-radius: 10px; font-weight: 500; }
.pnone { width: 100%; padding: 7px; margin-bottom: 6px; background: var(--soft); }
.pnone.on { background: var(--green); color: #fff; }
.ptimes { display: flex; flex-direction: column; gap: 3px; }
.prow { display: grid; grid-template-columns: 34px repeat(4, 1fr); gap: 3px; align-items: center; }
.prow b { text-align: right; padding-right: 4px; color: var(--ink2); font-size: 14px; }
.prow button { padding: 6px 0; background: var(--soft); font-size: 13.5px; }
.prow button:hover, .pdays button:hover:not(:disabled) { background: var(--hl); }
.prow button.on, .pdays button.on { background: var(--green); color: #fff; }
.phead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.phead b { text-transform: capitalize; font-size: 16px; }
.phead button { width: 34px; height: 34px; font-size: 18px; background: var(--soft); }
.pdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.pdays span { font-size: 11.5px; font-weight: 600; color: var(--ink2); padding: 2px 0; }
.pdays button { padding: 7px 0; font-size: 14px; background: transparent; }
.pdays button.we { color: var(--red); }
.pdays button.today { }
.pdays button.start { }
.pdays button:disabled { opacity: .25; cursor: not-allowed; }
.pdays button.on.we { color: #fff; }
.pfoot { display: flex; gap: 6px; margin-top: 8px; }
.pfoot button { flex: 1; padding: 7px; background: var(--soft); }
/* názov obdobia v strede medzi šípkami */
.calhead h2 { flex: 1; text-align: center; }
.calbar .calhead { justify-content: space-between; }
@media (max-width: 699px) { .calbar .calhead { flex: 1 1 100%; } }
@media (min-width: 700px) { .calbar .calhead { min-width: 340px; } }
.calhead h2 { justify-content: center; margin-bottom: 0; }

/* ---------- zhustený formulár udalosti ---------- */
.sheet.s-udalost { padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }
.s-udalost h2 { font-size: 19px; margin-bottom: 6px; }
.s-udalost h2 .round { width: 34px; height: 34px; font-size: 16px; }
.s-udalost label.f { margin: 7px 0 3px; font-size: 13px; }
.s-udalost .in { padding: 7px 10px; font-size: 15px; border-radius: 11px; }
.s-udalost textarea.in { min-height: 44px; }
.s-udalost .choices { gap: 4px; }
.s-udalost .choice { padding: 3px 9px; font-size: 13px; border-width: 1.5px; }
.s-udalost .pickers { gap: 4px 8px; }
.s-udalost .picker { font-size: 11px; gap: 0; }
.s-udalost .picker .avatar.md { --size: 34px; }
.s-udalost .hint { display: none; }
.s-udalost .two { gap: 8px; }
.s-udalost .req { font-size: 10px; padding: 0 5px; }
.s-udalost .btn { padding: 7px 12px; }
.s-udalost .btn.block { margin-top: 8px !important; }
.s-udalost .row[style*="margin-top:16px"] { margin-top: 10px !important; }
.s-udalost label.row { margin-top: 8px !important; font-size: 14px; }
/* na tablete a počítači polia v dvoch stĺpcoch vedľa seba */
@media (min-width: 700px) {
  .sheet.s-udalost { width: min(760px, 100%); }
}
.s-udalost .pickers { gap: 2px 3px; flex-wrap: wrap; }
.s-udalost .picker { min-width: 44px; font-size: 10.5px; }
.s-udalost .picker .avatar.md { --size: 30px; }

/* ---------- budík a choroba ---------- */
.request.alarm { background: var(--card); border-color: #f5a623; }
.alarmkid { padding: 8px 0; border-top: 1px dashed var(--line); }
.alarmkid:first-of-type { border-top: 0; }
.alarmkid .list { margin: 6px 0 0 40px; }
.alarmrow.off { opacity: .5; }
.alarmrow .btn.sm { padding: 6px 9px; }
.prow.p5 { grid-template-columns: 34px repeat(6, 1fr); }
.prow.p5 b { grid-row: span 2; }
.sickoff { filter: grayscale(1); opacity: .55; }
.cchip.sickoff .ct, .tblock.sickoff .tbn { text-decoration: line-through; }
/* lišta so šípkou – rozbalí / skryje prázdny víkend v kalendári */
.wewrap { display: flex; gap: 6px; align-items: stretch; }
.wewrap > .grow { min-width: 0; flex: 1; }
.webar { flex: none; width: 26px; border-radius: 12px; background: var(--soft); color: var(--ink2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 0; font-weight: 600; }
.webar span { font-size: 22px; line-height: 1; }
.webar small { font-size: 10px; writing-mode: vertical-rl; letter-spacing: .5px; }
.webar:hover { background: var(--hl); color: var(--ink); }
/* skratka na Christmas wishlist na obrazovke Dnes */
.xmaslist { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: #fff; background: var(--card); }
.xmaslist .ic { font-size: 30px; }
.xmaslist .small { opacity: .92; }
/* číslo pri záložke: čo je nové */
.nav button { position: relative; }
.navn { position: absolute; top: 0; right: calc(50% - 24px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
/* pásik Na čo sa teším: ťuknutie otvorí výber */
.cdrow { cursor: pointer; align-items: stretch; }
.cdgo { flex: 0 0 auto; align-self: center; padding: 0 4px; font-size: 22px; font-weight: 600; color: var(--muted, #8b84a3); }
.cd.cdempty { display: flex; align-items: center; padding: 10px 12px; }
.cd.cdempty span { font-size: 13px; }
.askdev { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; color: #2b2340; }

/* ===================== Tichý vzhľad: jemné plochy, tenké čiary, málo farby ===================== */
body { font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 500; }
b, strong { font-weight: 500; }
.card, .profile, .pinpad button, .theme, .tabs button, .round, .popx, .choice, .emojis button {
  border: 1px solid var(--line);
}
.card { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.card h2 { font-size: 15px; font-weight: 500; margin-bottom: 10px; color: var(--ink); }
.card h2 .muted, .card h2 .small { font-weight: 400; }
.sheet h2, .calhead h2 { font-weight: 500; font-size: 18px; }
.sheet { border-radius: 18px 18px 0 0; background: var(--card); }
.sheetbg { background: rgb(47 46 43 / .25); }
.top { background: var(--topbg); border-bottom: 1px solid var(--line); }
.word, .top .word, .login .word { font-weight: 500; letter-spacing: 0; color: var(--ink); }
.top .word { font-size: 17px; }
.login .word { font-size: 28px; }
.login .brand img { width: 72px; height: 72px; }
.top .brand img { width: 26px; height: 26px; }
.login { padding-top: 56px; }

/* tlačidlá */
.btn { background: var(--green); color: #fff; font-weight: 500; border-radius: 10px; padding: 9px 16px; }
.btn:active { transform: none; opacity: .85; }
.btn.sec { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.red { background: transparent; color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); }
.btn.gold { background: var(--green); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 13.5px; border-radius: 8px; }
.link { font-weight: 500; font-size: 14px; }
.in { border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.in:focus { border-color: var(--green); }
label.f { font-weight: 500; font-size: 13.5px; color: var(--ink2); }

/* spodné menu: tenká lišta */
.nav {
  left: 0; right: 0; bottom: 0; transform: none; width: 100%; border-radius: 0; background: var(--card); border-top: 1px solid var(--line);
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); justify-content: center;
}
.nav button { max-width: 120px; color: var(--ink2); font-size: 11.5px; font-weight: 400; gap: 2px; border-radius: 8px; }
.nav button span { line-height: 0; }
.nav button svg { width: 22px; height: 22px; }
.nav button.on { background: transparent; color: var(--green-d); font-weight: 500; }
.navn { background: var(--green); font-weight: 500; right: calc(50% - 22px); }
main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

/* hlavička */
.ticon svg { width: 22px; height: 22px; }
.ticon { color: var(--ink2); }
.ticon:hover, .ticon:active { transform: none; color: var(--ink); }
.ticon .count, .round.bell .count { background: var(--green); border-color: var(--bg); font-weight: 500; }
.round { background: transparent; }
.round.sos, .round.bell { background: transparent; }

/* postavy: pastelové kruhy */
.avatar { background: color-mix(in srgb, var(--c) 22%, var(--card)); color: color-mix(in srgb, var(--c) 75%, var(--ink)); font-size: calc(var(--size) * .42); }
.profile { font-weight: 400; font-size: 15px; padding: 16px 8px 12px; }
.profile:hover { border-color: var(--ink2); }
.profile:active, .mood:active, .theme:active, .ticon:active { transform: none; }
.pinpad button { height: 58px; font-size: 22px; font-weight: 400; border-radius: 12px; }
.pindots i { width: 12px; height: 12px; border-width: 1.5px; }

/* nálady */
.mood { background: transparent; border: 1px solid transparent; }
.mood span { font-size: 24px; filter: saturate(.75); }
.mood.on { background: var(--hl); border-color: var(--green); transform: none; }
.mood small { font-weight: 400; }
.mood .num { display: none; }
.mchip { background: var(--soft); }

/* zoznamy a štítky */
.item { background: transparent; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 2px; }
.list > .item:last-child { border-bottom: 0; }
.item .tt { font-weight: 400; }
.item .ic { font-size: 18px; filter: saturate(.7); }
.item.notif.new { background: var(--hl); border-radius: 8px; padding-left: 8px; }
.check { border: 1.5px solid var(--ink2); border-radius: 6px; width: 22px; height: 22px; font-size: 14px; }
.check.on { border-color: var(--green); }
.pill, .pill.gold, .pill.green, .pill.red { background: var(--soft); color: var(--ink2); font-weight: 400; font-size: 12.5px; }
.pill.red { color: var(--red); }
.money { font-weight: 500; }
.req { background: transparent; color: var(--red); padding: 0; font-weight: 400; }

/* záložky a výbery */
.tabs button { background: transparent; border-color: transparent; font-weight: 400; color: var(--ink2); }
.tabs button.on { background: var(--soft); color: var(--ink); font-weight: 500; }
.choice { background: transparent; font-weight: 400; }
.choice.on { background: var(--hl); color: var(--green-d); border-color: var(--green); }
.calviews { background: transparent; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; }
.calviews button { font-weight: 400; border-radius: 0; }
.calviews button.on { background: transparent; color: var(--green-d); font-weight: 500; border-bottom: 2px solid var(--green); }
.calwho button { background: transparent; font-weight: 400; border: 1px solid transparent; }
.calwho button.on { background: var(--soft); border-color: var(--line); }

/* pásiky a oznamy bez farebných plôch */
.cd, .count { background: transparent; color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--cc, var(--green)); border-radius: 10px; }
.cd b, .count .n { font-weight: 500; }
.cd.xmas { border-left-color: var(--gold); }
.cd small, .cd span, .count .u, .count .l { font-weight: 400; }
.cd small, .count .u { color: var(--ink2); opacity: 1; }
.install { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.install .tt { font-weight: 500; font-size: 14px; }
.install .appicon { display: none; }
.install .key { background: var(--soft); }
.xmaslist { color: var(--ink); }
.xmaslist .ic { font-size: 20px; }
.piggy { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.piggy .big { font-weight: 500; font-size: 26px; }
.piggy .pig { font-size: 26px; filter: saturate(.7); }
.request, .request.taken, .request.alarm { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 10px; }
.request.taken { border-left-color: var(--gold); }
.request.alarm { background: var(--hl); border-left-color: var(--gold); }
.ask { border-color: var(--green); }
.popt { background: transparent; border: 1px solid var(--line); font-weight: 400; }
.popt.on { border-color: var(--green); }
.popt.win { border-color: var(--gold); background: transparent; }
.poll + .poll { border-top: 1px solid var(--line); }
.sbar { height: 5px; }
.alarmkid { border-top-style: solid; }

/* kalendár */
.day { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.day .d, .cal.big .day .d { font-weight: 400; color: var(--ink2); }
.day.today, .wcol.today { background: var(--hl); border-color: var(--green); }
.day.today .d { color: var(--green-d); font-weight: 500; }
.cal.big .day.we, .wcol.we { background: var(--bg); }
.cal .dn { font-weight: 400; }
.cchip { font-weight: 400; border-left-width: 2px; background: color-mix(in srgb, var(--c) 10%, var(--card)); }
.cchip .ct b { font-weight: 500; }
.cchip .ca { background: color-mix(in srgb, var(--c) 30%, var(--card)); color: var(--ink); }
.wcol, .ym { background: var(--card); border: 1px solid var(--line); }
.wkno { background: transparent; color: var(--ink2); font-weight: 400; }
.webar { background: transparent; border: 1px solid var(--line); font-weight: 400; }
.tlh { border-right-width: 1px; font-weight: 400; }
.yd { font-weight: 400; }
.yd.has { background: color-mix(in srgb, var(--yc, var(--green)) 30%, var(--card)); color: var(--ink); }
@media (min-width: 700px) {
  .tall { border-bottom-width: 1px; }
  .thead.today { background: var(--hl); color: var(--green-d); }
  .tblock { background: color-mix(in srgb, var(--c) 12%, var(--card)); border-left-width: 2px; border-radius: 6px; }
  .tbt, .tbn { font-weight: 400; }
  .tbw .ca { background: color-mix(in srgb, var(--c) 30%, var(--card)); color: var(--ink); }
}

/* okná a hlášky */
#toast { background: var(--ink); font-weight: 400; border-radius: 10px; font-size: 14px; }
.heartmsg { border: 1px solid var(--line); border-radius: 14px; }
.heartmsg .h { font-size: 36px; }
.popx { border-radius: 12px; }
.dict-btn { background: var(--soft); color: var(--ink2); }
.say { background: var(--soft); color: var(--ink2); }

/* výber témy */
.themes { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.theme { border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 10px; }
.theme .sw { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.theme .nm { padding: 0; font-weight: 400; font-size: 14px; }
.theme.on { border-color: var(--green); background: var(--hl); }

/* vítanie a správa rodiny */
.wrapw { max-width: 380px; margin: 0 auto; }
.welcome { margin-top: 22px; text-align: left; padding: 18px; }
.welcome h2 { font-size: 17px; margin-bottom: 8px; }
.welcome a { color: var(--link); }
.afoot { display: flex; justify-content: space-between; margin-top: 12px; }
.qr { max-width: 220px; margin: 8px auto 12px; }
.qr svg { width: 100%; height: auto; display: block; }
a.btn { color: inherit; }
a.btn:not(.sec):not(.red) { color: #fff; }

.calwho { scrollbar-width: none; }
.calwho::-webkit-scrollbar { display: none; }
.round { width: 34px; height: 34px; font-size: 15px; }
.top .avatar.md { --size: 32px; }
.chipcard { font-size: 14.5px; }
.evrow [style*="--c"], .item .bar { opacity: .7; }
.card.chipcard { width: 100%; font-size: 14px; }
.chipcard .grow, .chipcard > span:first-child { font-size: 14px; }

/* tiché ikonky namiesto farebných emoji (ikonky.js) */
.li { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -.25em; line-height: 0; }
.li svg, .avatar .li svg, .avatar .badge .li svg { display: block; width: 100%; height: 100%; }
.item .ic { filter: none; color: var(--ink2); }
.mood span { color: var(--ink2); }
.mood.on span { color: var(--green-d); }
.avatar .badge .li { width: 100%; height: 100%; vertical-align: top; color: var(--ink2); }

/* témy s pozadím a ozdobami (voliteľné) */
body.fx {
  background-image:
    radial-gradient(circle at 10% 0%, var(--b1) 0, transparent 40%),
    radial-gradient(circle at 100% 30%, var(--b2) 0, transparent 45%),
    radial-gradient(circle at 0% 100%, var(--b3) 0, transparent 40%);
  background-attachment: fixed;
}
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
#snow i { position: absolute; top: -20px; color: var(--particle); font-style: normal; text-shadow: 0 0 4px rgba(120, 160, 200, .6); animation: fall linear infinite; }
#snow i.rise { top: auto; bottom: -30px; animation-name: rise; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }
@keyframes rise { to { transform: translateY(-115vh) rotate(-20deg); } }
.themes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.theme .sw { width: 34px; height: 34px; font-size: 18px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.theme .nm { text-align: left; line-height: 1.2; }
.theme .ds { display: block; font-size: 11.5px; font-weight: 400; margin-top: 1px; }
.themedot { width: 34px; height: 34px; border-radius: 50%; flex: none; border: 1px solid var(--line); }
.heartfly { animation: heart 2.6s ease-out forwards; }
@keyframes heart {
  0% { transform: translateY(0) scale(.4); opacity: 0; }
  15% { opacity: 1; transform: translateY(-20px) scale(1.2); }
  100% { transform: translateY(-70vh) scale(1) rotate(20deg); opacity: 0; }
}

/* spodné menu: každá ikonka má vlastnú farbu */
.nav button[data-tab="dnes"] { --navi: #b7791f; }
.nav button[data-tab="spravy"] { --navi: #2f7fb5; }
.nav button[data-tab="kalendar"] { --navi: #c2553f; }
.nav button[data-tab="ulohy"] { --navi: #4a7358; }
.nav button[data-tab="zelania"] { --navi: #c0508a; }
.nav button[data-tab="rodina"] { --navi: #7d5fb0; }
.nav button span { color: var(--navi); }
.nav button.on { color: var(--navi); }

/* červený krížik na mazanie */
button:has(> .krizik) { color: var(--red); opacity: 1; }
.krizik { display: block; width: 20px; height: 20px; color: var(--red); }

/* smajlíky: farebný okraj podľa nálady */
[data-act="mood"][data-v="0"], [data-act="mood-del"][data-v="0"] { --mfarba: #c8372d; }
[data-act="mood"][data-v="1"], [data-act="mood-del"][data-v="1"] { --mfarba: #e0702a; }
[data-act="mood"][data-v="2"], [data-act="mood-del"][data-v="2"] { --mfarba: #c99a12; }
[data-act="mood"][data-v="3"], [data-act="mood-del"][data-v="3"] { --mfarba: #7f9f2f; }
[data-act="mood"][data-v="4"], [data-act="mood-del"][data-v="4"] { --mfarba: #3f9f5a; }
[data-act="mood"][data-v="5"], [data-act="mood-del"][data-v="5"] { --mfarba: #1f9d8a; }
.mood span, .mood.on span, .mchip span { color: var(--mfarba); }
.mood span { filter: none; }

/* potvrdenie v grafike appky */
.potvrd-bg { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgb(47 46 43 / .35); }
.potvrd { width: 100%; max-width: 340px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.potvrd-t { font-size: 17px; font-weight: 500; line-height: 1.35; }
.potvrd-v { font-size: 14px; color: var(--ink2); margin-top: 6px; line-height: 1.4; }
.potvrd-v:empty { display: none; }
.potvrd-r { display: flex; gap: 8px; margin-top: 16px; }
.potvrd-r .btn { flex: 1; }
.potvrd-r .btn.zle { background: var(--red); color: #fff; border: 0; }
/* vrátený rozpísaný text */
.koncept-pas { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--hl); border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; font-size: 13.5px; }

/* meniny pri názve appky */
.top .brand { min-width: 0; }
.top .acts { flex: none; }
.brand .meniny { font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.brand .meniny b { font-weight: 600; color: var(--ink); }
@media (max-width: 560px) {
  .top .brand { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 0; align-items: center; }
  .top .brand img { grid-row: span 2; }
  .top .brand .meniny { font-size: 11.5px; line-height: 1.2; }
  .top .brand:has(.meniny) .word { line-height: 1.15; }
}
/* presúvanie kartičiek na Dnes */
#main > .dkarta { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
main > .dkarta[data-dk="tesim"] { column-span: all; }
.dkarta.tahane { position: relative; z-index: 30; pointer-events: none; }
.dkarta.tahane > * { box-shadow: 0 14px 30px rgb(0 0 0 / .18); transform: scale(1.02); }
body.tahanie { cursor: grabbing; }

/* poradie kartičiek šípkami */
.kartu-r { display: flex; align-items: center; gap: 4px; }
.kartu-r > .item { flex: 1; min-width: 0; }
.karta-sip { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--ink2); background: var(--soft); }
.karta-sip svg { width: 18px; height: 18px; }
.karta-sip:disabled { opacity: .3; }

/* kartička čaká na ťuknutie, kam ju dať */
#main > .dkarta, #main > .dkarta * { -webkit-user-drag: none; }
.dkarta.uklada > * { outline: 2px dashed var(--green); outline-offset: 2px; }
body.tahanie .dkarta:not(.tahane) { cursor: copy; }

/* ikonky vpravo hore farebné ako spodné menu */
.top .ticon[data-sheet="notifs"] { color: #b7791f; }
.top .ticon[data-sheet="prosba"] { color: #c2553f; }
.top .ticon[data-sheet="rodina"] { color: #c0508a; }
.top .ticon[data-sheet]:hover, .top .ticon[data-sheet]:active { filter: brightness(.85); }

/* smajlíky nálad všade vo farbe nálady */
.mf, .mf .li, .avatar .badge .mf .li { color: var(--mfarba); }

/* na plnom tlačidle a v spodnom menu ikonka ostane farbou textu */
.btn:not(.sec) .li, .nav .li, #toast .li, .mchip .li { color: inherit !important; }
.mf .li { color: var(--mfarba) !important; }

/* zbalené Pripomenúť a Opakovať v okne udalosti */
details.zbal { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
details.zbal > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 0; cursor: pointer; font-weight: 500; }
details.zbal > summary::-webkit-details-marker { display: none; }
details.zbal > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.6px solid var(--ink2); border-bottom: 1.6px solid var(--ink2); transform: rotate(45deg); margin: -3px 2px 0 0; transition: transform .15s; }
details.zbal[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
details.zbal .zbal-t { flex: none; }
details.zbal .zbal-h { flex: 1; min-width: 0; text-align: right; color: var(--ink2); font-weight: 400; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.zbal[open] { padding-bottom: 12px; }
/* týždeň s hodinami v mobile: menšie písmo, bez avatarov v bloku */
@media (max-width: 699px) {
  .trow, .tbody { grid-template-columns: 20px repeat(var(--ndays, 7), minmax(0, 1fr)); gap: 0 2px; }
  .thead { padding: 4px 0; font-size: 11px; border-radius: 8px; }
  .tcorner { font-size: 8px; padding: 4px 1px 0 0; line-height: 1.05; }
  .tall .cchip b { display: none; }
  .thours span { right: 3px; font-size: 9.5px; }
  .tcol { border-radius: 6px; }
  .tblock { padding: 2px 2px 2px 3px; border-left-width: 3px; border-radius: 5px; }
  .tbt { font-size: 9px; }
  .tbn { font-size: 10.5px; line-height: 1.1; word-break: break-word; }
  .tblock { flex-direction: column; gap: 1px; }
  .tbx { flex: 0 1 auto; }
  .tbw, .tbw.row { flex-direction: row; gap: 3px; margin-top: auto; padding: 0 0 2px 2px; }
  .tbw .ca, .tbw.row .ca { width: 14px; height: 14px; font-size: 8px; margin: 0; }
  .tbw .ca.req { box-shadow: 0 0 0 1.5px var(--c); }
  .tall { gap: 1px; min-height: 20px; }
  .tbody { max-height: calc(100dvh - 330px); }
}

/* jeden výber ľudí pri udalosti */
.picker .os-stav { font-size: 10.5px; font-weight: 500; color: var(--ink2); line-height: 1.1; }
.picker.osoba.s2 .os-stav { color: var(--ink); font-weight: 600; }
/* týždeň v mobile: v bloku len názov, bez času */
@media (max-width: 699px) { .tblock .tbt { display: none; } }

/* Kto? pri opakovanej udalosti: Všetky dni / Len tento deň */
.osoby-rezim { margin-bottom: 8px; }
.osoby-rezim .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.osoby-rezim .choice { text-align: center; }

/* kalendár: hutný vrch – výber zobrazenia vedľa názvu */
.calnova { margin-bottom: 8px !important; }
.calnova .btn { padding: 8px 14px; }
.calhead .calsel { flex: none; width: auto; margin: 0 0 0 6px; height: 34px; min-height: 0; padding: 4px 28px 4px 10px; font-size: 14px; border-radius: 10px; }
.calbar { margin-bottom: 6px; }
.calbar .calwho { margin-bottom: 0; }
@media (max-width: 699px) {
  .calhead .wkno { display: none; }
  .calbar .calhead h2 { font-size: 16px; }
  .calbar .calhead .round { width: 30px; height: 30px; font-size: 17px; }
  .calhead { gap: 4px !important; }
}

/* musí byť pri tom: hrubý krúžok vo farbe člena */
.avatar.musi { box-shadow: 0 0 0 3px var(--c); margin: 3px; }

/* úzky stĺpec s hodinami: len číslo */
.thours span { right: 4px; }
.tcorner.small { font-size: 9px; line-height: 1.05; padding-right: 2px; }
@media (max-width: 699px) { .thours span { right: 2px; } .tcorner.small { font-size: 8px; padding-right: 1px; } }

/* týždeň: prekrývajúce sa udalosti v riadkoch */
.tblock.v-riadku { flex-direction: row; align-items: center; gap: 3px; padding: 0 3px; border-radius: 5px; }
.tblock.v-riadku .tbx { flex: 1; min-width: 0; display: block; }
.tblock.v-riadku .tbt { display: none; }
.tblock.v-riadku .tbn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.tblock.v-riadku .tbw, .tblock.v-riadku .tbw.row { flex: none; flex-direction: row; gap: 1px; margin: 0; padding: 0; }
.tblock.v-riadku .tbw .ca { width: 14px; height: 14px; font-size: 8px; margin: 0; }
/* týždeň: zväčšenie dvoma prstami */
.wtg { touch-action: pan-x pan-y; }
.wtg.z { overflow: auto; -webkit-overflow-scrolling: touch; }
.wtg.z .tbody { max-height: none; overflow: visible; margin-top: 0; }
.wtg.z .tblock { touch-action: pan-x pan-y; }
.wtg.z .thl, .wtg.z .tcd { position: sticky; z-index: 6; background: var(--card); }
.wtg.z .thl { top: 0; }
.wtg.z .tcd { top: var(--thl, 26px); }
.wtg.z .tcorner, .wtg.z .thours { position: sticky; left: 0; z-index: 5; background: var(--card); }

/* kto musí byť pri tom: farebná guľôčka */
.gulka { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.evrow .gulka { width: 13px; height: 13px; }
.evrow .row { gap: 4px !important; align-items: center; }
.cchip .gulka { width: 8px; height: 8px; margin-right: 2px; }
.tbw { gap: 3px; }
.tblock.v-riadku .tbw { gap: 2px; }
@media (max-width: 699px) { .tbw .gulka { width: 8px; height: 8px; } }
.wtg:not(.z) .tbody { overflow-x: hidden; }

/* úchytka na zmenu dĺžky udalosti: funguje, ale nevidno ju */
.tres::after { display: none; }

/* okno sa animuje len pri otvorení, nie pri každom prekreslení */
.sheetbg.bezanim, .sheetbg.bezanim .sheet { animation: none; }

/* v týždni len názov; čas len počas ťahania udalosti */
.tblock .tbt { display: none; }
.tblock.dragging .tbt { display: block; }

/* prekrývajúce sa udalosti: karty cez seba */
.tblock.karta { align-items: flex-start; padding: 2px 3px; background: color-mix(in srgb, var(--c) 42%, var(--card)); box-shadow: 0 -1px 3px rgb(0 0 0 / .18); }
.tblock.dragging { z-index: 20 !important; }

.tblock.karta { padding-top: 1px; }

/* spodná lišta: väčšie ikonky, nižšia lišta */
.nav { padding-top: 2px; padding-bottom: calc(2px + env(safe-area-inset-bottom)); }
.nav button { padding: 1px 2px; gap: 0; font-size: 10.5px; line-height: 1.15; }
.nav button svg { width: 27px; height: 27px; }
main { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }

/* novinka v podzáložke: červená bodka */
.subd { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--red); vertical-align: 2px; }

/* okno udalosti: hutný vrch a Uložiť stále dole */
.sheet.s-udalost { padding: 6px 14px 0; }
.s-udalost h2 { font-size: 16px; margin-bottom: 4px; }
.s-udalost h2 .round { width: 28px; height: 28px; font-size: 14px; }
.s-udalost label.f { margin: 5px 0 2px; }
.s-udalost .os-napoveda { font-size: 11.5px; margin: 0 0 3px !important; }
.s-udalost details.zbal { margin-top: 6px; }
.s-udalost details.zbal > summary { padding: 7px 0; font-size: 14px; }
.zm-sec.den, .ud-uloz.den .zm-all, .ud-uloz:not(.den) .zm-den { display: none !important; }
.s-udalost.prip .ne-prip, .s-udalost:not(.prip) .len-prip { display: none !important; }
.s-udalost .ud-uloz { position: sticky; bottom: 0; z-index: 5; margin: 10px -14px 0; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }

/* obdĺžnik novej udalosti aj na mobile */
.tghost { position: absolute; left: 2px; right: 2px; border-radius: 6px; background: color-mix(in srgb, var(--green) 30%, transparent); border: 2px dashed var(--green); color: var(--ink); font-size: 11px; font-weight: 600; padding: 1px 3px; pointer-events: none; z-index: 4; overflow: hidden; white-space: nowrap; }
.tcol { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* zvonček: zmazať staršie */
.notif-akcia { display: flex; justify-content: flex-end; margin: -6px 0 6px; }

/* filter ľudí v kalendári: len ikonky */
.calwho button, .calbar .calwho button { padding: 2px; gap: 0; border-radius: 50%; }
.calwho { justify-content: flex-start; }

/* škola z EduPage v týždni */
.skh { position: absolute; z-index: 0; overflow: hidden; border-radius: 4px; padding: 0 3px; text-align: left; font-size: 11px; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; background: color-mix(in srgb, var(--ink2) 20%, var(--card)); border-left: 2px solid var(--ink2); color: var(--ink2); }
.skh.zrus { text-decoration: line-through; opacity: .55; }
.tblock { z-index: 2; }
.cchip.skchip { --c: var(--ink2); width: 100%; text-align: left; }
.cchip.skchip.test { --c: var(--red); color: var(--red); font-weight: 500; }
.calwho .skprep { width: 34px; height: 34px; padding: 0; border-radius: 50%; opacity: .45; display: grid; place-items: center; }
.calwho .skprep.on { opacity: 1; background: var(--soft); }
@media (max-width: 699px) { .skh { font-size: 9.5px; padding: 0 2px; } }

/* hodina ako karta cez inú udalosť */
.skh.karta { background: color-mix(in srgb, var(--ink2) 32%, var(--card)); color: var(--ink); box-shadow: 0 -1px 3px rgb(0 0 0 / .18); }

/* rozvrh: výber detí a farba dieťaťa */
.calwho .rozvrhsel { flex: none; width: auto; margin: 0 0 0 6px; height: 34px; min-height: 0; padding: 4px 26px 4px 8px; font-size: 13px; border-radius: 10px; }
.skh { border-left-color: var(--c, var(--ink2)); }
.skriadok + .skriadok { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* kalendár: + , Dnes a týždeň v jednom riadku */
.calhead .calplus { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center; }
.calhead .caldnes { flex: none; height: 34px; padding: 0 10px; font-size: 14px; }
@media (max-width: 699px) {
  .calhead .calplus { width: 30px; height: 30px; font-size: 20px; }
  .calhead .caldnes { height: 30px; padding: 0 7px; font-size: 13px; }
  .calbar .calhead h2 { font-size: 14.5px; white-space: nowrap; }
  .calhead .calsel { margin-left: 2px; padding: 4px 22px 4px 7px; font-size: 13px; height: 30px; }
}
@media (max-width: 420px) {
  .calbar .calhead { min-width: 0; max-width: 100%; gap: 2px !important; }
  .calbar .calhead h2 { flex: 1 1 0; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
  .calbar .calhead .round { width: 26px; height: 28px; font-size: 16px; flex: none; }
  .calhead .calplus { width: 28px; height: 28px; font-size: 18px; }
  .calhead .caldnes { height: 28px; padding: 0 5px; font-size: 12.5px; }
  .calhead .calsel { margin-left: 0; padding: 2px 18px 2px 5px; font-size: 12.5px; height: 28px; background-position: calc(100% - 11px) 50%, calc(100% - 6px) 50%; }
}

/* výber rozvrhu v prvom riadku, v druhom len ikonky */
.calhead .rozvrhsel { flex: none; width: auto; margin: 0 0 0 4px; height: 34px; min-height: 0; padding: 4px 26px 4px 8px; font-size: 14px; border-radius: 10px; }
.calbar .calwho { justify-content: center; overflow: visible; flex-wrap: wrap; }
.calbar .calhead { min-width: 0; }
@media (max-width: 699px) {
  .calhead .rozvrhsel { margin-left: 2px; padding: 2px 18px 2px 5px; font-size: 12.5px; height: 28px; background-position: calc(100% - 11px) 50%, calc(100% - 6px) 50%; }
}

/* záložka Rodina: hutné a zbalené karty */
body[data-tab="rodina"] #main .card { padding: 10px 12px; margin-bottom: 8px; }
.card > h2.rod-h { cursor: pointer; margin-bottom: 6px; position: relative; padding-right: 20px; }
.card > h2.rod-h::after { content: ''; position: absolute; right: 4px; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid var(--ink2); border-bottom: 1.6px solid var(--ink2); transform: translateY(-2px) rotate(-135deg); }
.card.zbal > h2.rod-h::after { transform: translateY(-5px) rotate(45deg); }
.card.zbal > h2.rod-h { margin-bottom: 0; }
.card.zbal > :not(h2) { display: none; }

/* moduly: škola, zdravie, domácnosť, balenie */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.mod-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: var(--soft); color: var(--ink); font-size: 14px; }
.mod-tile .e { font-size: 26px; line-height: 1; }
.mod-dni { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.mod-dni .choice { flex: none; }
.mod-graf { width: 100%; height: auto; display: block; margin-bottom: 4px; }
.mod-graf text { font-size: 11px; fill: var(--ink2); }
.mod-graf .mriezka { stroke: var(--line); stroke-width: 1; }
.mod-graf .ciara { fill: none; stroke: var(--green-d); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mod-graf .bod { fill: var(--green-d); stroke: var(--card); stroke-width: 2; }
.mod-graf .ciel { fill: transparent; cursor: pointer; }
.mod-graf-h { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.mod-chk { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; color: var(--green-d); font-weight: 700; background: var(--card); }
.mod-chk.on { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.mod-velke { font-size: 24px; font-weight: 700; }
.mod-vzory { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mod-vzory button { padding: 5px 10px; border-radius: 99px; background: var(--soft); color: var(--ink); font-size: 13px; }
.mod-casy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mod-riadok { display: flex; gap: 8px; align-items: center; }
.mod-riadok .in { flex: 1; min-width: 0; }
.sheet h2 .t { display: flex; gap: 8px; align-items: center; min-width: 0; }
.sheet h2 .t .round { width: 36px; height: 36px; flex: none; }

/* víkend sa dá skryť ručne len na tablete a počítači; väčšie ikonky v riadku kalendára */
.calbar .calwho .avatar.sm { --size: 34px; }
@media (min-width: 700px) { .calbar .calwho .avatar.sm { --size: 40px; } }
.calhead .calplus { width: 34px; height: 34px; font-size: 22px; }

/* vybraný člen v kalendári: ikonka v krúžku */
.calwho button, .calbar .calwho button { border: 2px solid transparent; background: transparent; }
.calwho button.on, .calbar .calwho button.on { border-color: var(--mc, var(--green)); background: transparent; }

/* rozvrh: sivý základ s nádychom farby dieťaťa */
.skh { background: color-mix(in srgb, var(--c, var(--ink2)) 26%, color-mix(in srgb, var(--ink2) 24%, var(--card))); border-left: 3px solid var(--c, var(--ink2)); color: var(--ink); }
.skh.karta { background: color-mix(in srgb, var(--c, var(--ink2)) 36%, color-mix(in srgb, var(--ink2) 32%, var(--card))); }

/* výbery v hlavičke kalendára: popis nad hodnotou, tvar ako ostatné polia */
.calhead .vyber { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 0; height: 36px; padding: 0 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.calhead .vyber:focus-within { border-color: var(--green); }
.calhead .vyber small { font-size: 10px; line-height: 12px; color: var(--ink2); }
.calhead .vyber select.in.tsel { width: auto; height: 17px; min-height: 0; margin: 0; padding: 0 13px 0 0; border: 0; border-radius: 0; background-color: transparent; font-size: 13px; line-height: 17px; font-weight: 500; background-position: calc(100% - 5px) 50%, 100% 50%; }
@media (max-width: 699px) {
  .calhead .vyber { height: 30px; padding: 0 5px; border-radius: 8px; }
  .calhead .vyber small { font-size: 9px; line-height: 10px; }
  .calhead .vyber select.in.tsel { height: 15px; font-size: 12px; line-height: 15px; padding-right: 11px; }
}

/* menu výberu v kalendári (návrh A) */
.vyber-obal { position: relative; flex: none; }
.calhead .vyber { align-items: flex-start; color: var(--ink); text-align: left; }
.calhead .vyber.ot { border-color: var(--green); }
.calhead .vyber b { display: flex; align-items: center; gap: 4px; font-size: 13px; line-height: 17px; font-weight: 500; white-space: nowrap; }
.calhead .vyber b::after { content: ''; border: 4px solid transparent; border-top-color: var(--ink2); border-bottom: 0; }
.vyb-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 60; min-width: 150px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 20px rgba(47, 46, 43, .14); }
.vyb-r { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border-radius: 8px; background: transparent; color: var(--ink); font-size: 15px; text-align: left; white-space: nowrap; }
.vyb-r.on { background: var(--hl); color: var(--green-d); font-weight: 500; }
.vyb-r i { margin-left: auto; font-style: normal; }
.vyb-r .avatar.sm { --size: 24px; }
@media (max-width: 699px) {
  .calhead .vyber b { font-size: 12px; line-height: 15px; gap: 3px; }
  .vyb-r { padding: 10px 9px; }
}

/* celý deň: výrazný štítok a deň podfarbený farbou udalosti */
.tall { position: relative; }
.tall > :not(.tden) { position: relative; }
.tden { position: absolute; inset: 0; border-radius: inherit; opacity: .22; pointer-events: none; }
.tall .cchip:not(.skchip) { background: color-mix(in srgb, var(--c) 45%, var(--card)); }

/* udalosť sa chytá až po podržaní; dovtedy sa dá kalendár posúvať aj cez ňu */
.tblock { touch-action: pan-x pan-y; cursor: pointer; -webkit-touch-callout: none; }
.tblock.chyteny { cursor: grabbing; z-index: 20 !important; transform: scale(1.04); box-shadow: 0 4px 14px rgb(0 0 0 / .3); outline: 2px solid var(--c); }
.tblock.chyteny.dragging { transform: none; }

/* viacdňová udalosť: jeden pás cez všetky dni */
.tallbg { position: relative; min-height: 20px; border-bottom: 2px solid var(--line); }
.tcd .tall { border-bottom: 0; background: none; z-index: 1; }
.tcd .tall:empty { min-height: 0; padding: 0; }
.tpas { position: relative; z-index: 1; min-width: 0; padding: 1px 0; }
.tpas .cchip { display: flex; width: 100%; box-sizing: border-box; background: color-mix(in srgb, var(--c) 45%, var(--card)); }
@media (max-width: 699px) { .tallbg { border-bottom-width: 1px; } }

/* vrch kalendára: na počítači je miesto, tak celé texty a väčšie ovládanie */
.lenpc { display: none; }
@media (min-width: 900px) {
  .lenpc { display: inline; }
  .nepc { display: none; }
  .calbar .calhead { flex: 1 1 auto; gap: 12px !important; }
  .calbar .calhead h2 { flex: 1 1 auto; font-size: 20px; white-space: nowrap; }
  .calhead .calplus { width: auto; height: 44px; padding: 0 20px; border-radius: 22px; font-size: 16px; font-weight: 500; }
  .calhead .caldnes { height: 44px; padding: 0 20px; font-size: 15px; }
  .calbar .calhead .round { width: 44px; height: 44px; font-size: 20px; }
  .calhead .vyber { height: 48px; min-width: 130px; padding: 0 12px; }
  .calhead .vyber small { font-size: 11px; line-height: 14px; }
  .calhead .vyber b { font-size: 15px; line-height: 20px; justify-content: space-between; width: 100%; }
}

/* všetky udalosti v mriežke majú rovnakú jemnú farbu; prekrytie oddelí tieň */
.tblock, .tblock.karta { background: color-mix(in srgb, var(--c) 12%, var(--card)); }

/* užší stĺpec hodín s číslami v strede */
.trow, .tbody { grid-template-columns: 22px repeat(var(--ndays, 7), minmax(0, 1fr)); }
.thours span { left: 0; right: 0 !important; text-align: center; }
.tcorner.small { text-align: center; padding: 4px 0 0; font-size: 8.5px; }
@media (max-width: 699px) {
  .trow, .tbody { grid-template-columns: 15px repeat(var(--ndays, 7), minmax(0, 1fr)); }
  .tcorner.small { font-size: 7.5px; }
}
/* agenda vybraného dňa pod kalendárom */
.wtg:not(.z) .tbody { max-height: max(340px, calc(100dvh - 440px)); }
.agenda { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); scroll-margin-bottom: 80px; }
.agh { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.agchip { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.thead.vyb { box-shadow: inset 0 -2px 0 var(--green); }
.tcol.vyb { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--green) 40%, transparent); }
.tallbg[data-act] { cursor: pointer; }
.zvon { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-width: 26px; min-height: 24px; justify-content: center; padding: 0 4px; border: 0; border-radius: 7px; background: none; color: var(--ink2); font-size: 15px; line-height: 1; cursor: pointer; }
.zvon small { font-size: 11px; font-weight: 600; }
.tcol { cursor: pointer; }

/* rozvrh: bodkovaný obrys vo farbe dieťaťa, vnútri takmer biele */
.skh, .skh.karta { background: color-mix(in srgb, var(--c, var(--ink2)) 10%, var(--card)); border: 1.5px dotted var(--c, var(--ink2)); color: var(--ink); }

/* vrch kalendára v jednom riadku od šírky počítača */
@media (min-width: 900px) {
  .calbar { flex-wrap: nowrap; gap: 10px; }
  .calbar .calhead { flex: 1 1 0; min-width: 0; }
  .calbar .calhead h2 { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .calbar .calwho { flex: none; flex-wrap: nowrap; overflow: visible; gap: 4px; }
}
@media (min-width: 900px) and (max-width: 1299px) {
  .calbar .calhead { gap: 6px !important; }
  .calbar .calhead h2 { font-size: 15px; }
  .calhead .calplus { height: 36px; padding: 0 12px; border-radius: 18px; font-size: 14px; white-space: nowrap; }
  .calhead .caldnes { height: 36px; padding: 0 10px; font-size: 14px; }
  .calbar .calhead .round { width: 30px; height: 36px; font-size: 18px; }
  .calhead .vyber { height: 38px; min-width: 84px; padding: 0 8px; }
  .calhead .vyber small { font-size: 10px; line-height: 12px; }
  .calhead .vyber b { font-size: 13px; line-height: 16px; }
  .calbar .calwho .avatar.sm { --size: 32px; }
}
@media (min-width: 900px) and (max-width: 959px) {
  .calhead h2 .lenpc { display: none; }
  .calhead h2 .nepc { display: inline; }
}

/* vyššie hodiny v týždni na počítači */
@media (min-width: 900px) and (hover: hover) {
  .tcol { background: repeating-linear-gradient(to bottom, var(--soft) 0, var(--soft) 65px, var(--line) 65px, var(--line) 66px); }
  .tcol.we { background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--soft) 70%, var(--hl)) 0, color-mix(in srgb, var(--soft) 70%, var(--hl)) 65px, var(--line) 65px, var(--line) 66px); }
}
@media (min-width: 900px) and (hover: hover) {
  .wtg:not(.z) .tbody { max-height: max(420px, calc(100dvh - 290px)); }
}

/* týždeň ako agenda */
.agtyz { display: flex; flex-direction: column; gap: 8px; }
.agden { background: var(--soft); border-radius: 12px; padding: 8px; border: 2px solid transparent; min-width: 0; }
.agden.today { border-color: var(--green); background: var(--hl); }
.agh2 { display: block; font-size: 14px; color: var(--ink2); padding: 2px; margin-bottom: 4px; }
.agh2 b { font-weight: 500; color: var(--ink); }
.agsk { background: var(--card); border: 1.5px dotted var(--c, var(--ink2)); border-radius: 9px; padding: 6px 8px; margin-top: 6px; font-size: 13px; }
.agsk-n { font-weight: 500; }
.agsk ol { margin: 4px 0 0; padding-left: 18px; color: var(--ink2); font-size: 12.5px; }
.agsk li.zrus { text-decoration: line-through; opacity: .6; }
.agsk-u { margin-top: 3px; font-size: 12.5px; color: var(--ink2); }
.agsk-u.test { color: var(--red); font-weight: 500; }
.agu { display: flex; flex-direction: column; width: 100%; text-align: left; margin-top: 6px; padding: 5px 8px; border-radius: 7px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.agu b { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.agp { margin-top: 6px; padding: 0 3px; }
@media (min-width: 700px) { .agtyz { display: grid; grid-template-columns: repeat(var(--ndays, 5), minmax(0, 1fr)); align-items: stretch; } .agden { min-height: 300px; } }

/* agenda variant B: hodiny zbalené, rozbalia sa kliknutím */
.agsk-n { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; text-align: left; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
.agsk-n:disabled { cursor: default; }
.agsip { flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--ink2); border-bottom: 1.5px solid var(--ink2); transform: translateY(1px) rotate(-135deg); }
.agsk.zb .agsip { transform: translateY(-2px) rotate(45deg); }
.agsk.zb ol { display: none; }

/* kto dovezie: krúžok, kto odvezie: plná gulička */
.gulka.dov { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.picker.osoba.s3 .os-stav { color: var(--ink); font-weight: 600; }

/* odvezie aj dovezie: plná gulička s krúžkom okolo */
.gulka.obe { box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px var(--c); margin: 3px; }
.picker.osoba.s4 .os-stav { color: var(--ink); font-weight: 600; white-space: normal; line-height: 1.1; }

/* karta Škola: riadok dieťaťa otvára rozvrh v Agende */
button.skriadok { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }

/* červený krížik presne v strede krúžku */
.round:has(> .krizik) { padding: 0; }
.round > .krizik { width: 16px; height: 16px; }

/* podzáložky: jemný obrys všade */
.tabs button { border: 1px solid var(--line); }
.tabs button.on { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }

/* prečítanie krúžkami a skupiny */
.chat-prec.vlavo, .chat-kto.vlavo, .chat-kto-zoz.vlavo { align-self: flex-start; }
.chat-kto { align-self: flex-end; display: flex; gap: 3px; background: none; border: 0; padding: 2px 0; cursor: pointer; }
.chat-krz { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #4a3300; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.chat-krz.nie { background: transparent; color: var(--ink2); border: 1px dashed var(--ink2); }
.chat-kto-zoz { align-self: flex-end; min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--ink2); }
.chat-kto-zoz div { display: flex; justify-content: space-between; gap: 14px; line-height: 1.6; }
.skup-pozv { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.skup-vyber { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* odvoz a dovoz */
.ik-auto { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex: none; }
.odv-r { display: flex; align-items: center; gap: 5px; }
.odv-r .ik-auto { width: 15px; height: 15px; }
.round.odv-btn { width: 36px; height: 36px; flex: none; color: var(--ink2); }
.round.odv-btn .ik-auto { width: 20px; height: 20px; }
.round.odv-btn.ma { color: var(--green, #3c6b4b); }
.round.odv-btn.caka { box-shadow: 0 0 0 2px var(--gold); }
.dnes-r .round.odv-btn { width: 32px; height: 32px; }
.choice.odv-ch { display: inline-flex; align-items: center; gap: 6px; }
.odv-notify { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.odv-notify input { width: 18px; height: 18px; }
.odv-ask { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.odv-stav { margin-top: 8px; }
.odv-stav.ano { color: var(--green, #3c6b4b); }
.odv-stav.nie { color: var(--red); }
h2 .ik-auto { margin-right: 4px; }
.odv-h { display: inline-flex; align-items: center; gap: 8px; }

/* Farby rodiny (len rodič) */
.farby-r { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.farby-m { font-weight: 600; min-width: 70px; }
.farby-sw { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.farba { width: 26px; height: 26px; border-radius: 50%; background: var(--f); border: 0; padding: 0; cursor: pointer; }
.farba.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.farba:disabled { opacity: .22; cursor: not-allowed; }

/* Miesto a poloha (mapa) */
.pol-pole { display: flex; gap: 8px; }
.pol-pole .in { flex: 1; min-width: 0; }
.pol-r a { color: inherit; text-decoration: none; }
.pol-r a:hover { text-decoration: underline; }
.pol-mapka { position: relative; overflow: hidden; background: #e8e4da; border-radius: 12px; }
.pol-mapka img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.pol-spendlik { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--red); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); z-index: 500; pointer-events: none; }
.pol-spendlik.velky { width: 28px; height: 28px; margin: -30px 0 0 -14px; }
.pol-osm { position: absolute; right: 4px; bottom: 2px; font-size: 9px; color: #555; background: rgba(255,255,255,.7); padding: 0 3px; border-radius: 3px; }
.pol-karta { background: var(--card); border-radius: 14px; overflow: hidden; min-width: 220px; }
.chatsp .pol-karta { margin: -2px 0 4px; color: var(--ink); }
.pol-karta.mala { margin-top: 8px; border: 1px solid var(--line); }
.pol-k-t { padding: 8px 10px 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pol-k-t span { color: var(--ink2); font-size: 13px; }
.pol-tl { display: flex; gap: 6px; padding: 8px 10px 10px; flex-wrap: wrap; }
.pol-tl a { flex: 1; text-align: center; padding: 7px 8px; border-radius: 99px; background: var(--hl); color: var(--green-d); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.pol-okno { position: fixed; inset: 0; z-index: 3000; background: rgba(30,30,25,.45); display: flex; align-items: flex-end; justify-content: center; }
.pol-panel { background: var(--bg); width: 100%; max-width: 640px; height: min(92dvh, 760px); border-radius: 20px 20px 0 0; padding: 14px 14px max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 700px) { .pol-okno { align-items: center; } .pol-panel { border-radius: 20px; } }
.pol-hl { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.pol-x { background: none; border: 0; font-size: 20px; padding: 4px 8px; cursor: pointer; color: var(--ink2); }
.pol-alebo { text-align: center; }
.pol-hladaj { display: flex; gap: 8px; }
.pol-hladaj .in { flex: 1; min-width: 0; }
.pol-vysl { display: flex; flex-direction: column; gap: 4px; max-height: 34%; overflow: auto; }
.pol-vysl:empty { display: none; }
.pol-v { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; cursor: pointer; font: inherit; color: inherit; }
.pol-v span { font-size: 13px; color: var(--ink2); }
.pol-mapa-obal { position: relative; flex: 1; min-height: 200px; border-radius: 14px; overflow: hidden; }
.pol-mapa { position: absolute; inset: 0; }
.pol-moja { position: absolute; right: 10px; bottom: 10px; z-index: 600; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: 22px; cursor: pointer; color: var(--green-d); }
.pol-adresa { font-size: 14px; min-height: 2.6em; color: var(--ink); }

/* Zdieľanie z iných aplikácií: kam to dať */
.zdiel-kam { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 4px 0 2px; }
.zdiel-kam .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; }
.zdiel-kam .zk-ik { font-size: 22px; line-height: 1; }

/* Hniezdo Plus */
.plus-pas { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line)); background: var(--hl); }
.plus-pas-t { flex: 1; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; line-height: 1.4; }
.plus-pas-t b { color: var(--green-d); white-space: nowrap; }
.plus-duvod { margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--hl); }
.plus-pozn { margin: 8px 0 0; text-align: center; }
.plus-veci .item { align-items: center; }
.plus-ok { color: var(--green-d); font-weight: 700; }
.nav button.zamk { opacity: .55; position: relative; }
.nav button.zamk::after { content: '🔒'; position: absolute; top: 2px; right: calc(50% - 22px); font-size: 10px; }
