/* Pollioni To-Do v1.2 — Things 3 warmth on a quiet monochrome frame. See DESIGN.md */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #FFFFFF;
  --bg-2: #F6F6F5;
  --side: #F2F3F5;
  --text: #1D1D1F;
  --text-2: #6E6E73;
  --text-3: #AEAEB2;
  --line: #E5E5E7;
  --accent: #3B7BFF;
  --accent-soft: rgba(59, 123, 255, 0.10);
  --red: #FF453A;
  --c-inbox: #3B7BFF;
  --c-today: #F7B500;
  --c-upcoming: #FF6259;
  --c-anytime: #2FB6C7;
  --c-done: #30C758;
  /* Pollioni suite shell */
  --ink: #14181d;
  --sidebar-w: 232px;
  --accent-light: #8FB6FF;
  --radius: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06);
  --card-shadow: 0 10px 34px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.05);
  --t: 150ms ease;
}
html, body { height: 100%; }
body {
  font-family: Inter, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 10px; outline: none; transition: border-color var(--t);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
::placeholder { color: var(--text-3); }

/* ---------- Login ---------- */
#login-screen { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: var(--bg-2); }
.login-box { width: min(320px, 88vw); display: flex; flex-direction: column; gap: 10px; }
.login-box h1 {
  font-size: 17px; font-weight: 500; text-align: center; margin-bottom: 16px;
  letter-spacing: .01em; color: var(--text-2);
}
.login-box input { padding: 11px 12px; }
.error { color: var(--red); font-size: 13px; min-height: 1.2em; text-align: center; }
button.primary {
  background: var(--accent); color: #fff; font-weight: 500;
  padding: 10px 18px; border-radius: var(--radius); transition: filter var(--t);
}
button.primary:hover { filter: brightness(1.06); }

/* ---------- Layout: Pollioni suite shell ---------- */
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#columns { flex: 1; display: flex; min-height: 0; }

/* Black bar carrying the theme-coloured wordmark and the sibling-app links,
   matching Jobs / Mail / Docs / BMS. */
#topbar {
  display: flex; align-items: center; gap: 0;
  background: var(--ink); padding: 10px 0; position: relative; flex-shrink: 0;
  /* iPhone home-screen app: the bar also covers the status-bar strip. */
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
#topbar::after { /* thin accent rule under the wordmark, sidebar-width */
  content: ''; position: absolute; bottom: 0; left: 20px;
  width: calc(var(--sidebar-w) - 40px); height: 2px; background: var(--accent);
}
/* The wordmark is a mask so it wears the theme colour and updates live. */
.logo-mask {
  background: var(--accent);
  -webkit-mask: url('/pollioni-logo.svg') no-repeat center / contain;
  mask: url('/pollioni-logo.svg') no-repeat center / contain;
}
#header-logo { width: calc(var(--sidebar-w) - 40px); height: 34px; margin-left: 20px; flex-shrink: 0; }
#app-links { display: flex; gap: 10px; margin-left: 26px; }
#app-links a {
  color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--accent); border-radius: 999px; padding: 5px 13px;
  transition: background var(--t);
}
#app-links a:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
#topbar #menu-btn { display: none; margin-left: 10px; color: rgba(255,255,255,.85); }
#topbar #menu-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

#sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--ink);
  display: flex; flex-direction: column; padding: 16px 12px 12px;
  overflow-y: auto;
}
.login-logo { width: 168px; display: block; margin: 0 auto 6px; }
.side-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: 6px; font-size: 15px; font-weight: 600;
  color: rgba(255,255,255,.78);
  transition: background var(--t), color var(--t); text-align: left;
}
.side-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-item.active { background: rgba(255,255,255,.16); color: var(--accent-light); }
.si-icon { display: inline-flex; width: 18px; height: 18px; color: rgba(255,255,255,.6); flex-shrink: 0; }
.si-icon svg { width: 100%; height: 100%; }
.side-item.active .si-icon { color: inherit; }
.side-item .count {
  margin-left: auto; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 9px; padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}
.side-sec { margin-top: 20px; }
.side-sec-title {
  font-size: 15px; font-weight: 700; color: rgba(255,255,255,.92);
  letter-spacing: -.01em; padding: 0 11px 6px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.side-sec-title button { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.55); }
