:root {
  --bg: #f6f5f1;
  --panel: #efede7;
  --card: #ffffff;
  --line: rgba(40, 32, 18, 0.1);
  --line2: rgba(40, 32, 18, 0.2);
  --hover: rgba(40, 32, 18, 0.05);
  --sel: rgba(40, 32, 18, 0.08);
  --tx: #1f1d19;
  --tx2: #5e5a52;
  --tx3: #99948a;
  --acc: #c98a12;
  --tag-bg: #fbefd2;
  --tag-tx: #80520a;
  --ok: #2c8a56;
  --ok-bg: #e2f2e8;
  --warn: #a5690f;
  --warn-bg: #fbefd8;
  --bad: #b8432d;
  --bad-bg: #fbe5df;
  --pri: #1f1d19;
  --on-pri: #ffffff;
  --shadow: 0 1px 2px rgba(40, 32, 18, 0.05);
  --pop: 0 10px 30px rgba(40, 32, 18, 0.16), 0 2px 6px rgba(40, 32, 18, 0.08);
  --r: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171715;
    --panel: #1d1d1b;
    --card: #232321;
    --line: rgba(255, 248, 230, 0.09);
    --line2: rgba(255, 248, 230, 0.18);
    --hover: rgba(255, 248, 230, 0.05);
    --sel: rgba(255, 248, 230, 0.09);
    --tx: #eeebe4;
    --tx2: #b2ada3;
    --tx3: #7b776e;
    --acc: #eab048;
    --tag-bg: #3b2f17;
    --tag-tx: #f2cf86;
    --ok: #5cc48b;
    --ok-bg: #1c3426;
    --warn: #e9ab4b;
    --warn-bg: #3a2c13;
    --bad: #ec8670;
    --bad-bg: #3d221b;
    --pri: #eeebe4;
    --on-pri: #171715;
    --shadow: none;
    --pop: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--tx);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sp { flex: 1; }
.muted { color: var(--tx3); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
kbd { font: 12px var(--font); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--card); }
code { font: 12.5px ui-monospace, "SF Mono", Menlo, monospace; background: var(--sel); border-radius: 5px; padding: 1px 5px; word-break: break-all; }

/* tlačidlá */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none; }
.btn.primary { background: var(--pri); color: var(--on-pri); }
.btn.primary:active { transform: scale(0.98); }
.btn.ghost { border: 1px solid var(--line2); }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.sm .i { width: 16px; height: 16px; }
.btn.danger { color: var(--bad); }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--tx2); }
.icon:hover, .icon.on { background: var(--hover); color: var(--tx); }
.icon.sm { width: 28px; height: 28px; }

/* rozloženie */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px 24px; }
.main { width: 100%; max-width: 780px; margin: 0 auto; padding: 14px 24px 140px; min-width: 0; }
.only-m { display: none !important; }
.scrim { display: none; }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav button { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; text-align: left; color: var(--tx2); font-size: 14px; }
.nav button span:not(.n):not(.hash) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx); }
.nav button:hover { background: var(--hover); }
.nav button.on { background: var(--sel); }
.nav button.on span { font-weight: 500; }
.nav .n { font-size: 12px; color: var(--tx3); font-variant-numeric: tabular-nums; }
.nav .hash { width: 18px; text-align: center; color: var(--acc); font-weight: 600; }
.nav .more { color: var(--tx3); font-size: 13px; padding-left: 38px; }
.side-h { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--tx3); padding: 18px 10px 6px; font-weight: 500; }
.side-edit { font-size: 12px; color: var(--tx3); padding: 2px 6px; border-radius: 6px; }
.side-edit:hover { background: var(--hover); color: var(--tx); }
.pad { padding: 4px 10px; margin: 0; }

.top { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 10px; }
.title { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outbox { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); background: var(--warn-bg); padding: 4px 10px; border-radius: 99px; }
.outbox .i { width: 15px; height: 15px; }

.searchrow { display: flex; gap: 6px; margin-bottom: 10px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--tx3); }
.search:focus-within { border-color: var(--line2); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: var(--tx); }
.filt { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--card); }
.filt .dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }

.chips, .active { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.active { flex-wrap: wrap; overflow: visible; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 13px; white-space: nowrap; color: var(--tx2); }
.chip.on { background: var(--pri); color: var(--on-pri); border-color: transparent; }
.chip.x { padding-right: 8px; }
.chip .i { width: 14px; height: 14px; }
.chip.ghost { background: none; border-color: transparent; color: var(--tx3); }

.filterpanel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; }
.fp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-l { width: 72px; font-size: 13px; color: var(--tx3); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--sel); border-radius: 9px; padding: 2px; }
.seg button { height: 28px; padding: 0 10px; border-radius: 7px; font-size: 13px; color: var(--tx2); }
.seg button.on { background: var(--card); color: var(--tx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); font-weight: 500; }
.date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tx3); }
.date input { height: 30px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); padding: 0 8px; }

/* editor */
.editor { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: border-color 0.15s; }
.editor:focus-within { border-color: var(--line2); }
.editor.drop { border-color: var(--acc); border-style: dashed; }
.editor.busy { opacity: 0.6; pointer-events: none; }
.editor.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.editor .ce { position: relative; padding: 13px 14px 6px; font-size: 16px; line-height: 1.5; min-height: 48px; max-height: 640px; overflow-y: auto; outline: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ce-wrap { position: relative; }
.ce-wrap .ph { position: absolute; top: 13px; left: 14px; right: 14px; color: var(--tx3); font-size: 16px; line-height: 1.5; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.quick .ce-wrap .ph { font-size: 17px; top: 12px; }
.ce > div { min-height: 1.5em; }
.ce .cl { position: relative; padding-left: 27px; }
.ce .cl::before { content: ""; position: absolute; left: 0; top: 0.22em; width: 17px; height: 17px; box-sizing: border-box; border: 1.6px solid var(--line2); border-radius: 5px; cursor: pointer; }
.ce .cl.on::before { background: var(--ok); border-color: var(--ok); }
.ce .cl.on::after { content: ""; position: absolute; left: 5px; top: calc(0.22em + 4px); width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg); pointer-events: none; }
.ce .cl.on { color: var(--tx3); text-decoration: line-through; }
.ed-bar { display: flex; align-items: center; gap: 2px; padding: 4px 8px 8px; }
.ed-bar .icon.on { background: var(--tag-bg); color: var(--tag-tx); }
.ed-bar .hint { font-size: 12px; color: var(--tx3); margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-bar .btn { height: 30px; padding: 0 12px; font-size: 13px; }
.ed-bar .btn + .btn { margin-left: 6px; }
.ed-imgs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px; }
.ed-imgs:not(:empty) { padding-bottom: 8px; }
.ed-img { position: relative; width: 72px; height: 72px; border-radius: 9px; overflow: hidden; background: var(--sel); }
.ed-img img { width: 100%; height: 100%; object-fit: cover; }
.ed-img.up img { opacity: 0.45; }
.ed-img.up::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border: 2px solid var(--tx2); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
.ed-img.fail { outline: 2px solid var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
.ed-img .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; display: flex; align-items: center; justify-content: center; }
.ed-img .rm .i { width: 14px; height: 14px; stroke-width: 2.4; }
.ed-links { padding: 0 14px; }
.ed-links:not(:empty) { padding-bottom: 8px; }
.ac { margin: 0 10px 6px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: var(--card); display: flex; flex-wrap: wrap; gap: 4px; }
.ac button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; font-size: 14px; color: var(--tag-tx); }
.ac button.sel, .ac button:hover { background: var(--tag-bg); }
.ac .n { font-size: 11px; color: var(--tx3); }
.composer { margin-bottom: 18px; }

