:root {
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --accent: #6d5ef6;
  --sheet: #ffffff;
  --page: #f5f6fb;
  --text: #1c1d2b;
  --muted: #9094a6;
  --field: #f1f2f8;
  --field-focus: #ffffff;
  --card: #ffffff;
  --line: #ebecf3;
  --check-border: #d6d8e4;
  --faint: #c2c5d4;
  --del-active: #fdeaea;
  --card-shadow: 0 2px 10px rgba(60, 50, 130, 0.05);
  --danger: #ef4444;
  --radius: 18px;
}
html[data-theme="dark"] {
  --sheet: #161922;
  --page: #0d0f15;
  --text: #edeef4;
  --muted: #9499ac;
  --field: #232733;
  --field-focus: #2b3040;
  --card: #232733;
  --line: #333949;
  --check-border: #404659;
  --faint: #5a6072;
  --del-active: rgba(248, 113, 113, 0.16);
  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.38);
  --danger: #f87171;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; overflow: hidden;
}

/* ---------- gradient hero ---------- */
.hero {
  background: var(--grad);
  padding: calc(14px + env(safe-area-inset-top)) 20px 34px;
  color: #fff;
  position: relative;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-titles { min-width: 0; flex: 1; }
.hero-actions { display: flex; gap: 8px; flex-shrink: 0; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 8px;
  object-fit: cover; background: rgba(255,255,255,0.18);
  margin-right: 8px; flex-shrink: 0;
}
.hero h1 {
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
  margin: 0; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.18); color: #fff;
  padding: 3px 9px 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  margin-top: 5px; cursor: pointer; border: none;
}
.list-pill svg { width: 11px; height: 11px; opacity: 0.75; }
.date { font-size: 11px; font-weight: 500; opacity: 0.85; margin-top: 4px; }

.progress {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 9px 12px;
}
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.progress-top .count { font-size: 11px; font-weight: 600; opacity: 0.95; }
.progress-top .pct { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}
.bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #34d399, #22d3ee);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.55);
  transition: width 0.45s cubic-bezier(.4,0,.2,1);
}

/* hero icon buttons */
.hero-btn {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 10px;
  border: none; background: rgba(255, 255, 255, 0.18);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.12s, background 0.15s;
}
.hero-btn:active { transform: scale(0.88); background: rgba(255, 255, 255, 0.3); }
.hero-btn svg { width: 18px; height: 18px; display: block; }

/* ---------- white sheet ---------- */
.sheet {
  background: var(--sheet);
  border-radius: 22px 22px 0 0;
  margin-top: -22px;
  padding: 16px 16px 0;
  position: relative;
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
}

/* list */
ul.tasks {
  list-style: none; display: flex; flex-direction: column; gap: 10px;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 6px 16px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}
ul.tasks::-webkit-scrollbar { width: 8px; }
ul.tasks::-webkit-scrollbar-track { background: transparent; }
ul.tasks::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 999px; }
ul.tasks::-webkit-scrollbar-thumb:active { background: var(--muted); }

ul.tasks > li {
  display: flex; flex-direction: column;
  flex: 0 0 auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
ul.tasks > li.new {
  animation: pop 0.25s ease;
}
.task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--check-border); background: transparent;
  flex-shrink: 0; display: grid; place-items: center;
  cursor: pointer; transition: all 0.18s;
}
.check svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3.5; fill: none; opacity: 0; transition: opacity 0.15s; }
li.done .check { background: var(--accent); border-color: var(--accent); }
li.done .check svg { opacity: 1; }

.task-text { flex: 1; font-size: 16px; font-weight: 500; word-break: break-word; line-height: 1.35; cursor: pointer; }
li.done .task-text { color: var(--muted); text-decoration: line-through; }

.task-badges { display: inline-flex; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.task-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--muted); background: var(--field);
  padding: 2px 7px; border-radius: 999px; text-transform: uppercase;
}
.task-badge svg { width: 10px; height: 10px; }

.del {
  border: none; background: transparent; color: var(--faint);
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  font-size: 17px; cursor: pointer; display: grid; place-items: center;
  transition: background 0.15s, color 0.15s;
}
.del:active { background: var(--del-active); color: var(--danger); }

