:root {
  --ink: #1D1A16;
  --ink-2: #5D564C;
  --ink-3: #7A7266;
  --paper: #FAF8F3;
  --line: #EFEAE0;
  --line-2: #E9E3D6;
  --butter: #FFE17A;
  --butter-ink: #3A2A00;
  --butter-soft: #FFF8D6;
  --pen: #2B4FD6;
  --rust: #C24F28;
  --mint: #E3FBF1;
  --mint-ink: #0F6B4C;
  --lilac: #F1ECFF;
  --lilac-ink: #4B2FA8;
  --violet: #7C5CE0;
  --peach: #FFF6F2;
  --peach-ink: #6E2A12;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius: 22px;
  --lift: 0 1px 0 rgba(29, 26, 22, .04), 0 16px 32px -26px rgba(29, 26, 22, .45);
  --sans: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #FFFFFF; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--pen); }
img { display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-family: var(--hand); color: var(--pen); }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.rail { width: 248px; flex: none; background: var(--paper); border-right: 1px solid var(--line); padding: 28px 18px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; color: var(--ink); }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rust); margin-top: 10px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; transition: background .25s var(--ease); }
.nav a:hover { background: #F3EFE6; }
.nav a.active { background: #FFFFFF; color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 rgba(29,26,22,.05), 0 8px 18px -14px rgba(29,26,22,.4); }
.badge { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--butter); color: var(--butter-ink); padding: 2px 8px; border-radius: 999px; }
.rail-projects { display: flex; flex-direction: column; gap: 10px; padding: 0 10px; }
.rail-projects a { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.dot-sq { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.rail-label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.momo-card { margin-top: auto; background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.momo-card img { width: 44px; height: 44px; border-radius: 50%; background: #FFF4C2; object-fit: cover; }
.momo-card .who { position: relative; flex: none; }
.momo-card .live-dot { position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #FFFFFF; background: #1F9E73; }
.momo-card.asleep .live-dot { background: #D8D0BF; animation: none; }
.momo-card b { display: block; font-size: 14px; }
.momo-card span { font-size: 12px; color: var(--ink-3); }

/* Claude plan usage: sits just above the Momo card, which keeps its place at the bottom of the rail. */
.fuel { margin-top: auto; background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fuel + .momo-card { margin-top: -16px; }
.fuel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fuel-ago, .fuel-reset { font-size: 11px; color: var(--ink-3); }
.fuel-row { display: flex; flex-direction: column; gap: 5px; }
.fuel-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.fuel-top b { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.fuel-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.fuel-bar i { display: block; height: 100%; border-radius: inherit; background: currentColor; transition: width .6s var(--ease); }
.fuel-note { font-size: 19px; line-height: 1; }
.lvl-ok { color: #1F9E73; }
.lvl-mid { color: #D9A21B; }
.lvl-high { color: var(--rust); }
.chip.fuel-chip { display: none; }
.fuel-ring { width: 14px; height: 14px; border-radius: 50%; flex: none; -webkit-mask: radial-gradient(circle, transparent 3px, #000 3.5px); mask: radial-gradient(circle, transparent 3px, #000 3.5px); }

.main { flex: 1; min-width: 0; padding: 28px clamp(20px, 3.5vw, 56px) 32px; display: flex; flex-direction: column; gap: 36px; }
.view { display: flex; flex-direction: column; gap: 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); background: #F4F1EA; padding: 8px 14px; border-radius: 999px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #FFFFFF; display: grid; place-items: center; color: var(--ink); }
.icon-btn[aria-pressed="false"] { color: var(--ink-3); }
.banner { display: flex; align-items: center; gap: 14px; background: var(--peach); border: 1px solid #FFD9CC; color: var(--peach-ink); border-radius: 18px; padding: 14px 18px; font-size: 15px; }
.banner img { width: 48px; height: 48px; object-fit: contain; }

/* ---------- headings ---------- */
.h1 { font-size: clamp(40px, 5vw, 72px); line-height: .98; font-weight: 800; letter-spacing: -0.045em; }
.lede { margin: 0; font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 560px; }
.section { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 28px; font-weight: 800; }
.section-head .aside { margin-left: auto; font-size: 14px; color: var(--ink-3); }

/* ---------- hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding-bottom: 8px; }
.hero-chat { flex: 1 1 460px; min-width: 0; display: flex; align-items: flex-end; justify-content: flex-end; gap: 4px; }
.hero-chat .bubbles { flex: 1 1 auto; min-width: 0; max-width: 400px; display: flex; flex-direction: column; gap: 12px; padding-bottom: 32px; }
.hero-chat .momo-img { width: clamp(180px, 20vw, 280px); flex: none; margin-bottom: -8px; animation: bob 5s ease-in-out infinite; }

/* ---------- messages ---------- */
.bubble { font-size: 15px; line-height: 1.45; padding: 13px 17px; max-width: 100%; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.you { align-self: flex-end; background: #F4F1EA; border-radius: 22px 22px 6px 22px; }
.bubble.momo { background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px 22px 22px 22px; box-shadow: 0 14px 30px -24px rgba(29,26,22,.5); }
.msg-row { display: flex; gap: 10px; align-items: flex-start; }
.msg-row img { width: 30px; height: 30px; border-radius: 50%; background: #FFF4C2; flex: none; }
.msg-meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.convo { display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; padding-right: 4px; }

/* ---------- composer ---------- */
.composer-wrap { position: sticky; bottom: 16px; z-index: 20; display: flex; justify-content: center; margin-top: auto; pointer-events: none; }
.composer { pointer-events: auto; width: min(720px, 100%); display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: 0 1px 0 rgba(29,26,22,.04), 0 22px 44px -24px rgba(29,26,22,.5); }
.composer input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; padding: 10px 0; }
.composer .hint { font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 6px; white-space: nowrap; }
.mic { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #FFFFFF; display: grid; place-items: center; flex: none; }
.mic .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--violet); opacity: 0; }
.mic.listening .ring { animation: ring 1.8s var(--ease) infinite; }
.mic.listening .ring + .ring { animation-delay: .6s; }
.send { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: #FFFFFF; display: grid; place-items: center; flex: none; }
.send:disabled { opacity: .4; cursor: default; }
.composer-wrap { flex-direction: column; align-items: center; gap: 10px; }
.composer.dropping { border-color: var(--pen); box-shadow: 0 0 0 4px rgba(43, 79, 214, .14), 0 22px 44px -24px rgba(29,26,22,.5); }
.tray { pointer-events: auto; width: min(720px, 100%); display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
.tray:empty { display: none; }
.att { position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #FFFFFF; box-shadow: 0 10px 20px -14px rgba(29,26,22,.5); }
.att img { width: 100%; height: 100%; object-fit: cover; }
.att.uploading img { opacity: .45; }
.att.uploading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); border-top-color: transparent; animation: spin .8s linear infinite; }
.att button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(29,26,22,.75); color: #FFFFFF; display: grid; place-items: center; padding: 0; }
.bubble-shots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.bubble-shots img { width: 140px; height: 96px; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--line-2); }

/* ---------- floating chat ---------- */
.dock { position: fixed; left: 0; top: 0; z-index: 40; width: min(380px, calc(100vw - 24px)); height: min(540px, calc(100vh - 24px)); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(29,26,22,.04), 0 28px 56px -28px rgba(29,26,22,.55); overflow: hidden; animation: rise .4s var(--ease) both; }
.dock[hidden], .dock-bubble[hidden] { display: none; }
.dock-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #FFFFFF; border-bottom: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; }
.dock.dragging .dock-head { cursor: grabbing; }
.dock-head img { width: 34px; height: 34px; border-radius: 50%; background: #FFF4C2; flex: none; pointer-events: none; }
.dock-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dock-title b { font-size: 15px; }
.dock-title span { font-size: 12px; color: var(--ink-3); }
.dock-head .icon-btn { width: 34px; height: 34px; }
.dock-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 12px; }
.dock-convo { flex: 1; max-height: none; min-height: 0; }
.dock .composer-wrap { position: static; margin: 0; }
.dock .composer { width: 100%; gap: 6px; padding: 6px 6px 6px 16px; }
.dock .composer .hint { display: none; }
.dock .composer:focus-within { border-color: var(--pen); }
.dock .tray { width: 100%; }
.dock-bubble { position: fixed; right: 24px; bottom: 96px; z-index: 40; width: 60px; height: 60px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: #FFF4C2; box-shadow: 0 18px 32px -18px rgba(29,26,22,.6); overflow: hidden; transition: transform .3s var(--ease); }
.dock-bubble:hover { transform: translateY(-3px); }
.dock-bubble img { width: 100%; height: 100%; object-fit: cover; }
.dock.resizing { user-select: none; }
.dock-resize { position: absolute; z-index: 2; touch-action: none; }
.dock-resize-n, .dock-resize-s { left: var(--radius); right: var(--radius); height: 8px; cursor: ns-resize; }
.dock-resize-e, .dock-resize-w { top: var(--radius); bottom: var(--radius); width: 8px; cursor: ew-resize; }
.dock-resize-n { top: 0; }
.dock-resize-s { bottom: 0; }
.dock-resize-e { right: 0; }
.dock-resize-w { left: 0; }
/* Corner handles span the rounded corner, since clicks outside the curve never reach the dock. */
.dock-resize-nw, .dock-resize-ne, .dock-resize-sw, .dock-resize-se { width: var(--radius); height: var(--radius); }
.dock-resize-nw { top: 0; left: 0; cursor: nwse-resize; }
.dock-resize-se { bottom: 0; right: 0; cursor: nwse-resize; background: linear-gradient(135deg, transparent 40%, var(--ink-3) 40%, var(--ink-3) 45%, transparent 45%, transparent 56%, var(--ink-3) 56%, var(--ink-3) 61%, transparent 61%); opacity: .45; }
.dock-resize-ne { top: 0; right: 0; cursor: nesw-resize; }
.dock-resize-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.dock button:focus-visible, .dock-bubble:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }

/* ---------- sticky notes ---------- */
.notes { display: flex; flex-wrap: wrap; gap: 22px; align-items: stretch; }
.note { flex: 1 1 300px; min-width: 0; max-width: 520px; background: var(--butter); border-radius: 6px 6px 18px 6px; padding: 22px 22px 20px; box-shadow: 0 1px 0 rgba(58,42,0,.06), 0 18px 30px -22px rgba(58,42,0,.55); display: flex; flex-direction: column; gap: 12px; color: var(--butter-ink); transition: transform .4s var(--ease); }
.note:nth-child(3n+1) { transform: rotate(-1.1deg); }
.note:nth-child(3n+2) { transform: rotate(.8deg); }
.note:nth-child(3n) { transform: rotate(-.4deg); }
.note:hover { transform: rotate(0) translateY(-4px); }
.note .who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.note h3 { font-family: var(--hand); font-size: 30px; line-height: 1.02; font-weight: 700; color: var(--ink); letter-spacing: 0; overflow-wrap: anywhere; }
.note p { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.note pre { margin: 0; font-family: var(--mono); font-size: 12px; background: rgba(255,255,255,.55); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; }
.note .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.btn { border: 0; background: var(--ink); color: #FFFFFF; font-size: 14px; font-weight: 600; padding: 0 18px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn.ghost { background: transparent; color: inherit; border: 1px solid rgba(58,42,0,.25); }
.btn.light { background: #FFFFFF; color: var(--ink); border: 1px solid var(--line-2); }
.btn:disabled { opacity: .5; cursor: default; }
.calm { display: flex; align-items: center; gap: 16px; background: var(--paper); border-radius: 22px; padding: 14px 22px; color: var(--ink-2); font-size: 16px; }
.calm img { width: 64px; height: 64px; object-fit: contain; }

/* ---------- task cards ---------- */
.cards { display: flex; flex-wrap: wrap; gap: 18px; }
.tcard { flex: 1 1 260px; min-width: 0; max-width: 420px; position: relative; overflow: hidden; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 18px; min-height: 210px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); box-shadow: var(--lift); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.tcard:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(29,26,22,.04), 0 24px 40px -24px rgba(29,26,22,.38); }
.tcard .peek { position: absolute; right: -6px; bottom: 0; width: 108px; transform: scaleX(-1) translateX(-22px); transition: transform .6s var(--ease); pointer-events: none; }
.tcard:hover .peek { transform: scaleX(-1) translateX(0); }
.tcard .round-peek { position: absolute; right: 10px; bottom: 10px; width: 84px; height: 84px; object-fit: contain; pointer-events: none; }
.tcard .proj { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.tcard h3 { font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; max-width: 76%; overflow-wrap: anywhere; }
.tcard .now { font-size: 13px; color: var(--ink-2); max-width: 62%; line-height: 1.4; }
.tcard .foot { margin-top: auto; font-size: 12px; color: var(--ink-3); max-width: 62%; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.s-working { background: var(--lilac); color: var(--lilac-ink); }
.s-checking { background: var(--lilac); color: var(--lilac-ink); }
.s-waiting { background: #FFF4C2; color: var(--butter-ink); }
.s-queued { background: #F4F1EA; color: var(--ink-2); }
.s-done { background: var(--mint); color: var(--mint-ink); }
.s-failed { background: #FFEDE8; color: #8A3517; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s var(--ease) infinite; }

/* ---------- updates + panels ---------- */
.split { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.panel { flex: 1 1 380px; min-width: 0; background: var(--paper); border-radius: 26px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.panel.white { background: #FFFFFF; border: 1px solid var(--line); }
/* Panels stacked straight in a page column must not take the side-by-side flex height. */
.view > .panel { flex: none; }
.panel-head { display: flex; align-items: center; gap: 12px; }
.panel-head img { width: 42px; height: 42px; border-radius: 50%; background: #FFF4C2; flex: none; object-fit: cover; }
.panel-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.panel-head span { font-size: 13px; color: var(--ink-3); }
.urow { display: flex; align-items: center; gap: 14px; background: #FFFFFF; border-radius: 18px; padding: 12px 16px 12px 12px; }
.urow .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.urow b { font-size: 15px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.urow small { font-size: 13px; color: var(--ink-2); line-height: 1.4; overflow-wrap: anywhere; }
.urow time { font-size: 12px; color: var(--ink-3); flex: none; align-self: flex-start; }
.shot { width: 96px; height: 62px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: #F7F5EF; overflow: hidden; display: grid; place-items: center; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot.big { width: 200px; height: 128px; }
.checked { display: inline-flex; align-items: center; gap: 5px; color: var(--mint-ink); font-weight: 600; }
.empty { font-size: 15px; color: var(--ink-3); padding: 6px 2px; }

/* ---------- task detail ---------- */
.back { align-self: flex-start; font-size: 14px; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 16px; }
.tl .rail-col { display: flex; flex-direction: column; align-items: center; }
.tl .node { width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; flex: none; overflow: hidden; }
.tl .node img { width: 28px; height: 28px; object-fit: cover; }
.tl .stem { width: 2px; flex: 1; background: var(--line); min-height: 16px; }
.tl .body { display: flex; flex-direction: column; gap: 4px; padding-bottom: 20px; min-width: 0; }
.tl .body b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tl .body span { font-size: 13px; color: var(--ink-3); }

/* ---------- crew ---------- */
.crew-grid { flex: 3 1 600px; min-width: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.ccard { flex: 1 1 260px; min-width: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--lift); }
.ccard .panel-art { position: relative; height: 136px; overflow: hidden; }
.ccard .panel-art .peek-img { position: absolute; left: 0; bottom: 0; height: 136px; width: auto; transition: transform .6s var(--ease); }
.ccard .panel-art .round-img { position: absolute; left: 20px; bottom: 14px; width: 104px; height: 104px; object-fit: contain; transition: transform .6s var(--ease); }
.ccard:hover .panel-art img { transform: translateY(-6px) scale(1.03); }
.ccard .tag { position: absolute; right: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.9); padding: 5px 10px; border-radius: 999px; }
.ccard .tag.top { top: 14px; }
.ccard .tag.bottom { bottom: 14px; background: #FFFFFF; }
.ccard .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ccard h2 { font-size: 24px; font-weight: 800; }
.ccard .role { font-size: 14px; color: var(--ink-2); }
.ccard .label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ccard .nowtext { font-size: 15px; line-height: 1.4; font-weight: 500; }
.ccard .next { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid #F1ECE2; margin-top: auto; }
.ccard .next span { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.ccard .next span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #B4AC9E; flex: none; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.room { flex: 1 1 340px; min-width: 0; background: var(--paper); border-radius: 26px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.room-row { display: flex; gap: 10px; align-items: flex-start; }
.room-row .msg { flex: 1; min-width: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px 18px 18px 18px; padding: 9px 13px; display: flex; flex-direction: column; gap: 3px; }
.room-row.momo .msg { background: var(--butter-soft); border-color: transparent; }
.room-row .msg b { font-size: 12px; color: var(--ink-2); }
.room-row .msg span { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; background: #FFFFFF; position: relative; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.av img.peek { position: absolute; left: -6px; top: -2px; width: 52px; height: auto; }
.av img.round { width: 100%; height: 100%; object-fit: cover; }

/* ---------- settings ---------- */
.setting-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid #F1ECE2; }
.setting-row:first-of-type { border-top: 0; }
.setting-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.setting-text b { font-size: 15px; }
.setting-text span { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.setting-text small { font-size: 13px; color: var(--ink-3); line-height: 1.45; overflow-wrap: anywhere; }
.setting-text code, .setting-row > code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: #F4F1EA; padding: 4px 8px; border-radius: 8px; overflow-wrap: anywhere; align-self: flex-start; }
.setting-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.setting-note { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.setting-steps { margin: 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.panel select, .panel input[type="time"] { font: inherit; font-size: 14px; border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; background: #FFFFFF; min-height: 44px; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; border: 0; background: var(--line-2); padding: 0; flex: none; transition: background .25s var(--ease); }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(29,26,22,.3); transition: transform .25s var(--ease); }
.switch.on { background: var(--ink); }
.switch.on span { transform: translateX(20px); }
.chip-btn { border: 0; cursor: pointer; }
.chip-btn.on { background: var(--lilac); color: var(--lilac-ink); }

/* ---------- orbit + undo ---------- */
.orow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #F1ECE2; }
.orow:first-of-type { border-top: 0; }
.otitle { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.opri { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.urow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; align-self: flex-start; }
.urow-side time { font-size: 12px; color: var(--ink-3); }
.undo { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); background: #FFFFFF; color: var(--ink-2); font-size: 12px; padding: 4px 9px; border-radius: 999px; }
.undo:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------- approvals ---------- */
.levels { display: flex; flex-wrap: wrap; gap: 12px; }
.level { flex: 1 1 220px; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; background: #FFFFFF; border: 1.5px solid var(--line-2); border-radius: 18px; padding: 16px 18px; transition: border-color .25s var(--ease), background .25s var(--ease); }
.level:hover { border-color: var(--ink-3); }
.level.on { border-color: var(--ink); background: var(--paper); }
.level b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.level-text { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.restart-note { margin: 0; font-size: 14px; color: var(--butter-ink); background: var(--butter-soft); border-radius: 14px; padding: 10px 14px; }

/* ---------- projects + markdown ---------- */
.pgrid { display: flex; flex-wrap: wrap; gap: 18px; }
.pcard { flex: 1 1 260px; min-width: 0; max-width: 420px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); box-shadow: var(--lift); transition: transform .4s var(--ease); }
.pcard:hover { transform: translateY(-3px); }
.pcard h3 { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.pcard p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.md { font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.md h3, .md h4, .md h5, .md h6 { margin: 14px 0 6px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.md p { margin: 0 0 10px; }
.md ul { margin: 0 0 10px; padding-left: 20px; }
.md li { margin: 4px 0; }
.md li.md-done { color: var(--ink-3); text-decoration: line-through; }
.md code { font-family: var(--mono); font-size: 13px; background: #F4F1EA; padding: 1px 5px; border-radius: 5px; }

/* ---------- days ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #FFFFFF; font-size: 14px; padding: 0 16px; border-radius: 999px; min-height: 40px; }
.filter.on { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.day-head { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 14px; }
.day-head h2 { font-size: 24px; font-weight: 800; }
.jrow { display: flex; gap: 16px; }
.jrow time { font-family: var(--mono); font-size: 12px; color: var(--ink-3); width: 66px; flex: none; padding-top: 4px; text-align: right; }
.jrow .rail-col { display: flex; flex-direction: column; align-items: center; }
.jrow .sq { width: 12px; height: 12px; border-radius: 4px; margin-top: 4px; flex: none; }
.jrow .stem { width: 2px; flex: 1; background: var(--line); min-height: 14px; }
.jrow .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-bottom: 22px; }
.jrow .body > span { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.jrow .body small { font-size: 13px; color: var(--ink-3); }
.recap { background: var(--butter-soft); border-radius: 26px; padding: 24px; display: flex; flex-direction: column; gap: 12px; color: var(--butter-ink); }
.recap h2 { font-family: var(--hand); font-size: 32px; font-weight: 700; letter-spacing: 0; color: var(--ink); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.bar .name { width: 130px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { flex: 1; height: 10px; border-radius: 999px; background: #F4F1EA; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; }
.bar .n { width: 24px; text-align: right; font-weight: 600; }

/* ---------- lock + toast ---------- */
.lock { position: fixed; inset: 0; background: #FFFFFF; display: grid; place-items: center; z-index: 100; padding: 20px; }
.lock form { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.lock img { width: 150px; }
.lock input { width: 100%; border: 1px solid var(--line-2); border-radius: 999px; padding: 14px 20px; font-size: 16px; }
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #FFFFFF; padding: 11px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 16px 30px -16px rgba(29,26,22,.6); animation: rise .5s var(--ease) both; }
.toast.error { background: #8A3517; }

/* ---------- screenshot viewer ---------- */
.viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
.viewer::backdrop { background: rgba(29, 26, 22, .82); }
.viewer[open] { animation: rise .3s var(--ease) both; }
html:has(.viewer[open]) { overflow: hidden; }
/* Auto margins (not place-items) keep a zoomed picture's left and top edges reachable by scrolling. */
.viewer-stage { position: absolute; inset: 0; display: flex; overflow: auto; overscroll-behavior: contain; padding: calc(64px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.viewer-stage img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; background: #FFFFFF; box-shadow: 0 28px 56px -28px rgba(0, 0, 0, .7); cursor: zoom-in; }
.viewer.zoomed .viewer-stage img { max-width: none; max-height: none; cursor: zoom-out; }
.viewer-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 1; }

/* ---------- phone ---------- */
.bnav { display: none; }
@media (max-width: 860px) {
  .rail { display: none; }
  .chip.fuel-chip { display: inline-flex; }
  .main { padding: 20px 16px 24px; gap: 28px; }
  .view { gap: 32px; }
  .h1 { font-size: 40px; }
  .lede { font-size: 16px; }
  .hero-chat .momo-img { width: 120px; }
  .hero-chat .bubbles { padding-bottom: 12px; }
  .composer-wrap { bottom: 86px; }
  .composer .hint { display: none; }
  .dock, .dock-bubble { display: none; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 74px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid #F1ECE2; justify-content: space-around; align-items: center; }
  .bnav a { width: 52px; height: 52px; display: grid; place-items: center; color: var(--ink-3); border-radius: 16px; }
  .bnav a.active { color: var(--ink); background: #F4F1EA; }
  .shell { padding-bottom: 74px; }
  .note h3 { font-size: 27px; }
  .tcard, .pcard, .note { max-width: none; }
}

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.75); } }
@keyframes ring { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