/* zoznam */
.feed { transition: opacity 0.15s; }
.feed.stale { opacity: 0.55; }
.day { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; color: var(--tx2); margin: 22px 0 8px 2px; }
.day .n { font-weight: 400; color: var(--tx3); }
.note { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 8px 12px; margin-bottom: 8px; box-shadow: var(--shadow); transition: opacity 0.3s, transform 0.3s; }
.note.leaving { opacity: 0; transform: translateX(12px); }
.note.editing { padding: 0; border-color: transparent; background: none; box-shadow: none; }
.note.editing .tick { display: none; }
.note.editing .note-main { width: 100%; }
.tick { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 1.6px solid var(--line2); display: flex; align-items: center; justify-content: center; color: #fff; transition: background 0.15s, border-color 0.15s; }
.tick:hover { border-color: var(--ok); }
.tick .i { width: 14px; height: 14px; stroke-width: 2.8; }
.s-done .tick { background: var(--ok); border-color: var(--ok); }
.s-dropped .tick { background: var(--tx3); border-color: var(--tx3); }
.s-later .tick { border-color: var(--warn); border-style: dashed; }
.note-main { flex: 1; min-width: 0; }
.note-body { cursor: text; overflow-wrap: anywhere; }
.note-body p { margin: 0 0 2px; }
.note-body p.t { font-weight: 600; }
.note-body .gap { height: 8px; }
.s-done .note-body, .s-dropped .note-body { color: var(--tx3); }
.s-done .note-body > p, .s-dropped .note-body > p { text-decoration: line-through; text-decoration-color: var(--line2); }
.s-dropped .imgs, .s-dropped .lcard { opacity: 0.55; }
.note-body a { color: var(--acc); text-decoration: none; }
.note-body a:hover { text-decoration: underline; }
.tag { display: inline-block; color: var(--tag-tx); background: var(--tag-bg); border-radius: 6px; padding: 0 6px; font-size: 0.92em; line-height: 1.55; font-weight: 500; }
.tag:hover { filter: brightness(0.96); }
.todo { display: flex; align-items: flex-start; gap: 9px; padding: 2px 0; cursor: pointer; }
.todo input { appearance: none; flex-shrink: 0; width: 17px; height: 17px; margin: 3px 0 0; border: 1.6px solid var(--line2); border-radius: 5px; cursor: pointer; display: grid; place-items: center; }
.todo input:checked { background: var(--ok); border-color: var(--ok); }
.todo input:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.todo.on > span { text-decoration: line-through; color: var(--tx3); }
.imgs { display: grid; gap: 6px; margin-top: 8px; }
.imgs.c1 { grid-template-columns: minmax(0, 360px); }
.imgs.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 480px; }
.imgs.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; }
.img { display: block; border-radius: 10px; overflow: hidden; background: var(--sel); }
.img img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.imgs.c1 .img img { aspect-ratio: auto; max-height: 360px; }
.lcard { display: flex; gap: 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; background: var(--bg); max-width: 560px; }
.lcard:hover { border-color: var(--line2); }
.lcard img { width: 112px; min-height: 76px; object-fit: cover; flex-shrink: 0; background: var(--sel); }
.lc { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px 9px 0; min-width: 0; }
.lcard > .lc:first-child { padding-left: 12px; }
.lc b { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-d { font-size: 13px; color: var(--tx2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-s { font-size: 12px; color: var(--tx3); }
.note-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; min-height: 28px; font-size: 12px; color: var(--tx3); }
.note-foot .time { font-variant-numeric: tabular-nums; }
.prog, .cnt { display: inline-flex; align-items: center; gap: 4px; }
.prog .i, .cnt .i { width: 14px; height: 14px; }
.prog.full { color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.pill .i { width: 14px; height: 14px; }
.p-later { background: var(--warn-bg); color: var(--warn); }
.p-done { background: var(--ok-bg); color: var(--ok); }
.p-dropped { background: var(--sel); color: var(--tx2); }
.note .icon.sm { opacity: 0.55; }
.note:hover .icon.sm { opacity: 1; }
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; gap: 6px; color: var(--tx2); }
.empty b { color: var(--tx); font-size: 16px; }
.loadmore { display: flex; margin: 18px auto 0; }
.end { text-align: center; margin-top: 22px; }
.trashbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }

/* menu, toast, lightbox */
.menu { position: absolute; z-index: 60; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--pop); padding: 5px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 14px; text-align: left; }
.menu button span { flex: 1; }
.menu button:hover { background: var(--hover); }
.menu button.danger { color: var(--bad); }
.menu .i.on { color: var(--ok); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--pri); color: var(--on-pri); padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; z-index: 90; transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 9, 0.92); display: flex; align-items: center; justify-content: center; padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-x, .lb-nav { position: absolute; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.lb-x { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lb-nav.l { left: 14px; }
.lb-nav.r { right: 14px; }
.lb-n { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); color: rgba(255, 255, 255, 0.7); font-size: 13px; }

/* štatistika */
.stats, .settings { display: flex; flex-direction: column; gap: 14px; }
.st-head { display: flex; }
.sel { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--tx3); }
.sel select { height: 34px; border-radius: 9px; border: 1px solid var(--line2); background: var(--card); padding: 0 10px; font-size: 14px; color: var(--tx); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; }
.card span { font-size: 13px; color: var(--tx3); }
.card b { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.card em { font-style: normal; font-size: 12px; color: var(--tx3); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.box h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 10px; font-weight: 600; }
.box-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.box-h h3 { margin: 0; }
.box p { margin: 0 0 8px; }
.box ol { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.box ol .i { width: 16px; height: 16px; vertical-align: -3px; }
.box .row { display: flex; gap: 8px; flex-wrap: wrap; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line2); }
.chart .lab { fill: var(--tx3); font-size: 11px; font-family: var(--font); }
.chart .b-add { fill: var(--acc); }
.chart .b-done { fill: var(--ok); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--tx2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lg.add { background: var(--acc); }
.lg.done { background: var(--ok); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stackbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin-bottom: 12px; }
.sb-open { background: var(--acc); }
.sb-later { background: var(--warn); opacity: 0.55; }
.sb-done { background: var(--ok); }
.sb-dropped, .sb-empty { background: var(--line2); }
.kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kv li { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv li:first-child { border-top: 0; }
.kv li button { display: inline-flex; align-items: center; gap: 8px; }
.kv li b { font-variant-numeric: tabular-nums; }
.kv li.hl { font-weight: 600; }
.wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 90px; margin-top: 12px; }
.wd div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.wd span { width: 100%; max-width: 26px; background: var(--acc); border-radius: 4px 4px 2px 2px; min-height: 2px; opacity: 0.85; }
.wd em { font-style: normal; font-size: 11px; color: var(--tx3); }
.tt { width: 100%; border-collapse: collapse; font-size: 14px; }
.tt th { text-align: left; font-weight: 500; font-size: 12px; color: var(--tx3); padding: 4px 0; }
.tt td { padding: 6px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tt th:not(:first-child), .tt td:not(:first-child) { text-align: right; }

/* nastavenia */
.tagadmin td { vertical-align: middle; }
.tagadmin td.cnt { color: var(--tx3); width: 60px; }
.tagadmin td.act { text-align: right; white-space: nowrap; }
.tagadmin td.act .btn + .btn { margin-left: 6px; }
.tagin { height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); padding: 0 10px; font-size: 15px; width: 100%; max-width: 240px; outline: 0; }
.tagin:focus { border-color: var(--tx3); }
.more-info { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.more-info summary { cursor: pointer; font-size: 14px; color: var(--tx2); }
.more-info[open] summary { margin-bottom: 8px; }
.pw { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.pw input, .login input { height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); padding: 0 12px; font-size: 16px; outline: 0; }
.pw input:focus, .login input:focus { border-color: var(--tx3); }
.pw .btn { align-self: flex-start; }
.err { color: var(--bad); margin: 0; min-height: 1em; }

/* prihlásenie */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; }
.login img { border-radius: 18px; }
.login h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.login form { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; }
.login .btn { justify-content: center; height: 40px; }

/* mobil */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .only-m { display: inline-flex !important; }
  .chips.only-m { display: flex !important; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(300px, 84vw); height: auto; transform: translateX(-102%); transition: transform 0.22s ease; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--pop); }
  .side-open .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0.3); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  .side-open .scrim { opacity: 1; pointer-events: auto; }
  .main { padding: calc(8px + env(safe-area-inset-top)) 14px calc(120px + env(safe-area-inset-bottom)); }
  .top { margin-left: -6px; }
  .title { font-size: 24px; }
  .nav button { height: 40px; font-size: 15px; }
  .fab { position: fixed; right: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: var(--pri); color: var(--on-pri); align-items: center; justify-content: center; box-shadow: var(--pop); }
  .fab .i { width: 26px; height: 26px; stroke-width: 2.2; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
  body:not(.quick) .ed-bar .hint { display: none; }
  .note .icon.sm { opacity: 1; }
  .lcard img { width: 88px; }
  .fp-l { width: 100%; }
  .tagadmin td.act .btn { padding: 0 8px; }
  .tagadmin td.cnt { width: 36px; }
}

/* rýchle okno v Mac appke */
body.quick { background: var(--card); overflow: hidden; }
body.quick .q-wrap { padding: 6px 4px 4px; }
body.quick .editor { border: 0; box-shadow: none; background: none; }
body.quick .editor .ce { font-size: 17px; padding: 12px 14px 8px; max-height: 360px; }
body.quick .q-foot { display: flex; align-items: center; gap: 10px; padding: 6px 14px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--tx3); }
body.quick .q-saved { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 600; }
body.quick .q-saved .i { width: 15px; height: 15px; stroke-width: 2.6; }
body.quick .q-open { color: var(--tx3); font-size: 12px; }
body.quick .q-open:hover { color: var(--tx); }
body.quick .login { min-height: 0; padding: 20px; flex-direction: row; flex-wrap: wrap; }
body.quick .login img, body.quick .login h1 { display: none; }
body.quick .toast { bottom: 8px; }
