@font-face { font-family: Manrope; src: url(fonts/manrope-latin.woff2) format("woff2"); font-weight: 200 800; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Manrope; src: url(fonts/manrope-latin-ext.woff2) format("woff2"); font-weight: 200 800; unicode-range: U+0100-024F, U+20A6, U+1E00-1EFF; }

:root {
  --bg: #faf7f2; --card: #ffffff; --ink: #1f1d2b; --muted: #6b6878; --line: #ebe6dd;
  --accent: #d9542f; --accent-ink: #ffffff; --accent-soft: #fbe9e2; --ok: #1f7a4d; --ok-soft: #e3f3ea;
  --gold: #b7791f; --shadow: 0 1px 2px rgba(31,29,43,.05), 0 4px 16px rgba(31,29,43,.05); --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15141c; --card: #1f1e28; --ink: #f1eee8; --muted: #a29fae; --line: #2f2d3a;
    --accent: #f0714d; --accent-ink: #1a0f0b; --accent-soft: #3a2420; --ok: #5cc28c; --ok-soft: #1c3226; --shadow: none; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Manrope, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 24px; align-items: center; padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
nav { display: flex; gap: 4px; overflow-x: auto; }
nav a { padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
nav a:hover { color: var(--ink); }
nav a.on { background: var(--ink); color: var(--bg); }

main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 80px; }
.view { display: none; }
.view.on { display: block; }
h1 { font-size: 30px; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 4px 0 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card.accent { background: var(--accent-soft); border-color: transparent; }
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 16px; }

.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > input:first-child { flex: 1 1 200px; }
.stack { display: grid; gap: 8px; margin-top: 12px; }
input, select, textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
button { border: 0; border-radius: 10px; padding: 9px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.05); }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.small { padding: 5px 10px; font-size: 13px; }
button.link { background: none; color: var(--muted); padding: 4px 6px; font-weight: 600; }
button.link:hover, a.alink:hover { color: var(--accent); }
a.alink { color: var(--muted); padding: 4px 6px; font-weight: 600; text-decoration: none; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.chips button { background: var(--card); color: var(--muted); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.chips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: inherit; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .txt { flex: 1; min-width: 0; }
.list .done .txt { text-decoration: line-through; color: var(--muted); }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: none; padding: 0; flex: none; }
.done .check { background: var(--ok); border-color: var(--ok); }
.done .check::after { content: "✓"; color: #fff; font-size: 13px; display: block; line-height: 18px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.tag.hot { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag.late { background: #fde2e2; color: #b42318; border-color: transparent; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.empty { color: var(--muted); padding: 14px 0; }

.place { display: flex; flex-direction: column; gap: 8px; }
.place h3 { margin: 0; font-size: 16px; }
.place .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.place p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.place .act { display: flex; gap: 2px; margin: 0 -6px -6px; flex-wrap: wrap; }
.place.been { opacity: .7; }
.star.on { color: var(--gold); }
details.add summary { cursor: pointer; font-weight: 700; }

.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px; border: 2px dashed var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; text-align: center; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop span { color: var(--muted); font-size: 13px; }
.drop input { display: none; }
.prog { margin-top: 8px; font-size: 13px; color: var(--muted); }
.prog i { display: block; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.prog i b { display: block; height: 100%; background: var(--accent); }
.media .thumb { aspect-ratio: 16/10; background: #000; border-radius: 10px; overflow: hidden; margin: -6px -6px 4px; }
.media .thumb video, .media .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.col { background: color-mix(in srgb, var(--line) 45%, transparent); border-radius: var(--r); padding: 12px; min-height: 120px; }
.col h3 { margin: 2px 4px 10px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.idea { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; cursor: pointer; }
.idea:hover { border-color: var(--accent); }
.idea b { display: block; margin: 6px 0 2px; }
.idea p { margin: 0; color: var(--muted); font-size: 13px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.mail { display: flex; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.mail:first-child { border-top: 0; }
.mail:hover { background: var(--bg); }
.mail .from { width: 190px; flex: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .body { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.mail .body b { color: var(--ink); font-weight: 600; }
.mail.unread .from, .mail.unread .body b { font-weight: 800; }
.mail time { color: var(--muted); font-size: 13px; flex: none; }
.steps { padding-left: 20px; } .steps li { margin-bottom: 6px; }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; word-break: break-all; }

dialog { border: 0; border-radius: var(--r); padding: 0; width: min(520px, 94vw); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20,18,30,.45); }
dialog form { padding: 20px; display: grid; gap: 10px; }
dialog .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
dialog .foot .left { margin-right: auto; }
label.f { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
#toast { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; width: max-content; max-width: min(520px, calc(100% - 32px));
  transform: translate(-50%, calc(-100% - 24px)); visibility: hidden; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px;
  font-weight: 600; line-height: 1.4; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .25s, visibility .25s; z-index: 40; cursor: pointer; }
#toast.show { transform: translate(-50%, 0); visibility: visible; }
#toast.error { background: #b42318; color: #fff; }
#toast.error::before { content: "⚠️ "; }

@media (max-width: 760px) {
  .top { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px; }
  nav { margin: 0 -4px; }
  main { padding: 20px 16px 60px; }
  .grid2, .board { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .mail { flex-wrap: wrap; } .mail .from { width: auto; flex: 1; } .mail .body { flex-basis: 100%; order: 3; }
  h1 { font-size: 25px; }
}

/* Voice */
#micFab { position: fixed; right: 22px; bottom: 22px; z-index: 15; width: 60px; height: 60px; border-radius: 50%; padding: 0; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.vrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vbtn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 10px 18px; }
.vbtn .pulse { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.vbtn.on { background: #b42318; color: #fff; }
.vbtn.on .pulse { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .2; transform: scale(1.6); } }
.vitem { display: grid; grid-template-columns: 92px 1fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.vitem input, .vitem select { padding: 7px 9px; font-size: 14px; }
.vextra select, .vextra input { max-width: 150px; }
@media (max-width: 560px) { .vitem { grid-template-columns: 92px 1fr auto; } .vextra { grid-column: 2; } }

/* WhatsApp */
.wa { display: grid; grid-template-columns: 330px 1fr; gap: 14px; align-items: start; }
.wa-list { padding: 12px; max-height: 76vh; overflow: auto; position: sticky; top: 76px; }
.wa-list .chips { margin: 10px 0 6px; }
.wa-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.wa-item:hover { background: var(--bg); }
.wa-item.on { background: var(--accent-soft); }
.wa-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-item time { color: var(--muted); font-size: 12px; }
.wa-item span { grid-column: 1 / -1; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-item .badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 800; text-align: center; margin-left: 4px; }
.wa-chat { display: flex; flex-direction: column; gap: 10px; min-height: 420px; }
.wa-msgs { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; padding: 10px; background: var(--bg); border-radius: 12px; }
.bub { max-width: 78%; padding: 7px 11px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.bub.me { align-self: flex-end; background: var(--ok-soft); border-color: transparent; }
.bub small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.bub .who { color: var(--accent); font-weight: 700; font-size: 12px; display: block; }
.wa-draft textarea { min-height: 96px; }
.wa-draft .row { align-items: center; }
@media (max-width: 760px) { .wa { grid-template-columns: 1fr; } .wa-list { position: static; max-height: 40vh; } }

/* Sign-in + phone polish */
#login { display: none; position: fixed; inset: 0; z-index: 30; background: var(--bg); place-items: center; padding: 16px; }
#login form { width: min(380px, 100%); }
body.locked #login { display: grid; }
body.locked > header, body.locked > main, body.locked #micFab { display: none; }
#signOut { margin-left: auto; }
.top { padding-top: max(12px, env(safe-area-inset-top)); }
#micFab { bottom: max(22px, env(safe-area-inset-bottom)); }
@media (max-width: 760px) { #signOut { position: absolute; right: 12px; top: max(10px, env(safe-area-inset-top)); } input, select, textarea { font-size: 16px; } }

/* Email reader */
.thread { display: grid; gap: 8px; margin: 10px 0 14px; }
.msg { padding: 12px 14px; }
.msg.mine { background: var(--ok-soft); border-color: transparent; }
.msg summary { display: flex; gap: 10px; cursor: pointer; list-style: none; }
.msg summary::-webkit-details-marker { display: none; }
.msg summary b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg summary time { color: var(--muted); font-size: 13px; flex: none; }
.msgbody { white-space: pre-wrap; word-wrap: break-word; margin-top: 10px; font-size: 14.5px; line-height: 1.55; max-height: 60vh; overflow: auto; }
#replyBox textarea { min-height: 180px; }

/* Phones: never let long links or wide emails push the page sideways */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
main, .view, .card, .stack, .row > *, .grid2 > *, .wa > * { min-width: 0; }
.thread { grid-template-columns: minmax(0, 1fr); }
.msg { min-width: 0; max-width: 100%; }
.msgbody, .bub, .idea p, .place p, .mail .body { overflow-wrap: anywhere; word-break: break-word; }
.msgbody img, .msgbody table { max-width: 100%; }
#rTo { width: 100%; }
.warn { color: #b42318; font-size: 13px; margin: 0; }
@media (prefers-color-scheme: dark) { .warn { color: #ff8a7a; } }

/* Drive videos */
.drivethumb { position: relative; display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #2b2a36, #1a1922); color: #fff; text-decoration: none; }
.drivethumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drivethumb img:not([src]) { visibility: hidden; }
.drivethumb .play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; font-size: 22px; padding-left: 4px; }
.drivethumb .dlabel { position: absolute; left: 10px; bottom: 8px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 999px; }

/* Media grouped by event */
.evhead { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; }
.evhead h2 { margin: 0; font-size: 18px; }

/* Ask Claude */
.claude-say { margin: 4px 0 8px; font-weight: 600; }
.vactions { display: grid; gap: 6px; }
.vact { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; font-size: 14px; }
.vact input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.vact .sub { margin: 4px 0 0; display: inline-block; font-size: 13px; }
.tag.claude { background: #ece6ff; color: #5b3fc4; border-color: transparent; }
@media (prefers-color-scheme: dark) { .tag.claude { background: #2c2546; color: #c7b8ff; } }

/* Meals */
.weeknav { align-items: center; margin: 6px 0 12px; gap: 10px; }
.weeknav .ghost { padding: 6px 12px; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dayc { padding: 14px; }
.dayc.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dayc h3 { margin: 0 0 8px; font-size: 15px; }
.dayc h3 .sub { font-size: 13px; font-weight: 600; }
.slot { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line); }
.slot:first-of-type { border-top: 0; }
.slotn { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 6px; }
.slotm { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.meal { background: var(--bg); color: var(--ink); border: 1px dashed var(--line); font-weight: 600; font-size: 13px; padding: 5px 10px; border-radius: 10px; text-align: left; overflow-wrap: anywhere; }
.meal.eaten { background: var(--ok-soft); color: var(--ok); border: 1px solid transparent; }
.meal .st { color: var(--gold); font-size: 11px; }
.addm { background: none; color: var(--muted); border: 1px dashed var(--line); padding: 4px 10px; border-radius: 10px; font-weight: 700; }
.addm:hover { color: var(--accent); border-color: var(--accent); }
.shop li { flex-wrap: wrap; }
.shop label { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; cursor: pointer; }
.shop input { width: 18px; height: 18px; accent-color: var(--ok); }
.shop input:checked + .txt { text-decoration: line-through; color: var(--muted); }
.tmeal { padding: 6px 0; border-top: 1px solid var(--line); }
.tmeal:first-child { border-top: 0; }
#todayMeals { margin-bottom: 10px; }

/* Inspiration */
.inspo .inspo-thumb { display: block; aspect-ratio: 4/5; max-height: 420px; width: 100%; overflow: hidden; border-radius: 10px; background: var(--bg); margin: -6px 0 4px; }
.inspo .inspo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card img { max-width: 100%; } /* no picture may ever be wider than its card */
.inspo ol.steps { padding-left: 18px; font-size: 13.5px; }

/* Ask Claude about plans */
.ask-box { align-items: center; margin-bottom: 12px; }
.ask-box input { flex: 1 1 200px; }
.ask-card { margin-bottom: 14px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ask-answer p { margin: 0 0 8px; } .ask-answer ul { margin: 0 0 8px; padding-left: 20px; }
.ask-links { display: grid; gap: 8px; margin-top: 8px; }
.ask-links a { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.ask-links a:hover { border-color: var(--accent); }
.ask-links a span { color: var(--muted); font-size: 13px; }

/* Plan reader — reads like an article */
.view.reading > :not(#planRead):not(.libread) { display: none !important; }
.read-nav { margin-bottom: 8px; }
.read { max-width: 680px; margin: 0 auto; }
.read-hero { display: block; width: 100%; max-height: 520px; object-fit: cover; object-position: top; border-radius: 14px; margin-bottom: 18px; background: var(--card); }
.read .kicker { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.read h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 7vw, 40px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 10px; }
.read .byline, .read .tags { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.read-body { font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.65; margin-top: 18px; }
.read-body p { margin: 0 0 16px; }
.read-body h3 { font-family: Manrope, system-ui, sans-serif; font-size: 20px; margin: 26px 0 10px; }
.read-body .kicker { font-family: Manrope, system-ui, sans-serif; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 600; margin: -4px 0 12px; }
.read-body ul, .read-body ol { padding-left: 24px; margin: 0 0 16px; } .read-body li { margin-bottom: 8px; }
.read-body blockquote { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; font-size: 17px; }
.read-body a:not(.linkbtn) { color: var(--accent); }
.linkbtn { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; font-family: Manrope, system-ui, sans-serif; font-size: 16px; overflow-wrap: anywhere; }
.linkbtn:hover { border-color: var(--accent); }
.linkbtn .lt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.linkbtn .lt span { color: var(--muted); font-size: 14px; }
.linkbtn i { font-style: normal; color: var(--accent); font-weight: 800; }
.read-actions { max-width: 680px; margin: 22px auto 0; padding-top: 16px; border-top: 1px solid var(--line); }
.readable { cursor: pointer; } .inspo-thumb[data-a] { cursor: pointer; }

/* iPhone actions: "Run next" bar after returning from Shortcuts */
.phone-next { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 35; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.phone-next span { flex: 1 1 200px; }

/* ===== Sidebar menu ===== */
.top { gap: 12px; }
.iconbtn { background: none; color: var(--ink); font-size: 22px; padding: 4px 10px; border-radius: 10px; }
.iconbtn:hover { background: var(--card); filter: none; }
#pageTitle { font-weight: 700; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#saveBtn { flex: none; }
#sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 260px; z-index: 30; background: var(--card); border-right: 1px solid var(--line);
  transform: translateX(-105%); transition: transform .22s ease; display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) 12px 16px; overflow-y: auto; }
body.menu-open #sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
#scrim { position: fixed; inset: 0; z-index: 29; background: rgba(10,10,20,.45); }
#tabs { display: flex; flex-direction: column; gap: 2px; overflow: visible; margin-top: 6px; }
#tabs a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: 15px; }
#tabs a i { font-style: normal; width: 22px; text-align: center; }
#tabs a:hover { background: var(--bg); }
#tabs a.on { background: var(--accent-soft); color: var(--accent); }
.navh { margin: 14px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#sidebar #signOut { margin-top: auto; align-self: flex-start; padding: 12px; position: static; }
@media (min-width: 1000px) {
  #sidebar { transform: none; top: 0; padding-top: 70px; box-shadow: none; }
  #menuBtn, #scrim { display: none !important; }
  .top { padding-left: 24px; }
  main { margin-left: 260px; max-width: 1040px; }
  .phone-next { left: 272px; }
}
@media (max-width: 760px) { .top { flex-direction: row; align-items: center; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); } .top .brand span:last-child { display: none; } }
body.locked #sidebar, body.locked #scrim { display: none; }

/* ===== Library pages (Reading / Watch / Listen / Style) ===== */
.libbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
.libbar input { flex: 1 1 200px; }
.libcard { display: flex; flex-direction: column; gap: 6px; }
.libcard .lthumb { display: block; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: var(--bg); margin: -6px -6px 4px; cursor: pointer; position: relative; }
.libcard[data-shelf="style"] .lthumb { aspect-ratio: 4/5; }
.libcard .lthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.libcard .lthumb .play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 20px; padding-left: 3px; }
.libcard h3 { margin: 0; font-size: 16px; cursor: pointer; }
.libcard .by { color: var(--muted); font-size: 13px; margin: 0; }
.embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; margin: 0 0 16px; }
.embed.audio { aspect-ratio: auto; height: 152px; background: transparent; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.capture-card .drop { padding: 16px; }
.rec { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rec .dot-rec { width: 12px; height: 12px; border-radius: 50%; background: #b42318; animation: pulse 1s infinite; }
audio { width: 100%; }

/* ===== Design pass (14 Nov): icons, header, compact Ask, chips, rows, browser surfaces ===== */
.ic { display: inline-block; vertical-align: -0.2em; flex: none; }
button .ic, a .ic, label .ic { margin-right: 6px; }
.iconbtn .ic { margin: 0; }
#saveBtn { display: inline-flex; align-items: center; gap: 2px; }
#saveBtn .ic { margin-right: 4px; }
#tabs a i { display: inline-flex; width: 22px; justify-content: center; color: var(--muted); }
#tabs a.on i, #tabs a:hover i { color: inherit; }
#sidebar #signOut { display: inline-flex; align-items: center; gap: 4px; }
.side-brand { font-size: 18px; padding: 4px 12px 6px; }
.top .brand { display: none; }
#pageTitle { color: var(--ink); font-size: 17px; }
@media (min-width: 1000px) {
  #sidebar { padding-top: max(16px, env(safe-area-inset-top)); }
  .top { margin-left: 260px; padding-left: 28px; }
  main { padding-left: 28px; }
}

/* Ask Claude: one compact row (input with icon + inline button) */
.ask-box { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.ask-box:focus-within { border-color: var(--accent); }
.ask-box .ask-ic { color: var(--accent); display: inline-flex; }
.ask-box input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 4px; outline: none; }
.ask-box input:focus { outline: none; }
.ask-box button { border-radius: 999px; padding: 8px 18px; flex: none; }

/* Filter chips scroll sideways on phones instead of wrapping */
@media (max-width: 760px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; }
  /* To-do rows: tags drop under the text instead of squeezing it */
  .list li { flex-wrap: wrap; row-gap: 6px; }
  .list li .txt { flex: 1 1 calc(100% - 80px); }
  .list li .tag { order: 3; }
  .list li .txt + .tag { margin-left: 32px; }
  .list li .link[data-act="del"] { order: 2; }
}

/* Mic button hides while the menu is open */
body.menu-open #micFab { opacity: 0; pointer-events: none; }
#micFab { transition: opacity .2s; }

/* Browser surfaces in the app's own colours */
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--ink); }
input, textarea { caret-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible { outline-offset: 3px; }
html { scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
.mail a, .read-body a { text-underline-offset: 3px; }
.stat b { font-variant-numeric: tabular-nums; }
.hic { display: flex; align-items: center; gap: 8px; } .hic .ic, .hic i { color: var(--accent); margin: 0; }
.claude-say .ic, .empty .ic { color: var(--accent); margin-right: 6px; }
.tag .ic { margin-right: 4px; vertical-align: -0.15em; }
.chips button i { display: inline-flex; vertical-align: -0.2em; }

/* ===== Long reads + read aloud (14 Nov) ===== */
.listen-btn { display: inline-flex; align-items: center; gap: 2px; margin: 10px 0 4px; padding: 10px 18px; border-radius: 999px; }
.read-body .lede { font-size: 21px; line-height: 1.55; color: var(--ink); }
.fulltext { margin-top: 8px; }
.fulltext p.li { padding-left: 22px; position: relative; }
.fulltext p.li::before { content: ""; position: absolute; left: 6px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.body-note { font-family: Manrope, system-ui, sans-serif; font-size: 14px !important; color: var(--muted); }
.body-note.loading { animation: fadepulse 1.6s ease-in-out infinite; }
@keyframes fadepulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .body-note.loading { animation: none; } }
.read-body [data-say] { transition: background-color .25s; border-radius: 6px; }
.read-body .speaking-now, .read h1.speaking-now { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }

#speakBar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 36; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#speakBar[hidden] { display: none; }
#speakBar .sp-row { display: flex; align-items: center; gap: 4px; }
#speakBar button { padding: 0; display: inline-grid; place-items: center; flex: none; }
#speakBar .sp-ic { width: 44px; height: 44px; border: 0; border-radius: 12px; color: var(--ink); }
#speakBar .sp-ic .ic, #speakBar .sp-main .ic { margin: 0; }
#speakBar .sp-main { width: 52px; height: 52px; border-radius: 50%; }
#speakBar .sp-rate { height: 36px; min-width: 50px; padding: 0 8px; border-radius: 999px; font-size: 14px; font-variant-numeric: tabular-nums; }
#speakBar .sp-info { flex: 1; min-width: 0; display: grid; padding: 0 6px; line-height: 1.25; }
#speakBar .sp-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
#speakBar .sp-info span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#speakBar .sp-voices { border-top: 1px solid var(--line); margin-top: 8px; padding: 8px 4px 2px; }
#speakBar .sp-voices label { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; }
#speakBar .sp-voices select { flex: 1; min-width: 0; }
#speakBar .sp-tip { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
body.speaking #micFab { opacity: 0; pointer-events: none; }
body.speaking main { padding-bottom: 150px; }
@media (max-width: 560px) { #speakBar .sp-row { flex-wrap: wrap; justify-content: space-between; } #speakBar .sp-info { order: -1; flex-basis: 100%; padding: 2px 6px 6px; } }
@media (min-width: 1000px) { #speakBar { left: 284px; right: 24px; max-width: 760px; margin: 0 auto; } }
#speakBar .sp-main.busy { opacity: .85; }
#speakBar .spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #speakBar .spin { animation-duration: 2.5s; } }
#speakBar .sp-voices optgroup { font-weight: 700; }
#speakBar .sp-music { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
#speakBar .sp-music label:first-child { flex: 1 1 180px; }
#speakBar .sp-music select { flex: 1; min-width: 0; }
#speakBar .sp-vol { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; }
#speakBar .sp-vol output { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
#speakBar input[type=range] { flex: 1; min-width: 0; height: 32px; padding: 0; border: 0; background: none; -webkit-appearance: none; appearance: none; --fill: 45%; }
#speakBar input[type=range]:focus { outline: none; }
#speakBar input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--accent) var(--fill), var(--line) var(--fill)); }
#speakBar input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
#speakBar input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
#speakBar input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
#speakBar input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
#speakBar input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Bottom tab bar (phones and tablets; the sidebar takes over at 1000px) ===== */
#tabbar { display: none; }
@media (max-width: 999px) {
  #tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    gap: 0; overflow: visible; padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  #tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; padding: 4px 0;
    border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  #tabbar a i { display: inline-flex; font-style: normal; }
  #tabbar a.on { color: var(--accent); background: none; }
  #tabbar a:active { background: var(--bg); }
  #tabMic { justify-self: center; width: 54px; height: 54px; border-radius: 50%; padding: 0; display: grid; place-items: center; margin-top: -18px;
    border: 4px solid var(--bg); box-sizing: content-box; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
  #tabMic i { display: inline-flex; }
  #micFab { display: none; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* Floating bars sit above the tab bar */
  .phone-next, #speakBar { bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.speaking main { padding-bottom: calc(210px + env(safe-area-inset-bottom)); }
  /* Out of the way while typing, so it doesn't ride up on the iPhone keyboard */
  body:has(:is(input, textarea, select):focus) #tabbar { display: none; }
  body.menu-open #tabbar { visibility: hidden; }
  /* Sibling pages in the current section */
  #subtabs { margin: -8px 0 16px; }
  #subtabs[hidden] { display: none; }
}
@media (min-width: 1000px) { #subtabs { display: none; } }
body.locked #tabbar { display: none; }
@media (prefers-reduced-motion: reduce) { #tabbar a { transition: none; } }
.listen-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 4px; }
.listen-row .listen-btn { margin: 0; }
.listen-tip { color: var(--muted); font-size: 13px; }
.read > h1, .read-body [data-say] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .read-body [data-say]:hover:not(.speaking-now) { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-soft) 45%, transparent); } }

/* ===== Today: "Your day" briefing ===== */
.brief { margin: 14px 0 10px; padding: 16px 16px 14px; }
.brief h2 { margin: 0 0 6px; font-size: 17px; }
.brief-list, .search-list { list-style: none; margin: 0; padding: 0; }
.brief-list li + li, .search-list li + li { border-top: 1px solid var(--line); }
.brief-list a, .search-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 2px; min-height: 48px; text-align: left;
  color: var(--ink); text-decoration: none; background: none; border: 0; border-radius: 0; font-weight: 400; }
.brief-list a > .ic:last-child, .search-list button > .ic:last-child { color: var(--muted); flex: none; }
.bi { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--muted); }
.bt { flex: 1; min-width: 0; display: grid; }
.bt b { font-weight: 600; font-size: 15px; }
.bt small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-list a.late .bi { background: #fde2e2; color: #b42318; }
.brief-list a:hover .bt b, .search-list button:hover .bt b { color: var(--accent); }
.brief-ask { width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.quick { margin: 0 0 16px; }
.quick button { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); padding: 8px 14px; }
.quick button .ic { color: var(--accent); }
@media (prefers-color-scheme: dark) { .brief-list a.late .bi { background: #3a1d1d; color: #ff8a7a; } }

/* ===== One-line to-do ===== */
.todo-add { display: grid; gap: 6px; margin-bottom: 4px; }
.todo-add .row { flex-wrap: nowrap; }
.todo-add .row input[name="text"] { flex: 1; min-width: 0; }
.todo-hint { margin: 0; font-size: 13px; color: var(--muted); min-height: 0; }
.todo-hint:empty { display: none; }
.todo-hint .tag { margin-left: 2px; }
.todo-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; width: max-content; }
.todo-more summary:hover { color: var(--accent); }
.todo-more .row { margin-top: 6px; }
.todo-more .row > * { flex: 1 1 140px; }

/* ===== Swipe on to-do rows ===== */
#todoList li[data-id] { background: var(--card); transition: transform .2s ease, background .15s; touch-action: pan-y; }
#todoList li.swiping { transition: background .15s; }
#todoList li.sw-r { background: var(--ok-soft); }
#todoList li.sw-l { background: var(--accent-soft); }

/* ===== Search everything ===== */
.search-dlg { gap: 8px !important; }
.search-head { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.search-head input { flex: 1; min-width: 0; font-size: 16px; }
.search-res { max-height: min(60vh, 520px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.search-ask { width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
#searchBtn { padding: 6px 8px; }
@media (max-width: 760px) { dialog:has(.search-dlg) { margin-top: max(12px, env(safe-area-inset-top)); } }

/* ===== Live voice waveform (moves only while speech is heard) ===== */
.wave { display: none; align-items: center; gap: 3px; height: 28px; }
.wave.on { display: flex; }
.wave i { width: 3px; height: 4px; border-radius: 2px; background: var(--accent); opacity: .45; transition: height .2s, opacity .2s; }
.wave.live i { opacity: 1; animation: wv .9s ease-in-out infinite; }
.wave.live i:nth-child(3n) { animation-duration: .7s; } .wave.live i:nth-child(4n+1) { animation-duration: 1.1s; } .wave.live i:nth-child(5n+2) { animation-delay: -.3s; }
.wave.live i:nth-child(7n) { animation-delay: -.6s; }
@keyframes wv { 0%, 100% { height: 5px; } 50% { height: 24px; } }
@media (prefers-reduced-motion: reduce) { .wave.live i { animation: none; height: 14px; } }

/* ===== What Claude is doing ===== */
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.steps li .ic { color: var(--ok); flex: none; }
.steps li.done { color: var(--ink); }
.steps li.now { color: var(--ink); font-weight: 600; }
.dotstep { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line); }
.steps li.now .dotstep { border-color: var(--accent); border-right-color: transparent; animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .steps li.now .dotstep { animation: none; border-right-color: var(--accent); } }

/* ===== Loading placeholders ===== */
.skel-list { display: grid; gap: 12px; padding: 6px 0; }
.skel-list i { display: block; height: 44px; border-radius: 10px; background: linear-gradient(90deg, var(--bg) 25%, var(--line) 50%, var(--bg) 75%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
.skel-list i:nth-child(2n) { width: 82%; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel-list i { animation: none; } }

/* ===== Studio (14 Nov) ===== */
.studio-prof .sp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.studio-prof h2 { margin: 0; }
.studio-prof .sp-niche { font-size: 17px; font-weight: 600; margin: 8px 0 0; }
.studio-prof, .studio-gen { margin-bottom: 16px; }
.studio-gen select { flex: 0 1 200px; }
.sugg-head { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; } .sugg-head b { margin-right: auto; }
.sugg, .idea-card, .ref-card, .theme-card { display: flex; flex-direction: column; gap: 6px; }
.sugg h3, .idea-card h3, .ref-card h3, .theme-card h3 { margin: 0; font-size: 16px; }
.idea-card h3 { cursor: pointer; }
.hook { margin: 0; font-style: italic; color: var(--ink); }
.why { margin: 0; font-size: 13px; color: var(--muted); }
.ref-card p { margin: 0; font-size: 14px; } .ref-card .by { color: var(--muted); font-size: 13px; }
.stage-h { margin: 18px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.studio-read .srcs .tag { margin: 0 4px 4px 0; } .studio-read .tag.src { cursor: pointer; border-color: var(--accent); color: var(--accent); }
.beats { list-style: none; padding: 0 !important; }
.beats li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); margin: 0 !important; }
.beats .bt { font-family: Manrope, system-ui, sans-serif; font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 4px; }
.beats p { margin: 0 0 4px; } .beats .show, .beats .otext { font-family: Manrope, system-ui, sans-serif; font-size: 14px; color: var(--muted); }
.beats .show .ic { margin-right: 6px; }
.studio-read .caption { white-space: pre-wrap; }
.dev-card { font-family: Manrope, system-ui, sans-serif; font-size: 15px; margin: 18px 0; }
.spin-sm { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .9s linear infinite; vertical-align: -2px; }

/* ===== File and link buttons ===== */
.btn-file, .btn-like { display: inline-flex; align-items: center; border-radius: 10px; padding: 9px 16px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-file { border: 1px solid var(--line); color: var(--ink); }
.btn-like { background: var(--accent); color: var(--accent-ink); }
.btn-file .ic, .btn-like .ic { margin-right: 6px; }

/* ===== Instagram check (14 Nov) ===== */
.ig-receipt { font-family: Manrope, system-ui, sans-serif; margin: 18px 0; }
.ig-receipt h3 { margin: 0 0 8px !important; font-size: 16px !important; display: flex; align-items: center; gap: 6px; }
.ig-receipt ul { list-style: none; padding: 0 !important; margin: 0 !important; }
.ig-receipt li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); margin: 0 !important; font-size: 14px; }
.ig-receipt .igk { font-weight: 700; min-width: 96px; } .ig-receipt .igv { flex: 1; min-width: 0; color: var(--muted); }
.ig-open { font-size: 13px; color: var(--muted); padding-left: 18px !important; }
.ig-credit { font-size: 12px; color: var(--muted); margin: 8px 0 0 !important; }
.ig-check { margin: 0 0 16px; } .ig-check summary { cursor: pointer; list-style-position: inside; }
.ig-check form { margin-top: 12px; } .ig-check select { flex: 0 1 220px; }
.ig-res p { margin: 8px 0; } .ig-text { white-space: pre-wrap; font-family: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 8px 0; }
.ig-receipt details summary, .ig-res details summary { font-family: Manrope, system-ui, sans-serif; font-size: 14px; font-weight: 600; margin-top: 8px; cursor: pointer; }

/* ===== One-tap "Add to…" on suggested links (14 Nov) ===== */
.ask-link { display: grid; gap: 6px; }
.linkrow { margin: 0 0 12px; } .linkrow .linkbtn { margin-bottom: 6px; }
.la { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-family: Manrope, system-ui, sans-serif; }
.la .la-btn { display: inline-flex; align-items: center; gap: 2px; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.la .la-btn .ic { margin-right: 2px; }
.la .la-more { border-radius: 999px; padding: 4px 12px; font-size: 15px; line-height: 1; }
.la-done { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ok); }
.la-done .ic { margin: 0; }
.tlink { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
#tabMic .ic, #tabMic svg { margin: 0; } /* icon-only button: no gap after the icon, so it sits dead centre */

/* ===== WhatsApp photos, voice notes, videos, documents (14 Nov) ===== */
.bub .wa-img { display: block; margin: 2px 0 4px; }
.bub .wa-img img { display: block; max-width: min(260px, 100%); height: auto; max-height: 320px; object-fit: cover; border-radius: 10px; background: var(--line); }
.bub .wa-vid { display: block; width: min(260px, 100%); max-height: 340px; border-radius: 10px; background: #000; margin: 2px 0 4px; }
.bub .wa-aud { display: block; width: min(260px, 100%); height: 40px; margin: 2px 0 4px; }
.bub .wa-file { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin: 2px 0 4px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; font-size: 14px; overflow-wrap: anywhere; }
.bub .wa-file em { font-style: normal; font-size: 12px; color: var(--muted); }

/* ===== Health · Money · Weekly review · Notifications (14 Nov) ===== */
.stat em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.hbars { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 120px; align-items: end; padding-bottom: 18px; }
.hb { position: relative; height: 100%; display: flex; align-items: flex-end; }
.hb span { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.hb span.hit { background: var(--accent); }
.hb i { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; color: var(--muted); }
.hgoal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--muted); opacity: .6; margin-bottom: 18px; pointer-events: none; }
.hline { width: 100%; height: 80px; color: var(--accent); }
.hlist { list-style: none; padding: 0; margin: 0; } .hlist li { padding: 6px 0; border-top: 1px solid var(--line); } .hlist li:first-child { border: 0; }
.hsetup { margin-top: 16px; } .hsetup summary { cursor: pointer; }
.hsteps { padding-left: 20px; } .hsteps > li { margin: 12px 0; line-height: 1.5; } .hsteps ul { margin: 6px 0; padding-left: 18px; }
.keybox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; } .keybox code { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; overflow-wrap: anywhere; }
.month-nav { align-items: center; gap: 12px; margin-bottom: 12px; } .month-nav b { min-width: 140px; text-align: center; }
.money-stats { grid-template-columns: repeat(3, 1fr); } .neg { color: #b42318; } .pos { color: var(--ok); }
.money-add { margin-bottom: 16px; } .money-add .paste { margin-top: 12px; } .money-add .paste summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.seg button { background: none; color: var(--muted); border-radius: 999px; padding: 6px 16px; } .seg button.on { background: var(--ink); color: var(--bg); }
.parsed { list-style: none; padding: 0; margin: 10px 0; } .parsed li { padding: 6px 0; border-top: 1px solid var(--line); }
.catbars { list-style: none; padding: 0; margin: 0; } .catbars li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.catbars .cb { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; } .catbars .cb i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.catbars .cv { font-variant-numeric: tabular-nums; font-weight: 600; }
.goals { list-style: none; padding: 0; margin: 0; } .goals li { padding: 8px 0; border-top: 1px solid var(--line); } .goals li:first-child { border: 0; }
.goals .gh { display: flex; justify-content: space-between; } .gbar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.gbar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; } .gbar.over i { background: #b42318; }
.mday { margin-bottom: 10px; } .mdh { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 700; }
.mlist li { align-items: center; } .mlist .txt { flex: 1; } .mlist .amt { font-variant-numeric: tabular-nums; margin-left: auto; }
.review-make { margin-bottom: 18px; } .review-make textarea { min-height: 54px; }
.rnums { display: flex; flex-wrap: wrap; gap: 8px; font-family: Manrope, system-ui, sans-serif; margin-bottom: 14px; }
.rnums span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.rnext li { font-weight: 600; } .rhist a { text-decoration: none; color: var(--ink); } .rhist a.on { color: var(--accent); font-weight: 700; }
.notify-card { margin: 12px 0; } .notify-card .ic { color: var(--accent); }
@media (max-width: 560px) { .money-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .money-stats .stat b { font-size: 18px; } .catbars li { grid-template-columns: 90px 1fr auto; } }
.mlist li { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; }
.mlist li .txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlist li .tag, .mlist li .txt + .tag { order: 0; margin-left: 0 !important; flex: none; }
.mlist li .amt { flex: none; margin-left: 0; } .mlist li [data-del] { flex: none; padding: 4px 6px; }
@media (max-width: 420px) { .mlist li .tag { display: none; } }
.hdiy { margin-top: 10px; } .hdiy summary { cursor: pointer; color: var(--muted); font-weight: 600; } .hsteps .btn-like { margin: 6px 0; }

/* ===== Posting calendar · What worked · Habits (14 Nov) ===== */
.cal { margin-bottom: 14px; } .cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-d { min-height: 64px; padding: 4px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; font-weight: 600; overflow: hidden; }
.cal-d.empty { background: none; border: 0; } .cal-d span { font-size: 12px; color: var(--muted); }
.cal-d.today { border-color: var(--accent); } .cal-d.today span { color: var(--accent); } .cal-d.sel { box-shadow: 0 0 0 2px var(--accent) inset; }
.cal-d i { font-style: normal; font-size: 10px; line-height: 1.2; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 1px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-d i.done { background: var(--ok-soft); color: var(--ok); }
.cal-day { margin-bottom: 14px; } .cal-day h3 { margin: 0 0 8px; }
.unsched li { display: flex; align-items: center; gap: 8px; } .unsched li a { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; } .unsched input[type=date] { flex: 0 1 150px; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.worked { width: 100%; border-collapse: collapse; font-size: 14px; } table.worked th, table.worked td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
table.worked th { font-size: 12px; color: var(--muted); border-top: 0; white-space: nowrap; } table.worked td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.worked a { color: var(--ink); font-weight: 600; text-decoration: none; } table.worked .sub { font-size: 12px; margin: 2px 0 0; }
.audit-card { margin: 14px 0; } .audit-read { margin-top: 10px; }
.post-box { max-width: 680px; margin: 18px auto 0; font-family: Manrope, system-ui, sans-serif; } .post-box h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 16px; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 12px 0 0; }
.statgrid div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; } .statgrid dt { font-size: 12px; color: var(--muted); } .statgrid dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.statform { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .btn-file.small { padding: 5px 10px; font-size: 13px; }
.habits-today { margin: 12px 0; } .ht-head { display: flex; align-items: baseline; justify-content: space-between; } .ht-head h2 { margin: 0 0 10px; }
.ht-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hchip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 600; min-height: 40px; }
.hchip .ic { margin: 0; color: var(--muted); } .hchip em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hchip.on { background: var(--ok-soft); border-color: transparent; color: var(--ok); } .hchip.on .ic, .hchip.on em { color: var(--ok); }
table.hgrid { width: 100%; border-collapse: collapse; } table.hgrid th, table.hgrid td { padding: 6px 4px; text-align: center; }
table.hgrid thead th { font-size: 12px; color: var(--muted); font-weight: 700; } table.hgrid thead th span { display: block; font-size: 11px; font-weight: 600; } table.hgrid thead th.now { color: var(--accent); }
table.hgrid tbody th { text-align: left; min-width: 150px; } table.hgrid tbody tr + tr th, table.hgrid tbody tr + tr td { border-top: 1px solid var(--line); }
.hname { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 700; padding: 0; text-align: left; } .hname .ic { margin: 0; color: var(--muted); }
table.hgrid tbody th .sub { display: block; font-size: 12px; font-weight: 500; margin-top: 2px; }
.hcell { width: 34px; height: 34px; border-radius: 10px; padding: 0; background: var(--bg); border: 1px solid var(--line); color: #fff; display: inline-grid; place-items: center; }
.hcell .ic { margin: 0; } .hcell.on { background: var(--ok); border-color: var(--ok); } .hcell.auto { background: color-mix(in srgb, var(--ok) 70%, var(--card)); }
.hstreak { white-space: nowrap; font-size: 13px; text-align: left !important; } .hstreak b { font-size: 16px; } .hstreak .sub { display: block; font-size: 11px; }
.hsuggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.hheat { display: grid; gap: 8px; } .hh { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; font-size: 14px; }
.hhn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hhd { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; }
.hhd i { aspect-ratio: 1; border-radius: 3px; background: var(--line); } .hhd i.on { background: var(--ok); }
@media (max-width: 560px) { .cal-d { min-height: 52px; } .cal-d i { font-size: 9px; } .hh { grid-template-columns: 96px 1fr; font-size: 13px; } table.hgrid tbody th { min-width: 120px; } .hcell { width: 30px; height: 30px; } }
@media (max-width: 560px) {
  table.hgrid, table.hgrid tbody, table.hgrid tr { display: block; } table.hgrid thead { display: none; }
  table.hgrid tbody tr { display: grid; grid-template-columns: repeat(7, 1fr) auto; gap: 4px; align-items: end; padding: 10px 0; }
  table.hgrid tbody tr + tr { border-top: 1px solid var(--line); } table.hgrid tbody tr + tr th, table.hgrid tbody tr + tr td { border-top: 0; }
  table.hgrid tbody th { grid-column: 1 / -1; min-width: 0; padding: 0 0 4px; }
  table.hgrid td { padding: 0; } table.hgrid td::before { content: attr(data-w); display: block; font-size: 10px; color: var(--muted); margin-bottom: 2px; }
  table.hgrid td.hstreak::before { content: none; } .hcell { width: 100%; max-width: 38px; height: 32px; }
}

/* ===== Lock · Remember · People · Couple · What's on · Journal (15 Nov) ===== */
#lockScreen { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 24px; }
#lockScreen[hidden] { display: none; } body.lock-on main, body.lock-on #tabbar, body.lock-on .top, body.lock-on #sidebar, body.lock-on #micFab { visibility: hidden; }
.lock-box { text-align: center; display: grid; gap: 12px; justify-items: center; } .lock-box .brand { font-size: 22px; } .lock-box p { color: var(--muted); margin: 0; }
.flash { min-height: 190px; display: flex; flex-direction: column; justify-content: center; gap: 10px; cursor: pointer; text-align: center; margin-top: 14px; }
.flash .fsrc { font-size: 12px; color: var(--muted); margin: 0; } .flash .ffront { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.35; }
.flash .fback { font-family: Georgia, serif; font-size: 18px; line-height: 1.5; margin: 6px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.fgrade { justify-content: center; margin-top: 12px; } .fgrade button { min-width: 96px; }
.person { display: flex; flex-direction: column; gap: 4px; } .person .ph { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .person h3 { margin: 0; font-size: 16px; }
.person .due, .due { color: var(--accent); font-weight: 600; font-size: 14px; margin: 4px 0 0; }
label.checkrow { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; flex: 1 1 auto; min-width: 0; line-height: 1.4; cursor: pointer; }
label.checkrow input { flex: none; margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
label.checkrow span { min-width: 0; overflow-wrap: anywhere; }
.gifts li { flex-wrap: nowrap !important; }
.list.dates li { flex-wrap: nowrap !important; }
.list.dates .txt { display: flex; flex-direction: column; gap: 2px; }
.list.dates .tag { order: 0 !important; margin-left: auto !important; flex: none; } .gifts .done { text-decoration: line-through; color: var(--muted); }
.gifts li { display: flex; align-items: center; justify-content: space-between; }
.couple-head h2 { display: flex; align-items: center; gap: 8px; } .couple-head .ic { color: var(--accent); }
.events-card { margin: 0 0 16px; } .ev-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .ev-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; }
.evlist { list-style: none; padding: 0; margin: 12px 0 0; } .evlist li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.evlist .evt { display: grid; gap: 2px; min-width: 0; } .evlist .evt p { margin: 2px 0; font-size: 14px; } .evlist .sub { font-size: 13px; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 12px; }
.mood { display: grid; gap: 2px; justify-items: center; padding: 10px 4px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
.mood b { font-size: 18px; } .mood span { font-size: 12px; color: var(--muted); font-weight: 600; }
.mood.on { border-color: transparent; color: #fff; } .mood.on span { color: rgba(255,255,255,.85); }
.mood.m1.on, .moodline .m1, .tag.m1 { background: #b42318; } .mood.m2.on, .moodline .m2, .tag.m2 { background: #d9772f; } .mood.m3.on, .moodline .m3, .tag.m3 { background: #9a8f73; }
.mood.m4.on, .moodline .m4, .tag.m4 { background: #4f9a6b; } .mood.m5.on, .moodline .m5, .tag.m5 { background: var(--ok); }
.tag.m1, .tag.m2, .tag.m3, .tag.m4, .tag.m5 { color: #fff; border-color: transparent; }
.moodline { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 80px; align-items: end; } .moodline i { display: block; border-radius: 3px 3px 1px 1px; min-height: 3px; }
.jrefl { margin-top: 12px; } .jpat { margin-top: 12px; } .jpat ul { padding-left: 18px; } .jpat li { margin-bottom: 6px; }
.jentry summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .jentry p { margin: 10px 0 0; }
.rec-on { border-color: #b42318 !important; color: #b42318 !important; } .rec-on .dot-rec { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #b42318; margin-right: 6px; animation: pulse 1s infinite; }

/* ===== Telegram receipts (15 Nov) ===== */
.tg-card { font-family: Manrope, system-ui, sans-serif; }
.tg-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.tg-row p { margin: 4px 0 0; }
.tg-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--accent); }
.tg-ic .ic { margin: 0; }
.btn-like.small { padding: 5px 12px; font-size: 13px; }
.tg-card .row { align-items: center; }

/* ===== Settings and welcome setup (15 Nov) ===== */
.set-link { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.set-link.on, .set-link[aria-current] { background: var(--card); color: var(--accent); }
.set-card { font-family: Manrope, system-ui, sans-serif; }
.set-card h2 { margin: 0 0 4px; }
.set-card > .sub { margin: 0 0 12px; }
.pick { border: 0; padding: 0; margin: 4px 0 0; }
.pick legend { font-weight: 700; margin-bottom: 4px; padding: 0; }
.pick-h { margin: 12px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; user-select: none; }
.pick-chip input { margin: 0; accent-color: var(--accent); }
.pick-chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pick-chip:has(input:disabled) { opacity: .7; cursor: default; }
.setlist { list-style: none; padding: 0; margin: 0; }
.setlist > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.setlist > li:first-child { border-top: 0; padding-top: 4px; }
.setlist > li > div:first-child { flex: 1 1 220px; min-width: 0; }
.setlist > li > div > b { display: inline-flex; align-items: center; gap: 8px; }
.setlist p { margin: 2px 0 0; }
.setlist .sa { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.setlist .hint { flex-basis: 100%; margin: 0; font-size: 13px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.st i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st.ok { color: var(--ok); } .st.ok i { background: var(--ok); }
.set-card .notify-card { margin: 8px 0 0; background: transparent; border: 0; padding: 0; }
#dlgBody .pick-row { gap: 6px; }
.pick-chip[hidden], .setlist [hidden] { display: none; }

/* ===== Audiobooks on Spotify (15 Nov) ===== */
.ab-card { font-family: Manrope, system-ui, sans-serif; margin-bottom: 18px; }
.ab-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ab-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.ab-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ab-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ab-row img, .ab-noimg { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card); }
.ab-noimg { display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
.ab-txt { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ab-txt b { font-size: 15px; line-height: 1.3; }
.ab-why { font-size: 13px; }
.ab-act { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.ab-miss { opacity: .8; }
.ab-now { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.ab-now img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.ab-bar { height: 4px; background: var(--line); border-radius: 4px; margin: 6px 0 2px; overflow: hidden; }
.ab-bar i { display: block; height: 100%; background: var(--accent); }
.ab-ctl { display: flex; gap: 6px; flex-wrap: wrap; }
.ab-msg { margin: 10px 0 0; font-size: 14px; }
.sp-own { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; }
.sp-own summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.sp-own .sp-steps { padding-left: 20px; margin: 8px 0 10px; line-height: 1.5; }
.sp-own code { font-size: 12px; word-break: break-all; background: var(--card); padding: 1px 4px; border-radius: 4px; }
.sp-own form { max-width: 420px; }
.lthumb img.bookcover { object-fit: contain; background: #111; }
.read-hero.bookcover { width: min(240px, 60vw); aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; margin: 0 0 18px; }
.chips.kinds { margin-bottom: 4px; }
.chips.kinds button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
[data-abnow] .ab-now { margin-top: 4px; }
.lock-box .lock-help { max-width: 320px; font-size: 14px; line-height: 1.5; }
