/* Diár: svetlé karty s jedným veľkým oblým rohom, farebné gradientové karty s 3D ikonkami */
@font-face {
  font-family: 'Jakarta';
  src: url(fonts/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jakarta';
  src: url(fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F2F3F8;
  --karta: #FFFFFF;
  --text: #253840;
  --text2: #4A6572;
  --sivy: #8A97A8;
  --ciara: #EDF0F5;
  --modra: #2633C5;
  --modra2: #6A88E5;
  --cervena: #E5484D;
  --tien: 0 2px 16px rgba(58, 81, 96, .09);
  --kb: 0px;
  --ease: cubic-bezier(.2, .9, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: 'Jakarta', -apple-system, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
html.ma-harok, html.ma-harok body { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: #A9B4C4; }
img { display: block; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--modra); outline-offset: 2px; }

.ik { width: 28px; height: 28px; object-fit: contain; flex: none; pointer-events: none; -webkit-user-drag: none; }
.ik.mini { width: 18px; height: 18px; }

/* ---------- hlavička ---------- */
#hlava {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(env(safe-area-inset-top) + 12px) max(20px, calc((100vw - 520px) / 2)) 10px;
  transition: background .25s, box-shadow .25s;
}
#hlava.pod {
  background: rgba(242, 243, 248, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 rgba(37, 56, 64, .06);
}
.hl-riadok { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.hl-pozdrav { margin: 0; font-size: 14px; font-weight: 500; color: var(--sivy); }
h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; white-space: nowrap; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FE95B6, #FF5287);
  box-shadow: 0 4px 12px -2px rgba(255, 82, 135, .5);
}
.datnav { display: flex; align-items: center; margin-right: -8px; }
.ikbtn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text2); flex: none; }
.ikbtn svg { width: 20px; height: 20px; }
.datnav-stred { position: relative; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; padding: 6px 2px; white-space: nowrap; }
.datnav-stred svg { width: 18px; height: 18px; color: var(--modra); }
.datum-skryty { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
.naspat { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--modra); padding: 4px 0; }

/* ---------- obsah ---------- */
#obsah { max-width: 520px; margin: 0 auto; padding: 8px 20px calc(118px + env(safe-area-inset-bottom)); }
#obsah.vstup > * { animation: vstup .42s var(--ease) both; }
#obsah.vstup > *:nth-child(2) { animation-delay: .03s; }
#obsah.vstup > *:nth-child(3) { animation-delay: .06s; }
#obsah.vstup > *:nth-child(4) { animation-delay: .09s; }
#obsah.vstup > *:nth-child(n+5) { animation-delay: .12s; }
@keyframes vstup { from { opacity: 0; transform: translateY(10px); } }

.karta { background: var(--karta); border-radius: 8px; box-shadow: var(--tien); padding: 16px; margin-bottom: 14px; }
.karta-velka { border-radius: 8px 68px 8px 8px; padding: 20px; }
.sekcia-hlava { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 24px 2px 10px; }
.sekcia-hlava h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.odkaz { font-size: 14px; font-weight: 600; color: var(--modra); padding: 4px 0; white-space: nowrap; }
.odkaz-maly { font-size: 12px; padding: 0; margin-top: 3px; display: block; text-align: left; }
.sivy { color: var(--sivy); font-size: 13px; margin: 2px 0 0; line-height: 1.45; }
.drobne { font-size: 12px; color: var(--sivy); margin: 6px 2px; line-height: 1.5; }
.stred { text-align: center; }
.mala-hlava { font-size: 12px; font-weight: 700; color: var(--sivy); margin: 16px 2px 4px; }

/* ---------- môj deň ---------- */
.md-hore { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.md-staty { display: flex; flex-direction: column; gap: 18px; flex: 1; min-width: 0; }
.md-stat { position: relative; padding-left: 12px; }
.md-stat::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 3px; background: linear-gradient(var(--f1), var(--f2)); }
.md-stat > span { font-size: 13px; font-weight: 500; color: var(--sivy); }
.md-stat p { margin: 3px 0 1px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.md-stat b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.md-stat small { font-size: 12px; color: var(--sivy); font-weight: 500; }
.md-dole { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ciara); }
.md-dole span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-dole small { display: block; margin-top: 7px; font-size: 12px; color: var(--sivy); white-space: nowrap; }
.pruh { display: block; height: 4px; width: min(100%, 76px); border-radius: 4px; background: #EBEEF5; overflow: hidden; }
.pruh i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); border-radius: 4px; transition: width 1s var(--ease); }

