:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --ink: #1d1f1c;
  --ink-2: #5d615a;
  --ink-3: #8b8f87;
  --line: #e4e2da;
  --line-2: #efede7;
  --accent: #2f7d5b;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ea;
  --warn: #b26a00;
  --warn-soft: #fff3de;
  --bad: #b8382f;
  --bad-soft: #fde8e6;
  --ok: #2f7d5b;
  --info-soft: #e8eff9;
  --shadow: 0 1px 2px rgba(20, 20, 10, .05), 0 4px 16px rgba(20, 20, 10, .04);
  --radius: 12px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151714; --panel: #1d201c; --panel-2: #222520; --ink: #eceee8; --ink-2: #a9ada4; --ink-3: #7d8279;
    --line: #30342e; --line-2: #282b26; --accent: #5cc08f; --accent-ink: #0d1a13; --accent-soft: #1f3529;
    --warn: #f0b24f; --warn-soft: #362b17; --bad: #ff7b70; --bad-soft: #3a1f1c; --ok: #5cc08f; --info-soft: #1e2837;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151714; --panel: #1d201c; --panel-2: #222520; --ink: #eceee8; --ink-2: #a9ada4; --ink-3: #7d8279;
  --line: #30342e; --line-2: #282b26; --accent: #5cc08f; --accent-ink: #0d1a13; --accent-soft: #1f3529;
  --warn: #f0b24f; --warn-soft: #362b17; --bad: #ff7b70; --bad-soft: #3a1f1c; --ok: #5cc08f; --info-soft: #1e2837;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- header */
