@font-face { font-family:Nunito; font-style:normal; font-weight:400 500; font-display:swap; src:url("assets/nunito-regular.ttf") format("truetype"); }
@font-face { font-family:Nunito; font-style:normal; font-weight:600 900; font-display:swap; src:url("assets/nunito-bold.ttf") format("truetype"); }
:root {
  --bg:#fbf7f0; --card:#fffdfa; --text:#50463e; --muted:#817369; --line:#eee5da;
  --teal:#68876c; --teal-soft:#edf2e7; --btn:#68876c; --danger:#b54d46; --warn:#9c7133;
  --peach:#f7e8db; --lavender:#eee9f4; --hero:#f3e9dc; --hero-end:#f8eee4;
  --chart-secondary:#b4a1bf; --shadow:0 5px 24px #68503c05; color-scheme:light;
}
@media(prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --bg:#28242b; --card:#342f36; --text:#f5e9df; --muted:#c0b1aa; --line:#4b424b;
    --teal:#a7c29b; --teal-soft:#39443a; --btn:#a7c29b; --danger:#f6a49b; --warn:#e3bb78;
    --peach:#51403c; --lavender:#443c51; --hero:#453935; --hero-end:#3d343b;
    --chart-secondary:#b4a1bf; --shadow:none; color-scheme:dark;
  }
}
:root[data-theme="dark"] {
  --bg:#28242b; --card:#342f36; --text:#f5e9df; --muted:#c0b1aa; --line:#4b424b;
  --teal:#a7c29b; --teal-soft:#39443a; --btn:#a7c29b; --danger:#f6a49b; --warn:#e3bb78;
  --peach:#51403c; --lavender:#443c51; --hero:#453935; --hero-end:#3d343b;
  --chart-secondary:#b4a1bf; --shadow:none; color-scheme:dark;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
[hidden] { display:none !important; }
html { background:var(--bg); }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 "Nunito", "Segoe UI", system-ui, sans-serif; padding-bottom:calc(108px + env(safe-area-inset-bottom)); }
button,input,select { font:inherit; color:inherit; }
button,a,input,select { touch-action:manipulation; }
button { cursor:pointer; }
button,a { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.file-btn:focus-within { outline:3px solid var(--teal); outline-offset:4px; }
button { transition:transform .15s, background .15s, box-shadow .15s; }
button:active { transform:scale(.97); }
main,.top { max-width:1000px; margin:0 auto; padding:0 28px; }
.top { display:flex; justify-content:space-between; align-items:center; padding-top:calc(26px + env(safe-area-inset-top)); padding-bottom:24px; }
.brand { display:flex; align-items:center; gap:11px; text-decoration:none; color:var(--text); font-size:27px; font-weight:800; line-height:1; letter-spacing:-1px; }
.brand>.ui-icon { width:43px; height:48px; padding:9px; border-radius:15px; background:var(--peach); color:#a07558; transform:rotate(-9deg); }
.brand-light { color:var(--teal); font-weight:500; }
.brand small { display:block; margin-top:7px; font-size:11px; font-weight:500; letter-spacing:.3px; color:var(--muted); }
.svg-library { position:absolute; width:0; height:0; overflow:hidden; }
.ui-icon { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.sync-dot { display:flex; align-items:center; gap:9px; padding:11px 15px; min-height:44px; border:1px solid var(--line); border-radius:24px; background:var(--card); font-size:12px; }
.sync-dot .ui-icon { width:18px; height:18px; }
.sync-dot::after { content:""; width:7px; height:7px; border-radius:50%; background:var(--muted); opacity:.5; }
.sync-dot.ok::after { background:var(--teal); opacity:1; }
.sync-dot.busy::after { background:var(--warn); opacity:1; animation:pulse 1s infinite; }
.sync-dot.err::after { background:var(--danger); opacity:1; }
@keyframes pulse { 50% { opacity:.3; } }
.welcome { position:relative; display:flex; align-items:center; min-height:228px; border:1px solid var(--line); border-radius:30px; background:linear-gradient(110deg,var(--hero),var(--hero-end)); margin-bottom:26px; overflow:hidden; }
.welcome-copy { padding:32px 34px; flex:1; position:relative; z-index:1; min-width:0; }
.eyebrow { color:var(--muted); font-size:10px; font-weight:700; letter-spacing:1.8px; }
.welcome h1 { font-family:Georgia,"Times New Roman",serif; font-weight:400; font-size:56px; line-height:1.1; letter-spacing:-1.8px; margin:11px 0 12px; overflow-wrap:anywhere; }
.welcome p { margin:14px 0 0; font-size:13px; color:var(--muted); }
.sub { font-size:12px; line-height:1.8; color:var(--muted); max-width:460px; }
.mascot { width:255px; height:auto; align-self:flex-end; margin-right:25px; flex-shrink:0; }
.home-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; }
.card { margin:0; padding:24px; border:1px solid var(--line); border-radius:24px; background:var(--card); box-shadow:var(--shadow); min-width:0; }
.section-title { display:flex; align-items:center; gap:10px; min-width:0; }
.section-title h2 { font-size:15px; font-weight:650; margin:0; line-height:1.35; }
.icon-tile { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:11px; flex-shrink:0; }
.icon-tile .ui-icon { width:19px; height:19px; }
.peach { background:var(--peach); color:var(--text); }
.sage { background:var(--teal-soft); color:var(--teal); }
.lavender { background:var(--lavender); color:var(--text); }
.tiny-heart { margin-left:auto; font-size:28px; color:#be9982; line-height:1; }
.section-note { font-size:12px; margin:9px 0 20px; color:var(--muted); }
.label { font-size:16px; font-weight:650; margin-bottom:16px; }
.muted { color:var(--muted); font-size:12px; line-height:1.6; }
.last-card { grid-column:1; grid-row:1; background:var(--card); }
.big { font-size:42px; font-weight:650; letter-spacing:-1.7px; line-height:1.2; color:var(--text); margin:18px 0 8px; font-variant-numeric:tabular-nums; }
.ring-card { grid-column:2; grid-row:1 / span 2; display:grid; grid-template-columns:1fr; gap:16px; justify-items:center; align-self:stretch; }
.ring-heading { width:100%; }
.pill { margin-left:auto; padding:5px 9px; background:var(--teal-soft); color:var(--teal); border-radius:20px; font-size:10px; white-space:nowrap; }
.ring-wrap { position:relative; width:180px; height:180px; }
.ring { width:100%; height:100%; transform:rotate(-90deg); }
.ring circle { fill:none; stroke-width:8; }
.ring-bg { stroke:var(--teal-soft); }
.ring-fg { stroke:var(--teal); stroke-linecap:round; stroke-dasharray:326.7; stroke-dashoffset:326.7; transition:stroke-dashoffset .6s ease; }
.ring-fg.over { stroke:var(--warn); }
.ring-text { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.ring-text::before { content:"♡"; color:var(--teal); font-size:28px; line-height:1.2; margin-bottom:2px; }
.ring-ml { font-size:29px; font-weight:700; letter-spacing:-1px; }
.ring-text .muted { font-size:11px; }
.stats-grid { display:grid; grid-template-columns:1fr 1fr; width:100%; gap:0; border:1px solid var(--line); border-radius:16px; margin-bottom:22px; }
.stat { display:flex; flex-direction:column; align-items:center; gap:3px; padding:12px 4px; text-align:center; }
.stat:nth-child(odd) { border-right:1px solid var(--line); }
.stat:nth-child(-n+2) { border-bottom:1px solid var(--line); }
.stat span { font-size:11px; color:var(--muted); }
.stat b { font-size:19px; font-weight:650; }
.hint { margin:0; padding:12px; border-radius:12px; background:var(--teal-soft); font-size:11px; text-align:center; color:var(--muted); width:100%; }
.hint b { color:var(--text); }
.hint.over b { color:var(--warn); }
.feed-card { grid-column:1; grid-row:2; }
.quick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.quick button { display:flex; flex-direction:column; gap:6px; align-items:center; justify-content:center; min-height:118px; border:1px solid var(--line); border-radius:17px; background:var(--peach); color:var(--text); padding:12px 5px; font-size:25px; font-weight:650; }
.quick button:nth-child(3n) { background:var(--lavender); }
.quick button.usual { background:var(--teal); border-color:var(--teal); color:var(--card); box-shadow:0 4px 10px #536d5115; }
.quick button>.ui-icon { width:22px; height:24px; opacity:.8; }
.quick button>span { line-height:1.2; white-space:nowrap; }
.quick button small { font-size:10px; font-weight:500; }
.quick button>span small { font-size:13px; }
.custom-btn { width:100%; margin-top:12px; min-height:46px; border-radius:14px; border:1px dashed #b9aa99; color:var(--muted); background:transparent; font-size:12px; }
.custom-btn span { font-size:20px; vertical-align:-1px; margin-right:5px; }
.chart { align-self:stretch; }
.chart svg:not(.ui-icon) { width:100%; display:block; }
.chart text { fill:var(--muted); font-size:10px; }
.chart .muted { font-size:10px; margin-top:9px; }
.chart-empty { display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center; text-align:center; min-height:159px; color:var(--muted); font-size:11px; border:1px dashed var(--line); border-radius:16px; background:var(--bg); }
.chart-empty .ui-icon { color:var(--teal); width:28px; height:28px; margin-bottom:3px; }
.chart-empty b { font-weight:500; font-size:12px; color:var(--text); }
.disclaimer { grid-column:1 / -1; font-size:11px; color:var(--muted); text-align:center; max-width:650px; margin:3px auto 12px; line-height:1.8; padding:0 18px; }
.page-heading { margin:10px 0 24px; }
.page-heading h2 { font:normal 34px/1.2 Georgia,serif; margin:10px 0; }
.page-heading p { color:var(--muted); font-size:13px; }
#v-settings { max-width:660px; margin:auto; }
#v-settings .card { margin-bottom:16px; }
#v-history { max-width:720px; margin:auto; }
.day { margin:24px 3px 10px; display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.day h3 { font-size:17px; font-weight:650; margin:0; }
.day .tot { font-weight:600; color:var(--teal); white-space:nowrap; font-size:13px; }
.item { display:grid; grid-template-columns:54px 1fr auto; gap:12px; align-items:center; width:100%; text-align:left; background:var(--card); border:1px solid var(--line); border-radius:17px; padding:16px; margin:8px 0; }
.item .t { font-weight:650; font-variant-numeric:tabular-nums; }
.item .ml { font-weight:650; font-size:19px; white-space:nowrap; color:var(--teal); }
.item .meta { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.tag { display:inline-block; font-size:11px; padding:3px 8px; border-radius:8px; background:var(--teal-soft); margin:4px 4px 0 0; }
.tag.warn { background:var(--peach); color:var(--danger); }
.empty { text-align:center; padding:25px 16px 45px; background:var(--card); border-radius:24px; border:1px solid var(--line); }
.empty h3 { font-size:20px; font-weight:600; }
.empty p { color:var(--muted); font-size:13px; }
.form label,dialog label { display:block; margin:14px 0; font-size:13px; color:var(--muted); }
.form input,.form select,dialog input,dialog select { display:block; width:100%; min-width:0; margin-top:6px; min-height:48px; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:var(--bg); color:var(--text); font-size:16px; }
.form p { font-size:12px; }
.row-btns { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.row-btns button,.form .file-btn { min-height:44px; padding:10px 14px; border-radius:12px; border:1px solid var(--line); background:var(--bg); display:inline-flex; align-items:center; justify-content:center; color:var(--text); font-size:13px; margin:0; cursor:pointer; }
.row-btns .primary,dialog .dlg-btns .primary { background:var(--teal); color:var(--card); border-color:var(--teal); }
.code { font:12px/1.6 ui-monospace,Consolas,monospace; overflow-wrap:anywhere; background:var(--bg); padding:14px; border-radius:12px; border:1px solid var(--line); }
.tabs { position:fixed; z-index:5; bottom:calc(18px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); display:flex; padding:6px; width:min(440px,calc(100% - 32px)); background:var(--card); border:1px solid var(--line); border-radius:24px; box-shadow:0 8px 38px #4d3c3c14; }
.tabs button { flex:1; min-width:0; height:58px; border:0; border-radius:18px; background:transparent; color:var(--muted); font-size:10px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; }
.tabs button .ui-icon { width:20px; height:20px; }
.tabs button.active { background:var(--teal-soft); color:var(--teal); font-weight:700; }
dialog { max-height:calc(100dvh - 32px); overflow:auto; border:1px solid var(--line); border-radius:26px; padding:24px; width:min(440px,calc(100vw - 28px)); background:var(--card); color:var(--text); box-shadow:0 20px 90px #352a3a30; }
dialog::backdrop { background:#322a3559; backdrop-filter:blur(4px); }
dialog h2 { margin:0 0 20px; font:normal 30px/1.2 Georgia,serif; }
dialog label.check { display:flex; align-items:center; gap:10px; color:var(--text); min-height:36px; }
dialog label.check input { width:22px; min-height:22px; height:22px; margin:0; accent-color:var(--teal); }
.ml-row { display:grid; grid-template-columns:54px minmax(0,1fr) auto 54px; gap:8px; align-items:center; }
.ml-row input { height:60px; font-size:28px; font-weight:650; text-align:center; margin:0; }
.ml-row button { height:52px; border-radius:14px; border:1px solid var(--line); background:var(--peach); font-size:17px; }
.dlg-btns { display:flex; gap:8px; margin-top:20px; }
.dlg-btns button { flex:1; height:48px; border-radius:14px; border:1px solid var(--line); background:var(--bg); font-size:14px; }
.dlg-btns .danger { color:var(--danger); }
.toast { position:fixed; z-index:10; left:50%; bottom:calc(103px + env(safe-area-inset-bottom)); transform:translateX(-50%); display:flex; flex-wrap:wrap; justify-content:center; gap:10px; align-items:center; width:max-content; max-width:calc(100vw - 28px); padding:12px 16px; background:var(--text); color:var(--card); border-radius:16px; font-size:12px; box-shadow:0 6px 24px #0002; animation:up .2s ease; }
.toast button { background:none; border:0; color:inherit; text-decoration:underline; text-underline-offset:3px; font-weight:700; min-height:32px; padding:4px; }
@keyframes up { from { opacity:0; transform:translate(-50%,8px); } }
@media(hover:hover) { .quick button:hover,.row-btns button:hover,.item:hover { transform:translateY(-2px); box-shadow:0 5px 16px #68503c12; } .tabs button:hover { background:var(--teal-soft); } }
@media(max-width:700px) {
  main,.top { padding-left:18px; padding-right:18px; }
  .top { padding-top:calc(20px + env(safe-area-inset-top)); padding-bottom:20px; }
  .brand { font-size:25px; }
  .sync-dot { padding:10px 12px; }
  .sync-dot span { display:none; }
  .welcome { min-height:190px; border-radius:25px; margin-bottom:18px; }
  .welcome-copy { padding:25px 20px; padding-right:116px; }
  .welcome h1 { font-size:43px; margin:10px 0; }
  .eyebrow { font-size:8px; letter-spacing:1.4px; }
  .welcome .sub { font-size:11px; max-width:270px; }
  .welcome p { font-size:11px; max-width:210px; margin-top:11px; }
  .mascot { position:absolute; right:-14px; bottom:0; width:142px; margin:0; }
  .home-grid { grid-template-columns:1fr; gap:15px; }
  .card { padding:20px; border-radius:23px; }
  .last-card,.feed-card,.ring-card { grid-column:auto; grid-row:auto; }
  .last-card { order:0; }
  .feed-card { order:1; }
  .ring-card { order:2; grid-template-columns:145px 1fr; gap:16px 14px; align-items:center; }
  .ring-heading { grid-column:1 / -1; }
  .ring-wrap { width:145px; height:145px; }
  .ring-ml { font-size:25px; }
  .ring-text .muted { font-size:10px; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .hint { grid-column:1 / -1; }
  .details-card { order:3; }
  .disclaimer { order:5; }
  .big { font-size:37px; margin-top:12px; }
  .quick button { min-height:108px; }
  .section-title h2 { font-size:14px; }
  .section-note { font-size:11px; margin-bottom:16px; }
}
@media(max-width:370px) {
  main,.top { padding-left:12px; padding-right:12px; }
  .card { padding:16px; }
  .welcome-copy { padding-left:16px; padding-right:87px; }
  .mascot { width:125px; right:-17px; }
  .welcome .eyebrow { letter-spacing:.5px; }
  .ring-card { grid-template-columns:120px 1fr; gap:12px; }
  .ring-wrap { width:120px; height:120px; }
  .ring-text::before { font-size:22px; }
  .ring-ml { font-size:22px; }
  .pill { font-size:9px; padding:4px 6px; }
  .ring-heading { gap:7px; }
  .ring-heading h2 { font-size:12px; }
  .quick button small { font-size:9px; }
  .item { grid-template-columns:40px 1fr auto; padding:12px; gap:8px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

/* --- dodělávka: jazyk, lvíček, „Zbývá“, Podrobnosti --- */
.top-actions { display:flex; align-items:center; gap:8px; }
.lang-btn { min-width:44px; min-height:44px; padding:0 12px; border:1px solid var(--line); border-radius:24px; background:var(--card); font-size:12px; font-weight:700; letter-spacing:.5px; color:var(--text); }
.rest-box { display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; }
.rest-box span { font-size:12px; color:var(--muted); }
.rest-box b { font-size:26px; font-weight:700; letter-spacing:-.5px; color:var(--teal); font-variant-numeric:tabular-nums; }
.rest-box.done b { font-size:28px; }
.details-card { grid-column:1 / -1; padding:0; overflow:hidden; }
.details-card summary { list-style:none; display:flex; align-items:center; gap:12px; padding:18px 24px; min-height:64px; cursor:pointer; }
.details-card summary::-webkit-details-marker { display:none; }
.details-card summary:focus-visible { outline:3px solid var(--teal); outline-offset:-3px; border-radius:24px; }
.summary-text { display:flex; flex-direction:column; flex:1; min-width:0; }
.summary-text b { font-size:15px; font-weight:650; }
.summary-text small { font-size:12px; color:var(--muted); }
.chevron { transition:transform .2s; color:var(--muted); }
.details-card[open] .chevron { transform:rotate(180deg); }
.details-body { padding:0 24px 24px; display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.details-body .stats-grid { grid-column:1 / -1; margin:0; }
.details-body .chart { min-width:0; }
@media(max-width:700px) {
  .details-card summary { padding:16px 20px; }
  .details-body { grid-template-columns:1fr; padding:0 20px 20px; }
  .ring-card .rest-box { align-items:flex-start; text-align:left; }
  .lang-btn { min-width:44px; padding:0 10px; }
}
@media(max-width:370px) {
  .rest-box b { font-size:22px; }
  .stat span { font-size:10px; }
}

/* --- nabídka přidání na plochu --- */
.install-card { grid-column:1 / -1; display:flex; align-items:center; gap:14px; flex-wrap:wrap; background:var(--teal-soft); border-color:transparent; }
.install-card img { width:52px; height:52px; border-radius:14px; flex-shrink:0; }
.install-copy { display:flex; flex-direction:column; gap:2px; flex:1; min-width:180px; }
.install-copy b { font-size:15px; font-weight:700; }
.install-copy span { font-size:13px; color:var(--muted); }
.install-btns { display:flex; gap:8px; }
.install-btns button { min-height:44px; padding:10px 16px; border-radius:12px; border:1px solid var(--line); background:var(--card); font-size:14px; }
.install-btns .primary { background:var(--teal); color:var(--card); border-color:var(--teal); font-weight:700; }
@media(max-width:700px) { .install-card { order:-1; } .install-btns { width:100%; } .install-btns button { flex:1; } }
