:root {
  --bg: #f5f6f8; --surface: #fff; --surface-2: #f9fafb; --border: #e3e6eb; --border-2: #d0d5dd;
  --text: #1b2330; --muted: #667085; --faint: #98a2b3;
  --accent: #2f6fd6; --accent-2: #2559b3; --accent-soft: #eaf1fc;
  --side-bg: #0f1a2b; --side-text: #9fb0c8; --side-strong: #fff; --side-dim: #6f819c; --side-active: #1c2b44; --side-line: #1d2a3f; --side-bar: #5b9bff;
  --danger: #c8322b; --ok: #15803d;
  --s-todo: #8a94a6; --s-doing: #1f5fa6; --s-review: #c27803; --s-done: #15803d;
  --p-urgent: #d92d20; --p-high: #e3a008; --p-normal: #2f6fd6; --p-low: #98a2b3;
  --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.16);
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* buttons + fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(16,24,40,.05); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: default; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--surface); }
textarea.input { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; }
.input:focus, .btn:focus-visible, .chip-select:focus { outline: 2px solid rgba(47,111,214,.35); outline-offset: 1px; border-color: var(--accent); }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }

/* ---------- public pages ---------- */
.pub-top { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 18px 20px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; }
.logo-mark svg { width: 15px; height: 15px; }
.pub-top nav { display: flex; gap: 8px; }
.hero { max-width: 1120px; margin: 0 auto; padding: 48px 20px 30px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 46px; font-weight: 700; letter-spacing: -.03em; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 18px 0 26px; max-width: 30em; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .small { margin-top: 14px; font-size: 13px; color: var(--muted); }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock .col { background: var(--surface-2); border-radius: 8px; padding: 8px; }
.mock .col h4 { margin: 2px 2px 8px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.mock .card { padding: 9px; font-size: 12.5px; margin-bottom: 7px; cursor: default; }
.features { max-width: 1120px; margin: 0 auto; padding: 30px 20px 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); }
.pub-foot { text-align: center; color: var(--faint); font-size: 13px; padding: 20px; border-top: 1px solid var(--border); }
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 20px; }
.auth-card .btn.primary { width: 100%; height: 42px; }
.auth-card .alt { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; }
.side { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; min-height: 0; color-scheme: dark; }
.side-top { padding: 12px; border-bottom: 1px solid var(--side-line); }
.ws-select { width: 100%; height: 38px; border: 1px solid #253652; border-radius: var(--radius); background: #16233a; color: var(--side-strong); padding: 0 8px; font-weight: 600; }
.ws-select:focus { outline: 2px solid rgba(91,155,255,.45); outline-offset: 1px; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 8px 10px 0; }
.side-label { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--side-dim); padding: 16px 8px 6px 18px; }
.side-label .btn { color: var(--side-dim); }
.side-label .btn:hover { color: var(--side-strong); background: rgba(255,255,255,.08); }
.nav-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px 7px 18px; border-radius: 0 6px 6px 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--side-text); }
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--side-strong); }
.nav-item:focus-visible { outline: 2px solid rgba(91,155,255,.6); outline-offset: -2px; }
.nav-item.active { background: var(--side-active); color: var(--side-strong); font-weight: 600; box-shadow: inset 3px 0 0 var(--side-bar); }
.nav-item.muted-item { color: var(--side-dim); }
.nav-item .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.nav-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { font-size: 12px; color: var(--side-dim); }
.nav-item svg { width: 16px; height: 16px; flex: none; color: currentColor; opacity: .85; }
.side-bottom { border-top: 1px solid var(--side-line); padding: 8px 8px 8px 0; }
.me-row { display: flex; align-items: center; gap: 9px; padding: 10px 8px 6px 18px; border-top: 1px solid var(--side-line); margin-top: 6px; }
.me-row .name { flex: 1; font-weight: 500; color: var(--side-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-row .btn { color: var(--side-dim); }
.me-row .btn:hover { color: var(--side-strong); background: rgba(255,255,255,.08); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.head { display: flex; align-items: center; gap: 12px; padding: 14px 20px 0; flex-wrap: wrap; }
.head h1 { font-size: 20px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.head h1 .dot { width: 12px; height: 12px; border-radius: 4px; }
.head .spacer { flex: 1; }
.menu-btn { display: none; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; background: #eceef2; padding: 3px; border-radius: 8px; }
.tab { border: 0; background: none; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tab svg { width: 15px; height: 15px; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search { height: 32px; width: 200px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--surface); }
.chip-select { height: 32px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--surface); padding: 0 8px; }
.toolbar .spacer { flex: 1; }
.content { flex: 1; overflow: auto; padding: 16px 20px 40px; }

/* list view */
.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; }
.group-head .n { color: var(--faint); font-weight: 500; }
.rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 26px 1fr 130px 110px 96px; align-items: center; gap: 8px; padding: 0 12px; min-height: 42px; border-bottom: 1px solid var(--border); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; min-width: 0; }
.row .title span.t { overflow: hidden; text-overflow: ellipsis; }
.row.done .title span.t { color: var(--muted); text-decoration: line-through; }
.row .meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rows-head { display: grid; grid-template-columns: 26px 1fr 130px 110px 96px; gap: 8px; padding: 6px 12px; font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.check svg { width: 11px; height: 11px; opacity: 0; color: #fff; }
.check:hover { border-color: var(--s-done); }
.check.on { background: var(--s-done); border-color: var(--s-done); }
.check.on svg { opacity: 1; }
.add-row { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 40px; color: var(--muted); }
.add-row input { flex: 1; border: 0; background: none; height: 38px; outline: none; }
.add-row button.plus { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: flex; align-items: center; gap: 8px; height: 40px; width: 100%; text-align: left; }
.add-row button.plus:hover { color: var(--accent); }
.tag { font-size: 11.5px; padding: 1px 7px; border-radius: 4px; background: #eef0f4; color: var(--muted); white-space: nowrap; }
.mini { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--faint); }
.mini svg { width: 13px; height: 13px; }

/* avatars, flags, dates */
.av { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.av.lg { width: 30px; height: 30px; font-size: 12px; }
.av.side-av { box-shadow: 0 0 0 2px var(--side-bg); }
.av.empty { background: transparent; border: 1.5px dashed var(--border-2); color: var(--faint); }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.flag svg { width: 14px; height: 14px; }
.due { font-size: 12.5px; }
.due.late { color: var(--danger); font-weight: 500; }
.due.soon { color: var(--s-review); font-weight: 500; }

/* board */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; min-width: 1000px; }
.col { background: #eceef2; border-radius: 10px; padding: 10px; min-height: 120px; }
.col.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-head { display: flex; align-items: center; gap: 8px; margin: 2px 2px 10px; font-weight: 600; font-size: 13px; }
.col-head .n { color: var(--muted); font-weight: 500; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 11px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; }
.card:hover { border-color: var(--border-2); }
.card.dragging, .ev.dragging { opacity: .4; }
.card, .ev { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.drag-ghost { position: fixed; z-index: 90; pointer-events: none; margin: 0; transform: rotate(2deg) scale(1.03); box-shadow: var(--shadow-lg); opacity: .95; }
body.touch-dragging { overscroll-behavior: none; }
.card .t { font-weight: 500; margin-bottom: 8px; word-break: break-word; }
.card .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .foot .sp { flex: 1; }
.drop-line { height: 3px; background: var(--accent); border-radius: 2px; margin: -5px 0 5px; }
.col .add-card { width: 100%; border: 0; background: none; text-align: left; padding: 6px 4px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.col .add-card:hover { background: rgba(16,24,40,.05); color: var(--text); }
.col textarea { width: 100%; border: 1px solid var(--accent); border-radius: 8px; padding: 8px; resize: none; min-height: 60px; outline: none; }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { font-size: 17px; min-width: 170px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; min-width: 780px; }
.cal .wd { background: var(--surface-2); padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.day { background: var(--surface); min-height: 112px; padding: 5px; position: relative; }
.day.other { background: #fafbfc; }
.day.other .num { color: var(--faint); }
.day.today .num { background: var(--accent); color: #fff; }
.day.over { background: var(--accent-soft); }
.day .num { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 3px; }
.day .add { position: absolute; top: 4px; right: 4px; border: 0; background: none; color: var(--faint); cursor: pointer; opacity: 0; font-size: 16px; line-height: 1; padding: 2px 5px; border-radius: 4px; }
.day:hover .add { opacity: 1; }
.day .add:hover { background: #eef0f4; color: var(--text); }
.ev { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid; background: #f2f4f7; border-radius: 4px; padding: 3px 6px; margin-bottom: 3px; font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.done { text-decoration: line-through; color: var(--muted); }
.nodue { margin-top: 18px; }
.nodue h3 { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.nodue .wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.nodue .ev { width: auto; max-width: 260px; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(16,24,40,.28); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 41; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.drawer-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.drawer-top .crumb { flex: 1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; }
.title-input { width: 100%; border: 1px solid transparent; border-radius: 6px; font-size: 21px; font-weight: 700; padding: 4px 6px; margin: 0 -6px 12px; resize: none; overflow: hidden; line-height: 1.3; }
.title-input:hover { border-color: var(--border); }
.title-input:focus { outline: none; border-color: var(--accent); }
.props { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 22px; }
.props label { color: var(--muted); font-size: 13px; }
.props select, .props input { height: 34px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; background: var(--surface); max-width: 280px; width: 100%; }
.sec { margin-bottom: 24px; }
.sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.desc { width: 100%; min-height: 110px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; resize: vertical; }
.desc:focus { outline: none; border-color: var(--accent); }
.progress { flex: 1; height: 6px; background: #eceef2; border-radius: 3px; overflow: hidden; max-width: 160px; }
.progress i { display: block; height: 100%; background: var(--s-done); }
.citem { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 6px; }
.citem:hover { background: var(--surface-2); }
.citem .txt { flex: 1; word-break: break-word; }
.citem.on .txt { text-decoration: line-through; color: var(--muted); }
.citem .x { opacity: 0; border: 0; background: none; cursor: pointer; color: var(--faint); font-size: 16px; padding: 0 4px; }
.citem:hover .x { opacity: 1; }
.citem .check { border-radius: 4px; }
.cadd { display: flex; gap: 8px; margin-top: 6px; }
.cadd input { flex: 1; height: 34px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; }
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment .b { flex: 1; min-width: 0; }
.comment .who { font-size: 13px; font-weight: 600; }
.comment .who time { font-weight: 400; color: var(--faint); margin-left: 6px; }
.comment .body { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.cform textarea { width: 100%; min-height: 70px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; resize: vertical; }
.cform .r { display: flex; justify-content: flex-end; margin-top: 6px; }
.drawer-foot { font-size: 12px; color: var(--faint); margin-top: 10px; }

/* modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 22px; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 18px; margin-bottom: 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 28px; height: 28px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; }
.colors button.on { border-color: var(--text); }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.member:last-child { border-bottom: 0; }
.member .who { flex: 1; min-width: 0; }
.member .who div:last-child { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1b2330; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 80; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: calc(100vw - 32px); }
.empty-state { text-align: center; color: var(--muted); padding: 50px 20px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; gap: 30px; }
  .hero h1 { font-size: 34px; }
  .features { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .app.nav-open .side { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(16,24,40,.3); z-index: 45; }
  .menu-btn { display: inline-flex; }
  .head { padding: 12px 16px 0; flex-wrap: nowrap; gap: 8px; }
  .head h1 { font-size: 18px; overflow: hidden; white-space: nowrap; }
  .head h1 .ttl { overflow: hidden; text-overflow: ellipsis; }
  .wide-only { display: none; }
  .toolbar { padding: 10px 16px; }
  .content { padding: 14px 16px 40px; }
  .search { width: 100%; order: 10; }
  .row, .rows-head { grid-template-columns: 26px 1fr 80px; }
  .row .c-assignee, .row .c-pri, .rows-head .c-assignee, .rows-head .c-pri { display: none; }
  .mock { grid-template-columns: 1fr 1fr; }
  .mock .col:nth-child(3) { display: none; }
  .props { grid-template-columns: 100px 1fr; }
  .drawer-body { padding: 16px; }
}

/* ---------- tags, badges, mentions ---------- */
.tchip { display: inline-flex; align-items: center; gap: 5px; max-width: 160px; padding: 1px 8px 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: color-mix(in srgb, var(--c) 78%, #000); background: color-mix(in srgb, var(--c) 14%, #fff); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.card .chips { margin-bottom: 6px; }
.nbadge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.nbadge[hidden] { display: none; }
.mention { color: var(--accent); font-weight: 600; background: var(--accent-soft); border-radius: 4px; padding: 0 2px; }
.mwrap { position: relative; }
.mention-pop { position: absolute; left: 8px; bottom: calc(100% + 4px); z-index: 5; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; }
.mention-pop button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; text-align: left; }
.mention-pop button.on, .mention-pop button:hover { background: var(--accent-soft); }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.cnt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tlink { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.tlink:hover { color: var(--accent); text-decoration: underline; }
.crumb .tlink { color: var(--muted); }

/* drawer extras */
.sub-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.sub-label svg { width: 14px; height: 14px; }
.sub-row { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 6px; }
.sub-row:hover { background: var(--surface-2); }
.sub-row .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-row.on .txt { text-decoration: line-through; color: var(--muted); }
.tag-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.props > div > select { max-width: 280px; width: 100%; }
.files { display: grid; gap: 6px; margin-bottom: 8px; }
.file { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; }
.fthumb { width: 44px; height: 44px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--muted); }
.fthumb img { width: 100%; height: 100%; object-fit: cover; }
.fthumb svg { width: 20px; height: 20px; }
.fname { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname span { display: block; font-size: 12px; color: var(--muted); }
.file .x { border: 0; background: none; cursor: pointer; color: var(--faint); font-size: 18px; padding: 0 6px; }
.file .x:hover { color: var(--danger); }

/* popover (tag picker) */
.pop { position: fixed; z-index: 70; width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; }
.pop .input { height: 34px; margin-bottom: 6px; }
.pop-list { max-height: 220px; overflow-y: auto; }
.pop-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; padding: 6px; border-radius: 6px; cursor: pointer; }
.pop-list button:hover { background: var(--surface-2); }
.pop-list button[hidden] { display: none; }
.tickmark { color: var(--accent); font-weight: 700; }
.pop-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }

/* status + tag editors */
.st-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.st-row .input { height: 34px; }
.st-row input.input { flex: 1; min-width: 0; }
.st-row select.input { width: 120px; flex: none; padding: 0 6px; }
.st-color { width: 26px; height: 26px; border-radius: 7px; border: 0; cursor: pointer; flex: none; }
.st-row .btn.sm { padding: 0 8px; }
.modal { max-width: 520px; }

/* table view */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; min-width: 860px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.th-sort { border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; }
.th-sort:hover { color: var(--text); }
.tbl td { padding: 5px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl tr.done .tlink { color: var(--muted); text-decoration: line-through; }
.tbl .c-title { min-width: 220px; font-weight: 500; }
.sub-of { font-size: 12px; color: var(--muted); font-weight: 400; }
.cell-sel { height: 30px; border: 1px solid transparent; border-radius: 6px; padding: 0 6px; background: color-mix(in srgb, var(--c, #8a94a6) 14%, #fff); color: color-mix(in srgb, var(--c, #8a94a6) 80%, #000); font-weight: 600; font-size: 13px; cursor: pointer; }
.cell-sel.plain { background: transparent; color: var(--text); font-weight: 400; }
.cell-sel:hover, .cell-date:hover { border-color: var(--border-2); }
.cell-date { height: 30px; border: 1px solid transparent; border-radius: 6px; padding: 0 6px; background: transparent; font-size: 13px; }
.cell-date.late { color: var(--danger); font-weight: 600; }
.tbl-add td { padding: 0; }
.tbl-add input { width: 100%; border: 0; height: 40px; padding: 0 12px; background: none; outline: none; }
.prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.prog .progress { width: 70px; }

/* overview */
.ov { max-width: 1100px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.tile .n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tile.bad .n { color: var(--danger); }
.tile.warn .n { color: var(--s-review); }
.tile.good .n { color: var(--ok); }
.ov-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { font-size: 14px; margin-bottom: 10px; }
.att-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 4px; border-bottom: 1px solid var(--border); cursor: pointer; text-align: left; }
.att-row:last-child { border-bottom: 0; }
.att-row:hover { background: var(--surface-2); }
.att-row .dot, .bar-row .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.att-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(70px, 1.4fr) 36px; align-items: center; gap: 10px; padding: 5px 0; width: 100%; border: 0; background: none; text-align: left; }
.bar-row.list-row { cursor: pointer; border-radius: 6px; }
.bar-row.list-row:hover { background: var(--surface-2); }
.bar-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar-row .who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; background: #eceef2; border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; min-width: 2px; }
.bar.green i { background: var(--ok); }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

/* notifications */
.notifs { display: grid; gap: 2px; margin: 0 -8px; max-height: 60vh; overflow-y: auto; }
.notif { display: flex; gap: 10px; align-items: flex-start; border: 0; background: none; text-align: left; padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-soft); }
.notif.unread .ntext { font-weight: 600; }
.nicon { width: 28px; height: 28px; border-radius: 50%; background: #eef0f4; display: grid; place-items: center; flex: none; color: var(--muted); }
.nicon svg { width: 15px; height: 15px; }
.nicon .at { color: var(--accent); font-size: 15px; }
.ntext { flex: 1; min-width: 0; font-weight: 400; }
.nmeta { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
@media (max-width: 480px) { .tab span { display: none; } .tab { padding: 5px 10px; } }
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .ov-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: minmax(0, 1fr) minmax(70px, 1.2fr) 32px; }
}

/* reminders + calendar window */
.opt-sec { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.opt-sec h3 { font-size: 14px; margin-bottom: 8px; }
.switch-row { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.switch-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.ok-line { color: var(--ok); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }

/* Icelandic holidays + deadlines */
.day.we { background: #fafbfc; }
.day.hol { background: #fff7f7; }
.day.hol .num { color: var(--danger); }
.day.hol.today .num { color: #fff; background: var(--danger); }
.holname { font-size: 11px; color: var(--danger); font-weight: 600; line-height: 1.25; margin: -2px 0 4px; }
.hint.warn { color: #b45309; }
.dl-row { align-items: flex-start; padding: 6px 0; }
.dl-row input { margin-top: 3px; flex: none; }
.dl-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.dl-preview ul { margin: 6px 0 0; padding-left: 18px; }
.dl-preview li { margin: 2px 0; }
.dl-date { display: inline-block; min-width: 64px; color: var(--muted); font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.hol-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hol-head h2 { margin: 0; }
.hol-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hol-item { background: #fff7f7; border-radius: 8px; padding: 8px 10px; }
.hol-item b { display: block; font-size: 13.5px; color: #9f1d1d; }
.hol-item span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .hol-list { grid-template-columns: 1fr 1fr; } .grid2 { grid-template-columns: 1fr; } }

/* priority flags */
.pbtn { border: 0; background: none; padding: 3px 6px; margin: -3px -6px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--text); }
.pbtn:hover { background: var(--surface-2); }
.pbtn svg, .pri-pick svg, .pri-pop svg { width: 14px; height: 14px; }
.p-urgent svg { color: var(--p-urgent); } .p-high svg { color: var(--p-high); } .p-normal svg { color: var(--p-normal); } .p-low svg { color: var(--p-low); }
.pbtn.p-urgent span { color: var(--p-urgent); font-weight: 600; }
.pbtn.p-low span { color: var(--muted); }
.row.pri-urgent { background: #fff6f5; }
.row.pri-urgent:hover { background: #ffeeec; }
.row.pri-urgent .title .t { font-weight: 600; }
.pri-m { display: none; }
.card.pri-urgent { border-color: #f2b8b3; background: #fffafa; }
.card .pbtn.p-urgent { background: #fde8e6; margin: 0; padding: 2px 7px; }
.card .pbtn { margin: 0; padding: 2px 4px; }
.pri-sel { color: color-mix(in srgb, var(--c) 85%, #000); font-weight: 600; }
.pri-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.pri-pick label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.pri-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pri-pick label:has(input:checked) { border-color: var(--accent); background: #eef4fd; font-weight: 600; }
.pri-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.pri-pop { width: 180px; }
.pri-pop .flag { gap: 8px; font-size: 13.5px; }
@media (max-width: 900px) { .pri-m { display: inline-flex; } .pri-m .pbtn { margin: 0 -2px 0 0; padding: 2px; } }

/* ---- layout A: sidebar sections ---- */
.side-label:first-child { padding-top: 8px; }
.nav-item .count.hot { background: #e5484d; color: #fff; font-weight: 700; border-radius: 999px; min-width: 19px; height: 19px; padding: 0 5px; display: inline-grid; place-items: center; font-size: 11px; }
.nav-av { width: 20px; height: 20px; font-size: 11px; margin-left: -2px; }

/* ---- layout A: task window ---- */
.drawer-body { padding-bottom: 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.d-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.pill-sel { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 13%, #fff); color: color-mix(in srgb, var(--c) 82%, #000); font-weight: 600; font-size: 12.5px; }
.pill-sel:hover { background: color-mix(in srgb, var(--c) 20%, #fff); }
.pill-sel:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.pill-sel .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pill-sel svg { width: 13px; height: 13px; color: var(--c); }
.pill-sel select { appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; font: inherit; padding: 0 2px 0 0; cursor: pointer; outline: none; }
.d-chips .tag-add { height: 28px; border-radius: 999px; color: var(--muted); }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 18px; }
.cell { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; min-width: 0; cursor: pointer; transition: border-color .12s, background .12s; }
.cell:hover { border-color: var(--border-2); background: var(--surface-2); }
.cell:focus-within { border-color: var(--accent); }
.cell.ro { cursor: default; background: var(--surface-2); }
.cell.ro:hover { border-color: var(--border); }
.cell small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cell.late small { color: var(--danger); }
.cell select, .cell input { border: 0; background: none; padding: 0; height: 24px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); width: 100%; min-width: 0; outline: none; cursor: pointer; }
.cell.late input { color: var(--danger); }
.cell select:disabled { color: var(--faint); cursor: not-allowed; }
.cell .cv { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cell .cv .av { flex: none; }
.cell .cv-txt { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.cell .hint { margin: 0; font-size: 12px; }
.cell .hint.warn, .cell .hint { display: block; }
.cell .tlink { color: var(--accent); font-size: 12px; }
.dtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.dtab { border: 0; background: none; padding: 8px 10px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; display: inline-flex; align-items: center; gap: 6px; }
.dtab:hover { color: var(--text); }
.dtab.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.dtab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.tcnt { font-size: 11.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 0 6px; line-height: 17px; }
.dpanel { margin-bottom: 22px; }
.dpanel .desc { min-height: 110px; }
.progress.wide { display: block; width: 100%; max-width: none; margin: 0 0 8px; }
.csec { border-top: 1px solid var(--border); padding-top: 16px; margin-bottom: 0; }
.cform.dock { display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.cform.dock .mwrap { flex: 1; }
.cform.dock textarea { min-height: 38px; height: 38px; max-height: 140px; resize: none; padding: 8px 11px; line-height: 1.4; display: block; }
.cform.dock .btn { height: 38px; padding: 0 16px; }
@media (max-width: 900px) { .cells { grid-template-columns: 1fr 1fr; gap: 6px; } .cell { padding: 7px 9px; } .cform.dock { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); } }
@media (max-width: 340px) { .cells { grid-template-columns: 1fr; } }

/* job sheet (Verkblað) */
.job .jintro { margin: 0 0 10px; }
.jl { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.job > .jl:first-of-type { margin-top: 4px; }
.jphotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jpg { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.jpg-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.jpg .hint { margin: 0; font-size: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.th { position: relative; aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(15,26,43,.65); color: #fff; cursor: pointer; line-height: 1; }
.jtable { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.jrow { display: grid; grid-template-columns: 1fr 1fr 28px; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.jrow:last-child { border-bottom: 0; }
.jrow .k { color: var(--muted); }
.jrow .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.jrow .x, .citem .x { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 16px; }
.cadd input.narrow { flex: 0 0 120px; }
.citem .qty { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
@media (max-width: 520px) { .jphotos { grid-template-columns: 1fr; } .cadd input.narrow { flex-basis: 90px; } }
.jbox { min-height: 96px; }
.jl .tcnt { text-transform: none; letter-spacing: 0; }
.cadd input { min-width: 0; }
@media (max-width: 520px) { .job .cadd { flex-wrap: wrap; } .job .cadd input:first-child { flex: 1 1 100%; } .job .cadd input.narrow { flex: 1 1 0; } }

/* ---------- phone polish ---------- */
.row .title .tl { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.row .title .tl .t { overflow: hidden; text-overflow: ellipsis; }
.av-m { display: none; }
@media (max-width: 900px) {
  /* menu: bigger tap targets */
  .nav-item { padding: 10px 12px 10px 18px; font-size: 15px; }
  .side { width: min(300px, 86vw); }
  .side-label { padding-top: 18px; }
  /* header + toolbar: two tidy rows */
  .head { padding: 10px 14px 0; }
  .head .btn.sm { height: 34px; }
  .toolbar { padding: 10px 14px; gap: 8px; }
  .toolbar .tabs { flex: 1 1 100%; }
  .toolbar .tab { flex: 1; justify-content: center; padding: 7px 0; }
  .toolbar .spacer { display: none; }
  .search { order: 2; flex: 1 1 0; min-width: 0; width: auto; height: 36px; font-size: 16px; }
  .chip-select { order: 3; height: 36px; max-width: 96px; font-size: 14px; padding: 0 4px; }
  .content { padding: 12px 12px 90px; }
  /* list rows: title on its own line, details underneath */
  .rows-head { display: none; }
  .row { grid-template-columns: 28px 1fr auto; padding: 9px 12px; min-height: 52px; align-items: start; }
  .row .check { margin-top: 1px; }
  .row .title { flex-wrap: wrap; white-space: normal; row-gap: 5px; column-gap: 6px; }
  .row .title .tl { flex: 1 1 100%; font-size: 15px; }
  .row .title .tl .t { white-space: nowrap; }
  .row .title .tchip { font-size: 11px; }
  .row .meta { padding-top: 2px; }
  .av-m { display: inline-flex; }
  .row .meta:last-child { flex-direction: column; align-items: flex-end; gap: 5px; }
  .av-m .av { width: 20px; height: 20px; font-size: 11px; }
  .group-head { margin: 0 2px 6px; }
  /* board: one column per screen, swipe sideways */
  .board { min-width: 0 !important; grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 84vw; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; scroll-padding: 12px; }
  .board .col { scroll-snap-align: start; }
  /* windows slide up from the bottom */
  .modal-scrim { place-items: end stretch; padding: 0; }
  .modal { max-width: none !important; border-radius: 16px 16px 0 0; max-height: 88vh; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
  .modal .actions .btn { flex: 1; height: 44px; }
  .input, .modal select, .modal input, .drawer input, .drawer select, .drawer textarea { font-size: 16px; }
  /* task window: full screen */
  .drawer { width: 100vw; }
  .drawer-top { padding: 8px 10px 8px 14px; }
  .title-input { font-size: 20px; }
  .pill-sel { height: 32px; }
  .dtab { padding: 10px 10px; }
  .cell select, .cell input { height: 28px; }
}

/* calendar on phones: compact grid + day list */
.cal-scroll { overflow-x: auto; }
.cal-agenda { display: none; }
@media (max-width: 900px) {
  .cal-head { flex-wrap: wrap; gap: 6px; }
  .cal-head h2 { min-width: 0; flex: 1; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cal-head #dl-open { order: 10; flex: 1 1 100%; }
  .cal-head .spacer { display: none; }
  .cal { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal .wd { padding: 5px 0; text-align: center; font-size: 11px; }
  .day { min-height: 54px; padding: 4px 3px; cursor: pointer; display: grid; grid-template-columns: repeat(auto-fit, 7px); grid-auto-rows: 7px; align-content: start; justify-content: center; gap: 3px; }
  .day .num { grid-column: 1 / -1; grid-row: span 3; justify-self: center; margin: 0 0 1px; width: 24px; height: 24px; font-size: 12.5px; }
  .day .holname, .day .add { display: none; }
  .day .ev { width: 7px; height: 7px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: var(--c); font-size: 0; flex: none; pointer-events: none; }
  .day .ev.done { opacity: .35; }
  .cal-agenda { display: block; margin-top: 14px; }
  .ag-day { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; scroll-margin-top: 10px; transition: box-shadow .3s; }
  .ag-day.today { border-color: var(--accent); }
  .ag-day.flash { box-shadow: 0 0 0 3px rgba(47,111,214,.35); }
  .ag-h { display: flex; align-items: baseline; gap: 8px; padding: 8px 8px 6px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
  .ag-h b { font-size: 14px; }
  .ag-h span { flex: 1; font-size: 12.5px; color: var(--muted); }
  .ag-h .btn { height: 28px; padding: 0 10px; font-size: 16px; }
  .ag-ev { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: none; padding: 10px 12px; font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; color: var(--text); }
  .ag-ev:last-child { border-bottom: 0; }
  .ag-ev .pdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
  .ag-ev .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ag-ev.done .t { text-decoration: line-through; color: var(--muted); }
  .ag-ev .flag svg { width: 14px; height: 14px; }
}

/* beiðni: photo → tasks */
.scan-btn { cursor: pointer; }
.scan-btn svg { width: 16px; height: 16px; }
.tnr { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; color: #3b4a63; background: #e9eef7; border-radius: 6px; padding: 1px 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.modal.wide { max-width: 640px !important; }
.scan-wait { text-align: center; padding: 14px 0 6px; }
.scan-wait h2 { margin: 12px 0 4px; }
.spin { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.tk-all { font-size: 13px; color: var(--muted); margin: -4px 0 8px; }
.tk-all .tlink { color: var(--accent); }
.tk-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tk-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 12px; background: var(--surface); transition: opacity .15s; }
.tk-card.ex { border-color: #f1d18a; background: #fffcf3; }
.tk-card.off { opacity: .5; }
.tk-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.tk-top > input { width: 18px; height: 18px; accent-color: var(--accent); }
.tk-top .tnr { font-size: 13px; padding: 2px 6px; }
.tk-top .tnr input { border: 0; background: none; font: inherit; color: inherit; width: 7ch; padding: 0; outline: none; }
.tk-ex { font-size: 12px; color: #8a5a00; font-weight: 600; }
.tk-title { font-weight: 600; margin-bottom: 6px; }
.tk-desc { min-height: 54px; resize: vertical; margin-bottom: 8px; font-size: 14px; }
.tk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tk-f { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; min-width: 0; background: var(--surface); }
.tk-f:focus-within { border-color: var(--accent); }
.tk-f.wide { grid-column: span 3; }
.tk-f small { font-size: 11px; font-weight: 600; color: var(--muted); }
.tk-f input { border: 0; padding: 0; height: 22px; font: inherit; font-size: 13.5px; font-weight: 600; background: none; outline: none; min-width: 0; color: var(--text); }
.tk-photos { margin-top: 8px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .scan-l { display: none; }
  .scan-btn { width: 38px; padding: 0; }
  .tk-grid { grid-template-columns: 1fr 1fr; }
  .tk-f.wide { grid-column: span 2; }
  .tk-f input { font-size: 16px; }
}
.tk-f.loc-hidden { display: none; }
.tk-more { color: var(--accent); font-size: 12.5px; margin: 0 0 6px; display: block; }
.tnr.big { font-size: 12.5px; height: 28px; padding: 0 10px; border-radius: 999px; }

/* paste a screenshot */
.paste-prev { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 12px; border-radius: 8px; border: 1px solid var(--border); object-fit: contain; background: var(--surface-2); }
.paste-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.paste-opt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; cursor: pointer; }
.paste-opt:has(input:checked) { border-color: var(--accent); background: #eef4fd; }
.paste-opt input { margin-top: 3px; accent-color: var(--accent); }
.paste-opt b { display: block; font-size: 14px; }
.paste-opt small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.paste-opt:first-child { grid-column: span 2; }

/* drag rows in the list */
.row[draggable="true"] { -webkit-user-select: none; user-select: none; }
.row.dragging { opacity: .4; }
.group.over .rows { box-shadow: 0 0 0 2px rgba(47,111,214,.35); }
.row-line { height: 3px; margin: -1.5px 12px; border-radius: 2px; background: var(--accent); position: relative; z-index: 2; }

/* snip / paste hints and buttons */
kbd { display: inline-block; font: 600 11.5px/1 Inter, system-ui, sans-serif; padding: 3px 5px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--text); }
.snip-btn svg, .snip-actions svg { width: 14px; height: 14px; }
.snip-tip { display: flex; gap: 10px; align-items: flex-start; background: #eef4fd; border: 1px solid #cfe0f8; border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.6; margin: 0 0 12px; color: #1d3b66; }
.snip-tip svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--accent); }
.tk-snip { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tk-snip .hint { margin: 0; font-size: 12.5px; }
.jpg-b { display: inline-flex; gap: 6px; }
.snip-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 2px dashed #b9cdea; border-radius: 14px; padding: 26px 18px; background: #f6f9fe; color: #1d3b66; outline: none; margin-bottom: 12px; transition: border-color .15s, background .15s; }
.snip-zone:focus, .snip-zone.over { border-color: var(--accent); background: #eef4fd; }
.snip-zone > svg { width: 30px; height: 30px; color: var(--accent); }
.snip-zone b { font-size: 16px; }
.snip-zone span { font-size: 13.5px; line-height: 1.8; color: var(--muted); }
.snip-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (pointer: coarse) { .snip-tip, .tk-snip, .snip-btn { display: none; } }
.jpg-h { flex-direction: column; align-items: stretch; gap: 6px; }
.jpg-b { display: flex; gap: 6px; }
.jpg-b > * { flex: 1; }

/* ---------- quick add hint ---------- */
.qhint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); padding: 2px 0 6px; flex-basis: 100%; }
.qhint svg { width: 13px; height: 13px; color: var(--accent); flex: none; }
.qhint b { color: var(--accent-2); font-weight: 600; }
.qhint i { font-style: normal; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; color: var(--muted); }
.add-row { flex-wrap: wrap; }
.add-row .qhint { padding-left: 30px; margin-top: -6px; }
.board .qhint, .col .qhint { padding: 4px 2px; }
.modal .qhint { margin-top: 4px; }

/* ---------- timeline (Gantt) ---------- */
.g-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; background: #eceef2; padding: 3px; border-radius: 8px; margin-left: 6px; }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.g-tip { margin-left: auto; }
.gwrap { overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); max-height: calc(100vh - 230px); box-shadow: var(--shadow); }
.gt { --gl: 250px; position: relative; width: calc(var(--gl) + var(--gw)); }
.grow { display: flex; min-height: 38px; border-bottom: 1px solid #eef0f3; }
.grow .gl { position: sticky; left: 0; z-index: 3; width: var(--gl); flex: none; background: var(--surface); border-right: 1px solid var(--border); display: flex; align-items: center; gap: 8px; padding: 0 12px; min-width: 0; }
.grow .gl .tlink { display: flex; align-items: center; gap: 5px; min-width: 0; text-align: left; color: var(--text); }
.grow .gl .tlink span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow .gl .tlink:hover span:last-child { color: var(--accent); text-decoration: underline; }
.grow .gl .flag svg { width: 13px; height: 13px; }
.grow.done .gl .tlink { color: var(--faint); }
.grow.done .gl .tlink span:last-child { text-decoration: line-through; }
.grow .gr { position: relative; width: var(--gw); flex: none; }
.ghead { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--border); }
.ghead .gl { z-index: 6; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.gms { position: relative; height: 24px; border-bottom: 1px solid #eef0f3; }
.gds { position: relative; height: 30px; }
.gm { position: absolute; top: 0; height: 24px; border-left: 1px solid var(--border); font-size: 12px; font-weight: 600; padding: 4px 8px; white-space: nowrap; overflow: hidden; }
.gm span::first-letter { text-transform: uppercase; }
.gd { position: absolute; top: 0; height: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; color: var(--faint); line-height: 1.1; }
.gd b { font-weight: 600; color: var(--muted); font-size: 12px; }
.gd.we, .gd.hol { background: #f6f7f9; }
.gd.hol b { color: var(--danger); }
.gd.today b { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 6px; }
.ggroup { background: var(--surface-2); min-height: 34px; }
.ggroup .gl { background: var(--surface-2); font-weight: 600; }
.ggroup .gl .n { color: var(--muted); font-size: 12px; font-weight: 500; }
.gbody { position: relative; }
.gbg { position: absolute; top: 0; bottom: 0; left: var(--gl); width: var(--gw); pointer-events: none; }
.gbg i { position: absolute; top: 0; bottom: 0; background: rgba(16,24,40,.028); }
.gnow { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #e5484d; opacity: .75; }
.gbar { position: absolute; top: 7px; height: 24px; border-radius: 6px; background: var(--c); color: #fff; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 12px; font-weight: 500;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 1px 2px rgba(16,24,40,.18); overflow: hidden; z-index: 1; transition: box-shadow .15s; }
.gbar:hover { box-shadow: 0 2px 8px rgba(16,24,40,.25); }
.gbar.drag { cursor: grabbing; opacity: .9; box-shadow: 0 6px 16px rgba(16,24,40,.3); z-index: 4; transition: none; }
.gbar.done { opacity: .45; }
.gbar.late { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--danger); }
.gbar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.gbar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.gbar .gtx { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gbar .av { width: 18px; height: 18px; font-size: 8.5px; flex: none; box-shadow: 0 0 0 1.5px rgba(255,255,255,.9); }
.gh { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 2; }
.gh.l { left: 0; } .gh.r { right: 0; }
.gbar:hover .gh { background: rgba(255,255,255,.3); }
.gnone { position: sticky; left: calc(var(--gl) + 12px); display: inline-block; line-height: 38px; font-size: 12px; color: var(--faint); pointer-events: none; white-space: nowrap; }
.gtrack:has(.gnone) { cursor: copy; }
.gtrack:has(.gnone):hover { background: var(--accent-soft); }
.goff { position: absolute; top: 8px; font-size: 11.5px; border: 1px dashed var(--border-2); background: var(--surface); border-radius: 6px; padding: 2px 8px; cursor: pointer; color: var(--muted); }
.goff:hover { color: var(--accent); border-color: var(--accent); }
.goff.l { left: 6px; } .goff.r { right: 6px; }
.g-add { margin-top: 10px; }
.g-add input { width: 100%; height: 38px; border: 1px dashed var(--border-2); border-radius: 8px; padding: 0 12px; background: var(--surface); }
.g-add input:focus { outline: 2px solid rgba(47,111,214,.3); border-style: solid; border-color: var(--accent); }
@media (max-width: 900px) {
  .gt { --gl: 132px; }
  .g-tip { display: none; }
  .grow .gl { padding: 0 8px; font-size: 13px; }
  .gwrap { max-height: calc(100vh - 250px); }
  .gbar .gh { width: 12px; }
}

/* ---------- automations ---------- */
.modal .au-title { display: flex; align-items: center; gap: 8px; }
.modal .au-title svg { width: 20px; height: 20px; color: #d97706; }
.au-lead { margin: 4px 0 14px; }
.au-h { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.au-rules { display: flex; flex-direction: column; gap: 8px; }
.rule { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.rule.off { background: var(--surface-2); }
.rule.off .rt { color: var(--faint); }
.rule .rt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.rule .rt small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.arrow { color: #d97706; font-weight: 700; padding: 0 2px; }
.switch { position: relative; width: 36px; height: 20px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #cfd4dc; border-radius: 20px; transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid rgba(47,111,214,.4); outline-offset: 2px; }
.au-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.idea { text-align: left; border: 1px dashed var(--border-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.idea:hover { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.idea small { color: var(--muted); font-size: 12px; }
.idea .add { color: var(--accent); font-weight: 600; font-size: 12.5px; margin-top: 2px; }
.au-build { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.au-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.au-f > span:first-child { width: 48px; font-weight: 600; font-size: 13px; }
.au-f select.input { width: auto; flex: 1 1 170px; min-width: 0; height: 36px; }
.au-days { display: inline-flex; align-items: center; gap: 6px; }
.au-days input { width: 80px; height: 36px; }
.modal:has(.au-rules) { max-width: 680px; }
.au-f [hidden], .au-days[hidden] { display: none !important; }
@media (max-width: 600px) { .au-f > span:first-child { width: 100%; } .au-ideas { grid-template-columns: 1fr; } }

/* ---------- help ---------- */
.help h3 { font-size: 14px; margin: 16px 0 6px; }
.help h3:first-child { margin-top: 4px; }
.help ul { margin: 0; padding-left: 18px; line-height: 1.7; }
.help p { margin: 4px 0; }
.help code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 12.5px; }
.help .keys { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.modal:has(.help) { max-width: 600px; }

/* ---------- first steps card ---------- */
.gs-card { border: 1px solid #cfe0fb; background: linear-gradient(180deg, #f4f8ff, #fff); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.gs-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gs-h .progress { flex: 1 1 120px; max-width: 220px; }
.gs-h .btn { margin-left: auto; }
.gs-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gs-step { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 20px; padding: 6px 12px 6px 6px; cursor: pointer; font-size: 13px; }
.gs-step:hover { border-color: var(--accent); color: var(--accent); }
.gs-step.ok { color: var(--faint); text-decoration: line-through; background: var(--surface-2); }
.gs-c { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.gs-step.ok .gs-c { background: var(--ok); border-color: var(--ok); color: #fff; }
.gs-c svg { width: 12px; height: 12px; }
.gm span { display: inline-block; }

/* ---------- weather ---------- */
.wx-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); text-align: center; min-width: 0; }
.wx-day b { font-size: 12.5px; }
.wx-day .wx-i { font-size: 26px; line-height: 1.2; }
.wx-day .wx-t { font-weight: 600; font-size: 15px; }
.wx-day .wx-t small { font-weight: 500; color: var(--faint); font-size: 12px; }
.wx-day .wx-w { font-size: 12px; color: var(--muted); }
.wx-day .wx-x { font-size: 11px; color: var(--faint); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wx-day.windy { border-color: #f0c36b; background: #fff8e8; }
.wx-day.windy .wx-w { color: #a16207; font-weight: 600; }
.wx-day.storm { border-color: #f1a3a5; background: #fff1f1; }
.wx-day.storm .wx-w { color: var(--danger); font-weight: 600; }
select.input.wx-st { width: auto; height: 32px; flex: none; }
.wx-src { margin: 8px 0 0; font-size: 11.5px; color: var(--faint); }
.wx-src a { color: inherit; }
.wx-top { margin-bottom: 16px; }
.wx-mini { position: absolute; top: 6px; right: 24px; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; line-height: 1; }
.wx-mini b { font-size: 11px; font-weight: 600; color: var(--muted); }
.wx-mini.windy b { color: #a16207; } .wx-mini.storm b { color: var(--danger); }
.ag-h .wx-mini { position: static; }
.wx-due { color: var(--muted); }
.wx-due.windy { color: #a16207; } .wx-due.storm { color: var(--danger); }
.gt.wk .gds, .gt.wk .gd { height: 44px; }
.gd .gwx { font-style: normal; font-size: 14px; line-height: 1.15; }
@media (max-width: 900px) {
  .day .wx-mini { display: none; }
  .wx-days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 92px; overflow-x: auto; padding-bottom: 4px; }
}

/* ---------- landing: what's inside ---------- */
.show { max-width: 1120px; margin: 0 auto; padding: 20px 20px 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.show-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.show-item h3 { font-size: 17px; margin: 14px 0 6px; }
.show-item p { margin: 0; color: var(--muted); }
.show-mock { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; min-height: 118px; display: flex; flex-direction: column; justify-content: center; gap: 8px; overflow: hidden; }
.lq-in { display: block; background: var(--surface); border: 1px solid var(--accent); border-radius: 8px; padding: 9px 12px; font-size: 14px; box-shadow: 0 0 0 3px rgba(47,111,214,.15); }
.lq-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); margin-top: 8px; }
.lq-hint svg { width: 13px; height: 13px; color: var(--accent); }
.lq-hint b { color: var(--accent-2); font-weight: 600; }
.lg-days { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 11px; color: var(--faint); text-align: center; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.lg-row { position: relative; height: 24px; }
.lg-row i { position: absolute; top: 2px; height: 20px; border-radius: 5px; background: var(--c); color: #fff; font-style: normal; font-size: 11.5px; font-weight: 500; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.la { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; }
.la-sw { flex: none; width: 30px; height: 17px; border-radius: 17px; background: var(--ok); position: relative; }
.la-sw::after { content: ''; position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.lw { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lw span { display: flex; flex-direction: column; align-items: center; gap: 1px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 2px; font-weight: 600; font-size: 13px; }
.lw b { font-size: 11px; font-weight: 600; color: var(--muted); }
.lw em { font-style: normal; font-size: 20px; line-height: 1.25; }
.lw small { font-weight: 500; font-size: 10.5px; color: var(--muted); }
.lw .storm { border-color: #f1a3a5; background: #fff1f1; }
.lw .storm small { color: var(--danger); font-weight: 600; }
.pub-cta { max-width: 1120px; margin: 0 auto 50px; padding: 34px 20px; text-align: center; background: linear-gradient(180deg, #f4f8ff, #fff); border: 1px solid #cfe0fb; border-radius: 16px; }
.pub-cta h2 { font-size: 26px; letter-spacing: -.02em; }
.pub-cta p { color: var(--muted); margin: 8px 0 18px; }
@media (max-width: 900px) {
  .show { grid-template-columns: 1fr; }
  .pub-cta { margin: 0 16px 40px; }
}

/* ---------- layouts ---------- */
.modal:has(.lay-grid) { max-width: 880px; }
.lay-lead { margin: 4px 0 14px; }
.lay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.lay-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); transition: border-color .12s, box-shadow .12s; }
.lay-card:hover { border-color: var(--lc); }
.lay-card.on { border-color: var(--lc); background: var(--ls); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 22%, transparent); }
.lay-top { display: flex; align-items: center; gap: 8px; }
.lay-top b { font-size: 14.5px; }
.lay-ic { font-size: 20px; line-height: 1; }
.lay-ic.sm { font-size: 14px; width: 16px; text-align: center; }
.lay-now { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--lc); border: 1px solid var(--lc); border-radius: 10px; padding: 0 6px; }
.lay-desc { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.lay-prev { display: flex; flex-direction: column; gap: 5px; margin-top: auto; }
.lay-bar { height: 4px; border-radius: 2px; background: var(--lc); }
.lay-lists { display: flex; flex-wrap: wrap; gap: 3px; }
.lay-lists em { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 8px; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 75%, #000); white-space: nowrap; }
.lay-views { font-size: 11px; color: var(--faint); }
.lay-views b { color: var(--muted); font-weight: 600; }
.lay-opts { display: flex; flex-direction: column; gap: 8px; }
.lay-opts .check-line { display: block; font-size: 13.5px; cursor: pointer; }
.lay-opts .check-line input { margin: 0 6px 0 0; vertical-align: -2px; }
.lay-opts .check-line small { display: block; color: var(--faint); font-size: 12px; padding-left: 22px; }
.lay-opts .hint svg, .pin-set .hint svg { width: 13px; height: 13px; vertical-align: -2px; }
.pin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pin-in { letter-spacing: .3em; }
.ov.no-hol .hol-strip, .ov.solo .people { display: none; }
.ov.solo .ov-grid > .panel:first-child { grid-column: 1 / -1; }
/* PIN screen */
.lock-card { text-align: center; }
.lock-card .field { text-align: left; }
.lock-ic { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.lock-ic svg { width: 26px; height: 26px; }
.pin-big { height: 52px; font-size: 24px; text-align: center; letter-spacing: .5em; margin-bottom: 4px; }
.lock-card .btn.primary { margin-top: 10px; }
.lock-others a { white-space: nowrap; }
@media (max-width: 600px) { .lay-grid { grid-template-columns: 1fr 1fr; } .lay-desc { display: none; } .pin-row { grid-template-columns: 1fr; } }

/* v38: "Hvað er á myndinni?" and photos in the new-task window */
.paste-opts.kinds .paste-opt:first-child { grid-column: auto; }
@media (max-width: 480px) { .paste-opts.kinds { grid-template-columns: 1fr; } }
.ph-rev { display: flex; gap: 12px; align-items: center; margin: -4px 0 4px; }
.ph-rev img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex: none; background: var(--surface-2); }
.ph-rev p { margin: 0; font-size: 13.5px; }
.ph-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-keep { display: block; font-size: 13.5px; cursor: pointer; }
.ph-keep input { margin: 0 6px 0 0; vertical-align: -2px; accent-color: var(--accent); }
.nt-photo { display: flex; gap: 10px; align-items: flex-start; margin-top: -4px; }
.nt-photo > .btn { flex: none; cursor: pointer; }
.nt-ph:empty { display: none; }
.nt-ph { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.nt-ph img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.nt-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; }
.nt-ph small { flex-basis: 100%; font-size: 12px; }
.nt-x { color: var(--muted); }
.nt-acts .tlink { color: var(--accent); }
.nt-acts .nt-x { color: var(--muted); }
.field[hidden] { display: none; }
.nt-photo .btn svg { width: 16px; height: 16px; }
@media (max-width: 480px) { .modal:has(.kinds) .paste-prev { max-height: 130px; } }

/* v39: speak in things to do */
.nt-photo { flex-wrap: wrap; }
#nt-mic.rec { background: #fdecec; border-color: #e5a3a0; color: #b42318; }
.rec-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d92d20; margin-right: 2px; animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.vmode { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; margin: -4px 0 6px; }
.vmode label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.vmode input { accent-color: var(--accent); margin: 0; }

/* v42: create button in quick add, created date */
.add-row .add-go { flex: none; }
.add-row .qhint { flex-basis: 100%; }
.add-go:disabled { opacity: .45; cursor: default; }
textarea + .add-go { margin-top: 6px; }
.mini.cdate { white-space: nowrap; }

/* v43: quick microphone */
.modal.qv { text-align: center; max-width: 340px; padding: 26px 22px 18px; }
.qv-t { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.qv-h { color: var(--muted); font-size: 13.5px; margin: 6px 0; }
.qv-stop { width: 120px; height: 120px; border-radius: 50%; border: 0; margin: 14px auto 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: #d92d20; color: #fff; font-size: 20px; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: 0 0 0 8px #fdecec; }
.qv-stop .rec-dot { background: #fff; width: 14px; height: 14px; }
.qv-cancel { margin-top: 6px; }
.qv .spinner { margin: 18px auto 6px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line, #ddd); border-top-color: var(--accent); animation: qvspin .8s linear infinite; }
@keyframes qvspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qv .spinner { animation-duration: 2.4s; } }

/* v45: measurement table in the job sheet, and export */
.mt-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 4px; }
.mtab { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 14px; }
.mtab th, .mtab td { border-bottom: 1px solid var(--border); padding: 0; text-align: left; }
.mtab tbody tr:last-child td { border-bottom: 0; }
.mtab th { background: var(--surface-2); font-weight: 600; }
.mtab td + td, .mtab th + th { border-left: 1px solid var(--border); }
.mtab input { width: 100%; min-width: 70px; border: 0; background: transparent; color: inherit; font: inherit; padding: 9px 8px; }
.mtab th input { font-weight: 600; }
.mtab input:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--surface); }
.mt-hc { display: flex; align-items: center; }
.mt-n { width: 28px; text-align: center !important; color: var(--muted); font-size: 12px; }
.mt-d { width: 1%; white-space: nowrap; color: var(--muted); font-size: 12px; padding: 0 8px !important; }
.mt-e { width: 30px; }
.mt-x { border: 0; background: none; color: var(--muted); font-size: 17px; line-height: 1; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.mt-x:hover { color: var(--danger); background: rgba(127,127,127,.12); }
.mt-act { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.mt-act .spacer { flex: 1; }
.mt-act svg { width: 14px; height: 14px; vertical-align: -2px; }
.mx-opts { display: grid; gap: 8px; margin: 12px 0 4px; }
.mx-o { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; height: auto; text-align: left; white-space: normal; }
.mx-o span { font-weight: 400; color: var(--muted); font-size: 13px; }

/* v46: share a task */
.d-share { display: inline-flex; align-items: center; gap: 5px; }
.d-share svg { width: 14px; height: 14px; }
#sh-make svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.sh-link { display: flex; gap: 6px; margin: 10px 0 8px; }
.sh-link .input { flex: 1; min-width: 0; font-size: 13px; }
.sh-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sh-row .spacer { flex: 1; }
.sh-off { color: var(--danger); }

/* v47: multi-line cells, photos per row, full-screen sheet */
.mtab textarea { display: block; width: 100%; min-width: 130px; border: 0; background: transparent; color: inherit; font: inherit; line-height: 1.4; padding: 9px 8px; resize: none; overflow: hidden; }
.mtab textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--surface); }
.mtab td { vertical-align: top; }
.mtab .mt-n, .mtab .mt-d { padding-top: 10px !important; vertical-align: top; }
.mt-p { width: 1%; padding: 4px 6px !important; }
th.mt-p { color: var(--muted); font-size: 12px; font-weight: 600; padding: 0 8px !important; }
.mt-phs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; min-width: 36px; max-width: 150px; }
.mt-ph { position: relative; display: block; }
.mt-ph img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border); display: block; }
.mt-phx { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #1b2330; color: #fff; font-size: 12px; line-height: 18px; padding: 0; cursor: pointer; display: none; }
.mt-ph:hover .mt-phx, .mt-ph:focus-within .mt-phx, .big .mt-phx { display: block; }
.mt-cam { display: grid; place-items: center; width: 34px; height: 34px; border: 1px dashed var(--border-2); border-radius: 6px; color: var(--muted); cursor: pointer; }
.mt-cam:hover { color: var(--accent); border-color: var(--accent); }
.mt-cam svg { width: 17px; height: 17px; }
.mt-cam.busy { opacity: .5; pointer-events: none; }
.mt-hint { margin: 6px 0 0; }
.mt-act svg { width: 14px; height: 14px; vertical-align: -2px; }
.msheet-full { position: fixed; inset: 0; z-index: 55; background: var(--bg); display: flex; flex-direction: column; }
.msf-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--border); }
.msf-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msf-t small { color: var(--muted); font-size: 12px; }
.msf-t b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msf-body { flex: 1; overflow: auto; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.msf-body .msheet { max-width: 1400px; margin: 0 auto; }
.msf-body .mt-wrap { background: var(--surface); }
.mtab.big { font-size: 15px; }
.mtab.big textarea { min-width: 200px; padding: 11px 10px; }
.mtab.big .mt-ph img, .mtab.big .mt-cam { width: 48px; height: 48px; }
.mtab.big .mt-phs { max-width: 210px; }
/* iPhone zooms in on fields under 16px; keep table text at 16px on touch screens */
@media (pointer: coarse) { .mtab textarea, .mtab input { font-size: 16px; } }

/* full-screen sheet on a phone: one card per row, fields stacked under their column names */
@media (max-width: 700px) {
  .mtab.big { min-width: 0; display: block; }
  .mtab.big thead, .mtab.big tbody { display: block; }
  .mtab.big thead tr { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
  .mtab.big thead th { display: block; border: 1px solid var(--border) !important; border-radius: 6px; }
  .mtab.big thead th.mt-n, .mtab.big thead th.mt-p, .mtab.big thead th.mt-d, .mtab.big thead th.mt-e { display: none; }
  .mtab.big thead th input { width: 120px; min-width: 0; padding: 7px 8px; }
  .mtab.big tbody tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 12px 14px; border-top: 1px solid var(--border); }
  .mtab.big tbody td { display: block; grid-column: 1 / -1; border: 0 !important; padding: 0 !important; width: auto; }
  .mtab.big td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
  .mtab.big td textarea { min-width: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
  .mtab.big td.mt-n { grid-column: 1; grid-row: 1; text-align: left !important; font-size: 14px; font-weight: 700; color: var(--text); align-self: center; }
  .mtab.big td.mt-n::before { content: "Lína "; }
  .mtab.big td.mt-e { grid-column: 2; grid-row: 1; }
  .mtab.big td.mt-d { margin-top: 8px; }
  .mtab.big td.mt-d::before { content: "Skráð "; }
  .mtab.big .mt-phs { max-width: none; }
}

/* v48: Google Sheets */
.gs-btn { display: inline-flex; align-items: center; gap: 6px; }
.gs-btn svg { width: 15px; height: 15px; flex: none; }
.gs-on { display: inline-flex; align-items: center; gap: 2px; }

/* v50: Verkblað with only the Google Sheet button */
.msheet.gs-only .mt-act { margin-top: 0; }

/* v52: Minnisblað, a mini spreadsheet in Verkblað */
.gx-head { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; min-height: 32px; }
.gx-head .jl { margin: 0; flex: 1; }
.gx-head .msheet.gs-only { margin: 0; }
.gx-wrap { overflow: auto; max-height: 420px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--surface); }
table.gx { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.gx th { position: sticky; top: 0; z-index: 2; background: #f1f3f4; color: #5f6368; font-weight: 500; font-size: 12px; height: 24px; border-right: 1px solid #dadce0; border-bottom: 1px solid #c0c4c9; width: 120px; text-align: center; user-select: none; }
.gx th.gx-corner { left: 0; z-index: 3; width: 40px; }
.gx th.gx-r { position: sticky; left: 0; z-index: 1; width: 40px; border-bottom: 1px solid #dadce0; border-right: 1px solid #c0c4c9; }
.gx td { padding: 0; border-right: 1px solid #e2e3e5; border-bottom: 1px solid #e2e3e5; height: 26px; }
.gx-i { display: block; width: 100%; height: 26px; border: 0; padding: 0 6px; font: inherit; color: var(--text); background: transparent; outline: none; text-overflow: ellipsis; }
.gx-i:focus { box-shadow: inset 0 0 0 2px #1a73e8; background: var(--surface); text-overflow: clip; }
.gx th.gx-on, .gx tr.gx-on th.gx-r { background: #d3e3fd; color: #0b57d0; }
@media (max-width: 700px) { .gx th { width: 104px; } .gx-i { font-size: 16px; height: 32px; } .gx td { height: 32px; } }
.gx { width: calc(40px + 8 * 120px); }
@media (max-width: 700px) { .gx { width: calc(40px + 8 * 104px); } }

/* v57: named sheets in Verkblað */
.gx-name { font: inherit; font-size: 13px; font-weight: 600; color: var(--text); border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; margin-left: -6px; background: transparent; min-width: 0; width: 240px; max-width: 60%; }
.gx-name:hover { border-color: var(--border); }
.gx-name:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.gx-head .spacer { flex: 1; }
.gx-add { margin-top: 10px; }

/* v58: cells wrap so the whole text is readable */
.gx th { width: auto; }
.gx td { height: auto; vertical-align: top; }
.gx-i { resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 18px; padding: 4px 6px; height: 26px; min-height: 26px; text-overflow: clip; }
@media (max-width: 700px) { .gx td { height: auto; } .gx-i { line-height: 22px; padding: 5px 6px; height: 32px; min-height: 32px; } }

/* v59: archive (Geymd verkefni) */
.gh-act { margin-left: auto; display: flex; gap: 6px; align-items: center; font-weight: 500; }
.gh-arch svg, .pick-bar .btn svg, #d-arch svg { width: 15px; height: 15px; margin-right: 5px; }
.col-head .gh-arch { margin-left: auto; height: 26px; padding: 0 8px; font-size: 12px; }
.row.picking { cursor: pointer; }
.row.picked { background: var(--accent-soft); }
.pickbox { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--border-2); display: grid; place-items: center; color: transparent; justify-self: center; }
.pickbox svg { width: 13px; height: 13px; }
.pickbox.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick-bar { position: sticky; bottom: 12px; z-index: 5; margin: 14px auto 0; width: fit-content; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 10px 8px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); }
.pick-bar .pb-n { font-weight: 600; font-size: 13px; margin-right: 4px; }
.arc-tools { display: flex; gap: 8px; margin: 4px 0 10px; flex-wrap: wrap; }
.arc-tools .search { flex: 1; min-width: 140px; }
.arc-list { max-height: min(52vh, 460px); overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.arc-all { display: flex; gap: 8px; align-items: center; padding: 8px 12px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.arc-row { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.arc-row:last-child { border-bottom: 0; }
.arc-row input, .arc-all input { width: 17px; height: 17px; flex: none; }
.arc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.arc-t .t { font-weight: 500; overflow-wrap: anywhere; }
.arc-t:hover .t { text-decoration: underline; }
.arc-t .muted { font-size: 12px; }
.arc-empty { padding: 22px 12px; text-align: center; color: var(--muted); margin: 0; }
@media (max-width: 700px) {
  .group-head { flex-wrap: wrap; }
  .pick-bar { bottom: 8px; left: 0; right: 0; width: auto; padding: 8px; }
  .pick-bar .pb-n { flex-basis: 100%; }
  .arc-row { padding: 10px; }
  .arc-row input { width: 20px; height: 20px; }
}

/* v60: delete next to archive */
.gh-del { color: var(--danger); }
.gh-del:hover:not(:disabled) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.arc-del { margin-right: auto; }
.arc-x { color: var(--muted); padding: 0 6px; }
.arc-x:hover { color: var(--danger); }
.arc-x svg { width: 15px; height: 15px; }

/* v61: trash (Eytt) tab + undo */
.arc-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 9px; margin: 2px 0 8px; }
.arc-tab { border: 0; background: none; padding: 6px 14px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.arc-tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.toast-undo { margin-left: 10px; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; pointer-events: auto; }

/* v62: phone list with swipes ("Símalisti með strokum") */
.fab { display: none; }
@media (max-width: 700px) {
  #new-task { display: none; }
  .fab { display: inline-flex; position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30; height: 50px; padding: 0 20px 0 16px; border-radius: 25px; border: 0;
    background: var(--accent); color: #fff; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; box-shadow: 0 6px 16px rgba(16,24,40,.24); }
  .fab svg { width: 20px; height: 20px; }
  .fab:active { transform: scale(.97); }
  /* rows become separate cards with room for a thumb */
  .group .rows { background: none; border: 0; border-radius: 0; overflow: visible; position: relative; }
  .group .row { position: relative; z-index: 1; background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 8px; padding: 12px; min-height: 58px; grid-template-columns: 34px 1fr auto; }
  .group .row.picked { background: var(--accent-soft); }
  .group .row.pri-urgent { background: #fff6f5; }
  .group .row .check { width: 26px; height: 26px; margin-top: 0; }
  .group .row .check svg { width: 14px; height: 14px; }
  .group .row .pickbox { width: 24px; height: 24px; }
  .row .title .tl .t, .row .title span.t { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .row .title .tl { overflow: visible; }
  .group .add-row { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); min-height: 48px; }
  .group-head { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 8px 2px 6px; margin: 0; }
  .swipe-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); text-align: center; }
  .row.swiping { box-shadow: 0 4px 14px rgba(16,24,40,.16); }
  .swipe-under { position: absolute; left: 0; right: 0; z-index: 0; border-radius: 12px; background: var(--border); display: flex; align-items: center; padding: 0 18px; color: #fff; font-weight: 600; font-size: 14px; }
  .swipe-under span { display: inline-flex; gap: 8px; align-items: center; opacity: .75; transition: opacity .12s, transform .12s; }
  .swipe-under.ready span { opacity: 1; transform: scale(1.06); }
  .swipe-under svg { width: 18px; height: 18px; }
  .swipe-under.to-l { justify-content: flex-end; }
  .swipe-under.sw-done { background: var(--s-done); }
  .swipe-under.sw-undo { background: var(--muted); }
  .swipe-under.sw-next { background: var(--s-doing); }
}

/* v62: calm list (one card, one heading row, one add field, finished folded) */
.top-add { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; min-height: 44px; margin-bottom: 12px; }
.top-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.top-add .ta-plus { color: var(--faint); display: grid; place-items: center; }
.top-add .ta-plus svg { width: 16px; height: 16px; }
.top-add input { flex: 1; border: 0; outline: 0; background: none; height: 42px; font-size: 14px; min-width: 0; }
.list-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.list-card .rows-head { border-bottom: 1px solid var(--border); padding: 9px 12px; margin: 0; }
.list-card .group { margin: 0; }
.list-card .group + .group { border-top: 1px solid var(--border); }
.list-card .group-head { padding: 12px 12px 6px; margin: 0; font-size: 13px; }
.list-card .group.empty .group-head, .list-card .group.folded .group-head { padding-bottom: 12px; }
.list-card .rows { border: 0; border-radius: 0; background: none; }
.list-card .rows:empty { min-height: 0; }
.list-card .row { border-bottom: 0; border-top: 1px solid #f0f2f5; }
.gdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gname { font-weight: 600; }
.gnone { margin-left: auto; color: var(--faint); font-weight: 400; font-size: 12.5px; }
.gfold { border: 0; background: none; padding: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); margin-left: -4px; }
.gfold:hover { background: var(--surface-2); }
.gfold svg { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .15s; }
.group.folded .gfold svg { transform: none; }
.group-head .gh-act + .gnone, .group-head .gh-act ~ .gnone { display: none; }
@media (min-width: 701px) {
  .list-card .row, .list-card .rows-head { grid-template-columns: 26px 1fr 140px 104px; }
  .list-card .c-pri { display: none; }
}
.row .cdate { white-space: nowrap; }
.arch-hits { margin-top: 18px; }
.arch-hits .rows { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.arch-hits .row { grid-template-columns: 26px 1fr 140px 104px; }
.arch-hits .row .c-pri { display: none; }
.arch-ic { color: var(--faint); display: grid; place-items: center; }
.arch-ic svg { width: 16px; height: 16px; }
.arch-hits .group-head { margin-bottom: 6px; }
@media (max-width: 700px) {
  .top-add { display: none; }
  .list-card { background: none; border: 0; border-radius: 0; overflow: visible; }
  .list-card .group + .group { border-top: 0; }
  .list-card .group-head { padding: 10px 2px 6px; }
  .list-card .group { margin-bottom: 6px; }
  .list-card .row { border-top: 0; }
  .arch-hits .rows { background: none; border: 0; overflow: visible; }
  .arch-hits .row { grid-template-columns: 34px 1fr auto; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 8px; padding: 12px; }
}

/* whole titles, never cut with "…" */
.list-card .row .title, .arch-hits .row .title { white-space: normal; flex-wrap: wrap; row-gap: 3px; padding: 9px 0; }
.list-card .row .title .tl, .list-card .row .title .tl .t, .list-card .row .title span.t { overflow: visible; white-space: normal; text-overflow: clip; }
.top-add { flex-wrap: wrap; }
.top-add .hint, .top-add .qhint { flex-basis: 100%; }
.top-add:not(:focus-within) .qhint, .top-add:not(:focus-within) .add-go:disabled { display: none; }
.top-add .qhint { padding-bottom: 8px; }
@media (max-width: 700px) { .list-card .row .title, .arch-hits .row .title { padding: 0; } .list-card .group .row { min-height: 0; } }
