/* Rhythm — dark navy theme with cool accents. Calm, high-contrast, glassy surfaces. */
:root {
  --bg: #0a111e; --bg2: #0e1728;
  --surface: rgba(22, 33, 52, .72); --surface-solid: #141f31; --surface-2: #1b2840; --surface-3: #22314c;
  --line: rgba(170, 200, 240, .11); --line-strong: rgba(170, 200, 240, .22);
  --text: #e9eff7; --muted: #a2b2c8; --dim: #71829b;
  --accent: #8ccfff; --accent-2: #5fb2f5; --accent-ink: #05121f; --accent-soft: rgba(140, 207, 255, .12);
  --warm: #f2c27b; --ok: #6fd3a8; --warn: #f2c27b; --danger: #ff8f86;
  --work: #7aa7ff; --meeting: #f2c27b; --learning: #b9a3ff; --relax: #6fd3a8;
  --radius: 14px; --radius-s: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -18px rgba(0,0,0,.6);
  --font: "Inter", "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--text); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body {
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(95, 178, 245, .13), transparent 60%),
    radial-gradient(900px 480px at 100% 0%, rgba(185, 163, 255, .08), transparent 60%),
    radial-gradient(1200px 600px at 50% 120%, rgba(111, 211, 168, .05), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg) 40%);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(140, 207, 255, .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(170, 200, 240, .14); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }

#app { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; position: relative; z-index: 1; }

/* ---------------- sidebar */
#nav { position: sticky; top: 0; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 23, 40, .85), rgba(10, 17, 30, .9)); border-right: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: .2px; padding: 4px 10px 20px; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; font-weight: 750; color: var(--accent);
  background: linear-gradient(145deg, rgba(140,207,255,.35), rgba(95,178,245,.08)); border: 1px solid var(--line-strong); box-shadow: 0 0 24px -6px rgba(140,207,255,.5); }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--dim); letter-spacing: .4px; text-transform: uppercase; }
#nav nav { display: flex; flex-direction: column; gap: 2px; }
#nav .navsec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--dim); padding: 14px 12px 6px; }
#nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; }
#nav a .ic { width: 20px; text-align: center; filter: saturate(.85); }
#nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
#nav a.active { background: linear-gradient(90deg, var(--accent-soft), rgba(140,207,255,.03)); color: var(--text); }
#nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
#nav .count { margin-left: auto; background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
#nav .count:empty { display: none; }
#nav .foot { margin-top: auto; padding: 12px; font-size: 12px; color: var(--dim); border-top: 1px solid var(--line); }

main { min-width: 0; }
#top { display: flex; gap: 10px; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
  background: rgba(10, 17, 30, .72); backdrop-filter: blur(14px) saturate(1.2); }
