:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --sidebar: #f4efe7;
  --hover: rgba(60, 45, 20, 0.06);
  --text: #2b2a33;
  --muted: #8a8794;
  --line: #ece6dc;
  --accent: #7c6cf2;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --danger: #e9566b;
  --danger-soft: rgba(233, 86, 107, 0.12);
  --warn: #e8960c;
  --warn-soft: rgba(242, 179, 61, 0.18);
  --ok: #3fae5b;
  --shadow: 0 1px 2px rgba(40, 30, 10, 0.05), 0 8px 24px rgba(40, 30, 10, 0.06);
  --shadow-lg: 0 20px 60px rgba(40, 30, 10, 0.18);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161c;
    --surface: #211f28;
    --sidebar: #1c1a22;
    --hover: rgba(255, 255, 255, 0.05);
    --text: #edebf2;
    --muted: #9893a6;
    --line: #2e2b37;
    --accent: #9184ff;
    --danger-soft: rgba(233, 86, 107, 0.18);
    --warn: #f2b33d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }

.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; padding: 4px 10px 16px; }
.brand-logo { font-size: 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  border: 0; background: transparent; text-align: left; width: 100%;
  font-weight: 600; color: var(--text);
  transition: background .15s;
}
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--surface); box-shadow: var(--shadow); }
.nav-item .ni-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.nav-item .ni-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .ni-count { font-size: 13px; color: var(--muted); font-weight: 700; min-width: 20px; text-align: right; }
.nav-item .ni-count.alert { color: var(--danger); }
.nav-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 10px 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.new-list-cta {
  display: flex; align-items: center; gap: 10px; margin-top: 4px;
  padding: 9px 10px; border-radius: 10px; border: 1.5px dashed var(--line);
  background: transparent; color: var(--muted); font-weight: 700;
}
.new-list-cta:hover { color: var(--accent); border-color: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.notify-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); font-size: 13.5px; }
.notify-card p { margin: 0 0 10px; color: var(--muted); }
.notify-card strong { display: block; margin-bottom: 4px; font-size: 14px; }
.notify-ok { font-size: 13px; color: var(--muted); padding: 8px 10px; }

/* ---------- Buttons ---------- */
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.small { width: 26px; height: 26px; border-radius: 8px; }
.icon-btn.small svg { width: 16px; height: 16px; }
.btn { border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: transform .1s, background .15s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: var(--hover); }
.btn.danger-ghost { background: transparent; color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.small { padding: 6px 12px; font-size: 13.5px; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; overflow-y: auto; padding: 36px 48px 80px; }
.main > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.main-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.menu-btn { display: none; }
.title-wrap { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.view-emoji { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
h1 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -.01em; line-height: 1.15; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.head-actions { display: flex; gap: 6px; align-items: center; }

.progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.progress svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.progress circle { stroke-width: 4; fill: none; }
.progress .track { stroke: var(--line); }
.progress .bar { stroke: var(--ok); transition: stroke-dashoffset .5s ease; }

/* ---------- Composer ---------- */
.composer {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1.5px solid transparent; transition: border-color .15s; margin-bottom: 26px;
}
.composer.focused { border-color: var(--accent); }
.composer-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; }
.composer-plus { color: var(--accent); display: grid; }
.composer-plus svg { width: 22px; height: 22px; }
#composerInput { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; padding: 8px 0; min-width: 0; }
#composerInput::placeholder { color: var(--muted); }
.composer-extra { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.composer:not(.open) .composer-extra { display: none; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); background: transparent;
  padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--text);
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip svg { width: 16px; height: 16px; }
.chip.on, .chip.toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.ghost { border-color: transparent; color: var(--muted); }
.select-chip { position: relative; padding-right: 6px; }
.select-chip select, .field-chip select, .field-chip input { border: 0; background: transparent; outline: 0; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.field-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13.5px; }
.field-chip:focus-within { border-color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ts-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--accent-soft); }
.detected { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-weight: 700; font-size: 13.5px; }
.detected button { border: 0; background: transparent; color: inherit; padding: 0 4px; font-size: 16px; line-height: 1; opacity: .7; }
.detected button:hover { opacity: 1; }

/* ---------- Tasks ---------- */
.group { margin-bottom: 26px; }
.group-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px 4px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.group-head.danger { color: var(--danger); }
.group-head .count { background: var(--hover); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.group-head button { margin-left: auto; text-transform: none; letter-spacing: 0; }
.collapse-btn { border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; padding: 0; }
.collapse-btn svg { transition: transform .2s; width: 16px; height: 16px; }
.collapse-btn[aria-expanded="false"] svg { transform: rotate(-90deg); }

.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.task {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border-radius: 12px; padding: 12px 12px 12px 14px;
  box-shadow: var(--shadow); cursor: pointer; position: relative;
  transition: transform .15s, box-shadow .15s, opacity .35s;
  animation: pop-in .25s ease both;
}
.task:hover { transform: translateY(-1px); }
.task.selected { outline: 2px solid var(--accent); }
.task.leaving { opacity: 0; transform: translateX(16px); }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } }

.check {
  --c: var(--accent);
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  border: 2px solid var(--c); background: transparent; display: grid; place-items: center; padding: 0;
  transition: background .2s, transform .15s;
}
.check svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; transform: scale(.4); transition: all .2s; }
.check:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.check:hover svg { opacity: .9; transform: scale(1); stroke: var(--c); }
.check.done { background: var(--c); }
.check.done svg { opacity: 1; transform: scale(1); stroke: #fff; }
.check:active { transform: scale(.85); }
.check.big { width: 28px; height: 28px; margin-top: 4px; }

.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; line-height: 1.4; word-wrap: break-word; }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.task-meta:empty { display: none; }
.meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: var(--hover); }
.meta svg { width: 13px; height: 13px; }
.meta.overdue { color: var(--danger); background: var(--danger-soft); }
.meta.soon { color: var(--warn); background: var(--warn-soft); }
.meta.today { color: var(--accent); background: var(--accent-soft); }
.meta.all-done { color: var(--ok); }
.task-del { opacity: 0; border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.task:hover .task-del { opacity: 1; }
.task-del:hover { color: var(--danger); background: var(--danger-soft); }

/* Empty */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 56px; margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- Drawer ---------- */
.drawer {
  width: 380px; flex-shrink: 0; background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  margin-right: -380px; transition: margin-right .25s ease;
}
.drawer.open { margin-right: 0; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.d-title { flex: 1; border: 0; outline: 0; background: transparent; font-size: 20px; font-weight: 800; resize: none; overflow: hidden; padding: 4px 0; line-height: 1.35; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 22px; }
.drawer-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.d-field { display: flex; flex-direction: column; gap: 8px; }
.d-label { font-weight: 800; font-size: 14px; }
.d-label.sm { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 4px; }
.drawer select, .drawer input[type="date"], .drawer input[type="time"], .drawer textarea:not(.d-title), .dialog input[type="text"] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--bg); outline: 0;
}
.drawer select:focus, .drawer input:focus, .drawer textarea:not(.d-title):focus, .dialog input:focus { border-color: var(--accent); }
.drawer textarea { resize: vertical; }
.hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--line); position: relative; flex-shrink: 0; transition: background .2s; padding: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(18px); }
.d-ts { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; background: var(--accent-soft); }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Subtasks */
.sub-count { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.subtasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.subtasks:empty { display: none; }
.sub { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 6px; border-radius: 10px; }
.sub:hover { background: var(--hover); }
.check.small { width: 20px; height: 20px; margin-top: 0; }
.check.small svg { width: 12px; height: 12px; }
.sub-title { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 5px 0; font-weight: 600; }
.sub.is-done .sub-title { color: var(--muted); text-decoration: line-through; }
.sub-del { opacity: 0; border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; padding: 0; }
.sub-del svg { width: 14px; height: 14px; }
.sub:hover .sub-del, .sub:focus-within .sub-del { opacity: 1; }
.sub-del:hover { color: var(--danger); background: var(--danger-soft); }
.sub-add { display: flex; align-items: center; gap: 10px; padding: 4px 6px; color: var(--muted); border-radius: 10px; }
.sub-add:focus-within { color: var(--accent); background: var(--hover); }
.sub-add svg { width: 20px; height: 20px; }
.sub-add input { flex: 1; border: 0; outline: 0; background: transparent; padding: 5px 0; }

/* ---------- Dialog ---------- */
.dialog { border: 0; border-radius: 20px; padding: 24px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(20, 15, 30, .35); backdrop-filter: blur(3px); }
.dialog h2 { margin: 0 0 16px; font-size: 22px; }
.list-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.lp-emoji { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.list-preview input { font-size: 17px; font-weight: 700; }
.emoji-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; margin-bottom: 16px; }
.emoji-grid button { border: 0; background: transparent; font-size: 20px; aspect-ratio: 1; border-radius: 10px; padding: 0; }
.emoji-grid button:hover { background: var(--hover); }
.emoji-grid button.on { background: var(--accent-soft); outline: 2px solid var(--accent); }
.color-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.color-grid button { width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; transition: transform .15s; }
.color-grid button:hover { transform: scale(1.12); }
.color-grid button.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px currentColor; }
.dialog-actions { display: flex; gap: 8px; align-items: center; }
.spacer { flex: 1; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 100; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: #2b2a33; color: #fff; border-radius: 14px; padding: 12px 12px 12px 16px;
  box-shadow: var(--shadow-lg); font-weight: 600; animation: toast-in .25s ease both;
}
.toast.out { animation: toast-out .2s ease both; }
.toast .t-msg { flex: 1; min-width: 0; }
.toast .t-msg small { display: block; opacity: .7; font-weight: 600; }
.toast button { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 13.5px; }
.toast button:hover { background: rgba(255,255,255,.22); }
.toast.reminder { background: var(--accent); }
.toast .t-icon { font-size: 22px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@media (prefers-color-scheme: dark) { .toast:not(.reminder) { background: #3a3745; } }

/* Confetti */
.confetti { position: fixed; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 200; }

.scrim { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .drawer { position: fixed; right: 0; top: 0; bottom: 0; z-index: 40; box-shadow: var(--shadow-lg); max-width: 100vw; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(20,15,30,.35); z-index: 45; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid; }
  .main { padding: 18px 16px 80px; }
  h1 { font-size: 24px; }
  .view-emoji { width: 40px; height: 40px; font-size: 22px; }
  .progress span { display: none; }
  .task-del { opacity: 1; }
  .sub-del { opacity: 1; }
  .drawer { width: 100vw; margin-right: -100vw; }
  .emoji-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Sidebar tools ---------- */
.nav.tools { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------- Steps shown under a task ---------- */
.row-subs { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.row-sub { display: flex; align-items: center; gap: 9px; padding: 3px 6px 3px 2px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.row-sub:hover { background: var(--hover); }
.row-sub.is-done span { color: var(--muted); text-decoration: line-through; }
.check.tiny { width: 18px; height: 18px; margin-top: 0; }
.check.tiny svg { width: 11px; height: 11px; }

/* ---------- Keep in Today until done ---------- */
.meta.pin { color: var(--warn); background: var(--warn-soft); }
.check-chip { cursor: pointer; user-select: none; }
.check-chip input, .check-row input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.check-chip:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check-row input { margin-top: 3px; flex-shrink: 0; }
.check-row b { display: block; font-size: 14px; }
.check-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- Notes ---------- */
.note-paper {
  --nc: #f2b33d;
  background: color-mix(in srgb, var(--nc) 9%, var(--surface));
  border-top: 6px solid var(--nc);
  border-radius: 18px; box-shadow: var(--shadow); padding: 26px 30px 40px; min-height: 60vh;
}
.note-title { width: 100%; border: 0; outline: 0; background: transparent; font-size: 26px; font-weight: 800; padding: 0 0 10px; }
.note-body { width: 100%; border: 0; outline: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.75; min-height: 45vh; overflow: hidden; }
.note-title::placeholder, .note-body::placeholder { color: var(--muted); }
.dot-btn { width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; margin: 0 2px; transition: transform .15s; }
.dot-btn:hover { transform: scale(1.15); }
.dot-btn.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px currentColor; }

/* ---------- Shared card ---------- */
.main.wide > * { max-width: 1120px; }
.card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 18px; margin: 0; font-weight: 800; flex: 1; }

/* ---------- Groceries ---------- */
.groc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 24px; align-items: start; }
.groc-list { position: sticky; top: 0; max-height: calc(100dvh - 160px); overflow-y: auto; }
.pill-count { background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 2px 10px; }
.groc-add { display: flex; gap: 8px; margin-bottom: 8px; }
.groc-add input, .pill-add input, .cat-head input {
  min-width: 0; border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 12px; outline: 0;
}
.groc-add input { flex: 1; }
.groc-add input:focus, .pill-add input:focus, .cat-head input:focus { border-color: var(--accent); }
.gl-cat { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 4px 6px; }
.gl-cat .btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.gl-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.gl-item { display: flex; align-items: center; gap: 12px; padding: 8px 6px 8px 8px; border-radius: 10px; cursor: pointer; font-weight: 600; user-select: none; }
.gl-item:hover { background: var(--hover); }
.gl-item .gl-name { flex: 1; min-width: 0; }
.gl-item.is-done .gl-name { color: var(--muted); text-decoration: line-through; }
.gl-item:hover .sub-del { opacity: 1; }
.gl-got { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 4px; }
.gl-empty { text-align: center; color: var(--muted); padding: 28px 10px; line-height: 1.6; font-weight: 600; }

.groc-catalog { display: flex; flex-direction: column; gap: 14px; }
.catalog-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.catalog-head .hint { margin-top: 2px; }
.cat { padding: 16px 18px; }
.cat-head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 12px; font-size: 15.5px; }
.cat-emoji-s { font-size: 20px; }
.cat-head .cat-emoji { width: 52px; text-align: center; font-size: 18px; padding: 5px; }
.cat-head .cat-name { flex: 1; font-weight: 800; padding: 6px 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1.5px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 14px;
  font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; transition: all .15s; user-select: none;
}
.pill svg { width: 14px; height: 14px; stroke-width: 3; }
.pill:hover { border-color: var(--accent); }
.pill:active { transform: scale(.94); }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.got { border-style: dashed; color: var(--muted); }
.pill.editing { padding: 3px 4px 3px 12px; background: var(--surface); gap: 4px; }
.pill.editing input { border: 0; outline: 0; background: transparent; font-weight: 700; font-size: 14px; padding: 4px 0; max-width: 180px; }
.pill.editing button { border: 0; background: var(--hover); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; padding: 0; color: var(--muted); }
.pill.editing button:hover { background: var(--danger-soft); color: var(--danger); }
.pill.editing button svg { width: 12px; height: 12px; }
.pill-add { display: inline-flex; }
.pill-add input { border-radius: 999px; border-style: dashed; width: 130px; padding: 7px 14px; font-size: 14px; background: transparent; font-weight: 600; }
.add-cat { justify-content: center; padding: 14px; }

/* ---------- Calculator ---------- */
.calc-wrap { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.calc { background: var(--surface); border-radius: 26px; padding: 18px; box-shadow: var(--shadow); }
.calc-display {
  background: var(--bg); border-radius: 18px; padding: 16px 18px 14px; text-align: right; margin-bottom: 16px;
  min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.calc-prev { color: var(--muted); font-weight: 700; min-height: 22px; font-size: 15px; word-break: break-all; }
.calc-main { font-size: 42px; font-weight: 800; word-break: break-all; line-height: 1.15; letter-spacing: -.01em; }
.calc-main.long { font-size: 30px; }
.calc-main.longer { font-size: 22px; }
.calc-main.err { font-size: 20px; color: var(--danger); }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.calc-keys button {
  aspect-ratio: 1.12; border: 0; border-radius: 18px; font-size: 22px; font-weight: 700; background: var(--bg);
  transition: transform .08s, background .15s;
}
.calc-keys button:hover { background: color-mix(in srgb, var(--text) 8%, var(--bg)); }
.calc-keys button:active { transform: scale(.93); }
.calc-keys .op { background: var(--accent-soft); color: var(--accent); font-size: 26px; }
.calc-keys .op:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.calc-keys .fn { color: var(--muted); }
.calc-keys .eq { background: var(--accent); color: #fff; font-size: 26px; }
.calc-keys .eq:hover { background: var(--accent); filter: brightness(1.08); }
.calc-history ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow-y: auto; }
.calc-history li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.calc-history li:hover { background: var(--hover); }
.h-expr { color: var(--muted); font-weight: 600; word-break: break-all; }
.h-res { font-weight: 800; font-size: 17px; white-space: nowrap; }

@media (max-width: 900px) {
  .groc { grid-template-columns: 1fr; }
  .groc-list { position: static; max-height: none; }
  .calc-wrap { grid-template-columns: 1fr; }
  .calc { max-width: 420px; width: 100%; margin: 0 auto; }
}
@media (max-width: 760px) {
  .note-paper { padding: 20px 18px 30px; }
  .pill.editing input { max-width: 130px; }
  .head-actions { flex-wrap: wrap; justify-content: flex-end; }
}

/* ---------- Language picker ---------- */
.lang-picker { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.lang-picker:hover { background: var(--hover); }
.lang-picker select { margin-left: auto; border: 1.5px solid var(--line); background: var(--surface); border-radius: 8px; padding: 4px 8px; font-weight: 700; font-size: 13.5px; color: var(--text); cursor: pointer; outline: 0; }
.lang-picker select:focus { border-color: var(--accent); }

/* ---------- Grocery quantities ---------- */
.qty-add {
  border: 1.5px dashed var(--line); background: transparent; color: var(--muted);
  width: 28px; height: 28px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  font-size: 16px; font-weight: 800; line-height: 1; opacity: 0; transition: opacity .15s, border-color .15s, color .15s;
}
.gl-item:hover .qty-add, .qty-add:focus-visible { opacity: 1; }
.qty-add:hover { border-color: var(--accent); color: var(--accent); }
.qty-step { display: inline-flex; align-items: center; background: var(--accent-soft); border-radius: 999px; padding: 2px; }
.qty-step button { border: 0; background: transparent; color: var(--accent); font-weight: 800; font-size: 15px; min-width: 26px; height: 26px; border-radius: 999px; padding: 0 6px; }
.qty-step button:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.qty-step .qty-val { min-width: 30px; color: var(--text); font-size: 14px; }
.qty-input { width: 84px; border: 1.5px solid var(--accent); border-radius: 999px; padding: 4px 10px; background: var(--surface); outline: 0; font-weight: 700; text-align: center; }
.qty-badge { font-size: 13px; font-weight: 800; color: var(--muted); }
.pill-qty { font-weight: 800; opacity: .9; }

/* ---------- Next 7 days strip ---------- */
.week { margin-bottom: 26px; }
.week .group-head { justify-content: flex-start; }
.link-btn { margin-left: auto; border: 0; background: transparent; color: var(--accent); font-weight: 800; font-size: 13px; padding: 2px 4px; border-radius: 6px; text-transform: none; letter-spacing: 0; }
.link-btn:hover { background: var(--accent-soft); }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ws-day {
  border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 14px; padding: 10px 4px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .15s, outline-color .15s;
  outline: 2px solid transparent;
}
.ws-day:hover { transform: translateY(-2px); outline-color: var(--accent-soft); }
.ws-day.is-today { outline-color: var(--accent); }
.ws-name { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-day.is-today .ws-name { color: var(--accent); }
.ws-num { font-size: 20px; font-weight: 800; line-height: 1.1; }
.ws-dots, .cd-dots { display: flex; gap: 3px; height: 7px; align-items: center; }
.ws-dots i, .cd-dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.ws-dots b, .cd-dots b { font-size: 10px; line-height: 7px; color: var(--muted); }
.ws-count { font-size: 12px; font-weight: 700; color: var(--muted); }
.ws-day.has .ws-count { color: var(--text); }

/* ---------- Calendar ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.cal { padding: 16px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.cal-head h2 { flex: 1; text-align: center; margin: 0; font-size: 18px; font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-day {
  position: relative; border: 0; background: transparent; border-radius: 12px; aspect-ratio: 1 / .92; min-height: 48px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 7px 2px 4px; transition: background .15s;
}
.cal-day:hover { background: var(--hover); }
.cal-day.out { opacity: .38; }
.cd-num { font-weight: 700; font-size: 15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cd-num { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.sel { background: var(--accent-soft); }
.cal-day.sel .cd-num { background: var(--accent); color: #fff; box-shadow: none; }
.cd-count { position: absolute; top: 4px; right: 6px; font-size: 10.5px; font-weight: 800; color: var(--muted); }
.cal-dayview .group-head { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); }
.empty.small { padding: 30px 10px; }
.empty.small .big { font-size: 40px; }
.empty.small h3 { font-size: 17px; }

/* Future repeats of a task */
.task.ghost { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); animation: none; }
.task.ghost .task-title { color: var(--muted); }
.ghost-icon { width: 24px; height: 24px; display: grid; place-items: center; flex-shrink: 0; opacity: .8; }

@media (max-width: 900px) {
  .cal-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .qty-add { opacity: .7; }
  .week-strip { gap: 5px; }
  .ws-day { padding: 8px 2px 7px; border-radius: 12px; }
  .ws-num { font-size: 17px; }
  .ws-count { font-size: 11px; }
  .cal { padding: 10px; }
  .cal-grid { gap: 2px; }
  .cd-num { width: 26px; height: 26px; font-size: 14px; }
  .cd-count { display: none; }
}

/* ---------- Drag & drop ---------- */
.grip {
  display: grid; place-items: center; color: var(--muted); cursor: grab; touch-action: none;
  opacity: 0; transition: opacity .15s;
}
.grip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.grip:active { cursor: grabbing; }
.task.sortable { padding-left: 26px; }
.task .grip { position: absolute; left: 4px; top: 12px; width: 20px; height: 24px; border-radius: 6px; }
.task:hover .grip { opacity: .7; }
.task .grip:hover { opacity: 1; background: var(--hover); }
.nav-item[data-sort-id] .ni-icon { position: relative; }
.nav-item .grip { position: absolute; inset: 0; border-radius: 8px; background: var(--surface); }
.nav-item:hover .grip { opacity: .95; }
.dragging { box-shadow: var(--shadow-lg) !important; opacity: .96; transform: scale(1.02) !important; animation: none !important; }
.sort-placeholder { list-style: none; border: 2px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); opacity: .6; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }
@media (hover: none) {
  .task .grip { opacity: .45; }
}

/* ---------- Calendar events ---------- */
.day-title { margin: 2px 0 12px; font-size: 18px; font-weight: 800; }
.events-card { margin-bottom: 22px; padding: 16px; }
.events-card .card-head h2 { font-size: 16px; }
.events-card .count, .card-head .count { background: var(--hover); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 800; color: var(--muted); }
.events-card .hint { margin: 0 0 12px; }
.ev-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; cursor: pointer;
  background: color-mix(in srgb, var(--ec) 12%, transparent); border-left: 4px solid var(--ec);
}
.ev:hover .sub-del { opacity: 1; }
.ev.editing { outline: 2px solid var(--ec); }
.ev-emoji { font-size: 20px; }
.ev-body { flex: 1; min-width: 0; }
.ev-title { font-weight: 700; word-wrap: break-word; }
.ev-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.ev-add { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--line); padding-top: 12px; }
.ev-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-kind { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.ev-kind:hover { border-color: var(--ec); }
.ev-kind.on { background: color-mix(in srgb, var(--ec) 18%, transparent); border-color: var(--ec); }
.ev-row { display: flex; gap: 8px; align-items: center; }
.ev-title-in, .ev-time { border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 12px; outline: 0; min-width: 0; }
.ev-title-in { flex: 1; }
.ev-time { width: 118px; }
.ev-title-in:focus, .ev-time:focus { border-color: var(--accent); }
.ev-yearly-row { align-items: center; font-weight: 700; font-size: 13.5px; }
.ev-yearly-row input { margin-top: 0; }
.day-hint { margin: 0 4px; }
.cd-ev { position: absolute; top: 3px; left: 5px; font-size: 11px; line-height: 1; }
.ws-ev { font-size: 11px; line-height: 1; height: 12px; }
.today-events { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 24px; }
.ev-chip {
  border: 0; border-left: 4px solid var(--ec); background: color-mix(in srgb, var(--ec) 12%, var(--surface));
  border-radius: 10px; padding: 8px 12px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; box-shadow: var(--shadow);
}
.ev-chip span { color: var(--muted); font-weight: 600; }
@media (max-width: 760px) {
  .ev-kind span { display: none; }
  .ev-time { width: 100px; }
}

/* ---------- Backup & restore ---------- */
.foot-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 10px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13.5px; text-align: left;
}
.foot-btn:hover { background: var(--hover); color: var(--text); }
.bk-dialog { width: min(520px, calc(100vw - 32px)); }
.bk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.bk-head h2 { margin: 0; }
.bk-dialog > .hint { margin: 0 0 14px; line-height: 1.5; }
.bk-status { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--accent-soft); margin-bottom: 18px; }
.bk-status > div { flex: 1; min-width: 0; }
.bk-status .hint { margin: 4px 0 0; }
.bk-status .btn { flex-shrink: 0; }
.bk-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.bk-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border-radius: 10px; background: var(--bg); }
.bk-list li > div { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-list small { color: var(--muted); font-weight: 600; }
.bk-tag { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 1px 8px; background: var(--hover); color: var(--muted); }
.bk-tag.bk-manual { background: var(--accent-soft); color: var(--accent); }
.bk-tag.bk-before-restore { background: var(--warn-soft); color: var(--warn); }
.bk-list .bk-empty { color: var(--muted); justify-content: center; padding: 16px; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
@media (max-width: 760px) {
  .bk-status { flex-direction: column; align-items: stretch; }
}

/* ---------- Calendar intake ---------- */
.events-card .ev-add { border-top: 0; padding-top: 0; }
.events-card .ev-add .btn.primary { flex-shrink: 0; }
.events-card .ev-title-in { font-size: 15px; padding: 10px 12px; }
.ev-opts { flex-wrap: wrap; row-gap: 6px; }
.ev-target { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.ev-target select { border: 1.5px solid var(--line); background: var(--bg); border-radius: 8px; padding: 4px 8px; font-weight: 700; font-size: 13.5px; color: var(--text); outline: 0; cursor: pointer; }
.ev-target select:focus { border-color: var(--accent); }
.events-card .ev-list { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.ev-hint { margin: 12px 0 0 !important; }

/* ---------- Weather in the 7-day strip ---------- */
.week .group-head .link-btn { margin-left: 0; }
.week .group-head .wx-link { margin-left: auto; color: var(--muted); }
.week .group-head .wx-link:hover { color: var(--accent); }
.ws-wx { display: flex; align-items: baseline; gap: 3px; font-size: 12.5px; line-height: 1.2; }
.ws-wx-icon { font-size: 15px; align-self: center; }
.ws-wx b { font-weight: 800; }
.ws-wx small { color: var(--muted); font-weight: 700; }
.wx-dialog { width: min(440px, calc(100vw - 32px)); }
.wx-dialog > .hint { margin: 0 0 14px; }
.wx-form { display: flex; gap: 8px; margin-bottom: 10px; }
.wx-form input { flex: 1; min-width: 0; border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; outline: 0; }
.wx-form input:focus { border-color: var(--accent); }
.wx-results { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wx-results .bk-empty { color: var(--muted); padding: 8px 4px; }
.wx-place { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: var(--bg); border-radius: 10px; padding: 9px 12px; text-align: left; }
.wx-place:hover { background: var(--accent-soft); }
.wx-place span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
@media (max-width: 760px) {
  .ws-wx small { display: none; }
  .ws-wx { font-size: 11.5px; }
  .week .group-head .wx-link { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Category emoji button + picker ---------- */
.cat-emoji-btn { border: 0; background: transparent; font-size: 20px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; padding: 0; flex-shrink: 0; transition: background .15s, transform .15s; }
.cat-emoji-btn:hover { background: var(--hover); transform: scale(1.08); }
.emoji-pop {
  position: fixed; z-index: 400; width: 300px; max-width: calc(100vw - 16px); padding: 8px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; animation: pop-in .15s ease both;
}
.emoji-pop button { border: 0; background: transparent; font-size: 20px; aspect-ratio: 1; border-radius: 8px; padding: 0; }
.emoji-pop button:hover { background: var(--accent-soft); }

/* quantities never wrap; long names wrap instead */
.qty-step { flex-shrink: 0; white-space: nowrap; }
.qty-step .qty-val { white-space: nowrap; }
.gl-item .gl-name { overflow-wrap: anywhere; }

/* 📌 next to the title of "keep in Today until done" tasks */
.pin-mark { display: inline-block; margin-left: 8px; font-size: 13px; line-height: 1; vertical-align: 1px; transform: rotate(-12deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); opacity: .9; transition: transform .2s; }
.task:hover .pin-mark { transform: rotate(0deg) scale(1.15); }

/* 📌 stuck into the checkbox of "keep in Today until done" tasks */
.check { position: relative; }
.check-pin { position: absolute; top: -13px; left: -12px; font-size: 17px; line-height: 1; pointer-events: none; transform: scaleX(-1) rotate(-10deg); filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); transition: transform .2s; }
.task:hover .check-pin { transform: scaleX(-1) rotate(-3deg) translateY(-1px); }
.pin-fly { position: fixed; z-index: 250; font-size: 17px; line-height: 1; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }

/* ---------- Login screen & account (cloud.js) ---------- */
.auth-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: var(--bg); }
.auth-card { width: min(380px, 100%); background: var(--surface); border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.auth-logo { font-size: 40px; line-height: 1; }
.auth-card h1 { margin: 0; font-size: 22px; }
.auth-card label { display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); }
.auth-card input { border: 1.5px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; outline: 0; font-size: 15px; }
.auth-card input:focus { border-color: var(--accent); }
.auth-card .btn { justify-content: center; padding: 11px 16px; }
.auth-msg { margin: 0; min-height: 1em; font-size: 13.5px; }
.auth-msg:empty { display: none; }
.auth-msg.err { color: var(--danger); }
.auth-msg .ok, .auth-msg.ok { color: var(--ok); }
.auth-links { display: flex; flex-direction: column; gap: 4px; }
.auth-links button { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 13.5px; padding: 4px; }
.auth-links button:hover { text-decoration: underline; }
.account-box { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.account-email { font-size: 12.5px; color: var(--muted); padding: 4px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-card .btn.google { background: var(--bg); border: 1.5px solid var(--line); color: var(--text); }
.auth-card .btn.google:hover { border-color: var(--muted); }
.g-logo { width: 18px; height: 18px; stroke: none; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