.side-sec-title button:hover { color: var(--accent-light); }
.manage-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; }
.manage-row input { flex: 1; min-width: 0; font-size: 13.5px; padding: 6px 9px; }
.manage-row .cnt { font-size: 13px; font-weight: 600; color: var(--text-2); width: 24px; text-align: right; flex-shrink: 0; }
.manage-row select { width: 92px; flex-shrink: 0; font-size: 12px; padding: 5px 4px; color: var(--text-2); }
.manage-row .rm { color: var(--text-3); font-size: 17px; padding: 2px 6px; }
.manage-row .rm:hover { color: var(--red); }
.new-list-row { display: flex; gap: 6px; margin-top: 10px; }
.new-list-row input { flex: 1; font-size: 13.5px; }
.pie { width: 16px; height: 16px; flex-shrink: 0; transform: rotate(-90deg); }
.pie circle { fill: none; stroke-width: 2.6; }
.pie .pie-bg { stroke: rgba(255,255,255,.22); }
.pie .pie-fg { stroke: var(--accent-light); stroke-linecap: butt; transition: stroke-dasharray 300ms ease; }
.side-foot {
  margin-top: auto; padding: 12px 11px 4px; display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,.72); border-top: 1px solid rgba(255,255,255,.12);
}
.side-foot button { color: rgba(255,255,255,.45); font-size: 12.5px; }
.side-foot button:hover { color: rgba(255,255,255,.8); }
#side-settings-sec { margin-top: 16px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.swatches button {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent;
  transition: transform var(--t);
}
.swatches button:hover { transform: scale(1.12); }
#accent-picker { width: 100%; height: 42px; padding: 3px; cursor: pointer; }

.sec-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.quiet-btn.accent { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.quiet-btn.accent:hover { background: var(--accent-soft); }

/* Settings > People */
.settings-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-sec h3 { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ur-who { flex: 1; min-width: 0; }
.ur-name { font-size: 14px; font-weight: 500; }
.ur-user { font-size: 12px; color: var(--text-3); }
.ur-role { width: 132px; flex-shrink: 0; font-size: 12.5px; padding: 6px 8px; }
.ur-rm { width: 30px; height: 30px; flex-shrink: 0; border-radius: 6px; font-size: 18px; color: var(--text-3); }
.ur-rm:hover { background: rgba(255,69,58,.1); color: var(--red); }
.ur-rm:disabled, .ur-role:disabled { opacity: .4; cursor: default; }
.ur-rm:disabled:hover { background: none; color: var(--text-3); }
.user-row.is-me .ur-name::after {
  content: 'you'; font-size: 10px; font-weight: 700; color: var(--text-3);
  background: var(--bg-2); border-radius: 4px; padding: 1px 5px; margin-left: 7px;
  text-transform: uppercase; letter-spacing: .04em;
}
#add-user-btn { margin-top: 12px; }
#scrim { display: none; }

/* Main */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; position: relative; }
#main-head {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 28px 10px; max-width: 700px; width: 100%; margin: 0 auto;
}
#view-icon { display: inline-flex; width: 24px; height: 24px; }
#view-icon svg { width: 100%; height: 100%; }
#view-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; flex: 1; }
.head-tools { display: flex; align-items: center; gap: 4px; }
#done-search { width: 200px; padding: 6px 10px; font-size: 13.5px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--text-2);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.listening { color: #fff; background: var(--red); }
#menu-btn { display: none; }
#content { flex: 1; overflow-y: auto; padding: 4px 28px 120px; max-width: 700px; width: 100%; margin: 0 auto; }

/* Magic Plus */
#magic-plus {
  position: absolute; right: 30px; bottom: 28px; z-index: 15;
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, #6B9BFF, #3B7BFF 62%, #1F55CC);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(59,123,255,.42), 0 2px 5px rgba(0,0,0,.18);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
#magic-plus svg { width: 24px; height: 24px; stroke-width: 2.2; }
#magic-plus:hover { transform: scale(1.06); box-shadow: 0 9px 24px rgba(59,123,255,.5), 0 3px 7px rgba(0,0,0,.2); }
#magic-plus:active { transform: scale(.94); }

