/* MyTodo — interface calme : liste d'abord, une seule couleur d'accent,
   le vert réservé à la progression. Mise en page : barre latérale + liste
   (bureau), onglets en bas (téléphone). */
:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #eef0ec;
  --ink: #1b211d;
  --muted: #69716c;
  --faint: #9aa29d;
  --line: #e1e5e0;
  --accent: #2f4fd0;
  --accent-ink: #ffffff;
  --accent-soft: #e7ebfb;
  --green: #23a05c;
  --green-soft: #dcf2e5;
  --high: #c8423b;
  --high-soft: #fbe6e4;
  --low: #7a8580;
  --warn: #a86a00;
  --warn-soft: #fbf0d9;
  --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 8px 28px rgba(20, 30, 25, .08);
  --overlay: rgba(18, 24, 20, .38);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --radius: 12px;
  --tap: 44px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121513; --surface: #1a1e1b; --surface-2: #232825; --ink: #e8ece9; --muted: #a0a8a3; --faint: #6f7772;
    --line: #2c322e; --accent: #8ea2ff; --accent-ink: #0f1430; --accent-soft: #23294a; --green: #45c47e; --green-soft: #1d3a2a;
    --high: #ff8a80; --high-soft: #3d2220; --low: #8f9893; --warn: #f0b44c; --warn-soft: #3a2f17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35); --overlay: rgba(0,0,0,.55); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121513; --surface: #1a1e1b; --surface-2: #232825; --ink: #e8ece9; --muted: #a0a8a3; --faint: #6f7772;
  --line: #2c322e; --accent: #8ea2ff; --accent-ink: #0f1430; --accent-soft: #23294a; --green: #45c47e; --green-soft: #1d3a2a;
  --high: #ff8a80; --high-soft: #3d2220; --low: #8f9893; --warn: #f0b44c; --warn-soft: #3a2f17;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35); --overlay: rgba(0,0,0,.55); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Coque ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 12px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font: 700 19px/1 var(--font-display); letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 0 10px 6px; display: flex; justify-content: space-between; align-items: center; }
