/* Huedoo – vzhľad aplikácie */

@font-face { font-family: "Bricolage"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2");
  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: "Bricolage"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format("woff2");
  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; }
@font-face { font-family: "Instrument"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(fonts/instrument-sans-latin-wght-normal.woff2) format("woff2");
  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: "Instrument"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(fonts/instrument-sans-latin-ext-wght-normal.woff2) format("woff2");
  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 {
  --paper: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F4F6;
  --ink: #15161A;
  --ink-2: #3C3E45;
  --muted: #6E717A;
  --line: #E7E7EB;
  --accent: #4B5BFF;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7E9FF;
  --marker: #FFE45C;
  --danger: #E5484D;
  --danger-soft: #FDECEC;
  --ok: #16A34A;
  --shadow-drawer: -16px 0 40px -24px rgba(0, 0, 0, .18);
  --shadow-pop: 0 18px 48px -12px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .05);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --font: "Instrument", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage", "Instrument", ui-sans-serif, system-ui, sans-serif;
  --sidebar: 272px;
  --drawer: 440px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --surface: #0F0F11;
    --surface-2: #19191C;
    --ink: #F2F2F4;
    --ink-2: #C9C9CE;
    --muted: #8D8D95;
    --line: #26262A;
    --accent: #7C88FF;
    --accent-ink: #0E1230;
    --accent-soft: #262B4D;
    --marker: #D9B92E;
    --danger: #FF6B70;
    --danger-soft: #3A1E24;
    --shadow-drawer: -24px 0 48px -24px rgba(0, 0, 0, .6);
    --shadow-pop: 0 18px 48px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--marker); color: #1B2340; }