/* New task row */
.new-task {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius); margin-bottom: 6px; cursor: text;
  background: var(--bg-2); animation: unfold 160ms ease;
}
.nt-plus { display: inline-flex; width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }
.nt-plus svg { width: 100%; height: 100%; }
.new-task input { border: none; background: none; padding: 0; flex: 1; font-size: 15px; }
#add-status { font-size: 12.5px; color: var(--text-2); padding: 2px 12px 8px; }

/* Sections */
.section-title { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 18px 10px 6px; letter-spacing: .02em; }
.section-title.first { padding-top: 6px; }

/* ---------- Task rows ---------- */
.task {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 8px 10px; border-radius: var(--radius);
  cursor: default; position: relative;
  transition: background var(--t);
}
.task:hover:not(.expanded) { background: var(--bg-2); }
.task.completing { animation: glide-out 480ms ease 260ms forwards; }
@keyframes glide-out {
  40% { opacity: 0; transform: translateX(26px); max-height: 60px; }
  100% { opacity: 0; transform: translateX(26px); max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
}
.task.completing .task-title { color: var(--text-3); text-decoration: line-through; transition: color 220ms ease; }

/* Things-style rounded-square checkbox with a pop */
.checkbox {
  width: 17px; height: 17px; margin-top: 3px; flex-shrink: 0;
  border: 1.5px solid #C9C9CE; border-radius: 5px; background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color var(--t), background var(--t);
  position: relative;
}
.task > .checkbox::after { content: ''; position: absolute; inset: -12px; } /* generous tap target */
.checkbox:hover { border-color: var(--accent); }
.checkbox.done { background: var(--accent); border-color: var(--accent); animation: pop 240ms ease; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
.checkbox svg { width: 10px; height: 10px; color: #fff; opacity: 0; transition: opacity var(--t); }
.checkbox.done svg { opacity: 1; }

.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 15px; line-height: 1.45; word-wrap: break-word; }
.task.done-item .task-title { color: var(--text-3); text-decoration: line-through; }
.task-meta {
  display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 12.5px;
  color: var(--text-2); margin-top: 1px; align-items: center;
}
.task-meta .m { display: inline-flex; align-items: center; gap: 4px; }
.task-meta .m svg { width: 12px; height: 12px; color: var(--text-3); }
.m.due-today svg { color: var(--c-today); }
.m.overdue, .m.overdue svg { color: var(--red); }
.m.prio-high { color: var(--red); }
.m.prio-high svg { color: var(--red); }
.m.prio-medium { color: #FF9F0A; }
.m.prio-medium svg { color: #FF9F0A; }
.m.prio-low { color: var(--text-2); }
.task-hover { position: absolute; right: 8px; top: 7px; display: none; gap: 2px; }
.task:hover:not(.expanded) .task-hover { display: flex; }
.task-hover .icon-btn { width: 27px; height: 27px; background: var(--bg-2); }
.task-hover .icon-btn:hover { background: var(--line); }
.task-hover .icon-btn svg { width: 15px; height: 15px; }
#empty-msg { text-align: center; color: var(--text-3); font-size: 14px; padding: 70px 0; }
#empty-msg .glyph { display: block; margin: 0 auto 10px; width: 34px; height: 34px; color: var(--line); }
#empty-msg .glyph svg { width: 100%; height: 100%; }

/* ---------- The unfold: task expands into a white card ---------- */
.task.expanded {
  display: block; background: var(--bg); cursor: default;
  box-shadow: var(--card-shadow); border-radius: 12px;
  padding: 14px 16px 12px; margin: 8px 0;
  animation: unfold 190ms ease;
}
@keyframes unfold { from { opacity: .4; transform: translateY(-5px) scale(.985); } }
.ed-top { display: flex; align-items: flex-start; gap: 11px; }
.ed-top .checkbox { margin-top: 4px; }
/* min-width:0 is required - without it the input refuses to shrink and pushes Save off the card */
.ed-title { flex: 1; min-width: 0; border: none; padding: 0; font-size: 15px; font-weight: 500; border-radius: 0; }
.ed-save { flex-shrink: 0; }
.ed-grid { display: grid; grid-template-columns: 72px 1fr; gap: 8px 10px; align-items: center; margin: 12px 0 0 28px; }
.ed-grid label { font-size: 12.5px; color: var(--text-2); }
.ed-grid input, .ed-grid select { font-size: 13.5px; padding: 5px 9px; width: 100%; }
.seg { display: flex; background: var(--bg-2); border-radius: 7px; padding: 2px; }
.seg button {
  flex: 1; font-size: 12.5px; padding: 4px 2px; border-radius: 5px;
  color: var(--text-2); transition: background var(--t), color var(--t);
}
.seg button.on { background: var(--bg); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ed-sec { margin: 12px 0 0 28px; }
.ed-sec-title { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.ed-sec textarea { width: 100%; font-size: 13.5px; resize: vertical; }
.ed-newsub { width: 100%; font-size: 13.5px; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 6px 2px; }
.subtask { display: flex; align-items: center; gap: 9px; padding: 4px 2px; font-size: 13.5px; }
.subtask .checkbox { width: 15px; height: 15px; margin: 0; border-radius: 4px; }
.subtask .checkbox svg { width: 8px; height: 8px; }
.subtask.done span { color: var(--text-3); text-decoration: line-through; }
.subtask span { flex: 1; }
.subtask .rm { color: var(--text-3); font-size: 15px; visibility: hidden; }
.subtask:hover .rm { visibility: visible; }
.ed-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-thumb { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.thumb-rm {
  position: absolute; top: 2px; right: 2px; width: 24px; height: 24px;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 50%;
  font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.ed-add-photo {
  border: 1.5px dashed #B9B9BE; color: var(--text-2); background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.ed-add-photo svg { width: 28px; height: 28px; }
.ed-add-photo:hover { border-color: var(--accent); color: var(--accent); }
.ed-save { color: var(--accent); font-weight: 600; font-size: 15px; padding: 8px 12px; }
.ed-foot { display: flex; align-items: center; margin: 20px 0 0 28px; }
.ed-save-main { flex: 0 0 auto; min-width: 130px; }
.ed-delete { margin-left: auto; }
.quiet-btn {
  font-size: 13px; color: var(--text-2); padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg);
  transition: background var(--t);
}
.quiet-btn:hover { background: var(--bg-2); }
.quiet-btn.danger { color: var(--red); border-color: transparent; }
.quiet-btn.danger:hover { background: rgba(255,69,58,.08); }

/* Mobile capture bar */
#capture-bar { display: none; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadein 150ms ease;
}
.overlay.top { align-items: flex-start; padding-top: 12vh; }
@keyframes fadein { from { opacity: 0; } }
.panel {
  background: var(--bg); border-radius: 12px; box-shadow: var(--shadow);
  width: min(560px, 100%); max-height: 86vh; overflow-y: auto; padding: 20px;
}
.panel.narrow { width: min(360px, 100%); }
.panel h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.hint { font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; }
.panel-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.fld { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.fld input { width: 100%; margin-top: 3px; font-size: 14px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-top: 12px; }

/* Scan review */
.review-row { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: none; }
.review-tag { font-size: 11px; color: var(--text-3); width: 52px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.review-row input[type=text] { flex: 1; font-size: 13.5px; padding: 6px 9px; min-width: 0; }
.review-row select { width: 112px; flex-shrink: 0; font-size: 12.5px; padding: 6px; }
.review-sketch { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex-shrink: 0; }
#review-title {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--bg-2); border-radius: 6px;
  padding: 7px 10px; margin-bottom: 10px;
}
#review-unreadable { color: var(--red); font-size: 12.5px; margin-top: 10px; }

/* Command palette */
.panel.pal { width: min(520px, 100%); padding: 8px; }
#pal-input { width: 100%; border: none; font-size: 16px; padding: 10px 12px; border-radius: 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pal-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 7px; font-size: 14px; text-align: left;
}
.pal-item.sel, .pal-item:hover { background: var(--accent-soft); }
.pal-item .k { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 30;
    padding-top: env(safe-area-inset-top, 0px);
    transform: translateX(-100%); transition: transform 200ms ease;
    width: 264px;
  }
  #sidebar.open { transform: none; box-shadow: var(--shadow); }
  #scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }

  /* The black bar stays on the phone: menu button, wordmark, no app pills
     (they are a desktop convenience and would crowd a 390px screen). */
  #topbar { padding: 8px 12px 8px 6px; }
  #topbar::after { left: 12px; width: 120px; }
  #topbar #menu-btn {
    display: inline-flex; width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  }
  #topbar #menu-btn svg { width: 24px; height: 24px; }
  #header-logo { width: 108px; height: 26px; margin-left: 4px; }
  #app-links { display: none; }

  #mic-btn, #scan-btn { display: none; }
  #main-head { padding: 16px 16px 8px; gap: 12px; }
  #view-title { font-size: 26px; }
  #view-icon { width: 25px; height: 25px; }
  #content { padding: 2px 12px 140px; }

  /* Touch-first: everything bigger on the phone */
  .task { padding: 15px 12px; gap: 16px; }
  .task-title { font-size: 17px; }
  .task-meta { font-size: 14px; gap: 4px 14px; }
  .task-meta .m svg { width: 14px; height: 14px; }
  .task > .checkbox { width: 25px; height: 25px; margin-top: 1px; border-radius: 7px; border-width: 2px; }
  .task > .checkbox svg { width: 14px; height: 14px; }
  .task > .checkbox::after { inset: -14px; }

  .task.expanded { padding: 18px 16px 16px; }
  .ed-title { font-size: 18px; }
  .ed-top .checkbox { width: 25px; height: 25px; border-radius: 7px; border-width: 2px; }
  .ed-top .checkbox svg { width: 14px; height: 14px; }
  .ed-top .icon-btn { width: 44px; height: 44px; }
  .ed-top .icon-btn svg { width: 22px; height: 22px; }
  .ed-grid { margin-left: 0; grid-template-columns: 86px 1fr; gap: 12px 10px; }
  .ed-grid label { font-size: 15px; }
  .ed-grid input, .ed-grid select { font-size: 16px; padding: 12px 12px; }
  .seg button { font-size: 15px; padding: 12px 2px; }
  .ed-sec, .ed-foot { margin-left: 0; }
  .ed-sec-title { font-size: 15px; }
  .ed-sec textarea { font-size: 16px; padding: 12px; }
  .ed-newsub { font-size: 16px; padding: 12px 4px; }
  .subtask { font-size: 16px; padding: 9px 2px; gap: 12px; }
  .subtask .checkbox { width: 22px; height: 22px; border-radius: 6px; border-width: 2px; }
  .subtask .checkbox svg { width: 12px; height: 12px; }
  .subtask .rm { visibility: visible; font-size: 24px; padding: 2px 10px; }
  .quiet-btn { font-size: 16px; padding: 12px 18px; }
  .ed-save { font-size: 17px; padding: 10px 14px; }
  .ed-save-main { font-size: 17px; padding: 14px 20px; min-width: 45%; }
  .ed-thumb { width: 96px; height: 96px; }
  .thumb-rm { width: 30px; height: 30px; font-size: 18px; }
  .ed-photo-sec { margin-bottom: 8px; }
  .ed-foot { margin-top: 26px; }

  /* Sidebar: finger-sized navigation */
  .side-sec-title { font-size: 17px; }
  .side-sec-title button { font-size: 15px; padding: 4px 8px; }
  .side-item { padding: 12px 12px; font-size: 17px; gap: 12px; border-radius: 9px; }
  .si-icon { width: 21px; height: 21px; }
  .pie { width: 19px; height: 19px; }
  .side-item .count { font-size: 15px; }
  .side-foot { font-size: 15px; }
  .side-foot button { font-size: 15px; padding: 8px 0; }

  /* Scan review: stacked, big */
  .review-row { flex-wrap: wrap; padding: 12px 0; row-gap: 8px; }
  .review-row input[type=text] { flex: 1 1 100%; font-size: 16px; padding: 12px; order: 1; }
  .review-tag { order: 2; font-size: 13px; width: auto; align-self: center; }
  .review-sketch { order: 3; width: 48px; height: 48px; }
  .review-row select { order: 4; flex: 1; width: auto; font-size: 16px; padding: 11px 6px; }
  .panel h2 { font-size: 19px; }
  .hint { font-size: 14px; }
  .panel-actions .primary, .panel-actions .quiet-btn { font-size: 16px; padding: 13px 20px; }

  /* Palette + search */
  .pal-item { font-size: 16px; padding: 13px 14px; }
  #pal-input { font-size: 17px; padding: 13px 14px; }
  #done-search { font-size: 16px; padding: 11px 12px; }
  #add-status { font-size: 15px; color: var(--accent); font-weight: 500; }
  .section-title { font-size: 15px; font-weight: 700; color: var(--text); }

  /* BOLD PASS - the phone must pop, not whisper */
  #view-title { font-size: 29px; font-weight: 700; }
  #view-icon { width: 27px; height: 27px; }
  .task { padding: 16px 12px; }
  .task-title { font-size: 18px; font-weight: 500; }
  .task-meta { font-size: 15px; font-weight: 500; color: #48484D; margin-top: 3px; }
  .task-meta .m svg { color: #6E6E73; }
  .task > .checkbox { width: 28px; height: 28px; border-radius: 8px; border-color: #8E8E93; }
  .task > .checkbox svg { width: 16px; height: 16px; }

  .ed-title { font-size: 19px; font-weight: 600; }
  .ed-top .checkbox { width: 28px; height: 28px; border-radius: 8px; border-color: #8E8E93; }
  .ed-top .checkbox svg { width: 16px; height: 16px; }
  .ed-grid { grid-template-columns: 92px 1fr; }
  .ed-grid label { font-size: 16px; font-weight: 600; color: var(--text); }
  .ed-grid input, .ed-grid select { font-size: 17px; font-weight: 500; }
  .ed-sec-title { font-size: 17px; font-weight: 700; color: var(--text); }
  .ed-sec textarea, .ed-newsub { font-size: 17px; }
  .subtask { font-size: 17px; }
  .subtask .checkbox { width: 24px; height: 24px; border-color: #8E8E93; }
  .seg { background: #E9E9EC; }
  .seg button { font-size: 16px; font-weight: 600; color: #48484D; }
  .seg button.on { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(59,123,255,.4); }

  .side-sec-title { font-size: 18px; font-weight: 700; }
  .side-item { font-size: 18px; font-weight: 500; padding: 13px 12px; }
  .si-icon { width: 23px; height: 23px; }
  .pie { width: 21px; height: 21px; }
  .side-item .count { font-size: 16px; font-weight: 700; color: var(--text); }
  .side-item.active { background: var(--accent-soft); color: var(--accent); }
  .side-item.active .count { color: var(--accent); }

  #capture-bar input { font-size: 17px; font-weight: 500; padding: 13px 14px; }
  .cap-btn { width: 50px; height: 50px; }
  .cap-btn svg { width: 24px; height: 24px; }
  #empty-msg { font-size: 16px; color: var(--text-2); }
  .task-hover { display: none !important; }
  .new-task { display: none; }
  #magic-plus { display: none; }
  #capture-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  #capture-bar input { flex: 1; font-size: 16px; padding: 11px 13px; border-radius: 10px; }
  .cap-btn {
    width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-2); background: var(--bg-2);
  }
  .cap-btn svg { width: 21px; height: 21px; }
  /* Manage Lists as a phone-sized sheet with finger-sized controls */
  .overlay { align-items: flex-end; padding: 0; }
  .overlay.top { align-items: flex-start; padding: 8vh 12px 0; }
  .panel, .panel.narrow { width: 100%; border-radius: 14px 14px 0 0; max-height: 88vh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .manage-row { gap: 8px; padding: 8px 0; }
  .manage-row input { font-size: 16px; padding: 11px 12px; }
  .manage-row .cnt { font-size: 15px; font-weight: 600; color: var(--text-2); width: 30px; }
  .manage-row select { width: 104px; font-size: 15px; padding: 10px 4px; }
  .manage-row .rm { font-size: 24px; padding: 6px 10px; }
  .new-list-row input { font-size: 16px; padding: 11px 12px; }
  .new-list-row .quiet-btn { font-size: 15px; padding: 11px 16px; }
  .fld input { font-size: 16px; padding: 11px 12px; }
  #done-search { width: 130px; }
}