.nav-label button { border: 0; background: none; color: var(--muted); padding: 2px 6px; border-radius: 6px; font-size: 12px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px; text-align: left; color: var(--ink); min-height: 38px; }
.nav-item:hover { background: var(--surface-2); }
.nav-item[aria-current="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.06); font-weight: 600; }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nav-item svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.nav-item.drop-hover { background: var(--accent-soft); outline: 2px dashed var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.sync-pill { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border: 0; text-align: left; width: 100%; }
.sync-pill .led { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-top: 4px; flex: none; }
.sync-pill.ok .led { background: var(--green); }

.main { min-width: 0; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 120px max(16px, env(safe-area-inset-left, 0px)); }
.main-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.main.wide .main-inner { max-width: 1240px; }

.topbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font: 700 28px/1.1 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.topbar .grow { flex: 1; min-width: 0; }
.icon-btn.menu-btn { display: none; }
.icon-btn { width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; border: 0; background: none; border-radius: 10px; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); min-height: 34px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.danger { color: var(--high); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn svg { width: 17px; height: 17px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Saisie rapide ---------- */
.quick { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px 6px 6px 14px; display: flex; flex-direction: column; }
.quick-row { display: flex; align-items: center; gap: 6px; }
.quick input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 10px 0; font-size: 16px; }
.quick input::placeholder { color: var(--faint); }
.mic { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; flex: none; }
.mic svg { width: 20px; height: 20px; }
.mic.listening { background: var(--high); color: #fff; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--high) 20%, transparent); } }
.add-btn { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.add-btn svg { width: 20px; height: 20px; }
.preview { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip b { color: var(--ink); font-weight: 600; }
.chip.new { background: var(--accent-soft); color: var(--accent); }
.chip.high { background: var(--high-soft); color: var(--high); }
.chip.low { color: var(--low); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.confirm-box { border-top: 1px dashed var(--line); margin: 4px 8px 6px 0; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.confirm-box .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.hint { font-size: 12px; color: var(--faint); padding: 0 4px; }

/* ---------- Bandeaux ---------- */
.banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); }
.banner .grow { flex: 1 1 260px; min-width: 0; }
.banner-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.banner.info { background: var(--accent-soft); }

/* ---------- Liste de tâches ---------- */
.group { display: flex; flex-direction: column; gap: 2px; }
.group-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 4px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.group-head .n { color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }
.group-head.overdue { color: var(--high); }
.group.drop-hover .group-head { color: var(--accent); }
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.task { position: relative; display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; align-items: start; gap: 4px; padding: 10px 6px 10px 2px; border-bottom: 1px solid var(--line); background: var(--surface); transition: background .15s, opacity .3s; }
.task:last-child { border-bottom: 0; }
.task:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.task.drop-before::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); }
.handle { width: 22px; height: 30px; display: grid; place-items: center; color: var(--faint); cursor: grab; touch-action: none; opacity: .35; border: 0; background: none; padding: 0; }
.task:hover .handle { opacity: 1; }
.handle svg { width: 14px; height: 14px; }
.check { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; padding: 0; }
.check span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; transition: all .15s; }
.check.p-high span { border-color: var(--high); }
.check:hover span { background: var(--green-soft); border-color: var(--green); }
.check svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.task.done .check span { background: var(--green); border-color: var(--green); }
.task.done .check svg { opacity: 1; }
.task-body { min-width: 0; padding: 4px 4px 2px; cursor: pointer; border: 0; background: none; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.task-title { font-size: 15px; overflow-wrap: anywhere; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task.leaving { opacity: .35; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); align-items: center; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.meta svg { width: 13px; height: 13px; }
.meta .late { color: var(--high); }
.meta .pr-high { color: var(--high); font-weight: 600; }
.meta .pr-low { color: var(--low); }
.progress { display: flex; align-items: center; gap: 8px; max-width: 260px; }
.bar { flex: 1; height: 5px; border-radius: 99px; background: var(--green-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .25s; }
.progress small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-actions { display: flex; align-items: center; }
.postpone { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 6px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; }
.postpone:hover { background: var(--surface-2); color: var(--ink); }
.postpone svg { width: 15px; height: 15px; }

.empty { text-align: center; padding: 42px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h3 { margin: 0 0 6px; font: 600 17px/1.3 var(--font-display); color: var(--ink); }
.empty p { margin: 0 auto; max-width: 42ch; font-size: 14px; }

/* ---------- Popover reporter ---------- */
.pop { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; display: flex; flex-direction: column; }
.pop button.opt { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; display: flex; justify-content: space-between; gap: 16px; min-height: 40px; align-items: center; }
.pop button.opt:hover { background: var(--surface-2); }
.pop button.opt small { color: var(--faint); }
.pop .date-pick { display: flex; gap: 6px; padding: 6px; }
.pop input[type="date"] { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); min-height: 38px; }

/* ---------- Dock de dépôt (glisser) ---------- */
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 70; display: flex; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 24px); overflow-x: auto; }
.dock div { flex: none; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; text-align: center; min-width: 74px; }
.dock div small { display: block; color: var(--faint); font-size: 11px; }
.dock div.drop-hover { background: var(--accent); color: var(--accent-ink); }
.dock div.drop-hover small { color: inherit; }
.drag-ghost { position: fixed; z-index: 80; pointer-events: none; padding: 10px 14px; background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dragging { user-select: none; cursor: grabbing; }

/* ---------- Kanban / Semaine ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.week { grid-auto-columns: minmax(200px, 1fr); }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; }
.col.drop-hover { outline: 2px dashed var(--accent); background: var(--accent-soft); }
.col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px; font-weight: 600; font-size: 13px; }
.col-head small { color: var(--faint); font-weight: 400; }
.col-head.today { color: var(--accent); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; cursor: grab; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.card .task-title { font-size: 14px; }
.card.done .task-title { text-decoration: line-through; color: var(--muted); }
.card-top { display: flex; gap: 6px; align-items: flex-start; }
.card-top .check { width: 22px; height: 22px; flex: none; }
.card-top .check span { width: 18px; height: 18px; }
.card.done .check span { background: var(--green); border-color: var(--green); }
.card.done .check svg { opacity: 1; }
.col-empty { font-size: 12px; color: var(--faint); text-align: center; padding: 18px 4px; }

/* ---------- Modale ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px; overflow-y: auto; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 680px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: .6; } }
.modal-head { display: flex; align-items: flex-start; gap: 8px; padding: 16px 12px 4px 20px; }
.modal-head .grow { flex: 1; min-width: 0; }
.modal-body { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.title-input { width: 100%; border: 0; outline: 0; background: none; font: 600 22px/1.25 var(--font-display); padding: 4px 0; letter-spacing: -.01em; resize: none; }
.title-input:focus { box-shadow: 0 2px 0 var(--accent); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .section-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea, .input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--surface); min-height: 40px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); outline: 0; }
.note { font-size: 12px; color: var(--muted); }
.note.warn { color: var(--warn); }
.note.ok { color: var(--green); }
.section { display: flex; flex-direction: column; gap: 8px; }
.section-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.subtasks { display: flex; flex-direction: column; }
.sub { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.sub input[type="text"] { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 4px; border-radius: 6px; }
.sub input[type="text"]:focus { background: var(--surface-2); outline: 0; }
.sub.done input[type="text"] { text-decoration: line-through; color: var(--muted); }
.sub .check span { width: 18px; height: 18px; border-radius: 5px; }
.sub.done .check span { background: var(--green); border-color: var(--green); }
.sub.done .check svg { opacity: 1; }
.sub .del { opacity: .5; }
.add-sub { display: flex; gap: 6px; }
.add-sub input { flex: 1; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 0; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prio-seg button[data-v="high"][aria-pressed="true"] { color: var(--high); }
.saved { font-size: 12px; color: var(--green); opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }
.inline-confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }

.viewer { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.viewer img { max-width: 100%; max-height: calc(100% - 80px); object-fit: contain; border-radius: 6px; }
.viewer .bar-actions { display: flex; gap: 8px; }
.viewer .btn { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }

/* Préparer ma journée */
.plan-list { display: flex; flex-direction: column; gap: 6px; counter-reset: plan; }
.plan-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.plan-item .rank { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-item .why { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.load { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.load .bar { height: 8px; }
.load.heavy .bar i { background: var(--warn); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.check-row input { width: 18px; height: 18px; }
.draft textarea { min-height: 220px; }
.status-list { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.status-list div { display: flex; gap: 8px; align-items: flex-start; }
.status-list b { width: 18px; flex: none; text-align: center; }
.status-list .y { color: var(--green); }
.status-list .n { color: var(--high); }
.proj-row { display: flex; gap: 8px; align-items: center; }
.proj-row input[type="text"] { flex: 1; min-width: 0; }
.proj-row input[type="color"] { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); }
.integrations { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.integ { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.integ b { font-size: 14px; }
.tag { align-self: flex-start; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }

/* Toast */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 95; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 14px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); animation: rise .2s ease-out; }
.toast button { border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; padding: 4px; }

/* Barre d'onglets mobile */
.tabbar { display: none; }
.drawer-scrim { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 55; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-104%); transition: transform .22s ease; background: var(--bg); box-shadow: var(--shadow); padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
  .side.open { transform: none; }
  .drawer-scrim.open { display: block; position: fixed; inset: 0; z-index: 54; background: var(--overlay); }
  .icon-btn.menu-btn { display: inline-grid; margin-left: -10px; }
  .main { padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .topbar h1 { font-size: 24px; }
  .topbar .view-switch { order: 5; width: 100%; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 4px max(4px, env(safe-area-inset-left, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-right, 0px)); }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 6px 2px; min-height: 52px; border-radius: 10px; position: relative; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button[aria-current="true"] { color: var(--accent); font-weight: 600; }
  .tabbar button .badge { position: absolute; top: 3px; left: calc(50% + 6px); background: var(--accent); color: var(--accent-ink); font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }
  .tabbar button.drop-hover { background: var(--accent-soft); }
  .overlay { padding: 0; align-items: stretch; }
  .modal { max-width: none; min-height: 100%; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .handle { opacity: .6; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .dock { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.photos .note { grid-column: 1 / -1; }
.prio-seg { display: flex; width: 100%; }
.prio-seg button { flex: 1; padding: 6px 4px; }
@media (max-width: 420px) { .field-grid { grid-template-columns: 1fr 1fr; } .field-grid .field:has(.prio-seg) { grid-column: 1 / -1; } }

/* Sessions Claude */
.sess-list { display: flex; flex-direction: column; gap: 8px; }
.sess { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.sess.child { margin-left: 22px; background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
.sess-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sess-title { font-weight: 600; overflow-wrap: anywhere; }
.sess-sum, .sess-next { margin: 0; font-size: 14px; color: var(--ink); }
.sess-next { color: var(--accent); }
.sess-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