header {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.bar { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 20px; }
.brand { font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav button {
  border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500;
}
nav button:hover { background: var(--line-2); color: var(--ink); }
nav button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
nav .badge { margin-left: 5px; }
.search { margin-left: auto; position: relative; }
.search input { width: 240px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.search-results {
  position: absolute; right: 0; top: 40px; width: 420px; max-height: 70vh; overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.15); padding: 8px 0;
}
.search-results h4 { margin: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.search-results .r { padding: 5px 14px; display: flex; justify-content: space-between; gap: 10px; }
.search-results .r span:last-child { color: var(--ink-3); white-space: nowrap; }

main { max-width: 1320px; margin: 0 auto; padding: 20px; }
body { overflow-x: hidden; }
.day-tools { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 10px; }
.tab { display: none; }
.tab.on { display: block; }

/* ---------- generic */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.card h2 .sub { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.card h2 .right { margin-left: auto; display: flex; gap: 6px; }
h3 { font-size: 13px; margin: 14px 0 6px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.btn {
  border: 1px solid var(--line); background: var(--panel); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: var(--ink-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--line-2); }
.btn:disabled { opacity: .5; cursor: default; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); }
.badge.est { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--accent-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.loc-fridge { background: var(--info-soft); color: #3d6cb3; }
.badge.loc-freezer { background: #e7f4f8; color: #247a93; }
.badge.loc-pantry { background: #f5eee2; color: #8a6a2e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.loc-fridge { color: #8fb3ea; }
  :root:not([data-theme="light"]) .badge.loc-freezer { background: #173139; color: #7cc8df; }
  :root:not([data-theme="light"]) .badge.loc-pantry { background: #2f2819; color: #d7b877; }
}
input[type=text], input[type=number], input[type=date], input[type=password], input:not([type]), select, textarea {
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.empty { color: var(--ink-3); padding: 18px 0; text-align: center; }

/* ---------- log tab */
.log-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .log-grid { grid-template-columns: minmax(0, 1fr); } }
.composer textarea {
  width: 100%; min-height: 110px; resize: vertical; font-size: 16px; line-height: 1.5; padding: 12px 14px; border-radius: 10px;
}
.composer .actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mic {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.mic svg { width: 20px; height: 20px; }
.mic.on { background: var(--bad); border-color: var(--bad); color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(184,56,47,.45)} 70%{box-shadow:0 0 0 12px rgba(184,56,47,0)} 100%{box-shadow:0 0 0 0 rgba(184,56,47,0)} }
.hint { color: var(--ink-3); font-size: 12px; }
.thread { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 10px 13px; border-radius: 12px; max-width: 92%; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: var(--accent-soft); }
.bubble.claude { background: var(--panel-2); border: 1px solid var(--line); }
.bubble.error { background: var(--bad-soft); color: var(--bad); }
.bubble.question { border-left: 3px solid var(--accent); }
.thinking { color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview { border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; background: var(--panel); }
.preview .msg { font-weight: 500; margin-bottom: 8px; }
.preview .foot { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.warnings { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.warnings div + div { margin-top: 4px; }
.sec + .sec { margin-top: 12px; }
.sec h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.sec ul { margin: 0; padding-left: 18px; }
.banner { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.banner .b { padding: 9px 13px; border-radius: 10px; display: flex; gap: 10px; align-items: center; }
.banner .b.expired, .banner .b.today { background: var(--bad-soft); color: var(--bad); }
.banner .b.tomorrow, .banner .b.soon, .banner .b.low { background: var(--warn-soft); color: var(--warn); }
.banner .b .btn { margin-left: auto; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.callout b { display: block; margin-bottom: 4px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; display: flex; gap: 14px; align-items: center; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.25);
  max-width: 92vw;
}
.toast .btn { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.quick .q { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.quick .q:first-child { border-top: 0; }
.quick .q .t { flex: 1; min-width: 0; }
.quick .q .t div:last-child { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); align-items: center; }
.entry:first-child { border-top: 0; }
.entry .t { flex: 1; min-width: 0; }
.entry .t div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry.undone { opacity: .5; text-decoration: line-through; }

/* ---------- nutrition tables */
.tw { overflow-x: auto; }
table.nt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.nt th, table.nt td { padding: 5px 7px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.nt th { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
table.nt th:first-child, table.nt td:first-child { text-align: left; white-space: normal; padding-left: 0; }
table.nt td:first-child .q { color: var(--ink-3); font-size: 12px; margin-left: 5px; }
table.nt tr.total td { font-weight: 700; border-bottom: 0; border-top: 1.5px solid var(--line); }
table.nt tr.running td { color: var(--ink-2); font-style: italic; border-bottom: 0; }
table.nt td.item-click { cursor: pointer; }
table.nt td.item-click:hover .n { text-decoration: underline; }
.meal { margin-bottom: 16px; }
.meal-h { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.meal-h b { font-size: 14px; }
.meal-h .time { color: var(--ink-3); font-size: 12px; }
.meal-h .btns { margin-left: auto; display: flex; gap: 4px; opacity: .55; }
.meal:hover .meal-h .btns { opacity: 1; }
.targets { list-style: none; padding: 0; margin: 10px 0 0; }
.targets li { padding: 2px 0; }
.targets li .v { font-variant-numeric: tabular-nums; }
.targets li .n { color: var(--ink-3); }
.extras { font-size: 13px; color: var(--ink-2); margin: 6px 0; }

/* ---------- weeks */
.weeks-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .weeks-grid { grid-template-columns: minmax(0, 1fr); } .week-list { position: static; max-height: 260px; } }
.week-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 72px; max-height: calc(100vh - 100px); overflow: auto; }
.wk {
  text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.wk:hover { border-color: var(--ink-3); }
.wk.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wk .top { display: flex; justify-content: space-between; align-items: baseline; }
.wk .top b { font-size: 15px; }
.wk .dates { color: var(--ink-2); font-size: 12px; }
.wk .stats { color: var(--ink-3); font-size: 12px; margin-top: 3px; }
.day-card { margin-bottom: 14px; }
.day-card.empty-day { opacity: .55; }
.day-card .dh { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.day-card .dh .dn { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.day-card .dh b { font-size: 15px; }
.day-card .dh .sum { margin-left: auto; color: var(--ink-2); font-size: 13px; }
.day-card .body { margin-top: 12px; }
.day-card.collapsed .body { display: none; }
.week-summary .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.stat .l { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- inventory */
.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.seg button .c { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
table.inv { width: 100%; border-collapse: collapse; }
table.inv th, table.inv td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); text-align: left; }
table.inv th { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
table.inv tr.main { cursor: pointer; }
table.inv tr.main:hover td { background: var(--panel-2); }
table.inv tr.lots td { background: var(--panel-2); padding: 4px 8px 10px 26px; }
table.inv .lot { display: flex; gap: 12px; align-items: center; padding: 4px 0; font-size: 13px; }
table.inv .lot > span:first-child { min-width: 80px; font-weight: 600; }
.bar-left { height: 4px; background: var(--line-2); border-radius: 2px; width: 70px; margin-top: 4px; overflow: hidden; }
.bar-left i { display: block; height: 100%; background: var(--accent); }
.bar-left.low i { background: var(--warn); }

/* ---------- ingredients */
table.ing { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ing th, table.ing td { padding: 6px 7px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
table.ing th { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
table.ing th:first-child, table.ing td:first-child { text-align: left; white-space: normal; }
table.ing tr { cursor: pointer; }
table.ing tr:hover td { background: var(--panel-2); }
table.ing .al { color: var(--ink-3); font-size: 12px; }

/* ---------- shopping */
.shop-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.shop-item:first-child { border-top: 0; }
.shop-item.done .n { text-decoration: line-through; color: var(--ink-3); }
.shop-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- settings */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; align-items: start; }
.set-grid .card + .card { margin-top: 0; }
.field { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.field label { color: var(--ink-2); }
table.tg { border-collapse: collapse; width: 100%; }
table.tg td, table.tg th { padding: 4px 6px; text-align: left; }
table.tg th { font-size: 11px; color: var(--ink-3); text-transform: uppercase; }
table.tg input, table.tg select { width: 100%; min-width: 0; }
table.tg td:nth-child(3) { width: 120px; }
table.tg td:nth-child(2), table.tg td:nth-child(4) { width: 95px; }

/* ---------- modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 12, 8, .45); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; padding: 18px 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.modal .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.modal .fields .f { display: flex; flex-direction: column; gap: 4px; }
.modal .fields .f.wide { grid-column: 1 / -1; }
.modal .fields .f label { font-size: 12px; color: var(--ink-2); }
.modal .fields .f.check { flex-direction: row; align-items: center; gap: 8px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.modal .foot .left { margin-right: auto; }

@media (max-width: 720px) {
  .bar { flex-wrap: wrap; padding: 8px 16px; gap: 8px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .search-results { width: 100%; }
  main { padding: 14px 16px; }
  .field { grid-template-columns: 1fr; gap: 4px; }
  .set-grid { grid-template-columns: 1fr; }
  .modal .fields { grid-template-columns: 1fr; }
}

/* ---- colour themes (accent). Green is the default in :root above. ---- */
:root[data-accent="blue"] { --accent: #2463b0; --accent-ink: #ffffff; --accent-soft: #e3edf9; }
:root[data-accent="blue"][data-theme="dark"] { --accent: #6aa7ee; --accent-ink: #0b1626; --accent-soft: #1c2c42; }
:root[data-accent="indigo"] { --accent: #4a4fb8; --accent-ink: #ffffff; --accent-soft: #e9e9f8; }
:root[data-accent="indigo"][data-theme="dark"] { --accent: #9296f0; --accent-ink: #121330; --accent-soft: #262848; }
:root[data-accent="purple"] { --accent: #7a3fa8; --accent-ink: #ffffff; --accent-soft: #f1e8f7; }
:root[data-accent="purple"][data-theme="dark"] { --accent: #bb8ae6; --accent-ink: #1c1026; --accent-soft: #33253f; }
:root[data-accent="teal"] { --accent: #12767c; --accent-ink: #ffffff; --accent-soft: #ddf0f1; }
:root[data-accent="teal"][data-theme="dark"] { --accent: #4ec2c8; --accent-ink: #06201f; --accent-soft: #173435; }
:root[data-accent="amber"] { --accent: #9c5208; --accent-ink: #ffffff; --accent-soft: #fbeedd; }
:root[data-accent="amber"][data-theme="dark"] { --accent: #efa94e; --accent-ink: #26170a; --accent-soft: #3a2a17; }
:root[data-accent="rose"] { --accent: #b3365c; --accent-ink: #ffffff; --accent-soft: #fae6ec; }
:root[data-accent="rose"][data-theme="dark"] { --accent: #f0829f; --accent-ink: #2a0d16; --accent-soft: #3d2129; }
:root[data-accent="slate"] { --accent: #3f4a5a; --accent-ink: #ffffff; --accent-soft: #e7eaee; }
:root[data-accent="slate"][data-theme="dark"] { --accent: #a6b3c4; --accent-ink: #121820; --accent-soft: #283039; }
@media (prefers-color-scheme: dark) {
  :root[data-accent="blue"]:not([data-theme="light"]) { --accent: #6aa7ee; --accent-ink: #0b1626; --accent-soft: #1c2c42; }
  :root[data-accent="indigo"]:not([data-theme="light"]) { --accent: #9296f0; --accent-ink: #121330; --accent-soft: #262848; }
  :root[data-accent="purple"]:not([data-theme="light"]) { --accent: #bb8ae6; --accent-ink: #1c1026; --accent-soft: #33253f; }
  :root[data-accent="teal"]:not([data-theme="light"]) { --accent: #4ec2c8; --accent-ink: #06201f; --accent-soft: #173435; }
  :root[data-accent="amber"]:not([data-theme="light"]) { --accent: #efa94e; --accent-ink: #26170a; --accent-soft: #3a2a17; }
  :root[data-accent="rose"]:not([data-theme="light"]) { --accent: #f0829f; --accent-ink: #2a0d16; --accent-soft: #3d2129; }
  :root[data-accent="slate"]:not([data-theme="light"]) { --accent: #a6b3c4; --accent-ink: #121820; --accent-soft: #283039; }
}
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }

/* ---- finances ---- */
:root { --ser-food: #2a78d6; --ser-other: #eb6834; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ser-food: #3987e5; --ser-other: #d95926; } }
:root[data-theme="dark"] { --ser-food: #3987e5; --ser-other: #d95926; }
#sectionSeg { flex: none; }
#sectionSeg button { padding: 5px 12px; font-weight: 600; }
.bad-text { color: var(--bad); }
.bud-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 22px; }
.bud-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.bud-top b { font-size: 15px; }
.bud-left { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.bud.over .bud-left { color: var(--bad); }
.bud-track { height: 12px; background: var(--line-2); border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.bud-track i { display: block; height: 100%; border-radius: 6px; transition: width .3s; }
.bud.over .bud-track { box-shadow: inset 0 0 0 2px var(--bad); }
i.ser-food, .dot.ser-food, .legend i.ser-food { background: var(--ser-food); }
i.ser-other, .dot.ser-other, .legend i.ser-other { background: var(--ser-other); }
.fin-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); color: var(--ink-2); }
.fin-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.exp { display: flex; align-items: flex-start; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--line-2); border-radius: 6px; }
.exp:last-of-type { border-bottom: 0; }
.exp:not(.fixed) { cursor: pointer; }
.exp:not(.fixed):hover, .exp:focus-visible { background: var(--panel-2); outline: none; }
.exp .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.exp .amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.exp.fixed .amt { color: var(--ink-2); }
.day-card.future { opacity: .45; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.ref-sw { height: 0; border-top: 2px dashed var(--ink-3); border-radius: 0; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--line-2); stroke-width: 1; }
svg.chart .ref { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 5 4; }
svg.chart .ax { fill: var(--ink-3); font-size: 11px; }
svg.chart .lbl { fill: var(--ink); font-size: 12px; font-weight: 600; }
svg.chart path.ser-food, svg.chart rect.ser-food { fill: var(--ser-food); }
svg.chart path.ser-other { fill: var(--ser-other); }
svg.chart .hit { fill: transparent; }
svg.chart .hit:hover { fill: var(--ink); fill-opacity: .04; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow); border-radius: 8px; padding: 7px 10px; font-size: 12px; line-height: 1.45; max-width: 260px; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hb { display: grid; grid-template-columns: minmax(90px, 170px) 1fr auto; gap: 10px; align-items: center; }
.hb .hl { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .ht { height: 12px; }
.hb .ht i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.hb .hv { font-variant-numeric: tabular-nums; font-size: 13px; }
.tbl-view { margin-top: 10px; }
.tbl-view summary { cursor: pointer; color: var(--ink-2); }
@media (max-width: 600px) { .hb { grid-template-columns: 90px 1fr auto; } }

/* v1.6: offline notice, update log */
.callout.warn { background: var(--warn-soft); }
.good-text { color: var(--ok); }
.upd-log { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 10px; max-height: 260px; overflow: auto; font-family: ui-monospace, Consolas, monospace; }
/* Monster tracker */
:root { --ser-monster: #4f9a2a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ser-monster: #7cc043; } }
:root[data-theme="dark"] { --ser-monster: #7cc043; }
svg.chart path.ser-monster { fill: var(--ser-monster); }

/* =====================================================================================
   Phones (≤ 640 px wide). Everything below only applies on narrow screens, so the desktop
   and laptop layout is untouched.
   ===================================================================================== */
.icon-btn { display: none; border: 0; background: none; color: var(--ink-2); padding: 8px; border-radius: 10px; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; display: block; }
#tabbar, #moreSheet { display: none; }

@media (max-width: 640px) {
  :root { --tabbar-h: 60px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* slim header: name + Food/Finances + search button; tabs move to the bottom bar */
  header { padding-top: env(safe-area-inset-top); }
  .bar { flex-wrap: nowrap; padding: 8px 12px; gap: 8px; }
  .brand { font-size: 15px; }
  #nav { display: none; }
  .seg button { padding: 7px 12px; }
  .icon-btn { display: block; margin-left: auto; }
  .search { display: none; }
  body.searching .bar { flex-wrap: wrap; }
  body.searching .search { display: block; width: 100%; order: 5; }
  .search input { font-size: 16px; padding: 10px 12px; }

  main { padding: 12px 12px 20px; }
  .card { padding: 14px; border-radius: 14px; }
  h2 { font-size: 16px; }

  /* bottom tab bar */
  #tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  #tabbar button {
    position: relative; border: 0; background: none; color: var(--ink-3); display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; cursor: pointer; padding: 0 2px; min-width: 0;
  }
  #tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #tabbar button svg { width: 23px; height: 23px; }
  #tabbar button.on { color: var(--accent); }
  #tabbar button.on svg { stroke-width: 2.3; }
  #tabbar .dotbadge {
    position: absolute; top: 5px; left: calc(50% + 6px); background: var(--bad); color: #fff; font-style: normal; font-size: 10px;
    font-weight: 700; min-width: 17px; height: 17px; line-height: 17px; border-radius: 9px; padding: 0 4px;
  }
  #moreSheet:not([hidden]) { display: block; }
  #moreSheet .more-bg { position: fixed; inset: 0; z-index: 38; background: rgba(10, 12, 8, .25); }
  #moreSheet .more-card {
    position: fixed; right: 10px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 39; min-width: 210px;
    background: var(--panel); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 6px; display: flex; flex-direction: column;
  }
  #moreSheet .more-card button { border: 0; background: none; text-align: left; padding: 13px 14px; border-radius: 10px; font-size: 15px; color: var(--ink); cursor: pointer; }
  #moreSheet .more-card button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  #moreSheet .more-card .switch { border-top: 1px solid var(--line-2); border-radius: 0 0 10px 10px; color: var(--ink-2); }

  .toast { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }

  /* log: bigger box and buttons, no keyboard hints */
  .composer textarea { font-size: 16px; min-height: 96px; }
  #hint { visibility: hidden; }
  .composer .actions .btn, .mic { min-height: 44px; }
  .mic { width: 44px; height: 44px; }
  .meal-h .btns { opacity: 1; }
  .btn.sm { padding: 6px 11px; min-height: 32px; }

  /* nutrition tables become compact cards: name on its own line, numbers wrap underneath */
  table.nt thead { display: none; }
  table.nt, table.nt tbody, table.nt tr { display: block; width: 100%; }
  table.nt tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
  table.nt td { border: 0 !important; padding: 0; text-align: left; font-size: 13px; }
  table.nt td:first-child { flex: 0 0 100%; font-size: 14px; }
  table.nt td[data-l]::before { content: attr(data-l); color: var(--ink-3); font-size: 11px; margin-right: 3px; }
  table.nt td[data-l=""]::before { content: none; }
  table.nt td[data-l=""] { font-weight: 600; }
  table.nt tr.total, table.nt tr.running { border-top: 1.5px solid var(--line); border-bottom: 0; }
  table.nt tr.total td { font-weight: 700; }

  /* inventory rows as cards */
  table.inv thead { display: none; }
  table.inv, table.inv tbody, table.inv tr { display: block; width: 100%; }
  table.inv tr.main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 11px 2px; border-bottom: 1px solid var(--line-2); position: relative; }
  table.inv td { border: 0; padding: 0; font-size: 13px; }
  table.inv tr.main td:first-child { flex: 0 0 calc(100% - 24px); font-size: 15px; }
  table.inv td.chev { position: absolute; right: 4px; top: 12px; }
  table.inv td.opt { display: none; }
  table.inv td[data-l]::before { content: attr(data-l); display: block; color: var(--ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
  table.inv tr.lots td { display: block; padding: 6px 10px 10px; }
  table.inv .lot { flex-wrap: wrap; gap: 4px 10px; }
  #tab-inventory .row { gap: 8px; }
  #locSeg { width: 100%; overflow-x: auto; }
  #locSeg button { white-space: nowrap; }

  /* ingredients as cards */
  table.ing thead { display: none; }
  table.ing, table.ing tbody, table.ing tr { display: block; width: 100%; }
  table.ing tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; padding: 10px 2px; border-bottom: 1px solid var(--line-2); }
  table.ing td { border: 0; padding: 0; text-align: left; white-space: nowrap; }
  table.ing td:first-child { flex: 0 0 100%; white-space: normal; font-size: 14px; }
  table.ing td.opt { display: none; }
  table.ing td[data-l]::before { content: attr(data-l); color: var(--ink-3); font-size: 11px; margin-right: 3px; }
  table.ing td[data-l=""]::before { content: none; }
  #ingTable.tw { overflow: visible; }

  /* weeks: a sideways strip of weeks instead of a tall list */
  .week-list { flex-direction: row; overflow-x: auto; max-height: none; position: static; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .wk { flex: 0 0 72%; scroll-snap-align: start; }
  .day-card .dh { flex-wrap: wrap; }

  /* settings */
  table.tg td:nth-child(3) { width: 96px; }
  table.tg td:nth-child(2), table.tg td:nth-child(4) { width: 70px; }
  input, select, textarea { font-size: 16px; }

  /* pop-up forms slide up from the bottom */
  .modal-bg { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  .modal .foot { position: sticky; bottom: -16px; background: var(--panel); padding-top: 10px; }
  .modal .foot .btn { min-height: 44px; flex: 1; }
  .modal .foot .left { flex: 0 0 auto; }
}
@media (max-width: 640px) {
  /* log tab order on a phone: type box, today, log again, recent entries */
  #tab-log .log-grid { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  #tab-log .log-grid > div { display: contents; }
  #tab-log .composer { order: 1; }
  #tab-log .log-grid > div:last-child > .card:first-child { order: 2; }
  #tab-log .quick { order: 3; }
  #tab-log .log-grid > div:last-child > .card:last-child { order: 4; }
  #tab-log .log-grid > div > .card { margin-bottom: 0; min-width: 0; }

  /* daily targets: one row per nutrient, three labelled boxes underneath */
  table.tg thead { display: none; }
  table.tg, table.tg tbody { display: block; }
  table.tg tr { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
  table.tg td { padding: 0; width: auto !important; }
  table.tg td:first-child { grid-column: 1 / -1; font-weight: 600; }
  table.tg td[data-l]::before { content: attr(data-l); display: block; color: var(--ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
}
@media (max-width: 640px) {
  table.nt td[data-l="$"]::before { content: "$"; color: inherit; font-size: inherit; margin: 0; }
  table.nt td[data-l="$"] { font-weight: 600; }
}

/* barcode scanner (phones) */
.scanner { position: fixed; inset: 0; z-index: 80; background: #000; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .scan-frame { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scanner .scan-frame i {
  width: min(78vw, 360px); height: min(40vw, 190px); border-radius: 14px; border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.45);
}
.scanner .scan-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; }
.scanner .scan-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 20px; cursor: pointer; }
.scanner .scan-bottom {
  position: absolute; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); text-align: center; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 15px; text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.scanner .scan-bottom .btn { background: rgba(255,255,255,.92); color: #111; border: 0; }
.scan-found { display: flex; gap: 12px; align-items: center; margin: -6px 0 12px; }
.scan-found img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
@media (max-width: 640px) {
  .modal { width: 100% !important; }
  .modal .foot { flex-wrap: wrap; }
  .modal .foot .btn { flex: 1 1 40%; }
  .modal .foot [data-a="ok"] { flex-basis: 100%; order: -1; }
}

/* budget pie (Finances → week) */
.pie-wrap { display: flex; align-items: center; gap: 18px; margin: 14px 0 6px; flex-wrap: wrap; }
svg.pie { width: 132px; height: 132px; flex: none; }
svg.pie path.ser-food { fill: var(--ser-food); }
svg.pie path.ser-other { fill: var(--ser-other); }
svg.pie path.pie-free { fill: var(--line); }
svg.pie .pie-split { stroke: var(--panel); stroke-width: 2.5; }
.pie-legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; min-width: 0; }
.pie-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pie-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.pie-row i.ser-food { background: var(--ser-food); }
.pie-row i.ser-other { background: var(--ser-other); }
.pie-row i.pie-free { background: var(--line); }

/* ===================================================================================
   Themes. "Plain" is a neutral white/black look (the default). Every colour theme also
   tints the page, cards, panels and outlines slightly, in both light and dark mode.
   =================================================================================== */
:root[data-accent="plain"] {
  --accent: #1d1f1c; --accent-ink: #ffffff; --accent-soft: #ececea;
  --bg: #f4f4f3; --panel: #ffffff; --panel-2: #f9f9f8; --line: #e3e3e0; --line-2: #eeeeec;
}
:root[data-accent="plain"][data-theme="dark"] {
  --accent: #f1f1ef; --accent-ink: #121212; --accent-soft: #2b2b2a;
  --bg: #0f0f0f; --panel: #1a1a1a; --panel-2: #1f1f1f; --line: #2f2f2f; --line-2: #252525;
}
@media (prefers-color-scheme: dark) {
  :root[data-accent="plain"]:not([data-theme="light"]) {
    --accent: #f1f1ef; --accent-ink: #121212; --accent-soft: #2b2b2a;
    --bg: #0f0f0f; --panel: #1a1a1a; --panel-2: #1f1f1f; --line: #2f2f2f; --line-2: #252525;
  }
}
/* colour themes: surfaces and outlines pick up a little of the theme colour */
:root[data-accent]:not([data-accent="plain"]) {
  --bg: color-mix(in srgb, var(--accent) 9%, #f7f7f5);
  --panel: color-mix(in srgb, var(--accent) 2.5%, #ffffff);
  --panel-2: color-mix(in srgb, var(--accent) 6%, #fbfbfa);
  --line: color-mix(in srgb, var(--accent) 24%, #e4e4e0);
  --line-2: color-mix(in srgb, var(--accent) 13%, #efefec);
  --shadow: 0 1px 2px color-mix(in srgb, var(--accent) 12%, rgba(20, 20, 10, .05)), 0 4px 16px color-mix(in srgb, var(--accent) 10%, rgba(20, 20, 10, .04));
}
:root[data-accent]:not([data-accent="plain"])[data-theme="dark"] {
  --bg: color-mix(in srgb, var(--accent) 7%, #101110);
  --panel: color-mix(in srgb, var(--accent) 7%, #1a1b1a);
  --panel-2: color-mix(in srgb, var(--accent) 9%, #1f201f);
  --line: color-mix(in srgb, var(--accent) 26%, #2c2d2c);
  --line-2: color-mix(in srgb, var(--accent) 15%, #242524);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
@media (prefers-color-scheme: dark) {
  :root[data-accent]:not([data-accent="plain"]):not([data-theme="light"]) {
    --bg: color-mix(in srgb, var(--accent) 7%, #101110);
    --panel: color-mix(in srgb, var(--accent) 7%, #1a1b1a);
    --panel-2: color-mix(in srgb, var(--accent) 9%, #1f201f);
    --line: color-mix(in srgb, var(--accent) 26%, #2c2d2c);
    --line-2: color-mix(in srgb, var(--accent) 15%, #242524);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
/* a touch more colour on the main pieces */
:root[data-accent]:not([data-accent="plain"]) .card { border-top: 2px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }
:root[data-accent]:not([data-accent="plain"]) header { border-bottom-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.swatch[data-accent-pick="plain"] { background: linear-gradient(135deg, #ffffff 50%, #1d1f1c 50%) !important; }

/* =====================================================================================
   Planner
   ===================================================================================== */
:root { --gutter: 52px; }
.add-btn { margin-left: auto; }
.brand .dot { background: var(--accent); }
.cal-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-bar h2 { margin: 0; font-size: 19px; flex: 1; min-width: 160px; }
.cal-nav { display: flex; gap: 2px; }
.icon-nav { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer; }
.icon-nav:hover { background: var(--panel-2); }

/* event colours: each item sets --ev */
.ev, .ad-chip, .mo-ev, .up-item { --ev-bg: color-mix(in srgb, var(--ev) 16%, var(--panel)); --ev-line: var(--ev); }
:root[data-theme="dark"] .ev, :root[data-theme="dark"] .ad-chip, :root[data-theme="dark"] .mo-ev { --ev-bg: color-mix(in srgb, var(--ev) 26%, var(--panel)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.ev, .ad-chip, .mo-ev) { --ev-bg: color-mix(in srgb, var(--ev) 26%, var(--panel)); } }
.ev-course { font-weight: 700; font-size: .9em; opacity: .85; }

/* week / day time grid */
.tg-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tg-head, .tg-all { display: grid; border-bottom: 1px solid var(--line); }
.tg-day { border: 0; background: none; padding: 6px 2px; cursor: pointer; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 0; }
.tg-day span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.tg-day b { font-size: 18px; font-weight: 600; color: var(--ink); width: 32px; height: 32px; line-height: 32px; border-radius: 50%; }
.tg-day.today b { background: var(--accent); color: var(--accent-ink); }
.one-day .tg-day { flex-direction: row; justify-content: center; gap: 8px; cursor: default; }
.tg-all { min-height: 30px; }
.tg-all.empty { min-height: 8px; }
.tg-gut { position: relative; }
.tg-all .tg-gut { font-size: 10px; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; }
.tg-allcell { border-left: 1px solid var(--line-2); padding: 3px 2px; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.ad-chip { background: var(--ev-bg); border-left: 3px solid var(--ev-line); border-radius: 5px; padding: 1px 6px; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: var(--ink); }
.ad-chip.bday { border-radius: 99px; border-left-width: 0; background: color-mix(in srgb, var(--ev) 22%, var(--panel)); }
.ad-chip.ph { font-style: italic; }
.tg-body { height: calc(100vh - 210px); min-height: 380px; overflow-y: auto; position: relative; }
.tg-inner { display: grid; position: relative;
  background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px var(--hour)); }
.tg-hr { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.tg-col { position: relative; border-left: 1px solid var(--line-2); cursor: copy; }
.tg-col.today { background: color-mix(in srgb, var(--accent) 5%, transparent); }
/* quiet hours (before 6am, after 10pm) shaded a little darker in day/week views */
.tg-col::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--offhours) 0, var(--offhours) calc(var(--hour) * 6), transparent calc(var(--hour) * 6),
    transparent calc(var(--hour) * 22), var(--offhours) calc(var(--hour) * 22)); }
:root { --offhours: rgba(0,0,0,.045); }
:root[data-theme="dark"] { --offhours: rgba(0,0,0,.22); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --offhours: rgba(0,0,0,.22); } }
.ev { position: absolute; background: var(--ev-bg); border-left: 3px solid var(--ev-line); border-radius: 6px; padding: 3px 6px;
  overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.25; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ev:hover { filter: brightness(.97); z-index: 3; }
.ev .ev-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ev .ev-m { color: var(--ink-2); font-size: 11px; margin-top: 1px; }
.ev.short { padding-top: 1px; }
.ev.short .ev-t { white-space: nowrap; }
.ev.deadline { border-left: 0; border-radius: 4px; background: var(--ev); color: #fff; padding: 4px 6px; z-index: 2; }
.ev.deadline .ev-t { white-space: nowrap; }
.ev.done, .mo-ev.done { opacity: .55; }
.ev.done .ev-t, .mo-ev.done { text-decoration: line-through; }
.ev.exam { border-left-width: 5px; }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: #e5484d; z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }

/* month */
.mo { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mo-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.mo-head div { padding: 7px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(108px, 1fr); }
.mo-cell { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.mo-cell:nth-child(7n) { border-right: 0; }
.mo-cell.out { background: var(--panel-2); }
.mo-cell.out .mo-num { color: var(--ink-3); }
.mo-num { font-size: 12px; font-weight: 600; padding: 1px 4px; align-self: flex-start; border-radius: 99px; }
.mo-cell.today .mo-num { background: var(--accent); color: var(--accent-ink); }
.mo-ev { display: flex; align-items: center; gap: 4px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; padding: 0 3px; color: var(--ink); }
.mo-ev i { width: 7px; height: 7px; border-radius: 50%; background: var(--ev); flex: none; }
.mo-ev.assignment, .mo-ev.exam { background: var(--ev-bg); }
.mo-time { color: var(--ink-3); font-size: 10.5px; }
.mo-more { font-size: 11px; color: var(--ink-3); padding-left: 4px; }

/* chips (weekday picker, reminders) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 5px 11px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.modal input[type=color] { width: 56px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }

/* upcoming */
.up-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.up-grid > div { display: flex; flex-direction: column; gap: 16px; }
.up-grid .card h3 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.up-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.up-bar { width: 4px; align-self: stretch; border-radius: 3px; background: var(--ev); flex: none; }
.up-item.overdue .up-cd { color: var(--bad); }
.up-cd { font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.up-cd.soon { color: var(--warn); }
.up-mini { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 13px; }
.up-mini i { width: 8px; height: 8px; border-radius: 50%; background: var(--ev); flex: none; }
.up-mini span { color: var(--ink-3); min-width: 110px; }

/* to-do */
.todo-card { max-width: 760px; }
.todo-add { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.todo-add #todoTitle { flex: 1 1 220px; min-width: 0; }
.todo { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.todo input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.todo-t { cursor: pointer; margin-right: 6px; }
.todo.done .todo-t { text-decoration: line-through; color: var(--ink-3); }
.todo-done { margin-top: 10px; }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* settings */
.kind-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.kind-row:first-of-type { border-top: 0; }
.kind-row input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.kind-row b { min-width: 110px; }
.kind-row .small { flex: 1; }

@media (max-width: 900px) { .up-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  :root { --gutter: 38px; }
  .cal-bar { gap: 6px; }
  .cal-bar h2 { order: -1; flex-basis: 100%; font-size: 17px; }
  #viewSeg { margin-left: auto; }
  .tg-body { height: calc(100vh - 250px - env(safe-area-inset-bottom)); }
  .tg-day b { font-size: 15px; width: 26px; height: 26px; line-height: 26px; }
  .tg-day span { font-size: 9.5px; }
  .ev { font-size: 11px; padding: 2px 3px; border-left-width: 2px; }
  .ev .ev-m { font-size: 10px; }
  .tg-hr { font-size: 9.5px; right: 3px; }
  .ad-chip { font-size: 10.5px; padding: 1px 3px; }
  .mo-grid { grid-auto-rows: minmax(76px, 1fr); }
  .mo-cell { padding: 2px; }
  .mo-ev { font-size: 10px; }
  .mo-ev .mo-time { display: none; }
  .add-btn { padding: 7px 12px; }
  .todo-add #todoDate, .todo-add #todoTime { flex: 1 1 40%; }
}

/* ================================================================== Pilot Drop */
html[data-app="drop"] { --accent: #b85f14; --accent-ink: #ffffff; --accent-soft: #f8eadb; --ok: #2f7d5b; }
@media (prefers-color-scheme: dark) {
  html[data-app="drop"]:not([data-theme="light"]) { --accent: #eb9a52; --accent-ink: #1e1307; --accent-soft: #3a2a1a; --ok: #5cc08f; }
}
html[data-app="drop"][data-theme="dark"] { --accent: #eb9a52; --accent-ink: #1e1307; --accent-soft: #3a2a1a; --ok: #5cc08f; }

.pd-main { max-width: 1080px; margin: 0 auto; padding: 20px 20px 60px; }
.pd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pd-head h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.meter { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.link-card { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line);
  background: var(--panel); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.link-card:hover { border-color: var(--ink-3); }
.link-card .t { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.link-card.off { opacity: .6; }
.kind { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); }
.urlbox { display: flex; gap: 8px; align-items: center; }
.urlbox input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); }
.grid-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; display: flex; flex-direction: column;
  cursor: pointer; text-align: left; padding: 0; }
.tile .pic { aspect-ratio: 1; background: var(--panel-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .pic svg { width: 42px; height: 42px; color: var(--ink-3); }
.tile .pic .new { position: absolute; top: 6px; left: 6px; }
.tile .meta { padding: 7px 9px 8px; font-size: 12px; min-width: 0; }
.tile .meta .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.qi { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--panel); display: grid;
  grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.qi .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.qi .bar2 { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.qi .bar2 > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.qi.done .bar2 > i { background: var(--ok); }
.qi.failed .bar2 > i { background: var(--bad); }
.drop-zone { border: 2px dashed var(--line); border-radius: 14px; padding: 28px 16px; text-align: center; background: var(--panel);
  display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drop-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone .big { font-size: 16px; font-weight: 600; }
.viewer img, .viewer video { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto 12px; border-radius: 8px; background: #000; }
.viewer audio { width: 100%; margin-bottom: 12px; }
.visitor { max-width: 640px; margin: 0 auto; padding: 28px 16px 60px; }
.visitor .brand { margin-bottom: 18px; }
.visitor h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.01em; }
@media (max-width: 640px) {
  .pd-main { padding: 14px 12px 40px; }
  .grid-files { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .links { grid-template-columns: 1fr; }
}
a.btn { text-decoration: none; color: inherit; display: inline-block; }
a.btn.primary { color: var(--accent-ink); }

/* ---- 1.2: a bit more life ---- */
html[data-app="drop"] { --warm: #fbf1e6; --warm-2: #f6e2cc; }
@media (prefers-color-scheme: dark) { html[data-app="drop"]:not([data-theme="light"]) { --warm: #2a2119; --warm-2: #33271b; } }
html[data-app="drop"][data-theme="dark"] { --warm: #2a2119; --warm-2: #33271b; }
html[data-app="drop"] header { border-bottom-color: transparent; box-shadow: inset 0 -3px 0 var(--accent); }
.brand .logo { width: 26px; height: 26px; border-radius: 7px; display: block; }
.art { display: block; width: 100%; height: auto; }
.art .a { fill: var(--accent); }
.art .s2 { fill: var(--warm-2); }
.art .tr { stroke: var(--accent); opacity: .5; }
.art .a2 { fill: color-mix(in srgb, var(--accent) 45%, var(--warm-2)); }
.art .a3 { fill: color-mix(in srgb, var(--accent) 72%, var(--warm-2)); }
.art .ln { stroke: var(--accent); }
.art .cx { stroke: var(--warm); }
.hero { position: relative; display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin-bottom: 26px; border-radius: 18px;
  background: linear-gradient(135deg, var(--warm) 0%, var(--panel) 70%); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.hero-text { flex: 1; min-width: 0; }
.hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.hero h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; }
.hero p { margin: 0; }
.hero-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero-store { margin-top: 16px; max-width: 460px; display: flex; flex-direction: column; gap: 6px; }
.hero-art { width: 150px; flex: none; animation: pd-float 5s ease-in-out infinite; }
@keyframes pd-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art { animation: none; } }
h2.sec { font-size: 15px; margin: 26px 0 10px; display: flex; align-items: baseline; gap: 8px; }
h2.sec:first-of-type { margin-top: 0; }
h2.sec span { font-weight: 400; font-size: 13px; color: var(--ink-3); }
.link-card { flex-direction: row; align-items: center; gap: 14px; transition: transform .12s, box-shadow .12s, border-color .12s; color: inherit; font: inherit; }
.link-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 18px rgba(120, 60, 10, .10); }
.link-card .lc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.link-card .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.link-card .go { font-size: 22px; color: var(--ink-3); line-height: 1; }
.link-card:hover .go { color: var(--accent); }
.chip { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--warm); display: grid; place-items: center; padding: 6px; }
.chip.big { width: 40px; height: 40px; padding: 5px; }

.empty-art { text-align: center; color: var(--ink-3); padding: 18px 16px 22px; border: 1px dashed var(--line); border-radius: 14px; background: var(--panel-2); }
.empty-art .art { width: 96px; margin: 0 auto 8px; opacity: .85; }
.empty-art p { margin: 0 auto; max-width: 420px; font-size: 14px; }
.empty-art.big { border: 0; background: none; padding-top: 40px; }
.empty-art.big .art { width: 140px; }
.empty-art.big h1 { color: var(--ink); }
.drop-zone { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--warm), var(--panel)); transition: background .15s, border-color .15s; }
.drop-zone .up { width: 34px; height: 34px; color: var(--accent); }
.drop-zone:hover { border-color: var(--accent); }
.tile { transition: transform .12s, box-shadow .12s, border-color .12s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(120, 60, 10, .10); }
.visitor .brand .logo { width: 30px; height: 30px; border-radius: 8px; }
.v-hero { margin-bottom: 16px; }
.v-hero .hero-art { width: 120px; }
.v-hero h1 { font-size: 24px; }
@media (max-width: 640px) {
  .hero { padding: 18px 16px; gap: 12px; }
  .hero h1 { font-size: 22px; }
  .hero-art { width: 84px; align-self: flex-start; }
  .v-hero .hero-art { width: 72px; }
  .hero-btns .btn { flex: 1 1 auto; }
}

/* ---- 1.4: one kind of link with switches, and the full-screen viewer ---- */
.kind { white-space: nowrap; }
.kind.out { background: var(--warm-2); color: var(--ink-2); }
.kind.both { background: var(--accent); color: var(--accent-ink); }
.link-card .small .kind { margin-right: 4px; font-size: 10px; padding: 1px 6px; vertical-align: 1px; }
.f.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); cursor: pointer; }
.f.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.f.check > span { display: flex; flex-direction: column; gap: 2px; }
.f.check:has(input:checked) { border-color: var(--accent); background: var(--warm); }
.tile[role="button"] { cursor: zoom-in; }
.grid-files .tile { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100; background: #0f0d0b; color: #f4efe8; display: flex; flex-direction: column;
  animation: lb-in .15s ease-out; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(0, 0, 0, .35); }
.lb-name { min-width: 0; display: flex; flex-direction: column; }
.lb-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.lb-name small { color: #b9b1a6; font-size: 12px; }
.lb-count { color: #b9b1a6; font-size: 13px; white-space: nowrap; }
.lb-acts { display: flex; gap: 8px; }
.lb .btn:not(.primary) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #f4efe8; }
.lb .btn.danger { color: #ff9b91; }
.lb a.btn.primary { color: var(--accent-ink); }
.lb-x { background: none; border: 0; color: #f4efe8; font-size: 30px; line-height: 1; padding: 0 4px 4px; cursor: pointer; }
.lb-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 12px 56px; }
.lb-media { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: #d8d0c5; background: rgba(255, 255, 255, .06);
  padding: 28px 30px; border-radius: 16px; min-width: min(360px, 100%); }
.lb-card svg { width: 64px; height: 64px; color: #d8d0c5; }
.lb-card audio { width: 100%; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #f4efe8; font-size: 34px; line-height: 1; }
.lb-nav:hover { background: rgba(255, 255, 255, .16); }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
@media (max-width: 640px) {
  .lb-top { flex-wrap: wrap; }
  .lb-name { flex: 1 1 calc(100% - 60px); order: 0; }
  .lb-x { order: 1; }
  .lb-top .grow { display: none; }
  .lb-count { order: 2; flex: 1; }
  .lb-acts { order: 3; } .lb-dl { order: 4; }
  .lb-stage { padding: 8px 4px; }
  .lb-nav { width: 36px; height: 52px; font-size: 28px; background: rgba(0, 0, 0, .35); }
}

/* ---- 1.6: your vault and devices ---- */
.art .cx2 { fill: var(--warm); }
.vault-card { width: 100%; text-align: left; display: flex; align-items: center; gap: 14px; margin: -8px 0 24px; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--accent); border-radius: var(--radius); background: linear-gradient(135deg, var(--warm), var(--panel) 80%);
  box-shadow: var(--shadow); color: inherit; font: inherit; transition: transform .12s, box-shadow .12s; }
.vault-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(120, 60, 10, .12); }
.vault-card .lc-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.vault-card .t { font-weight: 700; font-size: 16px; }
.vault-card .go { font-size: 22px; color: var(--accent); }
.devs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.dev { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.dev svg, .devrow svg, .send svg { width: 16px; height: 16px; flex: none; }
.dev.me { border-color: var(--accent); background: var(--warm); font-weight: 600; }
.tile .sends { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.send { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(0, 0, 0, .55); color: #fff; }
.send.ok { background: var(--ok); }
.send svg { width: 12px; height: 12px; }
.devlist { display: flex; flex-direction: column; gap: 8px; }
.devrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.devrow svg { width: 22px; height: 22px; color: var(--accent); }
.card.got { margin-bottom: 14px; border-color: var(--ok); }
.got-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.got-list a { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.art .lk { stroke: var(--accent); }
.art .lk-o { stroke: var(--warm); }
.art .lk-b { fill: color-mix(in srgb, var(--accent) 30%, var(--warm)); stroke: var(--warm); stroke-width: 5; }
.tile .pic .send svg { width: 12px; height: 12px; color: #fff; }
.auto-sw { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); cursor: pointer; max-width: 520px; }
.auto-sw input { position: absolute; opacity: 0; pointer-events: none; }
.auto-sw > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.auto-sw .sw { flex: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; margin-top: 2px; }
.auto-sw .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.auto-sw input:checked + .sw { background: var(--accent); }
.auto-sw input:checked + .sw::after { transform: translateX(16px); }
.auto-sw input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- 1.8: folders in the vault, bigger Home button, thicker vault banner ---- */
.btn.back { font-size: 15px; font-weight: 600; padding: 9px 16px; border-radius: 10px; }
.folder-head h1 .crumb { color: var(--ink-3); font-weight: 500; }
.folder-head .chip svg, .folder svg { width: 100%; height: 100%; color: var(--accent); }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.folder { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); box-shadow: var(--shadow); cursor: pointer; text-align: left; color: inherit; font: inherit;
  transition: transform .12s, border-color .12s, box-shadow .12s; }
.folder:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(120, 60, 10, .10); }
.folder > svg { width: 34px; height: 34px; flex: none; }
.folder > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.folder b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder.new { border-style: dashed; box-shadow: none; background: var(--panel-2); }
.folder .plus { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 26px; color: var(--accent); }
@media (min-width: 720px) {
  .vault-card { padding: 22px 24px; gap: 18px; }
  .vault-card .chip { width: 64px; height: 64px; padding: 8px; }
  .vault-card .t { font-size: 19px; }
}
.lb ~ .modal-bg, .modal-bg { z-index: 150; }          /* pop-ups opened from the file viewer sit above it */