#dump-form { flex: 1; position: relative; }
#dump-form::before { content: "＋"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 13px; }
#dump-input, #search { width: 100%; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; transition: border-color .15s, background .15s; }
#dump-input { padding-left: 32px; }
#dump-input:focus, #search:focus { outline: none; border-color: rgba(140,207,255,.45); background: rgba(140,207,255,.05); }
#search { width: 190px; }
.mode { display: flex; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.mode button { background: none; border: 0; padding: 6px 10px; border-radius: 8px; color: var(--muted); white-space: nowrap; font-size: 13px; font-weight: 500; }
.mode button:hover { color: var(--text); }
.mode button.on { background: var(--accent); color: var(--accent-ink); font-weight: 650; box-shadow: 0 2px 10px -2px rgba(140,207,255,.5); }
.sync-btn { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 11px; padding: 8px 11px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.sync-btn:hover { color: var(--text); border-color: var(--line-strong); }
.sync-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.sync-btn .dot.old { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.sync-btn .dot.none { background: var(--dim); box-shadow: none; }
.sync-btn.spin .ic { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#view { padding: 24px 28px 48px; max-width: 1440px; }

/* ---------------- type */
h1 { font-size: 25px; line-height: 1.2; margin: 0 0 4px; font-weight: 680; letter-spacing: -.015em; }
h2 { font-size: 14.5px; margin: 0 0 12px; font-weight: 640; color: var(--text); letter-spacing: .1px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 11.5px; margin: 18px 0 8px; color: var(--dim); text-transform: uppercase; letter-spacing: .9px; font-weight: 650; }
.sub { color: var(--muted); margin: 0 0 18px; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 650; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 12.5px; }
.empty { color: var(--dim); padding: 6px 0; font-size: 13.5px; }
.hidden { display: none !important; }

/* ---------------- layout */
.grid { display: grid; gap: 16px; align-content: start; }
.g2 { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.spacer { flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { margin: 2px 0 0; }

/* ---------------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.card.warm, .card.feature { position: relative; border-color: rgba(140,207,255,.22);
  background: linear-gradient(180deg, rgba(140,207,255,.09), rgba(140,207,255,.015) 140px), var(--surface); }
.card.feature::after, .card.warm::after { content: ""; position: absolute; inset: 0 30% auto 30%; height: 1px; background: linear-gradient(90deg, transparent, rgba(190,230,255,.6), transparent); }
.card.flat { box-shadow: none; background: rgba(255,255,255,.02); }
.card h2 .dim { margin-left: auto; font-weight: 400; }

/* ---------------- controls */
.btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.045); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 13px; font-weight: 550; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(170,200,240,.32); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #a2d8ff, var(--accent-2)); color: var(--accent-ink); border-color: transparent; font-weight: 650; box-shadow: 0 6px 16px -8px rgba(95,178,245,.8); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.05); }
.btn.danger { color: var(--danger); }
.btn.icon { padding: 5px 8px; min-width: 30px; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 550; background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.warn { color: var(--warn); border-color: rgba(242,194,123,.3); background: rgba(242,194,123,.07); }
.pill.bad { color: var(--danger); border-color: rgba(255,143,134,.3); background: rgba(255,143,134,.07); }
.pill.good { color: var(--ok); border-color: rgba(111,211,168,.3); background: rgba(111,211,168,.07); }
.pill.info { color: var(--accent); border-color: rgba(140,207,255,.3); background: var(--accent-soft); }
.k-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.k-work .k-dot, .k-dot.work { background: var(--work); }
.k-meeting .k-dot, .k-dot.meeting { background: var(--meeting); }
.k-learning .k-dot, .k-dot.learning { background: var(--learning); }
.k-relax .k-dot, .k-dot.relax { background: var(--relax); }
.seg { display: inline-flex; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 5px 11px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 550; }
.seg button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 650; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label, label.lbl { color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; font-weight: 600; }
.field input, .field select, .field textarea, .inp { background: rgba(255,255,255,.035); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 8px 11px; width: 100%; transition: border-color .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { outline: none; border-color: rgba(140,207,255,.5); box-shadow: 0 0 0 3px rgba(140,207,255,.12); }
select option { background: var(--surface-solid); }
.field textarea { min-height: 80px; resize: vertical; }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fields3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.title-input { font-size: 21px; font-weight: 680; letter-spacing: -.01em; background: transparent !important; border: 0 !important; padding: 4px 0 !important; box-shadow: none !important; }
input[type=checkbox] { width: 17px !important; height: 17px; flex: 0 0 17px; accent-color: var(--accent-2); padding: 0; }
input[type=time], input[type=date], input[type=datetime-local] { color-scheme: dark; }
.row > .inp:not([style]) { flex: 1; }

/* ---------------- lists */
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; transition: background .12s; }
.item:last-child { border-bottom: 0; }
.item:hover { background: rgba(255,255,255,.03); }
.item .t { flex: 1; min-width: 0; }
.item .title { font-weight: 560; }
.item.done .title { text-decoration: line-through; color: var(--dim); }
.time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 92px; font-size: 13px; padding-top: 1px; }

/* ---------------- today */
.goals { list-style: none; padding: 0; margin: 0; }
.goals li { display: flex; gap: 10px; align-items: center; padding: 7px 0; }
.goals li.done .gtext { text-decoration: line-through; color: var(--dim); }
.goals input.gtext { flex: 1; background: transparent; border: 0; border-bottom: 1px dashed var(--line-strong); padding: 4px 0; }
.goals input.gtext:focus { outline: none; border-bottom-color: var(--accent); }
.now-card .big { font-size: 19px; font-weight: 660; margin: 6px 0 2px; }
.timer { font-size: 34px; font-weight: 300; font-variant-numeric: tabular-nums; color: var(--accent); letter-spacing: 1px; text-shadow: 0 0 22px rgba(140,207,255,.35); }
.block-row { border-left: 3px solid var(--line-strong); padding-left: 12px; border-radius: 0 8px 8px 0; }
.block-row.k-work { border-left-color: var(--work); }
.block-row.k-meeting { border-left-color: var(--meeting); }
.block-row.k-learning { border-left-color: var(--learning); }
.block-row.k-relax { border-left-color: var(--relax); }
.block-row.c-tentative { border-left-style: dashed; }
.block-row .first { color: var(--muted); font-size: 12.5px; }
.conflict { color: var(--danger); font-size: 12.5px; }
.event-row { border-left: 3px solid #4f6386; padding-left: 12px; color: var(--muted); border-radius: 0 8px 8px 0; }
.routine-row { border-left: 3px dotted #44587a; padding-left: 12px; color: var(--dim); border-radius: 0 8px 8px 0; }
.dayline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.dayline b { color: var(--text); font-weight: 600; }
.loc { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); }
.loc.office { color: #a9c7ff; background: rgba(122,167,255,.1); }
.loc.wfh { color: var(--ok); background: rgba(111,211,168,.1); }
.loc.off { color: var(--learning); background: rgba(185,163,255,.1); }

/* what now */
.whatnow .controls { display: grid; gap: 10px; margin-bottom: 12px; }
.whatnow .controls .row { gap: 12px; }
.whatnow .controls label.lbl { min-width: 70px; }
.sugg { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); margin-bottom: 8px; transition: border-color .15s, background .15s; }
.sugg:hover { border-color: rgba(140,207,255,.35); background: rgba(140,207,255,.05); }
.sugg .ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.05); flex: none; }
.sugg .t { flex: 1; min-width: 0; }
.sugg .title { font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- calendar */
.week-goals { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; font-size: 12.5px; }
.week-goals .wg { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--surface); min-height: 70px; cursor: pointer; transition: border-color .15s; }
.week-goals .wg:hover { border-color: var(--line-strong); }
.week-goals .wg.head { cursor: default; background: none; border: 0; color: var(--dim); text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding-top: 14px; }
.week-goals .wg.today { border-color: rgba(140,207,255,.4); background: linear-gradient(180deg, rgba(140,207,255,.1), var(--surface)); }
.week-goals .wg b { display: flex; justify-content: space-between; align-items: center; gap: 4px; color: var(--text); margin-bottom: 3px; font-weight: 620; }
.week-goals .wg div { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-goals .wg div.done { text-decoration: line-through; color: var(--dim); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend .tent { width: 14px; height: 10px; border: 2px dashed var(--muted); border-radius: 3px; display: inline-block; }
#cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.fc { --fc-border-color: var(--line); --fc-page-bg-color: transparent; --fc-neutral-bg-color: rgba(255,255,255,.025);
      --fc-today-bg-color: rgba(140,207,255,.06); --fc-now-indicator-color: var(--accent); --fc-list-event-hover-bg-color: var(--surface-2);
      --fc-button-text-color: var(--muted); --fc-button-bg-color: rgba(255,255,255,.04); --fc-button-border-color: var(--line-strong); --fc-button-hover-bg-color: rgba(255,255,255,.08);
      --fc-button-hover-border-color: var(--line-strong); --fc-button-active-bg-color: var(--accent); --fc-button-active-border-color: var(--accent); --fc-event-text-color: var(--text);
      --fc-non-business-color: rgba(0,0,0,.18); }
.fc .fc-toolbar-title { font-size: 16px; font-weight: 640; }
.fc .fc-button { border-radius: 9px !important; font-size: 13px; font-weight: 550; text-transform: capitalize; box-shadow: none !important; }
.fc .fc-button-group .fc-button { border-radius: 0 !important; }
.fc .fc-button-group .fc-button:first-child { border-radius: 9px 0 0 9px !important; }
.fc .fc-button-group .fc-button:last-child { border-radius: 0 9px 9px 0 !important; }
.fc .fc-button-primary:not(:disabled).fc-button-active { color: var(--accent-ink); }
.fc .fc-col-header-cell-cushion { color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 8px 4px; }
.fc .fc-timegrid-slot-label-cushion { color: var(--dim); font-size: 11.5px; }
.fc .fc-timegrid-slot { height: 22px; }
.fc .fc-scrollgrid { border-radius: 10px; overflow: hidden; }

/* ---------------- drawer */
.drawer { position: fixed; top: 0; right: 0; width: min(540px, 100vw); height: 100vh; z-index: 20; overflow-y: auto; padding: 22px 24px 60px;
  background: linear-gradient(180deg, rgba(20,31,49,.97), rgba(13,21,35,.98)); border-left: 1px solid var(--line-strong); box-shadow: -24px 0 60px -20px rgba(0,0,0,.7); backdrop-filter: blur(18px);
  animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer.hidden { display: none; }
.drawer .close { position: absolute; top: 14px; right: 16px; }

/* ---------------- markdown + editor */
.md { line-height: 1.65; }
.md h1, .md h2, .md h3 { color: var(--text); text-transform: none; letter-spacing: 0; }
.md h2 { font-size: 16px; margin-top: 18px; }
.md code { background: rgba(0,0,0,.3); padding: 1px 5px; border-radius: 5px; font-family: var(--mono); font-size: 12.5px; }
.md pre { background: rgba(0,0,0,.3); padding: 12px; border-radius: 10px; overflow: auto; }
.md table { border-collapse: collapse; }
.md td, .md th { border: 1px solid var(--line-strong); padding: 4px 8px; }
.md blockquote { border-left: 3px solid var(--accent); margin: 0; padding-left: 12px; color: var(--muted); }
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor textarea { min-height: 480px; width: 100%; background: rgba(0,0,0,.22); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; font-family: var(--mono); font-size: 13px; line-height: 1.6; resize: vertical; }
.editor textarea:focus { outline: none; border-color: rgba(140,207,255,.45); }
.editor .preview { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; min-height: 480px; overflow: auto; }
.editor.single { grid-template-columns: 1fr; }

/* ---------------- plan / review */
.loadbar { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.loadbar .bar { flex: 1; height: 7px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.loadbar .bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fbf92, var(--ok)); border-radius: 99px; }
.loadbar .bar i.hi { background: linear-gradient(90deg, #d9a35a, var(--warm)); }
.loadbar .bar i.over { background: linear-gradient(90deg, #e46f66, var(--danger)); }
.insight { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.insight:last-child { border-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.stat b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--dim); font-size: 12px; }
.heat { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin-top: 6px; }
.heat div { height: 34px; border-radius: 6px; background: rgba(255,255,255,.04); display: grid; place-items: end center; font-size: 10px; color: var(--dim); padding-bottom: 2px; }
.heat-legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--dim); margin-top: 8px; }
.heat-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); flex: none; }
.check.ok .n { background: rgba(111,211,168,.15); color: var(--ok); }

/* ---------------- growth */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.level { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.level b { display: block; font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; }
.level span { font-size: 13px; color: var(--muted); }
.goal { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.goal.active { border-color: rgba(140,207,255,.35); background: linear-gradient(180deg, rgba(140,207,255,.08), rgba(255,255,255,.02)); }
.goal .area { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); font-weight: 650; }
.goal .gt { font-weight: 620; font-size: 15px; margin: 2px 0 4px; }
.progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 99px; }
.habit { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.habit:last-child { border-bottom: 0; }
.habit .t { flex: 1; min-width: 0; }
.wdots { display: flex; gap: 4px; }
.wdots button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); font-size: 10.5px; color: var(--dim); padding: 0; }
.wdots button.on { background: var(--ok); border-color: var(--ok); color: #062016; font-weight: 700; }
.wdots button.today { border-color: var(--accent); }
.balance .loadbar span:first-child { min-width: 200px; color: var(--muted); }

/* ---------------- setup */
.steps { display: grid; gap: 12px; }
.step { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.step > header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; }
.step > header .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(140,207,255,.3); flex: none; }
.step.done > header .n { background: rgba(111,211,168,.15); color: var(--ok); border-color: rgba(111,211,168,.35); }
.step.skipped > header .n { background: rgba(255,255,255,.05); color: var(--dim); border-color: var(--line); }
.step > header .t { flex: 1; }
.step > header .t b { display: block; font-weight: 620; }
.step > header .t span { color: var(--dim); font-size: 12.5px; }
.step .body { padding: 4px 18px 18px 58px; display: none; }
.step.open .body { display: block; }
.step.open { border-color: rgba(140,207,255,.3); }
.setup-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.setup-hero .bar { flex: 1; max-width: 360px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.setup-hero .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

/* rhythm editor */
table.rhythm { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 13px; }
table.rhythm th { text-align: left; color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding: 0 4px 4px; }
table.rhythm td { padding: 3px 4px; }
table.rhythm td:first-child { font-weight: 620; color: var(--text); width: 52px; }
table.rhythm input[type=time] { background: rgba(255,255,255,.035); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 6px; width: 100%; min-width: 86px; }
table.rhythm select { background: rgba(255,255,255,.035); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 6px; }
table.rhythm tr.off td:not(:first-child):not(.locc) { opacity: .35; }
.pair { display: flex; gap: 4px; align-items: center; }
.pair span { color: var(--dim); }

/* ---------------- misc */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 99px; padding: 5px 13px; color: var(--muted); font-size: 13px; font-weight: 550; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(140,207,255,.4); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.pcard { cursor: pointer; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pcard .now { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: rgba(27,40,64,.96); border: 1px solid var(--line-strong); padding: 10px 18px; border-radius: 12px; z-index: 30; box-shadow: 0 16px 40px -16px rgba(0,0,0,.8); backdrop-filter: blur(10px); max-width: 90vw; }
.toast.hidden { display: none; }
.code { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,.3); padding: 9px 11px; border-radius: 9px; word-break: break-all; border: 1px solid var(--line); }
table.simple { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.simple td, table.simple th { border-bottom: 1px solid var(--line); padding: 7px 4px; text-align: left; }
table.simple th { color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
table.simple input, table.simple select { background: rgba(255,255,255,.035); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 7px; width: 100%; }
table.simple input[data-k=title] { min-width: 170px; }
.days { white-space: nowrap; }
.days label { display: inline-flex !important; align-items: center; gap: 2px; margin: 0 4px 0 0; font-size: 11.5px; color: var(--muted); }
.note { font-size: 12.5px; color: var(--muted); background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.rating { display: flex; gap: 8px; }
.rating button { flex: 1; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.035); font-weight: 600; }
.rating button:hover { border-color: var(--accent); background: var(--accent-soft); }

body.login { display: grid; place-items: center; min-height: 100vh; }
.login-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 12px; width: 320px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); backdrop-filter: blur(16px); }
.login-card h1 { text-align: center; margin-bottom: 8px; }
.login-card input { background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px; }
.login-card button { background: linear-gradient(180deg, #a2d8ff, var(--accent-2)); border: 0; border-radius: 10px; padding: 11px; font-weight: 650; color: var(--accent-ink); }
.err { color: var(--danger); margin: 0; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .levels { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  #nav { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; z-index: 10; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); flex-direction: row; }
  #nav .brand, #nav .navsec, #nav .foot { display: none; }
  #nav nav { flex-direction: row; justify-content: space-around; width: 100%; }
  #nav a span, #nav a.active::before { display: none; }
  #nav a { font-size: 19px; padding: 8px; }
  #nav a .count { position: absolute; top: 0; right: 0; }
  #nav a[data-nav="settings"], #nav a[data-nav="projects"], #nav a[data-nav="memory"], #nav a[data-nav="meetings"], #nav a[data-nav="review"] { display: none; }
  #top { padding: 10px 12px; flex-wrap: wrap; }
  #view { padding: 16px 12px 96px; }
  .g2, .g3, .g4, .fields2, .fields3, .editor, .levels { grid-template-columns: 1fr; }
  #search, .sync-btn .lbl { display: none; }
  .mode button { padding: 6px 7px; font-size: 12px; }
  .week-goals { display: none; }
  .step .body { padding-left: 18px; }
  table.rhythm { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.grid > * { min-width: 0; }
.card { min-width: 0; }
table.rhythm, table.simple { max-width: 100%; }
.card:has(> table.rhythm), .card:has(> table.simple) { overflow-x: auto; }
.timer-chip { display: flex; align-items: center; gap: 8px; background: rgba(255,143,134,.08); border: 1px solid rgba(255,143,134,.3); border-radius: 11px; padding: 4px 6px 4px 11px; font-size: 12.5px; max-width: 280px; }
.timer-chip .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: pulse 1.6s ease-in-out infinite; flex: none; }
.timer-chip .tt { font-variant-numeric: tabular-nums; font-weight: 650; }
.timer-chip .tn { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@keyframes pulse { 50% { opacity: .35; } }
.coach-pick .gt { font-weight: 650; font-size: 16px; margin: 2px 0 4px; }
.tour { position: fixed; inset: 0; z-index: 50; }
.tour-dim { position: fixed; inset: 0; background: rgba(4, 8, 16, .62); }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(4, 8, 16, .62), 0 0 0 2px var(--accent), 0 0 24px rgba(140,207,255,.45); pointer-events: none; transition: all .2s; }
.tour-card { position: fixed; background: linear-gradient(180deg, rgba(27,40,64,.98), rgba(18,28,45,.98)); border: 1px solid var(--line-strong); border-radius: 14px; padding: 16px 18px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.8); }
.switch-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; cursor: pointer; }
.switch-row input { margin-top: 3px; }
/* tasks table */
.taskbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; padding: 12px 14px; }
.tf { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--dim); }
.tf select { background: rgba(255,255,255,.035); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 8px; max-width: 190px; }
.ttable { padding: 6px 8px; }
.trow { display: grid; grid-template-columns: 28px minmax(0, 3fr) minmax(0, 1.2fr) 130px 90px 70px 44px; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; font-size: 13.5px; }
.trow:hover { background: rgba(255,255,255,.03); }
.trow.thead { cursor: default; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.trow.thead:hover { background: none; }
.trow .tt { display: flex; flex-direction: column; min-width: 0; }
.trow .tt .title { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .tt .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.done .title { text-decoration: line-through; color: var(--dim); }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgroup { padding: 14px 6px 6px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .7px; color: var(--accent); }
.datecell { position: relative; display: inline-flex; align-items: center; }
.datecell input[type=date] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dlabel { padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.04); font-size: 12.5px; white-space: nowrap; }
.dlabel.warn { color: var(--warn); background: rgba(242,194,123,.08); }
.dlabel.bad { color: var(--danger); background: rgba(255,143,134,.08); }
@media (max-width: 900px) { .trow { grid-template-columns: 26px minmax(0, 1fr) 100px; } .trow > span:nth-child(3), .trow > span:nth-child(5), .trow > span:nth-child(6), .trow > span:nth-child(7) { display: none; } }
.sync-btn .dot.err { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* ---------------- calendar v2: one visual language
   Rhythm blocks = tinted fill + solid kind stripe (fixed) or dashed outline (tentative)
   Calendar events = neutral card + stripe in the calendar's own colour
   Routines = quiet background bands, label only on hover */
.calbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 10px; }
.calgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.calgroup .lbl { margin-right: 2px; }
.lchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 550;
  border: 1px solid var(--line); background: transparent; color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.lchip.on { background: rgba(255,255,255,.05); color: var(--text); border-color: var(--line-strong); text-decoration: none; }
.lchip .cdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; opacity: .4; }
.lchip.on .cdot { opacity: 1; }
.lchip .k-dot { width: 7px; height: 7px; margin-right: -3px; }
.calhelp { font-size: 11.5px; }
.fc .fc-timegrid-slot { height: 24px; }
.fc .fc-timegrid-slot-minor { border-top-style: none; }
.fc .fc-day-today .fc-col-header-cell-cushion { color: var(--accent); }
.fc-event { border-radius: 6px; font-size: 12px; box-shadow: none; overflow: hidden; }
.fc-event .fc-event-main { color: var(--text) !important; padding: 0; }
.ev-1 { padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; font-weight: 560; }
.ev-n { padding: 3px 6px; line-height: 1.3; }
.ev-t { font-size: 10.5px; opacity: .7; font-weight: 500; font-variant-numeric: tabular-nums; }
.ev-title { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ev-src { font-size: 10.5px; opacity: .6; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Rhythm blocks */
.fc-event.k-work { --k: var(--work); } .fc-event.k-meeting { --k: var(--meeting); } .fc-event.k-learning { --k: var(--learning); } .fc-event.k-relax { --k: var(--relax); }
.fc-event.c-fixed { background: color-mix(in srgb, var(--k) 48%, #0f1828) !important; border: 0 !important; border-left: 4px solid var(--k) !important; }
.fc-event.c-tentative { background: color-mix(in srgb, var(--k) 9%, transparent) !important; border: 1.5px dashed color-mix(in srgb, var(--k) 75%, transparent) !important; }
.fc-event.c-tentative .ev-title, .fc-event.c-tentative .ev-1 { font-weight: 520; color: color-mix(in srgb, var(--k) 35%, var(--text)); }
.fc-event.s-done { opacity: .38; }
.fc-event.s-done .ev-title, .fc-event.s-done .ev-1 { text-decoration: line-through; }
.fc-event.s-in_progress { box-shadow: 0 0 0 2px var(--k), 0 0 14px -2px var(--k) !important; }
.fc-event.conflict { box-shadow: 0 0 0 2px var(--danger) !important; }
/* External calendar events */
.fc-event.cal-event { background: color-mix(in srgb, var(--c, #7a8ba6) 10%, #161f30) !important; border: 1px solid rgba(170,200,240,.14) !important; border-left: 4px solid var(--c, #7a8ba6) !important; }
.fc-event.cal-event .fc-event-main { color: #d5deea !important; }
#cal.fade-ext .fc-event.cal-event { opacity: .42; filter: saturate(.5); }
#cal.fade-ext .fc-event.cal-event:hover { opacity: 1; filter: none; }
/* Manual meetings, deadlines */
.fc-event.deadline { background: rgba(255,143,134,.12) !important; border: 1px solid rgba(255,143,134,.35) !important; }
.fc-event.deadline .fc-event-main { color: #ffd2cd !important; }
.fc-daygrid-event.cal-event, .fc-daygrid-block-event { border-radius: 5px; }
/* Routines: quiet bands */
.fc .fc-bg-event.routine { background: repeating-linear-gradient(135deg, rgba(160,180,210,.07) 0 6px, transparent 6px 12px); opacity: 1; }
.fc .fc-bg-event.routine .rt-label { font-size: 10px; color: var(--dim); padding: 2px 5px; opacity: 0; transition: opacity .15s; }
.fc .fc-bg-event.routine:hover .rt-label { opacity: 1; }
.fc .fc-timegrid-col.fc-day-today { background: rgba(140,207,255,.035); }
.fc .fc-non-business { background: rgba(0,0,0,.14); }
.swatches { display: flex; gap: 4px; align-items: center; }
.swatches .sw { width: 18px; height: 18px; border-radius: 5px; border: 2px solid transparent; padding: 0; }
.swatches .sw.on { border-color: #fff; }
.swatches input[type=color] { width: 22px !important; height: 22px; padding: 0 !important; border: 1px dashed var(--line-strong) !important; background: none !important; border-radius: 5px; }
.lchip.toggle { text-decoration: none; }
/* Planning controls and the two memory stores. */
.memory-guide { margin: 18px 0; }
.memory-guide p { color: var(--muted, #a8b6cb); line-height: 1.65; }
.memory-guide .card { border-top: 3px solid #7799ef; }
.memory-guide .card + .card { border-top-color: #64bbaa; }
.availability { margin: 16px 0; }
.availability > .row { margin: 10px 0; }
.fc .protected-time { background: repeating-linear-gradient(135deg, rgba(224,163,58,.13) 0 7px, rgba(224,163,58,.04) 7px 14px); }
.fc .protected-time .fc-event-title { color: #e0bb7c; white-space: normal; }
.meeting-group { margin:24px 0; }
.meeting-group > .row { margin-bottom:10px; }
.meeting-group h2 { margin:0; font-size:17px; text-transform:none; letter-spacing:0; }
.meeting-list { padding:4px 16px; }
.meeting-row { display:flex; align-items:center; gap:18px; width:100%; text-align:left; color:var(--text); border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; padding:18px 4px; cursor:pointer; }
.meeting-row:last-child { border-bottom:0; }
.meeting-row:hover { background:rgba(140,207,255,.04); }
.meeting-row .t { display:flex; flex:1; min-width:0; flex-direction:column; gap:5px; }
.meeting-row strong { font-size:15px; }
.meeting-date { display:flex; flex-direction:column; gap:5px; width:92px; flex:none; color:var(--muted); font-size:12px; }
.meeting-date b { font-size:17px; color:var(--text); }
.meeting-details { margin:20px 0; border:1px solid var(--line); border-radius:14px; padding:16px; }
.meeting-details > summary { cursor:pointer; font-weight:600; }
.meeting-details h2, .meeting-notebook h2 { text-transform:none; letter-spacing:0; font-size:18px; }
.meeting-notebook { max-width:1100px; margin:24px auto; }
#note-save-state { font-size:12px; color:var(--muted); }
#note-save-state.err { color:var(--danger); }
#meeting-note-editor .toastui-editor-defaultUI { border:1px solid var(--line-strong); border-radius:14px; overflow:hidden; }
#meeting-note-editor .toastui-editor-toolbar { border-color:var(--line); }
#meeting-note-editor .toastui-editor-contents { font-family:inherit; font-size:15px; line-height:1.8; }
#meeting-note-editor .toastui-editor-ww-container .toastui-editor-contents { padding:30px 40px; }
#meeting-note-editor .toastui-editor-contents h1, #meeting-note-editor .toastui-editor-contents h2, #meeting-note-editor .toastui-editor-contents h3 { text-transform:none; letter-spacing:0; }
#sidebar-toggle { margin-left:auto; padding:3px 8px; font-size:21px; }
@media(min-width:901px) {
  .sidebar-collapsed #app { grid-template-columns:72px minmax(0,1fr); }
  .sidebar-collapsed #nav { width:72px; padding-left:8px; padding-right:8px; }
  .sidebar-collapsed #nav .brand { justify-content:center; padding-left:0; padding-right:0; }
  .sidebar-collapsed #nav .brand > .logo, .sidebar-collapsed #nav .brand > div, .sidebar-collapsed #nav .navsec, .sidebar-collapsed #nav .foot { display:none; }
  .sidebar-collapsed #sidebar-toggle { margin:0; }
  .sidebar-collapsed #nav nav a { justify-content:center; padding:12px 6px; position:relative; }
  .sidebar-collapsed #nav nav a > span:not(.ic) { display:none; }
  .sidebar-collapsed #nav .count { position:absolute; right:0; top:0; font-size:9px; }
}
@media(max-width:900px) {
  #sidebar-toggle { display:none; }
  .meeting-row { gap:10px; }
  .meeting-date { width:76px; }
  #meeting-note-editor .toastui-editor-ww-container .toastui-editor-contents { padding:18px; }
  .meeting-details { padding:12px; }
}
#meeting-note-editor { position:relative; }
#meeting-note-editor .toastui-editor-defaultUI { border:0!important; border-radius:0!important; overflow:visible!important; background:transparent!important; }
#meeting-note-editor .toastui-editor-defaultUI-toolbar, #meeting-note-editor .toastui-editor-toolbar { display:none!important; }
#meeting-note-editor .toastui-editor-main, #meeting-note-editor .toastui-editor-ww-container { background:transparent!important; color:var(--text); }
#meeting-note-editor .toastui-editor-ww-container .toastui-editor-contents { padding:20px 46px!important; }
#meeting-note-editor .toastui-editor-contents h1, #meeting-note-editor .toastui-editor-contents h2, #meeting-note-editor .toastui-editor-contents h3 { border:0!important; padding-bottom:0; }
#meeting-note-editor .toastui-editor-contents h1 { font-size:30px; }
#meeting-note-editor .toastui-editor-contents h2 { font-size:23px; }
#meeting-note-editor .toastui-editor-contents h3 { font-size:18px; }
#meeting-note-editor .toastui-editor-contents p { margin:7px 0; }
.note-block-add { position:fixed; display:grid; place-items:center; width:28px; height:28px; padding:0; margin:0; border:0; border-radius:5px; color:var(--muted); background:transparent; font:22px/1 system-ui,sans-serif; cursor:pointer; z-index:100; }
.note-block-add:hover { background:var(--surface-2); color:var(--text); }
.note-block-menu { position:fixed; z-index:1001; width:min(290px,90vw); padding:10px; border:1px solid var(--line-strong); background:#182234; color:var(--text); border-radius:12px; box-shadow:0 12px 40px #0009; isolation:isolate; }
.note-block-menu[hidden], .note-block-add[hidden] { display:none; }
.note-block-menu input { width:100%; margin:8px 0; padding:8px 10px; background:#101929; color:var(--text); border:1px solid var(--line-strong); border-radius:6px; outline:none; }
.note-block-menu [role=listbox] { max-height:min(280px,calc(100vh - 150px)); overflow:auto; }
.note-block-menu [role=option] { display:flex; align-items:center; gap:12px; width:100%; padding:9px; border:0; text-align:left; background:transparent; color:var(--text); cursor:pointer; border-radius:6px; }
.note-block-menu [role=option][aria-selected=true],.note-block-menu [role=option]:hover { background:#8ccfff18; }
.note-block-menu strong,.note-block-menu small { display:block; }
.note-block-menu small { color:var(--muted); font-size:11px; margin-top:3px; }
.meeting-notebook { border:1px solid var(--line-strong); border-radius:10px; padding:20px 24px 0; }
.meeting-notebook > .row { padding-bottom:14px; border-bottom:1px solid var(--line); }
#meeting-note-editor { margin:0 -24px; }
#meeting-note-editor .toastui-editor-main { padding-top:0!important; }
#meeting-note-editor .toastui-editor-contents > :first-child { margin-top:8px; }
.block-type-icon { display:grid; place-items:center; flex:none; width:34px; height:34px; border:1px solid var(--line-strong); border-radius:6px; font-size:16px; }

/* Quiet daily flow. Editor content stays beneath the opaque application header. */
#app { z-index:auto; }
.drawer { z-index:2000; }
.toast { z-index:2500; }
.task-options { margin:16px 0; border-top:1px solid var(--line); padding:16px 0; }
.task-options summary { margin-bottom:12px; cursor:pointer; color:var(--muted); }
.task-options>button { margin:8px 8px 8px 0; }
.task-view { width:auto; max-width:100%; margin:0 0 16px; }
#top { z-index:1200; background:#0a111e; isolation:isolate; }
#view { min-width:0; }
.meeting-notebook { position:relative; isolation:isolate; z-index:0; margin-top:16px; }
.note-block-menu,.note-block-add { z-index:1001; }
#dump-form { display:none; }
#search { display:block; flex:1; max-width:420px; width:120px; min-width:80px; }
#top .mode { margin-left:auto; }
#mobile-nav-toggle { display:none; }
#mobile-nav-close { display:none; }
.mobile-nav-options { display:none; }
.more-navigation { margin-top:12px; border-top:1px solid var(--line); padding-top:12px; }
.more-navigation summary { display:flex; align-items:center; gap:12px; padding:12px; cursor:pointer; color:var(--muted); }
.more-navigation summary::-webkit-details-marker { display:none; }
.sidebar-collapsed .more-navigation summary > span:not(.ic) { display:none; }
.more-navigation > div { display:flex; flex-direction:column; }
.today-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr); gap:24px; }
.today-layout > .grid { align-content:start; }
.today-layout h2 { margin-bottom:16px; }
.agenda-row { display:flex; align-items:center; gap:16px; width:100%; text-align:left; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; padding:18px 0; color:var(--text); }
.agenda-row:last-child { border-bottom:0; }
.agenda-row:hover { color:var(--accent); }
.agenda-row .t { min-width:0; flex:1; display:flex; flex-direction:column; gap:5px; }
.agenda-time { flex:none; width:92px; font-size:12px; color:var(--muted); }
.hub-link { display:block; width:100%; text-align:left; border:0; background:transparent; color:var(--accent); padding:10px 0; text-decoration:none; }
.secondary summary,.settings-group summary,.project-options summary,.calendar-options summary { cursor:pointer; color:var(--muted); font-weight:600; }
.secondary[open]>summary,.settings-group[open]>summary { margin-bottom:16px; }
.attention { border-color:rgba(224,163,58,.5); }
.day-nav { display:flex; gap:6px; }
.note-actions { position:relative; }
.note-actions > div { position:absolute; top:100%; right:0; min-width:160px; padding:10px; display:grid; gap:8px; background:#111e30; border:1px solid var(--line-strong); border-radius:10px; z-index:15; }
.meeting-time-options { margin:8px 0; font-size:12px; color:var(--muted); }
.meeting-details:not([open]) { display:none; }
.notebook-view { max-width:1180px!important; margin:0 auto; }
.notebook-view>.page-head { align-items:center; }
body:not(.tracking-enabled) .optional-tracking { display:none!important; }
.calendar-options { margin:0 0 14px; }
.calendar-options .calbar { margin-top:12px; }
.project-options { margin:8px 0 20px; }
.settings-group { margin-bottom:8px; min-width:0; }
.settings-group>* { max-width:100%; }
button,a,input,select,textarea { touch-action:manipulation; }
@media(max-width:900px) {
  #app,.sidebar-collapsed #app { display:block; }
  #top { padding:10px 12px; flex-wrap:nowrap; gap:8px; }
  #mobile-nav-toggle { display:inline-flex; flex:none; }
  #mobile-nav-close { display:inline-flex; margin-left:auto; }
  #nav,.sidebar-collapsed #nav { position:fixed; display:flex; flex-direction:column; top:0; left:0; bottom:0; width:min(300px,85vw); height:100dvh; padding:20px 16px; border-right:1px solid var(--line); border-top:0; z-index:1500; overflow-y:auto; transform:translateX(-105%); visibility:hidden; background:#0d1727; }
  .mobile-nav-open #nav { transform:none; visibility:visible; }
  .mobile-nav-open { overflow:hidden; }
  #nav .brand,#nav .foot { display:flex; }
  #nav .brand>div { display:block!important; }
  #nav .brand .logo { display:inline-flex!important; }
  #sidebar-toggle { display:none; }
  #nav nav { display:flex; flex-direction:column; justify-content:flex-start; }
  .mobile-nav-options { display:grid; gap:10px; margin:20px 10px; }
  #nav nav a,#nav a[data-nav] { display:flex; font-size:15px; padding:13px 12px; gap:12px; }
  #nav nav a span,.sidebar-collapsed #nav nav a>span:not(.ic),.sidebar-collapsed .more-navigation summary>span:not(.ic) { display:inline; }
  #nav a .count { position:static; margin-left:auto; }
  #nav-backdrop:not([hidden]) { display:block; position:fixed; inset:0; z-index:1400; background:rgba(0,0,0,.6); border:0; width:100%; height:100%; }
  #top .mode,#sync-btn { display:none; }
  #quick-capture { white-space:nowrap; flex:none; }
  #search { width:100px; }
  #view { padding:20px 16px 40px; }
  .today-layout { grid-template-columns:1fr; gap:16px; }
  .page-head { align-items:center; gap:10px; }
  .page-head h1 { font-size:23px; }
  .card { min-width:0; }
  .row,.page-head { max-width:100%; }
  .row { flex-wrap:wrap; }
  .agenda-row .agenda-time { width:76px; }
  .meeting-row { align-items:flex-start; }
  .meeting-row .pill { display:none; }
  .meeting-row strong,.t { overflow-wrap:anywhere; }
  .meeting-details .seg { flex-wrap:wrap; }
  .meeting-notebook { padding:16px 16px 0; }
  #meeting-note-editor { margin:0 -16px; }
  #meeting-note-editor .toastui-editor-ww-container .toastui-editor-contents { padding:18px 30px 30px 42px; }
  .fc .fc-toolbar { gap:8px; flex-wrap:wrap; }
  .fc .fc-toolbar-title { font-size:17px; }
  .fc .fc-button { padding:6px 8px; font-size:12px; }
  input,select,textarea { max-width:100%; font-size:16px!important; }
  .drawer { width:100%; max-width:100%; padding:24px 16px; }
  .fields2,.fields3,.g2,.g3 { grid-template-columns:minmax(0,1fr); }
  .note-block-menu { max-width:calc(100vw - 16px); max-height:calc(100dvh - 90px); }
}
