:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #6b6b66;
  --line: #e2e2dc;
  --accent: #2f6f5e;
  --accent-soft: #e3efe9;
  --warn-soft: #f6ecd6;
  --warn: #8a6214;
  --stop-soft: #ececec;
  --stop: #6b6b66;
  --info-soft: #e4ebf5;
  --info: #2f5487;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161715;
    --surface: #20221f;
    --text: #ececea;
    --muted: #a3a39d;
    --line: #33352f;
    --accent: #7fc4ad;
    --accent-soft: #23362f;
    --warn-soft: #3a3020;
    --warn: #e0b766;
    --stop-soft: #2c2d2a;
    --stop: #a3a39d;
    --info-soft: #222d3d;
    --info: #94b4e0;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

a { color: inherit; }
h1 { font-size: 1.6rem; margin: 0.4rem 0; }
h2 { font-size: 1.05rem; margin: 2rem 0 0.75rem; color: var(--muted); font-weight: 600; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0.3rem 0; }

/* ── 앱 껍데기: 왼쪽 탐색 · 가운데 본문 · 오른쪽 맥락 (docs/05 §13·§14) ── */
.app-top {
  position: sticky; top: 0; z-index: 5; height: 54px;
  display: flex; align-items: center; gap: 0.75rem; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; text-decoration: none; white-space: nowrap; }
.find { flex: 1; max-width: 420px; }
.find input { padding: 0.35rem 0.7rem; font-size: 0.95rem; }
.spacer { flex: 1; }
.tg {
  font: inherit; font-size: 0.85rem; cursor: pointer; white-space: nowrap; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0.3rem 0.65rem;
}
.tg.on { background: var(--bg); color: var(--text); }
.tg[hidden] { display: none; }
.add-btn {
  text-decoration: none; white-space: nowrap; font-size: 0.9rem; border-radius: 8px; padding: 0.35rem 0.8rem;
  background: var(--accent); color: var(--surface);
}

.shell {
  --l: 232px; --r: 300px;
  display: grid; grid-template-columns: var(--l) minmax(0, 1fr) var(--r);
  grid-template-areas: "side main ctx"; min-height: calc(100vh - 54px);
}
.shell[data-left="closed"] { --l: 0px; }
.shell[data-right="closed"] { --r: 0px; }
.shell[data-left="closed"] .side, .shell[data-right="closed"] .ctx { display: none; }
.side, .ctx {
  position: sticky; top: 54px; align-self: start; height: calc(100vh - 54px); overflow: auto;
  font-size: 0.92rem;
}
.side { grid-area: side; padding: 0.9rem 0.6rem 2rem; border-right: 1px solid var(--line); background: var(--surface); }
.ctx { grid-area: ctx; padding: 1rem 1.1rem 2rem; border-left: 1px solid var(--line); background: var(--surface); }
.view { grid-area: main; min-width: 0; padding: 1.25rem 28px 3rem; }
.side-label, .ctx h3 { font-size: 0.75rem; color: var(--muted); font-weight: 600; margin: 1.1rem 0.4rem 0.3rem; letter-spacing: 0.02em; }
.ctx h3 { margin: 1.2rem 0 0.4rem; }
.side-label:first-child, .ctx h3:first-child { margin-top: 0; }
.side ul, .ctx ul { list-style: none; margin: 0; padding: 0; }
.side ul ul { padding-left: 0.8rem; }
.side a {
  display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.22rem 0.5rem; border-radius: 6px;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side a.cur { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side .n { color: var(--muted); font-size: 0.8rem; }
.side .hint { color: var(--muted); font-size: 0.8rem; padding: 0.2rem 0.5rem; }
.ctx li { padding: 0.2rem 0; }
.ctx a { text-decoration: none; }
.ctx .sub { color: var(--muted); font-size: 0.8rem; }

.today-date { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.6rem; }
.home-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.25rem; }
.m-only { display: none; }
.tabbar { display: none; }
.search-hits h2 { margin-top: 1.5rem; }
.hit-sub { color: var(--muted); font-size: 0.85rem; }
.search-inbox-item { flex-wrap: wrap; }
.search-inbox-item .search-excerpt { display: block; width: 100%; font-size: 0.84rem; overflow-wrap: anywhere; }
mark { background: var(--warn-soft); color: inherit; padding: 0 1px; border-radius: 2px; }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  text-decoration: none;
}
a.card:hover { border-color: var(--accent); }

.grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.rooms { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.notice { margin-top: 0.75rem; padding: 0.6rem 0.8rem; border-left: 3px solid var(--line); }
.badge.scope { background: var(--stop-soft); color: var(--stop); }
.compass { min-height: 0; border-left: 4px solid var(--accent); }
.thoughts { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.thought {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem;
  padding: 0.5rem 0; border-top: 1px solid var(--line);
}
.thought:first-child { border-top: 0; }
.thought.l-example > span:first-child { color: var(--muted); }
.thought .tags { display: flex; flex: none; gap: 0.3rem; align-items: center; }
.thought .chip { margin: 0; }
.badge.l-tentative { background: var(--info-soft); color: var(--info); }
.badge.l-example { background: var(--warn-soft); color: var(--warn); }
.states { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 1rem; }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.status { display: flex; flex-direction: column; gap: 0.2rem; }
.room, .link { display: flex; flex-direction: column; gap: 0.3rem; min-height: 120px; }
.room .icon { font-size: 1.8rem; }
.room strong, .link strong { font-size: 1.1rem; }

.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 0.9rem; }
.empty { color: var(--muted); padding: 1rem 0; }
.back { display: inline-block; margin-bottom: 0.5rem; color: var(--muted); text-decoration: none; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tool, .area { display: flex; flex-direction: column; gap: 0.25rem; }
.area { border-style: dashed; }
.count { font-weight: 400; font-size: 0.85rem; margin-left: 0.25rem; }

.badge {
  flex: none; font-size: 0.8rem; padding: 0.1rem 0.55rem; border-radius: 999px; white-space: nowrap;
}
.s-using, .k-done { background: var(--accent-soft); color: var(--accent); }
.s-installed, .s-trial, .k-plan { background: var(--info-soft); color: var(--info); }
.s-stopped, .k-unknown { background: var(--stop-soft); color: var(--stop); }
.badge.k-unknown { background: var(--warn-soft); color: var(--warn); }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.chip {
  font-size: 0.8rem; padding: 0.1rem 0.55rem; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; color: var(--muted);
}

.records { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.record {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius); padding: 1rem;
}
.record.k-done { border-left-color: var(--accent); background: var(--surface); color: inherit; }
.record.k-plan { border-left-color: var(--info); background: var(--surface); color: inherit; }
.record.k-unknown { border-left-color: var(--warn); background: var(--surface); color: inherit; }
.record h3 { margin: 0.35rem 0; }
.date { color: var(--muted); font-size: 0.85rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 0.75rem; margin: 0.4rem 0 0; font-size: 0.92rem; }
dt { color: var(--muted); }
dd { margin: 0; }

/* ── 1단계: 홈 · 전체 구조 · 항목 상세 ── */
.small { font-size: 0.85rem; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.5rem 0; }
.warn { background: var(--warn-soft); color: var(--warn); padding: 0.6rem 0.8rem; border-radius: 8px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.crumbs a { color: var(--muted); }

input, textarea, select {
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; width: 100%; min-width: 0;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; }
.form { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.project-list { display: grid; gap: 0.75rem; }
.project-card { min-width: 0; }
.inbox-list { display: grid; gap: 0.75rem; }
.inbox-entry { min-width: 0; }
.inbox-entry:focus, .project-card:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.form label { display: grid; gap: 0.25rem; font-size: 0.9rem; color: var(--muted); }
.form.inline { grid-template-columns: 1fr 2fr auto; align-items: center; }
.row-end { display: flex; justify-content: flex-end; }

.btn {
  font: inherit; font-size: 0.95rem; cursor: pointer; white-space: nowrap;
  padding: 0.5rem 0.9rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; display: inline-block;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.btn.subtle { border-color: transparent; background: none; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }

details > summary { cursor: pointer; color: var(--muted); }
details.edit { margin: 0.75rem 0; }

.direction-banner {
  display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none;
  padding: 0.25rem 0 0.25rem 0.9rem; border-left: 4px solid var(--accent); margin-bottom: 1.25rem;
}
.direction-banner strong { font-size: 1.2rem; }
.motto { font-size: 1.15rem; font-weight: 600; margin: 0.3rem 0 0.75rem; }
.direction h3 { color: var(--muted); font-size: 0.9rem; font-weight: 600; margin-top: 0.75rem; }
.direction h3:first-child { margin-top: 0; }
.after-direction { margin-top: 0.75rem; }

.quick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem; }
.quick-row { display: flex; gap: 0.5rem; }
.quick details { margin-top: 0.5rem; font-size: 0.9rem; }
.flash { color: var(--accent); font-size: 0.9rem; margin: 0.5rem 0 0; }

.kinds { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.kinds label { display: inline-flex; cursor: pointer; }
.kinds input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kinds span {
  font-size: 0.85rem; padding: 0.2rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
}
.kinds input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.kinds input:focus-visible + span { outline: 2px solid var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
button.chip { background: none; cursor: pointer; font: inherit; font-size: 0.8rem; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.25rem; border-bottom: 1px solid var(--line); }
.item-title { flex: 1; min-width: 0; text-decoration: none; overflow-wrap: anywhere; }
.item.is-done .item-title { color: var(--muted); text-decoration: line-through; }
.item-meta { display: flex; align-items: center; gap: 0.4rem; flex: none; font-size: 0.8rem; }
.item-meta .chip { margin: 0; }
.kind-icon { width: 1.4rem; flex: none; text-align: center; color: var(--muted); }
.check {
  width: 1.4rem; height: 1.4rem; flex: none; cursor: pointer; padding: 0; line-height: 1;
  border: 1.5px solid var(--muted); border-radius: 5px; background: var(--surface); color: var(--accent);
}
.check[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.open { text-decoration: none; font-size: 1rem; padding: 0 0.25rem; color: var(--accent); }
.done-list { margin-top: 0.75rem; }

.recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.recent li { display: flex; flex-direction: column; }
.recent a { text-decoration: none; }

.shortcuts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.shortcuts li { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.shortcuts a { padding: 0.4rem 0.2rem 0.4rem 0.75rem; text-decoration: none; }
.x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; padding: 0.2rem 0.55rem; }

.browse { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.browse a { color: var(--muted); }
.data-box { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.item-head .badge { background: var(--stop-soft); color: var(--muted); }
.item-head h1 { margin-top: 0.4rem; overflow-wrap: anywhere; }
.url { overflow-wrap: anywhere; }
.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.notes li { border-left: 3px solid var(--line); padding: 0.1rem 0 0.1rem 0.75rem; }
.notes .text { margin: 0.15rem 0 0; }
.note-form { margin-top: 0.75rem; }
.danger-zone { margin-top: 2rem; }

.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 1rem; border-left: 1px solid var(--line); margin-left: 0.4rem; }
.tree > li { padding: 0.4rem 0; }
.tree summary { display: list-item; list-style: disclosure-closed inside; padding: 0.3rem 0; }
.tree details[open] > summary { list-style-type: disclosure-open; }
.tree .node { display: block; padding: 0.3rem 0; }
.tree summary a, .tree .node { color: var(--text); font-weight: 600; text-decoration: none; }
.tree .items { margin: 0.25rem 0 0.5rem; }

/* ── 바로 시작 · 내 도구 · 작업 지침 ── */
.start-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin: 1rem 0 0.25rem; }
.start {
  display: flex; flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.75rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.start:hover { border-color: var(--accent); }
.start strong { font-size: 0.95rem; }
.start span { font-size: 0.8rem; color: var(--muted); }
.resume-strip { margin: 1.1rem 0 0.5rem; }
.resume-strip h2 { margin: 0 0 0.15rem; }
.resume-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.5rem; padding: 0; margin: 0.6rem 0 0; }
.resume-list a { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); text-decoration: none; min-width: 0; }
.resume-list a:hover, .resume-list a:focus-visible { border-color: var(--accent); outline-offset: 2px; }
.resume-list strong { font-size: 0.88rem; }
.resume-list span { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.pinned h2 { margin-top: 1.5rem; }
.pin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pin-list li { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.3rem 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pin-name { text-decoration: none; font-size: 0.95rem; }
.btn.small-btn { font-size: 0.82rem; padding: 0.25rem 0.6rem; }

.live-filter { max-width: 360px; margin: 0.25rem 0 0.5rem; }
.tool-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tool-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--line); }
.tool-row[hidden] { display: none; }
.tool-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.tool-name { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.tool-sub { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.tool-act { flex: none; }
.pin { border: 0; background: none; cursor: pointer; font-size: 1.15rem; color: var(--line); padding: 0 0.15rem; line-height: 1; }
.pin.on { color: #d9a400; }
.ts-ok { background: var(--accent-soft); color: var(--accent); }
.ts-needs { background: var(--warn-soft); color: var(--warn); }
.ts-unchecked { background: var(--stop-soft); color: var(--stop); }
.ts-stopped { background: var(--stop-soft); color: var(--stop); text-decoration: line-through; }
.notice-box { background: var(--warn-soft); color: var(--warn); padding: 0.6rem 0.8rem; border-radius: 8px; margin: 0.5rem 0; }
.notice-box.soft { background: var(--info-soft); color: var(--info); }
.tool-facts { grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 1rem 0; font-size: 0.95rem; }
.tool-facts code, .guide-body { font-family: ui-monospace, Consolas, "D2Coding", monospace; overflow-wrap: anywhere; }
.tool-facts code { background: var(--bg); padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.88rem; }
.guide-body { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; font-size: 0.92rem; line-height: 1.65; margin: 0.75rem 0; }
.form-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.form .check-line { display: flex; flex-direction: row; align-items: center; gap: 0.4rem; color: var(--text); }
.form .check-line input { width: auto; }

/* 모바일: 패널을 줄이지 않고 하단 탭과 사용 순서로 재배치 */
@media (max-width: 760px) {
  .side, .ctx, .tg, .find, .add-btn { display: none !important; }
  .shell { grid-template-columns: 1fr !important; grid-template-areas: "main" !important; }
  .app-top { height: 50px; }
  .view { padding: 1rem 16px 5.5rem; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabbar a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); padding: 0.45rem 0.25rem; font-size: 0.9rem; border-radius: 8px; white-space: nowrap; }
  .tabbar a.active { color: var(--accent); font-weight: 600; }
  .tabbar .plus { background: var(--accent); color: var(--surface); font-weight: 600; margin: 0 0.35rem; }
  .m-only { display: block; }
  .home-cols { grid-template-columns: 1fr; gap: 0; }
  .grid.rooms, .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid.two:has(> section) { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .room { min-height: 104px; }
  dl { grid-template-columns: 1fr; }
  .form.inline { grid-template-columns: 1fr; }
  dt { margin-top: 0.3rem; }
  .start-strip { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
  .start { padding: 0.45rem 0.55rem; }
  .start strong { font-size: 0.88rem; }
  .start span { font-size: 0.72rem; }
  .resume-list { grid-template-columns: 1fr; }
  .tool-row { flex-wrap: wrap; }
  .tool-act { width: 100%; padding-left: 1.6rem; }
}

/* 하루 운영은 기존 화면 골격 안에서 첫 진입점을 제공한다. */
.daily-operations { margin-bottom: 1.25rem; min-width: 0; }
.daily-operations h1 { margin-top: 0; font-size: 1.5rem; }
.daily-form h2 { margin: 0.6rem 0 0; font-size: 1.05rem; }
.day-picker { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.75rem; }
.day-picker input { width: auto; max-width: 100%; min-width: 0; }
.carry-note { border-left: 3px solid var(--accent); padding-left: 0.75rem; margin-top: 0.7rem; overflow-wrap: anywhere; }
.daily-form input, .daily-form select, .daily-form textarea { max-width: 100%; min-width: 0; }
.daily-gpt { margin-top: 0.8rem; }
@media (max-width: 600px) { .daily-operations { padding: 0.8rem; } }



/* Compass 첫 실제 사용 흐름: 저장된 내용의 위계를 단순화. 기존 화면/라우트는 유지. */
.direction-banner {
  display: grid;
  gap: .1rem;
  padding: .7rem .9rem;
  margin: .3rem 0 .75rem;
  background: #ecf5ec;
  border: 1px solid #d5e5d5;
  border-left: 4px solid var(--accent);
  border-radius: 11px;
  min-width: 0;
}
.direction-banner strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.direction-banner .muted { overflow-wrap: anywhere; }

.daily-operations { background: #fffefa; padding: 1rem 1.15rem; }
.daily-eyebrow { display: block; color: var(--accent); font-weight: 700; font-size: .72rem; letter-spacing: .04em; }
.daily-operations h1 { margin: .1rem 0 .2rem; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.daily-operations > p.muted { margin: .25rem 0 .6rem; }
.day-picker { margin: .5rem 0 0; }
.daily-calendar-note { margin: .2rem 0 .5rem !important; }

.daily-operations .resume-strip {
  padding: .65rem .7rem .5rem;
  background: #f5f9f4;
  border: 1px solid #e0eae0;
  border-radius: 10px;
  margin: .75rem 0 .7rem;
}
.daily-operations .resume-strip h2 { font-size: .96rem; }
.daily-operations .resume-strip > p { font-size: .73rem; margin: .15rem 0; }
.daily-operations .resume-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: .5rem;
  padding: .1rem .05rem .4rem;
  margin-top: .45rem;
  scrollbar-width: thin;
}
.daily-operations .resume-list li { flex: 0 0 min(48%, 260px); min-width: 0; }
.daily-operations .resume-list a { padding: .5rem .65rem; height: 100%; }
.daily-operations .resume-list strong,
.daily-operations .resume-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.daily-carry { margin: .6rem 0; }
.daily-carry summary { font-size: .82rem; color: var(--accent); cursor: pointer; }
.daily-carry .carry-note { font-size: .85rem; }

.daily-form { margin-top: .65rem; }
.daily-form h2 { font-size: 1rem; margin: .1rem 0 .3rem; }
.daily-core { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .85rem; }
.daily-core label { min-width: 0; font-size: .83rem; margin: 0; }
.daily-core textarea { min-height: 2.7rem; resize: vertical; }
.daily-core input, .daily-core select { min-height: 2.7rem; }
.daily-more { margin: .35rem 0 .15rem; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .85rem; }
.daily-more summary { color: var(--accent); cursor: pointer; font-size: .88rem; font-weight: 650; }
.daily-more-fields { display: grid; gap: .5rem; padding-top: .6rem; }
.daily-more-fields h2 { margin: .15rem 0; }
.daily-save-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.daily-save-row .btn { flex: 0 0 auto; }
.daily-gpt { margin-top: .6rem; font-size: .9rem; }
.home-extra { margin: .7rem 0; padding: .75rem; background: #fbfcf9; border: 1px solid var(--line); border-radius: 10px; }
.home-extra summary { font-weight: 650; color: var(--accent); cursor: pointer; }
.home-extra .start-strip { margin-top: .65rem; }

@media (max-width: 760px) {
  .direction-banner { margin-top: 0; padding: .6rem .75rem; }
  .daily-operations { padding: .85rem .7rem; }
  .daily-operations .resume-list li { flex-basis: min(78%, 255px); }
  .daily-core { grid-template-columns: 1fr; gap: .35rem; }
  .daily-form { display: flex; flex-direction: column; gap: .45rem; }
  .daily-save-row { align-items: stretch; }
  .daily-save-row .btn { width: 100%; }
}


/* 2026-10-28: actual-current-story navigation; content and context, not menu card decoration. */
.live-stories { display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.live-stories-top { padding: .35rem .45rem; }
.live-eyebrow { color: var(--accent); font-size: .68rem; font-weight: 780; letter-spacing: .055em; }
.live-stories-top h2 { color: var(--text); font-size: 1.06rem; margin: .1rem 0; letter-spacing: -.02em; }
.live-stories-top p, .live-story-foot { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.live-story-foot { margin: 0 .45rem; }
.live-stories-scroll { display: flex; flex-direction: column; gap: .38rem; }
.live-story { border-radius: 10px; border: 1px solid var(--line); min-width: 0; padding: .58rem .58rem .35rem; background: var(--surface); }
.live-story.chosen { background: var(--accent-soft); border-color: var(--accent); }
.live-story-main { display: flex; flex-direction: column; width: 100%; gap: .13rem; padding: 0; color: var(--text); background: none; border: 0; text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.live-story-main strong { font-size: .83rem; line-height: 1.3; overflow-wrap: anywhere; }
.live-story-main small { font-size: .68rem; color: var(--muted); }
.live-story-main span { font-size: .76rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-story-main:focus-visible, .live-story-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.live-story-actions { display: flex; justify-content: flex-end; gap: .45rem; align-items: center; margin-top: .35rem; }
.live-story-actions button, .side .live-story-actions a {
  padding: .12rem .25rem; font-size: .67rem; border: 0; background: transparent; color: var(--accent);
  cursor: pointer; white-space: normal; overflow: visible; text-overflow: clip; font-weight: 650; text-decoration: none;
}
.live-story-picker { display: grid; gap: .3rem; margin: .35rem .2rem 0; font-size: .75rem; color: var(--muted); }
.live-story-picker select { max-width: 100%; min-width: 0; font-size: .78rem; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.live-story-empty { background: var(--bg); border-radius: 10px; padding: .75rem; font-size: .77rem; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.story-legacy-navigation { margin: 1.2rem .15rem; padding: .6rem .35rem; border-top: 1px solid var(--line); }
.story-legacy-navigation summary { cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 650; }
.story-pin-manager { margin: .6rem .2rem; min-width: 0; }
.story-pin-manager summary { cursor: pointer; font-size: .78rem; color: var(--accent); }
.story-pin-manager .live-story { margin-top: .4rem; }
.story-legacy-navigation > .side-label:first-of-type { margin-top: .8rem; }

.story-today-bridge { display: flex; justify-content: space-between; align-items: center; gap: .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: .6rem .75rem; margin: .6rem 0; }
.story-today-bridge div { min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.story-today-bridge strong { font-size: .83rem; }
.story-today-bridge div > span:last-child { font-size: .77rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-today-bridge .btn { font-size: .74rem; padding: .4rem .55rem; max-width: 40%; flex-shrink: 0; }
.ctx h4 { color: var(--accent); font-size: .8rem; margin: .9rem 0 .2rem; }
.ctx p { overflow-wrap: anywhere; }
.mobile-stories, .mobile-story-context { display: none; }

@media (max-width: 760px) {
  .mobile-story-context { display: block; margin: .8rem 0 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; }
  .mobile-story-context summary { cursor: pointer; font-size: .85rem; color: var(--accent); font-weight: 650; overflow-wrap: anywhere; }
  .mobile-story-context-body { padding-top: .6rem; font-size: .86rem; }
  .mobile-story-context-body h3, .mobile-story-context-body h4 { font-size: .8rem; margin: .7rem 0 .25rem; }
  .mobile-story-context-body p { overflow-wrap: anywhere; margin: .3rem 0; white-space: pre-wrap; }
  .mobile-stories { display: block; margin: 0 0 .7rem; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: .6rem .65rem; }
  .mobile-stories-title { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; font-size: .82rem; }
  .mobile-stories-title span { color: var(--muted); font-size: .7rem; }
  .mobile-stories-list { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: thin; padding: .5rem 0; }
  .mobile-stories-list button { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; flex: 0 0 auto; padding: .4rem .6rem; color: var(--text); font-size: .76rem; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-stories-list button.chosen { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 720; }
  .mobile-stories summary { cursor: pointer; font-size: .72rem; color: var(--accent); }
  .mobile-stories details p { margin: .5rem 0 0; font-size: .75rem; }
  .story-today-bridge { flex-direction: column; align-items: stretch; gap: .45rem; }
  .story-today-bridge .btn { max-width: 100%; width: 100%; }
}

/* Editorial home: existing content projected onto paper, without changing detail screens. */
.editorial-home { --bg: #f6f5f0; --surface: #fffefa; --text: #30392f; --muted: #687263; --line: #dfE2d7; --accent: #405e4a; --accent-soft: #e8eee3; background: var(--bg); color: var(--text); }
.editorial-home .view { padding-top: 1.5rem; }
.editorial-home .direction-banner { border-radius: 0; border-width: 1px 0; background: transparent; box-shadow: none; }
.editorial-home .daily-operations { background: transparent; border: 0; padding: 0; box-shadow: none; }
.editorial-home .daily-eyebrow { color: var(--accent); }
.editorial-home .daily-reading { background: #fbf8ee; border: 1px solid #e5dfce; box-shadow: 3px 4px 0 #eae6d9; padding: clamp(1rem, 3vw, 2rem); margin: 1rem 0 1.5rem; }
.daily-paper-label { font-size: .75rem; color: #746b53; }
.editorial-home .daily-reading h2 { font: 500 clamp(1.4rem, 2.7vw, 2rem)/1.45 Georgia, 'Nanum Myeongjo', serif; color: var(--text); white-space: pre-wrap; margin: 1rem 0; overflow-wrap: anywhere; }
.daily-reading-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid #e5dfce; font-size: .8rem; }
.daily-saved-records { margin-top: 1rem; }
.daily-saved-records h3 { font-size: .82rem; margin-top: 1rem; }
.daily-editor { border-block: 1px solid var(--line); padding: .8rem 0; margin-top: 1rem; }
.daily-editor > summary { cursor: pointer; font-weight: 650; color: var(--accent); }
.editorial-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin: 2rem 0 1rem; }
.editorial-section-heading h2 { margin: 0; color: var(--text); }
.editorial-section-heading span { font-size: .75rem; color: var(--muted); }
.editorial-story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; align-items: start; }
.editorial-story { border: 1px solid var(--line); background: var(--surface); padding: 1.2rem; min-width: 0; }
.editorial-story:first-child { grid-column: 1 / -1; border-left: 3px solid var(--accent); }
.editorial-story:nth-child(3n) { background: #eaf0e7; }
.editorial-story.chosen { outline: 2px solid #a8bda4; outline-offset: -2px; }
.editorial-story h3 { margin: .6rem 0; }
.editorial-story h3 button { font: inherit; text-align: left; color: inherit; border: 0; padding: 0; background: transparent; cursor: pointer; overflow-wrap: anywhere; }
.editorial-story p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.editorial-story a, .editorial-timeline a { font-size: .8rem; color: var(--accent); }
.editorial-next { color: var(--accent); font-size: .85rem; margin: 1rem 0; white-space: pre-wrap; }
.editorial-timeline { margin-bottom: 2rem; }
.editorial-timeline ol { padding-left: 1.1rem; border-left: 1px solid var(--line); list-style: none; }
.editorial-timeline li { margin: 1.5rem 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.editorial-timeline h3 { font-size: .85rem; margin: .35rem 0; }
.editorial-timeline li > p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.editorial-home .live-story { border-radius: 3px; }
.editorial-home .live-eyebrow { letter-spacing: .06em; }
.editorial-home .text, .daily-reading-meta, .editorial-timeline, .editorial-story { overflow-wrap: anywhere; }
.editorial-home button:focus-visible, .editorial-home a:focus-visible, .editorial-home summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .editorial-story-grid { grid-template-columns: 1fr; }
  .editorial-home .daily-reading { margin-top: .8rem; padding: 1rem; }
  .editorial-home .daily-reading h2 { font-size: 1.45rem; }
  .daily-editor > summary { min-height: 2rem; }
}

.editorial-home .editorial-stories, .editorial-home .daily-operations, .editorial-home [data-daily-reading] { scroll-margin-top: 70px; }

/* Stabilization A: navigation / content / source notes keep separate roles. */
.editorial-home .live-stories-top p { margin-bottom: .4rem; }
.editorial-home .live-story-main span { -webkit-line-clamp: 1; }
.editorial-home .live-story { padding: .45rem .5rem .3rem; }
.story-context-notes { padding-left: 1rem; font-size: .82rem; }
.story-context-notes li { margin: .8rem 0; }
.story-context-notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.story-context-current { margin: 1rem 0; font-size: .8rem; }
.story-context-current summary { cursor: pointer; color: var(--accent); }
.daily-date-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; }
.daily-date-row .daily-calendar-note { font-size: .73rem; }
.daily-calendar-note summary, .daily-context-actions > summary { cursor: pointer; }
.daily-context-actions { margin: .6rem 0; font-size: .82rem; }
@media (max-width: 600px) {
  .editorial-home .view { padding-top: .65rem; }
  .editorial-home .direction-banner { padding-block: .5rem; margin-bottom: .65rem; gap: .1rem; }
  .editorial-home .direction-banner > .small { font-size: .7rem; }
  .editorial-home .direction-banner > .muted:last-child { font-size: .8rem; }
  .editorial-home .mobile-stories { padding: .4rem .6rem; margin-bottom: .5rem; }
  .editorial-home .mobile-stories-list { padding-block: .3rem; }
  .editorial-home .daily-eyebrow { font-size: .65rem; }
  .editorial-home .daily-operations h1 { font-size: 1.2rem; }
  .editorial-home .daily-intro { font-size: .73rem; margin-bottom: .2rem; }
  .editorial-home .day-picker { font-size: .8rem; margin-top: .2rem; }
  .editorial-home .day-picker input { padding-block: .35rem; }
  .editorial-home .daily-reading { padding: .8rem; margin: .6rem 0 .75rem; }
  .editorial-home .daily-reading h2 { font-size: 1.2rem; margin: .5rem 0; line-height: 1.4; }
  .editorial-home .daily-paper-label { font-size: .68rem; }
  .editorial-home .daily-reading > p { font-size: .85rem; }
  .editorial-home .daily-reading-meta { margin-top: .6rem; padding-top: .6rem; font-size: .73rem; gap: .25rem .7rem; }
  .editorial-home .daily-saved-records { margin-top: .6rem; font-size: .8rem; }
  .editorial-home .daily-editor { padding-block: .5rem; margin-top: .6rem; }
  .editorial-home .editorial-section-heading { margin: 1.2rem 0 .65rem; }
}
[hidden] { display: none !important; }