/* ---------- Tlačidlá a formuláre ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.btn svg { width: 18px; height: 18px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 16px; height: 16px; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date],
input[type=time], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; line-height: 1.5; }
input:disabled { background: var(--surface-2); color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }

.note { padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 16px; }
.note-error { background: var(--danger-soft); color: var(--danger); }
.note-success { background: var(--accent-soft); color: var(--ink); }

kbd {
  font: 600 11px/1 var(--font); color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 4px 6px;
}

/* ---------- Prihlásenie ---------- */
body.auth { min-height: 100vh; background: var(--paper); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border-radius: 24px; padding: 36px 32px 24px;
  border: 1px solid var(--line);
}
.auth-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.auth-brand .logo { width: 36px; height: 36px; }
.auth-card h1 { font: 700 30px/1.1 var(--display); letter-spacing: -.03em; margin: 28px 0 6px; }
.auth-sub { color: var(--muted); margin: 0 0 24px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); margin: 20px 0 0; }
.auth-langs { display: flex; gap: 14px; justify-content: center; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.auth-langs a { color: var(--muted); text-decoration: none; }
.auth-langs a[aria-current] { color: var(--ink); font-weight: 600; }
.btn-google { width: 100%; background: var(--surface); }
.btn-google svg { width: 20px; height: 20px; stroke: none; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.prose p { color: var(--ink-2); }
.prose pre { background: var(--surface-2); padding: 10px 12px; border-radius: var(--r-sm); overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.checks { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.checks li { font-size: 12px; padding: 4px 10px; border-radius: 99px; }
.checks .ok { background: var(--accent-soft); }
.checks .ok::before { content: "✓ "; }
.checks .bad { background: var(--danger-soft); color: var(--danger); }
.checks .bad::before { content: "✗ "; }

/* ---------- Rozloženie aplikácie ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.only-mobile { display: none !important; }
.scrim { display: none; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
  padding: 20px 14px 14px; background: var(--paper);
  border-right: 1px solid var(--line);
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 700 21px/1 var(--display); letter-spacing: -.02em; }
.logo { width: 30px; height: 30px; stroke: none; }
/* Názov služby: „Hue“ vo farebnom prechode (odtiene), „doo“ v bežnej farbe textu */
.brand-hue {
  background: linear-gradient(90deg, #5B6CFF, #D946EF 60%, #F97360);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .02em;
}

.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px;
  border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.search svg { width: 17px; height: 17px; }
.search input { border: 0; background: transparent; min-height: 0; padding: 0; height: 100%; box-shadow: none !important; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px;
  border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500;
  border: 0; background: none; width: 100%; text-align: left; cursor: pointer;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; color: var(--muted); }
.nav-item[aria-current="page"] svg { color: var(--accent); }
.nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item .count.alert { color: var(--danger); }
.nav-item .edit { opacity: 0; width: 26px; height: 26px; margin-right: -4px; }
.nav-item:hover .edit, .nav-item:focus-within .edit { opacity: 1; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--muted)); }
.nav-item .dot { margin: 0 4px; }

.nav-group { display: grid; gap: 6px; }
.nav-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 10px;
  font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-empty { padding: 4px 10px; font-size: 13px; color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }

.side-bottom { margin-top: auto; display: grid; gap: 10px; }
.ad-slot { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 8px; font-size: 12px; color: var(--muted); overflow: hidden; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; width: 100%; }
.me:hover { background: var(--surface-2); }
.me svg { color: var(--muted); width: 18px; height: 18px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 15px/1 var(--display); flex: none; }
.me-text { flex: 1; min-width: 0; display: grid; }
.me-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { font-size: 12px; color: var(--muted); }

.main { min-width: 0; }
.column { max-width: 760px; margin: 0 auto; padding: 44px 32px 120px; }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.view-head h1 {
  font: 750 44px/1.05 var(--display); letter-spacing: -.035em; margin: 0;
  overflow-wrap: anywhere;
  /* Farba zoznamu alebo štítku. Svetlé farby (žltá, zelená) sa stmavia, aby boli čitateľné. */
  color: color-mix(in srgb, var(--hl, var(--ink)) 65%, var(--ink));
  color: oklch(from var(--hl, var(--ink)) min(l, 0.56) c h);
}
@media (prefers-color-scheme: dark) {
  .view-head h1 {
    color: color-mix(in srgb, var(--hl, var(--ink)) 85%, var(--ink));
    color: oklch(from var(--hl, var(--ink)) max(l, 0.72) c h);
  }
}
.view-sub { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.save-state { font-size: 13px; color: var(--muted); white-space: nowrap; min-height: 1em; transition: opacity .3s; }
.save-state.saving::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--marker); margin-right: 6px; vertical-align: 1px; }
.save-state.saved::before { content: "✓"; color: var(--ok); margin-right: 5px; font-weight: 700; }
.save-state.error { color: var(--danger); }

/* ---------- Rýchle pridanie ---------- */
.composer {
  position: sticky; top: 12px; z-index: 5;
  display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; height: 56px;
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .15s;
}
.composer:focus-within { box-shadow: 0 0 0 2px var(--accent), 0 12px 32px -16px rgba(75, 91, 255, .5); }
.composer-plus { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.composer-plus svg { width: 16px; height: 16px; stroke-width: 2.5; }
.composer input { border: 0; background: transparent; box-shadow: none !important; min-height: 0; height: 100%; padding: 0; font-size: 16px; }
.composer-hint { font-size: 13px; color: var(--muted); margin: 8px 4px 0; min-height: 20px; opacity: 0; transition: opacity .2s; }
.composer:focus-within + .composer-hint { opacity: 1; }

/* ---------- Filter stavov ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .dot { width: 8px; height: 8px; }
.chip .n { font-variant-numeric: tabular-nums; opacity: .7; }

/* ---------- Úlohy ---------- */
.tasks { display: grid; gap: 2px; }
.group-title { font: 650 15px/1 var(--display); color: var(--muted); margin: 22px 8px 8px; display: flex; align-items: center; gap: 8px; }
.group-title:first-child { margin-top: 4px; }
.group-title.danger { color: var(--danger); }
.group-title .n { font: 500 13px/1 var(--font); }

.task {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px;
  padding: 12px 12px 12px 10px; border-radius: 14px; cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.task::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--task-c, transparent); }
.task:hover { background: var(--surface-2); }
.task[aria-current="true"] { background: var(--surface); border-color: var(--accent); }

.tick {
  position: relative; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 50%; border: 2px solid var(--ring, var(--muted)); background: transparent;
  display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff;
  transition: background .15s, border-color .15s, transform .12s;
}
.tick::after { content: ""; position: absolute; inset: -10px; }
.tick:hover { background: color-mix(in srgb, var(--ring, var(--muted)) 14%, transparent); }
.tick:active { transform: scale(.88); }
.tick svg { width: 14px; height: 14px; stroke-width: 3.2; stroke-dasharray: 24; stroke-dashoffset: 24; }
.tick .half { position: absolute; inset: 3px; border-radius: 50%; background: conic-gradient(var(--ring) 0 50%, transparent 50%); }
.tick .wait { position: absolute; inset: 5px; border-radius: 50%; border: 2px dotted var(--ring); }
.p3 > .tick { --ring: var(--danger); }
.p2 > .tick { --ring: #F59E0B; }
.p1 > .tick { --ring: var(--accent); }

.task-body { min-width: 0; }
.task-title { position: relative; display: inline; isolation: isolate; font-size: 15.5px; line-height: 1.45; word-break: break-word; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.task-meta:empty { display: none; }
.meta { display: inline-flex; align-items: center; gap: 4px; }
.meta svg { width: 14px; height: 14px; }
.meta.late { color: var(--danger); font-weight: 600; }
.meta.today { color: var(--ok); font-weight: 600; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, transparent);
  border: 0; cursor: pointer; text-decoration: none;
}
.tag::before { content: "#"; opacity: .6; }
.tag-cloud .tag { height: 26px; font-size: 13px; }
.tag-cloud .tag[aria-current="page"] { background: var(--tc); color: #fff; }
.status-pill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; color: var(--sc); background: color-mix(in srgb, var(--sc) 13%, transparent); white-space: nowrap; }
.task-side { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.flag svg { width: 16px; height: 16px; }
.flag.p3 { color: var(--danger); } .flag.p2 { color: #F59E0B; } .flag.p1 { color: var(--accent); }
.flag.p3 svg, .flag.p2 svg, .flag.p1 svg { fill: currentColor; }

/* Hotové: prečiarknuté, stlmené */
.done > .tick { background: var(--ok); border-color: var(--ok); }
.done > .tick svg { stroke-dashoffset: 0; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent); }
.task.cancelled .task-title { color: var(--muted); text-decoration: line-through; text-decoration-style: wavy; text-decoration-thickness: 1px; }
.cancelled > .tick { border-style: dashed; }

/* Jediný výrazný moment: odškrtnutie. Zvýrazňovač prejde cez text, potom sa text prečiarkne. */
.task.ticking .tick { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); background: var(--ok); border-color: var(--ok); }
.task.ticking .tick svg { animation: draw .3s .08s ease-out forwards; }
.task.ticking .task-title::after {
  content: ""; position: absolute; left: -3px; right: -3px; top: 12%; bottom: 8%;
  background: var(--marker); border-radius: 3px; mix-blend-mode: multiply; z-index: -1;
  transform-origin: left; animation: sweep .45s .1s cubic-bezier(.6, 0, .2, 1) both;
}
@media (prefers-color-scheme: dark) { .task.ticking .task-title::after { mix-blend-mode: normal; opacity: .35; } }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sweep { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.task.leaving { animation: leave .3s ease-in forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(12px); } }

.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty svg { width: 120px; height: 90px; stroke-width: 1.6; color: var(--line); margin-bottom: 8px; }
.empty strong { display: block; font: 650 19px/1.3 var(--display); color: var(--ink); margin-bottom: 4px; }

/* ---------- Detail úlohy ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--drawer); max-width: 100vw; z-index: 30;
  background: var(--surface); box-shadow: var(--shadow-drawer); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  animation: slide-in .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 0 20px; }
.drawer-crumb { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px 24px; display: grid; gap: 18px; align-content: start; }
.title-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.title-row .tick { width: 26px; height: 26px; margin-top: 8px; }
.title-input {
  font: 650 22px/1.3 var(--display); letter-spacing: -.015em;
  border: 0 !important; box-shadow: none !important; padding: 4px 0; background: transparent;
  resize: none; overflow: hidden; min-height: 0;
}
.props { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; align-items: center; }
.props > label, .props > .plabel { font-size: 13px; color: var(--muted); font-weight: 500; }
.props select, .props input { min-height: 38px; padding: 6px 10px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > input { flex: 1; min-width: 120px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2);
}
.seg button:hover { border-color: var(--muted); }
.seg button[aria-pressed="true"] { border-color: var(--sc, var(--accent)); background: color-mix(in srgb, var(--sc, var(--accent)) 14%, transparent); color: var(--ink); font-weight: 600; }
.seg .dot { width: 8px; height: 8px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.quick button { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 99px; border: 1px dashed var(--line); background: none; color: var(--muted); cursor: pointer; }
.quick button:hover { border-style: solid; color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; position: relative; }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--c); }
.swatch.none { background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.swatch.none svg { width: 14px; height: 14px; }
.section-label { font: 650 14px/1 var(--display); color: var(--ink-2); margin: 6px 0 -6px; display: flex; justify-content: space-between; align-items: center; }
.note-input { min-height: 120px; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-pick .tag { height: 28px; font-size: 13px; opacity: .55; background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 40%, transparent); }
.tag-pick .tag[aria-pressed="true"] { opacity: 1; background: color-mix(in srgb, var(--tc) 15%, transparent); box-shadow: none; }
.tag-pick input { width: 130px; min-height: 28px; height: 28px; padding: 0 8px; font-size: 13px; border-style: dashed; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 0; padding: 0; cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; opacity: 0; }
.thumb:hover .x, .thumb:focus-within .x { opacity: 1; }
.thumb .x svg { width: 14px; height: 14px; }
.upload { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 12px; cursor: pointer; text-align: center; padding: 6px; }
.upload:hover { border-color: var(--accent); color: var(--accent); }
.upload input { display: none; }
.upload.busy { pointer-events: none; opacity: .6; }
.drawer-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- Toasty (Späť) ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 16px;
  background: var(--ink); color: var(--paper); border-radius: 14px; box-shadow: var(--shadow-pop);
  font-size: 14px; animation: toast-in .25s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.error { background: var(--danger); color: #fff; }
.toast button { border: 0; background: color-mix(in srgb, var(--paper) 16%, transparent); color: inherit; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.toast button:hover { background: color-mix(in srgb, var(--paper) 26%, transparent); }
@keyframes toast-in { from { transform: translateY(16px); opacity: 0; } }

/* ---------- Dialógy ---------- */
.dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border: 0; border-radius: var(--r-lg); padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop);
}
.dialog::backdrop { background: rgba(18, 21, 29, .45); backdrop-filter: blur(2px); }
.dialog[open] { animation: dlg .2s ease-out; }
@keyframes dlg { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 16px 4px 24px; }
.dlg-head h2 { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; margin: 0; }
.dlg-body { padding: 12px 24px 24px; display: grid; gap: 16px; }
.dlg-foot { display: flex; justify-content: space-between; gap: 8px; padding: 0 24px 24px; }
.dlg-foot .right { display: flex; gap: 8px; margin-left: auto; }
.settings-sec { display: grid; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.settings-sec:last-child { border-bottom: 0; padding-bottom: 0; }
.settings-sec h3 { font: 650 16px/1.2 var(--display); margin: 0; }
.settings-sec p { margin: 0; font-size: 14px; color: var(--muted); }
.plan-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-soft); }
.plan-card strong { font: 700 17px/1.2 var(--display); }