.attach, .flag {
  border: none; background: transparent; color: var(--faint);
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  cursor: pointer; display: grid; place-items: center;
  transition: background 0.15s, color 0.15s;
}
.attach svg { width: 18px; height: 18px; }
.attach:active { background: var(--field); color: var(--accent); }
.flag svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.flag.active svg { fill: currentColor; }
.flag:active { background: var(--field); }
.flag.p1 { color: #3b82f6; }
.flag.p2 { color: #f59e0b; }
.flag.p3 { color: #ef4444; }
li.p1 { box-shadow: inset 4px 0 0 #3b82f6, var(--card-shadow); }
li.p2 { box-shadow: inset 4px 0 0 #f59e0b, var(--card-shadow); }
li.p3 { box-shadow: inset 4px 0 0 #ef4444, var(--card-shadow); }

.thumb-btn { position: relative; border: none; background: transparent; padding: 0; line-height: 0; flex-shrink: 0; cursor: pointer; }
.thumb { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; display: block; border: 1px solid var(--line); }
.thumb-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}

/* subtasks */
.subtask-zone {
  border-top: 1px dashed var(--line);
  padding: 8px 14px 12px 52px;
  background: rgba(0,0,0,0.015);
}
html[data-theme="dark"] .subtask-zone { background: rgba(255,255,255,0.02); }
.subtask {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 0;
}
.subtask .scheck {
  width: 17px; height: 17px; border-radius: 50%;
  border: 1.6px solid var(--check-border); background: transparent;
  flex-shrink: 0; display: grid; place-items: center;
  cursor: pointer;
}
.subtask .scheck svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3.5; fill: none; opacity: 0; }
.subtask.done .scheck { background: var(--accent); border-color: var(--accent); }
.subtask.done .scheck svg { opacity: 1; }
.subtask .stext { flex: 1; font-size: 14px; color: var(--text); }
.subtask.done .stext { color: var(--muted); text-decoration: line-through; }
.subtask .sdel {
  border: none; background: transparent; color: var(--faint);
  font-size: 14px; cursor: pointer; padding: 2px 6px;
}
.subtask-add {
  display: flex; gap: 8px; margin-top: 4px;
}
.subtask-add input {
  flex: 1; border: 1px solid var(--line); background: var(--field);
  border-radius: 8px; padding: 7px 10px; font-size: 13px;
  color: var(--text); outline: none; font-family: inherit;
}
.subtask-add input:focus { border-color: var(--accent); }
.subtask-add button {
  border: none; background: var(--accent); color: #fff;
  border-radius: 8px; padding: 0 12px; font-size: 16px; font-weight: 700;
  cursor: pointer; line-height: 1;
}

/* bottom-sheet picker */
.sheet-modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, 0.45);
  display: none; align-items: flex-end; justify-content: center;
}
.sheet-modal.open { display: flex; }
.sheet-card {
  width: 100%; max-width: 560px;
  background: var(--sheet);
  border-radius: 22px 22px 0 0;
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.22s ease;
  max-height: 88vh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-title {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em; padding: 6px 8px 10px;
}
.sheet-section-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 10px 8px 6px;
}
.prio-opt {
  display: flex; align-items: center; gap: 13px; width: 100%;
  border: none; background: transparent; color: var(--text);
  padding: 14px 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; border-radius: 12px; transition: background 0.15s;
  text-align: left;
}
.prio-opt:active { background: var(--field); }
.prio-opt .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.prio-opt .ico { width: 22px; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.prio-opt .ico svg { width: 18px; height: 18px; }
.dot.p3 { background: #ef4444; }
.dot.p2 { background: #f59e0b; }
.dot.p1 { background: #3b82f6; }
.dot.none { background: transparent; border: 2px solid var(--check-border); }
.opt-check { margin-left: auto; color: var(--accent); font-weight: 800; opacity: 0; }
.prio-opt.sel .opt-check { opacity: 1; }

/* form-style add row in add-sheet */
.add-row { display: flex; gap: 10px; flex-shrink: 0; padding: 4px 4px 6px; }
.add-row input {
  flex: 1; border: 2px solid transparent;
  background: var(--field);
  border-radius: 14px; padding: 13px 14px;
  font-size: 16px; color: var(--text);
  outline: none; transition: border-color 0.15s, background 0.15s;
}
.add-row input:focus { border-color: var(--accent); background: var(--field-focus); }
.add-row input::placeholder { color: var(--muted); }
.add-btn {
  border: none; width: 48px; flex-shrink: 0;
  border-radius: 14px; color: #fff;
  background: var(--grad);
  font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
  transition: transform 0.1s;
}
.add-btn:active { transform: scale(0.92); }

/* date filter sheet */
.date-row { display: flex; gap: 10px; padding: 2px 8px 12px; }
.date-field { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.date-field > span {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.date-field .filter-date {
  width: 100%; height: 44px;
  border: 1px solid var(--line); background: var(--field);
  border-radius: 11px; padding: 0 12px; font-size: 14px; font-weight: 600;
  color: var(--text); font-family: inherit; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.date-field input.filter-date { -webkit-appearance: none; appearance: none; }
.date-field select.filter-date {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23909' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
html[data-theme="dark"] .date-field select.filter-date {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23ccc' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/></svg>");
}
.date-field .filter-date:focus { border-color: var(--accent); background: var(--field-focus); }
.date-field .filter-date::-webkit-calendar-picker-indicator { filter: invert(0.45); cursor: pointer; opacity: 0.6; }
html[data-theme="dark"] .date-field .filter-date::-webkit-calendar-picker-indicator { filter: invert(0.9); opacity: 0.7; }

.value-btn {
  width: 100%; height: 44px;
  border: 1px solid var(--line); background: var(--field);
  border-radius: 11px; padding: 0 12px;
  font-size: 14px; font-weight: 600;
  color: var(--text); font-family: inherit;
  cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.value-btn:active { background: var(--field-focus); border-color: var(--accent); }
.value-btn .vb-swatch {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.value-btn .vb-text {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.value-btn .vb-chev { color: var(--muted); flex-shrink: 0; display: grid; place-items: center; }
.value-btn .vb-chev svg { width: 14px; height: 14px; display: block; }

.status-seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--field); border-radius: 10px;
  margin: 2px 8px 12px;
}
.status-seg button {
  flex: 1; border: none; background: transparent; color: var(--muted);
  padding: 9px 6px; border-radius: 7px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.status-seg button .seg-n {
  min-width: 18px; padding: 0 5px; border-radius: 8px;
  font-size: 11px; line-height: 17px;
  background: rgba(128, 128, 128, 0.22);
}
.status-seg button.active { background: var(--accent); color: #fff; }
.status-seg button.active .seg-n { background: rgba(255, 255, 255, 0.28); }

.date-actions { display: flex; gap: 10px; padding: 4px 8px 2px; }
.date-actions button {
  flex: 1; border-radius: 11px; padding: 11px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  border: none; transition: transform 0.1s;
}
.date-actions button:active { transform: scale(0.96); }
.date-actions .primary-btn { color: #fff; background: var(--accent); }
.date-actions .ghost-btn {
  background: transparent; border: 1.5px solid var(--line); color: var(--muted);
}

/* lists manager */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-radius: 12px;
  cursor: pointer; transition: background 0.15s;
}
.list-item:active { background: var(--field); }
.list-item .lswatch {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.list-item .lname { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); }
.list-item.active .lname { color: var(--accent); }
.list-item .lcount { font-size: 12px; color: var(--muted); font-weight: 600; }
.list-item .lactions { display: flex; gap: 4px; }
.list-item button.icon {
  border: none; background: transparent; color: var(--muted);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center;
}
.list-item button.icon:active { background: var(--field); color: var(--accent); }
.list-item button.icon svg { width: 16px; height: 16px; }
.list-create-row {
  display: flex; gap: 8px; padding: 8px 10px 2px;
}
.list-create-row input {
  flex: 1; border: 1.5px solid var(--line); background: var(--field);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none;
  color: var(--text); font-family: inherit;
}
.list-create-row input:focus { border-color: var(--accent); }
.list-create-row button {
  border: none; background: var(--accent); color: #fff;
  border-radius: 10px; padding: 0 16px; font-size: 14px; font-weight: 700;
  cursor: pointer;
}

/* templates */
.tpl-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); margin-bottom: 8px;
  background: var(--card); cursor: pointer;
}
.tpl-card:active { background: var(--field); }
.tpl-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--field); color: var(--accent); flex-shrink: 0;
}
.tpl-icon svg { width: 20px; height: 20px; display: block; }
.tpl-meta { flex: 1; min-width: 0; }
.tpl-name { font-size: 14px; font-weight: 700; color: var(--text); }
.tpl-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* settings */
.setting-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-radius: 12px;
  cursor: pointer; transition: background 0.15s;
}
.setting-row:active { background: var(--field); }
.setting-row .sico {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--field); color: var(--accent); flex-shrink: 0;
}
.setting-row .sico svg { width: 18px; height: 18px; }
.setting-row .stitle { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.setting-row .ssub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.setting-row .schev { color: var(--muted); }

/* branding inputs */
.brand-field { padding: 8px 10px; }
.brand-field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.brand-field input[type="text"] {
  width: 100%; height: 42px;
  border: 1px solid var(--line); background: var(--field);
  border-radius: 10px; padding: 0 12px; font-size: 14px;
  color: var(--text); font-family: inherit; outline: none;
}
.brand-field input[type="text"]:focus { border-color: var(--accent); }
.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatches button {
  width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent;
  cursor: pointer; padding: 0;
}
.color-swatches button.active { border-color: var(--text); }
.logo-preview {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px;
}
.logo-preview img {
  width: 52px; height: 52px; border-radius: 10px;
  object-fit: cover; background: var(--field); border: 1px solid var(--line);
}
.logo-preview .empty-logo {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--field); border: 1px dashed var(--check-border);
  display: grid; place-items: center; color: var(--muted);
}
.logo-preview button {
  border: none; background: var(--field); color: var(--text);
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer;
}

/* task detail sheet */
.detail-field { padding: 6px 8px 10px; }
.detail-field label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 6px;
}
.detail-field textarea,
.detail-field input[type="text"] {
  width: 100%; border: 1px solid var(--line); background: var(--field);
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
  color: var(--text); font-family: inherit; outline: none; resize: vertical;
  min-height: 44px;
}
.detail-field textarea:focus,
.detail-field input[type="text"]:focus { border-color: var(--accent); background: var(--field-focus); }

/* photo viewer */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, 0.88);
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 68vh;
  border-radius: 14px; object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.lb-counter { color: #fff; font-size: 14px; font-weight: 700; opacity: 0.9; }
.lb-stage {
  position: relative; display: flex; align-items: center;
  justify-content: center; width: 100%; max-width: 520px;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lb-nav:active { background: rgba(255, 255, 255, 0.34); }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }
.lightbox-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lightbox-actions button {
  border: none; border-radius: 12px; padding: 12px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  transition: transform 0.1s;
}
.lightbox-actions button:active { transform: scale(0.94); }
.lightbox-actions .lb-danger { background: var(--danger); }

.empty {
  margin: 36px auto 0; text-align: center; color: var(--muted);
  padding: 8px 20px; line-height: 1.5;
  display: flex; flex-direction: column; align-items: center;
}
.empty .emoji {
  width: 62px; height: 62px;
  display: grid; place-items: center; margin-bottom: 12px;
  background: var(--field); border-radius: 50%;
  color: var(--accent);
}
.empty .emoji svg { width: 26px; height: 26px; }
.empty .et { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.empty .es { font-size: 13px; color: var(--muted); }

/* ---------- bottom bar ---------- */
.actions {
  flex: 0 0 auto;
  max-width: 560px; width: 100%; margin: 0 auto;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--sheet);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px;
}
.actions button {
  flex: 1; border: none; border-radius: 14px; padding: 13px 6px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform 0.1s, background 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.actions button svg { width: 16px; height: 16px; flex-shrink: 0; }
.actions button:active { transform: scale(0.96); }
.actions .primary {
  color: #fff; background: var(--accent);
  box-shadow: 0 6px 18px rgba(109, 94, 246, 0.30);
}
.actions .ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--text);
}
.actions .ghost:active { background: var(--field); }
.actions .ghost.filter-on { color: var(--accent); border-color: var(--accent); }

/* constrain whole app on larger screens, keep mobile feel */
.wrap {
  max-width: 560px; width: 100%; margin: 0 auto;
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}

/* toast */
.toast {
  position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%);
  background: #1f2333; color: #fff;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.toast.show { opacity: 1; }