.kruh { position: relative; flex: none; }
.kruh svg { display: block; width: 100%; height: 100%; }
.kruh-pod { stroke: #EEF0F7; }
.kruh-ciara { stroke-linecap: round; stroke-dashoffset: calc(var(--c) * (1 - var(--v, 0)) * 1px); transition: stroke-dashoffset 1.1s var(--ease); }
.kruh-ciara.nula { opacity: 0; }
.kruh-stred { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.kr-cislo { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--modra); }
.kr-cislo small { font-size: 15px; font-weight: 700; margin-left: 1px; }
.kr-mensie { font-size: 24px; }
.kruh-stred span { margin-top: 5px; max-width: 78px; font-size: 11px; font-weight: 500; line-height: 1.25; color: var(--sivy); }

/* ---------- gradientové karty ---------- */
.gkarta {
  position: relative; overflow: hidden; color: #fff;
  border-radius: 8px 54px 8px 8px; padding: 20px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--g2) 80%, transparent);
}
.gk-kruh { position: absolute; left: -22px; top: -26px; width: 104px; height: 104px; border-radius: 50%; background: rgba(255, 255, 255, .16); pointer-events: none; }
.citat-ik { position: absolute; right: 22px; top: 18px; width: 46px; height: 46px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.citat-nad { position: relative; margin: 0 0 8px; font-size: 13px; font-weight: 600; opacity: .85; }
.citat blockquote { position: relative; margin: 0; padding-right: 48px; font-size: 19px; font-weight: 700; line-height: 1.38; letter-spacing: -.01em; text-wrap: pretty; }
.citat-tl { position: relative; display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.tl-biely { font-size: 14px; font-weight: 700; color: #fff; opacity: .9; padding: 8px 0; }
.srdce { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .18); transition: background .2s; }
.srdce svg { width: 20px; height: 20px; fill: none; }
.srdce.on svg { fill: #fff; }

.vodorovne { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; scroll-padding: 0 20px; -webkit-overflow-scrolling: touch; }
.vodorovne::-webkit-scrollbar { display: none; }
.gk-riadok { padding-top: 32px; padding-bottom: 20px; margin-top: -22px; margin-bottom: -6px; }
.gk {
  position: relative; flex: none; width: 138px; height: 204px;
  scroll-snap-align: start; text-align: left; color: #fff;
  display: flex; flex-direction: column;
  padding: 60px 14px 14px;
  border-radius: 8px 54px 8px 8px;
  background:
    radial-gradient(circle at 22px 20px, rgba(255, 255, 255, .2) 0 46px, transparent 47px),
    linear-gradient(160deg, var(--g1), var(--g2));
  box-shadow: 0 12px 20px -10px color-mix(in srgb, var(--g2) 85%, transparent);
  transition: transform .2s var(--ease);
}
.gk:active { transform: scale(.97); }
.gk .gk-kruh { display: none; }
.gk-ik { position: absolute; left: 6px; top: -26px; width: 74px; height: 74px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18)); }
.gk-nazov { font-size: 16px; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gk-text { flex: 1; margin-top: 5px; font-size: 12px; font-weight: 500; line-height: 1.35; opacity: .92; overflow: hidden; }
.gk-hod { display: flex; align-items: baseline; gap: 4px; }
.gk-hod b { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.gk-hod small { font-size: 13px; font-weight: 700; opacity: .9; }
.gk-plus { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--g2); font-size: 24px; font-weight: 600; line-height: 1; box-shadow: 0 6px 14px rgba(0, 0, 0, .14); }
.gk-pruh { display: block; height: 4px; margin: 8px 0 12px; border-radius: 4px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.gk-pruh i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); border-radius: 4px; background: #fff; transition: width 1s var(--ease); }
.gk-novy { background: transparent; border: 2px dashed #CBD2E1; color: var(--text2); box-shadow: none; padding: 16px 14px; justify-content: flex-end; }
.gk-novy .gk-plus { margin-bottom: auto; color: #fff; background: linear-gradient(135deg, var(--modra2), var(--modra)); }
.gk-novy .gk-text { flex: none; }

/* ---------- voda ---------- */
.voda { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; }
.voda-n { margin: 0; display: flex; align-items: baseline; color: var(--modra); }
.voda-n b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.voda-n small { font-size: 15px; font-weight: 700; }
.voda-pohare { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 12px; max-width: 160px; }
.voda-pohare i { width: 12px; height: 15px; border-radius: 2px 2px 5px 5px; background: #E6EBF5; transition: background .3s; }
.voda-pohare i.on { background: linear-gradient(#7FDDF9, #3A7BEF); }
.voda-posl { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: var(--text2); }
.voda-ovl { display: flex; flex-direction: column; gap: 12px; }
.okr { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; color: var(--modra); font-size: 22px; font-weight: 500; line-height: 1; box-shadow: 0 3px 10px rgba(58, 81, 96, .16); transition: transform .15s; }
.okr:active { transform: scale(.92); }
.okr-plus { color: #fff; background: linear-gradient(135deg, var(--modra2), var(--modra)); box-shadow: 0 8px 16px -4px rgba(38, 51, 197, .5); }
.okr-mini { width: 32px; height: 32px; font-size: 20px; }
.okr-svetly { background: var(--bg); color: var(--text); box-shadow: none; }
.pohar { position: relative; width: 72px; height: 96px; flex: none; }
.pohar-vnutro { position: absolute; inset: 0; overflow: hidden; background: #EDF2FB; clip-path: path('M7.7 6H64.3L57.3 86.1A6 6 0 0 1 51.3 91.7H20.7A6 6 0 0 1 14.7 86.1Z'); }
.voda-hl { position: absolute; left: 0; right: 0; bottom: 4px; height: calc(var(--v, 0) * 84px + 2px); background: linear-gradient(#7FDDF9, #3A7BEF 120%); transition: height 1.2s cubic-bezier(.3, 1.25, .5, 1); }
.pohar.prazdny .voda-hl { opacity: 0; }
.pohar.nizko .bublina { display: none; }
.vlny { position: absolute; left: 0; top: -9px; width: 168px; height: 12px; animation: vlna 3.6s linear infinite; }
.vlny svg { display: block; width: 100%; height: 100%; }
.vlny-2 { top: -7px; animation-duration: 2.6s; animation-direction: reverse; }
@keyframes vlna { to { transform: translateX(-42px); } }
.pohar-obrys { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bublina { position: absolute; bottom: 6px; left: 30%; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .8); animation: bublina 3.2s ease-in infinite; }
.b2 { left: 58%; width: 3px; height: 3px; animation-delay: 1.1s; }
.b3 { left: 46%; width: 5px; height: 5px; animation-delay: 2.1s; }
@keyframes bublina { 0% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }

/* ---------- riadky, návyky, úlohy ---------- */
.zoznam-karta { padding: 4px 16px; }
.riadok { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 0; text-align: left; border-bottom: 1px solid var(--ciara); }
.zoznam-karta > :last-child, .karta-plocha > :last-child { border-bottom: 0; }
.riadok-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.riadok-t b { display: block; font-weight: 700; }
.riadok-t small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--sivy); }
.check { width: 27px; height: 27px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid #D5DBE7; color: transparent; transition: background .25s, border-color .25s, box-shadow .25s; }
.check svg { width: 16px; height: 16px; }
.check.prazdny { border-style: dashed; }
.navyk .check { border-color: color-mix(in srgb, var(--g2) 40%, #D5DBE7); }
.ok .check { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--g1, #8FA6F5), var(--g2, #2633C5)); box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--g2, #2633C5) 70%, transparent); }
.ok .check svg { animation: fajka .35s var(--ease); }
@keyframes fajka { from { transform: scale(.4); opacity: 0; } }
.uloha.ok .riadok-t, .karta-plocha .uloha.ok .riadok-t { color: var(--sivy); text-decoration: line-through; text-decoration-color: rgba(138, 151, 168, .6); }
.check-btn { padding: 6px; margin: -6px; display: grid; }
.seria { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 800; color: #F08A1C; white-space: nowrap; }
.x { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #B6C0CF; margin-right: -6px; }
.x svg { width: 18px; height: 18px; }
.pridaj-riadok { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.pridaj-riadok input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; font-weight: 500; padding: 12px 0; }
.prazdne { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0; text-align: left; }
.prazdne .ik { width: 46px; height: 46px; }
.prazdne b { display: block; font-size: 15px; }
.prazdne small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--sivy); }
.prazdne-velke { background: var(--bg); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.prazdne-text { margin: 0; padding: 16px 0; font-size: 14px; color: var(--sivy); }

.udalost { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 0; text-align: left; border-bottom: 1px solid var(--ciara); }
.ud-cas { width: 44px; flex: none; font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--text2); }
.ud-cas b { display: block; font-size: 18px; font-weight: 800; color: var(--text); }
.ud-pruh { width: 4px; align-self: stretch; min-height: 36px; border-radius: 4px; background: linear-gradient(var(--g1), var(--g2)); }
.ud-t { flex: 1; min-width: 0; }
.ud-t b { display: block; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.ud-t small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--sivy); }
.ud-zn { display: flex; align-items: center; gap: 6px; color: var(--sivy); }
.ud-zn svg { width: 16px; height: 16px; }

/* ---------- denník, zoznamy ---------- */
.dn-label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.dennik textarea { display: block; width: 100%; min-height: 86px; margin-bottom: 20px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--bg); outline: none; resize: none; font-size: 16px; line-height: 1.5; }
.vd { display: flex; align-items: center; gap: 10px; border-bottom: 1px dashed #DCE2EC; }
.vd:last-of-type { margin-bottom: 20px; }
.vd span { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #FE95B6, #FF5287); }
.vd input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; font-weight: 500; padding: 11px 0; }
.nalepky { gap: 8px; padding-top: 2px; padding-bottom: 4px; }
.nalepka { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); scroll-snap-align: start; transition: box-shadow .2s, background .2s; }
.nalepka .ik { width: 34px; height: 34px; }
.nalepka.on { background: #fff; box-shadow: 0 0 0 2px var(--modra), 0 6px 14px rgba(38, 51, 197, .2); }

.zoz-riadok { padding-top: 2px; padding-bottom: 10px; }
.zoz { flex: none; width: 142px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 3px; padding: 14px; text-align: left; background: #fff; border-radius: 8px 32px 8px 8px; box-shadow: var(--tien); }
.zoz .ik { width: 42px; height: 42px; margin-bottom: 8px; }
.zoz b { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zoz small { font-size: 12px; font-weight: 500; color: var(--sivy); }

.baner { display: flex; align-items: flex-start; gap: 12px; border-radius: 8px 32px 8px 8px; }
.baner-ik { width: 40px; height: 40px; }
.baner > div { flex: 1; }
.baner b { font-size: 15px; }
.baner p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--text2); }

/* ---------- spodná lišta ---------- */
#lista {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(66px + env(safe-area-inset-bottom));
  padding: 0 max(8px, calc((100vw - 520px) / 2)) env(safe-area-inset-bottom);
  display: grid; grid-template-columns: 1fr 1fr 86px 1fr 1fr; align-items: center;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 -6px 24px rgba(58, 81, 96, .08);
  -webkit-mask: radial-gradient(circle at 50% 0, transparent 37px, #000 38px);
  mask: radial-gradient(circle at 50% 0, transparent 37px, #000 38px);
}
#lista button { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: #A3AEBF; transition: color .2s; }
#lista svg { width: 25px; height: 25px; }
#lista .on { color: var(--modra); }
#plus {
  position: fixed; z-index: 31; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 33px);
  width: 60px; height: 60px; margin-left: -30px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--modra2), var(--modra));
  box-shadow: 0 12px 24px -6px rgba(38, 51, 197, .6);
  transition: transform .2s var(--ease);
}
#plus:active { transform: scale(.92); }
#plus svg { width: 26px; height: 26px; }

/* ---------- hárky ---------- */
.h-obal { position: fixed; inset: 0; z-index: 50; }
.h-pozadie { position: absolute; inset: 0; background: rgba(28, 38, 58, .34); opacity: 0; transition: opacity .32s; }
.harok {
  position: absolute; left: 0; right: 0; bottom: var(--kb); margin: 0 auto; max-width: 560px;
  max-height: calc(90dvh - var(--kb)); display: flex; flex-direction: column;
  padding: 8px 20px calc(18px + env(safe-area-inset-bottom));
  background: #fff; border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 40px rgba(28, 38, 58, .18);
  transform: translateY(105%); transition: transform .4s var(--ease);
}
.harok.velky { height: calc(90dvh - var(--kb)); }
.otvoreny .h-pozadie { opacity: 1; }
.otvoreny .harok { transform: none; }
.h-uchyt { flex: none; width: 40px; height: 5px; margin: 2px auto 12px; border-radius: 5px; background: #DAE0EA; }
.h-obsah { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px 6px; }
.h-hlava { padding: 2px 0 14px; }
.h-hlava h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.015em; }
.h-hlava-riadok { display: flex; align-items: center; gap: 10px; }
.h-hlava-riadok h3 { flex: 1; min-width: 0; }
.h-ik { width: 40px; height: 40px; }
.h-nadpis { flex: 1; min-width: 0; padding: 4px 0; border: 0; outline: none; background: none; font-size: 21px; font-weight: 800; letter-spacing: -.015em; }
.mesnav { display: flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; white-space: nowrap; }

.potvrd h3 { margin: 4px 0 6px; font-size: 20px; font-weight: 800; }
.potvrd p { margin: 0 0 18px; }

/* ---------- formuláre ---------- */
.formular { display: flex; flex-direction: column; gap: 12px; }
.pole { display: flex; flex-direction: column; gap: 5px; padding: 10px 14px; border-radius: 14px; background: var(--bg); }
.pole > span { font-size: 12px; font-weight: 600; color: var(--sivy); }
.pole input { width: 100%; min-height: 24px; padding: 0; border: 0; outline: none; background: none; font-size: 16px; font-weight: 600; -webkit-appearance: none; appearance: none; }
.pole input[type="date"], .pole input[type="time"] { display: block; text-align: left; }
.pole input::-webkit-date-and-time-value { text-align: left; }
.polia-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pole-n { margin: 6px 2px -2px; font-size: 13px; font-weight: 700; }
.cipy { display: flex; flex-wrap: wrap; gap: 8px; }
.cipy-stred { justify-content: center; }
.cip { padding: 9px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; font-weight: 600; color: var(--text2); transition: background .2s, color .2s, transform .15s, box-shadow .2s; }
.cip:active { transform: scale(.96); }
.cip.on { color: #fff; background: linear-gradient(135deg, var(--modra2), var(--modra)); box-shadow: 0 6px 12px -4px rgba(38, 51, 197, .5); }
.cip-maly { padding: 6px 11px; font-size: 13px; }
.cipy-napady { margin-top: -2px; }
.farby { display: flex; flex-wrap: wrap; gap: 12px; padding: 2px; }
.farba { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--g1), var(--g2)); transition: box-shadow .2s; }
.farba.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--g2); }
.tl { width: 100%; min-height: 52px; padding: 0 18px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 800; transition: transform .15s, filter .2s; }
.tl:active { transform: scale(.98); }
.tl:disabled { opacity: .55; }
.tl-hlavne { color: #fff; background: linear-gradient(135deg, var(--modra2), var(--modra)); box-shadow: 0 12px 20px -10px rgba(38, 51, 197, .75); }
.tl-svetle { position: relative; background: var(--bg); color: var(--text); }
.tl-text { min-height: 44px; color: var(--modra); font-weight: 700; }
.tl-text-cervene { min-height: 44px; color: var(--cervena); font-weight: 700; }
.tl-cervene { color: #fff; background: var(--cervena); }
.tl-biele { color: #E83A76; background: #fff; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .35); }
.tl-biele-obrys { position: relative; color: #fff; border: 2px solid rgba(255, 255, 255, .75); }
.tl-male { min-height: 42px; margin-top: 10px; font-size: 14px; border-radius: 12px; }
.tlacidla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skryty { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.plus-mriezka { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plus-pol { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 14px; border-radius: 18px; background: var(--bg); font-size: 13px; font-weight: 700; transition: transform .15s; }
.plus-pol:active { transform: scale(.96); }
.plus-pol .ik { width: 46px; height: 46px; }
.plus-pol span { text-align: center; }

.nalady { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 14px; }
.nal { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 8px; border-radius: 16px; font-size: 12px; font-weight: 700; color: var(--sivy); transition: background .2s, color .2s; }
.nal .ik { width: 48px; height: 48px; opacity: .75; filter: grayscale(.4); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), opacity .2s, filter .2s; }
.nal.on { background: var(--bg); color: var(--text); }
.nal.on .ik { opacity: 1; filter: none; transform: scale(1.15); }

.karta-plocha { margin-bottom: 10px; padding: 4px 14px; border-radius: 18px; background: var(--bg); }
.karta-plocha .pole { margin: 10px 0; background: #fff; }
.karta-plocha .riadok { border-color: #E3E7EF; }
.karta-plocha > .tl, .karta-plocha > .tlacidla-2 { margin: 10px 0; }
.karta-plocha .tl-svetle { background: #fff; }
.karta-plocha > .sivy { margin: 12px 0 0; }
.riadok-stlpec { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0; }
.karta-plocha .cip:not(.on) { background: #fff; }
.info { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; padding: 12px; border-radius: 12px; background: #FFF4E0; font-size: 13px; line-height: 1.45; }
.info p { margin: 0; }
.info-ok { background: #E3F7EF; }
.cas-mini { border: 0; outline: none; padding: 6px 8px; border-radius: 10px; background: #fff; font-size: 15px; font-weight: 700; -webkit-appearance: none; appearance: none; }
.obl p { display: flex; gap: 8px; margin: 12px 0; font-size: 14px; line-height: 1.45; }
.prepinac { position: relative; width: 50px; height: 30px; flex: none; border-radius: 15px; background: #D8DEE8; transition: background .25s; }
.prepinac i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .28s cubic-bezier(.3, 1.3, .5, 1); }
.prepinac.on { background: linear-gradient(135deg, #6EE2C0, #1FAE8E); }
.prepinac.on i { transform: translateX(20px); }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper b { min-width: 62px; text-align: center; font-size: 15px; font-weight: 800; white-space: nowrap; }
.stepper small { font-size: 12px; font-weight: 600; color: var(--sivy); }

/* ---------- kalendár ---------- */
.segment { display: grid; grid-template-columns: 1fr 1fr; width: min(230px, 66%); padding: 3px; margin-bottom: 16px; border-radius: 12px; background: var(--bg); }
.segment button { padding: 8px 0; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--sivy); transition: background .2s, color .2s; }
.segment .on { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(58, 81, 96, .12); }
.kal { padding: 18px 12px 16px; }
.kal-dni { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--sivy); }
.kal-mriezka { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.kb { position: relative; height: 54px; display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.kb-c { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600; transition: background .2s; }
.kb.mimo { opacity: .32; }
.kb.kr-ano .kb-c { background: #FFE1EB; color: #D92C68; font-weight: 800; }
.kb.kr-odhad .kb-c { outline: 1.5px dashed #FF8FB3; outline-offset: -3px; color: #D92C68; }
.kb.vybrany .kb-c { box-shadow: inset 0 0 0 2px var(--modra); color: var(--modra); font-weight: 800; }
.kb.dnes .kb-c { color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--modra2), var(--modra)); box-shadow: 0 4px 10px -2px rgba(38, 51, 197, .5); }
.kb-bodky { display: flex; gap: 2px; height: 5px; margin-top: 4px; }
.kb-bodky i { width: 5px; height: 5px; border-radius: 50%; }
.kb-nalepka { position: absolute; z-index: 2; right: 1px; top: -1px; width: 19px; height: 19px; }
.kb-ik { width: 20px; height: 20px; margin-top: -6px; position: relative; z-index: 2; }
.kb-ik + .kb-bodky { display: none; }
.legenda { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 12px; font-weight: 500; color: var(--sivy); }
.legenda span { display: flex; align-items: center; gap: 6px; }
.legenda i { width: 12px; height: 12px; border-radius: 50%; }
.lg-kr { background: #FFE1EB; box-shadow: inset 0 0 0 1px #FF8FB3; }
.lg-odhad { outline: 1.5px dashed #FF8FB3; outline-offset: -2px; }
.lg-dnes { background: linear-gradient(135deg, var(--modra2), var(--modra)); }
.zhrnutie { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px 0 2px; font-size: 13px; font-weight: 600; color: var(--text2); }
.zhrnutie span { display: flex; align-items: center; gap: 5px; }
.zoznam-karta > .tl-male { margin-bottom: 14px; }

/* ---------- návyky ---------- */
.hab { margin-bottom: 12px; padding: 14px; border-radius: 8px 32px 8px 8px; }
.hab-hlava { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.hab-nazov { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; text-align: left; }
.hab-nazov b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hab-bodka { width: 12px; height: 12px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--g1), var(--g2)); }
.hab-staty { display: flex; align-items: center; gap: 10px; }
.hab-pct { font-size: 14px; font-weight: 800; color: var(--g2); }
.hab-dni, .hab-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hab-dni { margin-bottom: 6px; text-align: center; font-size: 10px; font-weight: 700; color: #B3BDCB; }
.hb { aspect-ratio: 1; max-height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #9AA6B6; background: #F1F3F8; transition: background .2s; }
.hb.ok { color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); }
.hb.volno { background: none; color: #D2D8E1; }
.hb.buduci { background: none; color: #C9D0DB; box-shadow: inset 0 0 0 1.5px #EEF1F6; }
.hb.dnes { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--g2); }

/* ---------- peniaze ---------- */
.suma-pole { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 6px 0 2px; }
.suma-pole input { width: 6ch; border: 0; outline: none; background: none; text-align: right; font-size: 50px; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.suma-pole span { font-size: 28px; font-weight: 800; color: var(--sivy); }
.kat-mriezka { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ik-vyber { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--bg); font-size: 12px; font-weight: 700; color: var(--text2); transition: background .2s, box-shadow .2s; }
.kat .ik { width: 38px; height: 38px; }
.kat.on { background: #fff; color: var(--text); box-shadow: 0 0 0 2px var(--modra), 0 6px 14px rgba(38, 51, 197, .18); }
.vyd-ik { width: 40px; height: 40px; padding: 5px; border-radius: 12px; background: var(--bg); }
.suma { font-size: 15px; font-weight: 800; white-space: nowrap; }
.suma.plus { color: #1A9E80; }
.ciel-stred { display: flex; flex-direction: column; align-items: center; padding: 4px 0 16px; text-align: center; }
.ciel-veta { margin: 14px 0 2px; font-size: 16px; }
.ciel-veta .ik { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.vklad-riadok { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: stretch; margin: 4px 0 16px; }
.vklad-riadok .tl { width: auto; min-height: 0; padding: 0 14px; font-size: 14px; }

/* ---------- cyklus ---------- */
.cyk-hero { border-radius: 8px 68px 8px 8px; padding: 22px 20px 20px; }
.cyk-riadok { position: relative; display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.cyk-hero .kr-cislo { color: #fff; font-size: 36px; }
.cyk-hero .kruh-stred span { color: rgba(255, 255, 255, .88); }
.cyk-text { min-width: 0; }
.cyk-velke { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.cyk-pod { margin: 4px 0 0; font-size: 14px; font-weight: 700; opacity: .95; }
.cyk-veta { margin: 10px 0 0; font-size: 13px; line-height: 1.4; opacity: .88; }
.cyk-hero .citat-ik { right: 20px; }
.cyk-otazka { position: relative; margin: 0 0 16px; padding-right: 56px; font-size: 22px; font-weight: 800; line-height: 1.25; }
.cyk-zaciatok { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cyk-pozn { position: relative; margin: 14px 0 0; font-size: 13px; line-height: 1.45; opacity: .9; }
.tri-staty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-radius: 8px 32px 8px 8px; }
.tri-staty span { display: block; font-size: 12px; font-weight: 600; color: var(--sivy); }
.tri-staty b { display: block; margin: 5px 0 2px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.tri-staty small { font-size: 11px; font-weight: 500; color: var(--sivy); }

/* ---------- úvod ---------- */
#uvod { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 70px 20px 24px; background: var(--bg); overflow-y: auto; }
#uvod[hidden] { display: none; }
#uvod.odchod { animation: zmiz .4s var(--ease) forwards; }
@keyframes zmiz { to { opacity: 0; transform: scale(1.03); } }
.uv-karta { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 0 22px 22px; text-align: center; background: #fff; border-radius: 8px 68px 8px 8px; box-shadow: var(--tien); animation: vstup .5s var(--ease); }
.uv-ik { width: 96px; height: 96px; margin: -48px auto 0; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .15)); }
.uv-karta h2 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.uv-karta p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text2); }
.uv-karta .pole { text-align: left; }
.uv-bodky { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.uv-bodky i { width: 6px; height: 6px; border-radius: 3px; background: #DAE0EA; transition: width .3s, background .3s; }
.uv-bodky i.on { width: 20px; background: var(--modra); }

/* ---------- oznam, konfety, kostra ---------- */
#toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 104px);
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 40px);
  padding: 10px 16px 10px 12px; border-radius: 16px;
  color: #fff; background: #253840; font-size: 14px; font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity .3s, transform .35s var(--ease);
}
#toast.vidno { opacity: 1; transform: translate(-50%, 0); }
#toast .ik { width: 24px; height: 24px; }
html.ma-harok #toast { bottom: calc(env(safe-area-inset-bottom) + 24px); }
.konfeta { position: fixed; z-index: 95; width: 7px; height: 10px; border-radius: 2px; pointer-events: none; }

.kostra { border-radius: 8px 68px 8px 8px; background: #fff; box-shadow: var(--tien); margin-bottom: 14px; height: 210px; position: relative; overflow: hidden; }
.kostra.mala { height: 150px; border-radius: 8px 54px 8px 8px; background: #E6E9F3; }
.kostra::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); animation: lesk 1.4s infinite; transform: translateX(-100%); }
@keyframes lesk { to { transform: translateX(100%); } }

@media (hover: hover) {
  .odkaz:hover, .tl-text:hover, .tl-biely:hover { opacity: .75; }
  .tl-hlavne:hover, .okr-plus:hover, #plus:hover { filter: brightness(1.07); }
  .cip:not(.on):hover, .plus-pol:hover, .kat:not(.on):hover { background: #E8EBF3; }
  .ikbtn:hover, .x:hover { background: rgba(37, 56, 64, .06); }
  #lista button:hover { color: var(--text2); }
  #lista .on:hover { color: var(--modra); }
  .gk:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) {
  h1 { font-size: 22px; }
  .datnav-stred { font-size: 14px; }
  .md-dole small { white-space: normal; }
}

/* nápoveda v prázdnom dátume (iPhone ukazuje prázdne pole) */
.pole[data-nap] { position: relative; }
.pole.prazdny[data-nap]::after { content: attr(data-nap); position: absolute; left: 14px; bottom: 10px; font-size: 16px; font-weight: 600; color: #A9B4C4; pointer-events: none; }

/* prvé vykreslenie po kostre: jemné prelnutie */
#obsah.prvy > * { animation: zjav .28s ease-out both; }
@keyframes zjav { from { opacity: .35; } }

/* uvítacia stránka: kvietok, farebné škvrny v pozadí */
.uv-kv { margin: -58px auto 0; filter: drop-shadow(0 14px 18px rgba(38, 51, 197, .18)); }
.uv-kv.kv { --s: 112px; }
.uv-kv-obal { animation: kv-dych 4.5s ease-in-out 1.2s infinite; }
@keyframes kv-dych { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(4deg); } }
.uv-meno { margin: -2px 0 0; font-size: 15px; font-weight: 700; color: var(--modra); letter-spacing: .01em; }
.bloby { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bloby i { position: absolute; width: 260px; height: 260px; border-radius: 50%; filter: blur(60px); opacity: .45; animation: blob 14s ease-in-out infinite alternate; }
.bloby i:nth-child(1) { background: #8FA6F5; left: -80px; top: 6%; }
.bloby i:nth-child(2) { background: #FFB295; right: -90px; top: 18%; animation-delay: -4s; }
.bloby i:nth-child(3) { background: #6EE2C0; left: -60px; bottom: 6%; animation-delay: -8s; }
.bloby i:nth-child(4) { background: #FE95B6; right: -70px; bottom: 14%; animation-delay: -11s; }
@keyframes blob { to { transform: translate(40px, -30px) scale(1.15); } }
#uvod { isolation: isolate; }
@media (prefers-reduced-motion: reduce) { .uv-kv-obal, .bloby i { animation: none; } }
/* kvietok na uvítacej stránke sa rozvinie až po úvodnej animácii */
#uvod .uv-kv.kv-anim { animation-delay: 1.1s; }
#uvod .uv-kv .kv-1 { animation-delay: 1.14s; }
#uvod .uv-kv .kv-2 { animation-delay: 1.23s; }
#uvod .uv-kv .kv-4 { animation-delay: 1.32s; }
#uvod .uv-kv .kv-3 { animation-delay: 1.41s; }