/* ---------- Náhľad obrázka ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(10, 12, 18, .9); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

.skeleton { height: 48px; border-radius: 14px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; margin-bottom: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Mobil a tablet ---------- */
@media (min-width: 1181px) {
  body.drawer-open .main { padding-right: var(--drawer); }
}
@media (max-width: 1180px) {
  .drawer { width: min(var(--drawer), 100vw); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .only-mobile { display: inline-grid !important; }
  .topbar.only-mobile { display: flex !important; }
  .hide-mobile { display: none !important; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 40;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: none;
    padding-top: max(20px, env(safe-area-inset-top));
  }
  body.menu-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(18, 21, 29, .4); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { position: sticky; top: 0; z-index: 10; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); }
  .topbar-title { flex: 1; font: 700 17px/1 var(--display); opacity: 0; transition: opacity .2s; }
  body.scrolled .topbar-title { opacity: 1; }
  .column { padding: 8px 16px 120px; }
  .view-head h1 { font-size: 36px; }
  .composer { top: 64px; }
  .drawer { width: 100vw; border-left: 0; animation: sheet-in .25s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
  .props { grid-template-columns: 1fr; gap: 6px; }
  .props > label, .props > .plabel { margin-top: 8px; }
  .task { padding: 12px 8px 12px 10px; }
  .toasts { bottom: max(16px, env(safe-area-inset-bottom)); }
  .nav-item { min-height: 44px; }
  .nav-item .edit { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* Stlačená priorita dostane farbu svojej priority */
.seg .flag.p1 { --sc: var(--accent); }
.seg .flag.p2 { --sc: #F59E0B; }
.seg .flag.p3 { --sc: var(--danger); }
.seg .flag.p0 { --sc: var(--muted); }
