/* DAYFLOW — 업무 보조 위젯 스타일 */
:root {
  --bg: #f3f1ec;
  --side: #1e2330;
  --side-2: #2a3040;
  --side-text: #ece9e2;
  --side-muted: #8a909e;
  --panel: #e4e0d6;
  --surface: #ffffff;
  --surface-2: #f6f4ef;
  --text: #1e2330;
  --muted: #6f6b63;
  --faint: #a7a298;
  --line: #e6e2d8;
  --line-2: #d8d3c8;
  --accent: #e8705a;
  --accent-tx: #ffffff;
  --ok: #3f9b6a;
  --warn: #d99a2b;
  --urgent-bg: #f6d4cc; --urgent-tx: #8f3a2a; --urgent-dot: #e8705a; --urgent-lane: #fbebe6;
  --normal-bg: #dde3f0; --normal-tx: #33456e; --normal-dot: #5b73b5; --normal-lane: #eef1f8;
  --hold-bg: #e6e1d6;   --hold-tx: #5f5a50;   --hold-dot: #a39e92;   --hold-lane: #f1eee7;
  --none-dot: #c9c4b9;
  --meeting-bg: #1e2330; --meeting-tx: #ffffff;
  --routine-bg: #e6e1d6; --routine-tx: #4c483f;
  --gcal-bg: #dcefe4; --gcal-tx: #245a3e;
  --shadow: 0 1px 2px rgba(30,35,48,.06), 0 4px 14px rgba(30,35,48,.06);
  --shadow-lg: 0 10px 40px rgba(20,24,34,.22);
  --r-lg: 18px; --r: 12px; --r-sm: 8px;
  --hour: 64px;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #16191f; --side: #0e1015; --side-2: #1c2029; --side-text: #e9e6df; --side-muted: #7d8291;
  --panel: #20242c; --surface: #292e37; --surface-2: #232831; --text: #ebe8e2; --muted: #a29e95; --faint: #6e6b65;
  --line: #333944; --line-2: #3d4450;
  --urgent-bg: #4b2a24; --urgent-tx: #ffbcac; --urgent-lane: #2c2220;
  --normal-bg: #283350; --normal-tx: #bccbf0; --normal-lane: #20263a;
  --hold-bg: #38352f;   --hold-tx: #d2cbbd;   --hold-lane: #282622;
  --none-dot: #5a5e66;
  --meeting-bg: #e9e6df; --meeting-tx: #1e2330;
  --routine-bg: #38352f; --routine-tx: #e0d9cb;
  --gcal-bg: #213a2d; --gcal-tx: #a9e0c1;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--text); }
textarea { resize: vertical; line-height: 1.55; }
a { color: inherit; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 14px; height: 14px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.wrap { flex-wrap: wrap; }
.scroll { overflow: auto; }
.scroll::-webkit-scrollbar, .main-body::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll::-webkit-scrollbar-thumb, .main-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* ── 레이아웃 ───────────────────────────── */
.app { display: grid; grid-template-columns: 250px 1fr; height: 100vh; transition: grid-template-columns .2s; }
.app.collapsed { grid-template-columns: 68px 1fr; }
.app.nonav { grid-template-columns: 1fr; }
.app.nonav .sidebar { display: none; }

.sidebar { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 14px 14px; min-height: 0; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); flex: none; }
.brand-name { font-weight: 800; letter-spacing: .04em; font-size: 16px; flex: 1; white-space: nowrap; }
.side-toggle { color: var(--side-muted); padding: 6px; border-radius: 8px; }
.side-toggle:hover { background: var(--side-2); color: var(--side-text); }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; }
.nav::-webkit-scrollbar { width: 0; }
.nav-group { font-size: 11px; color: var(--side-muted); padding: 14px 10px 6px; white-space: nowrap; }
.nav-item, a.btn { text-decoration: none; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--side-text); font-weight: 600; font-size: 14px; white-space: nowrap; position: relative; }
.nav-item:hover { background: var(--side-2); }
.nav-item.on { background: var(--bg); color: var(--text); }
.nav-item .badge { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; font-size: 12px; display: grid; place-items: center; padding: 0 6px; font-weight: 700; }
.side-bottom { border-top: 1px solid var(--side-2); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.add-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; border-radius: 10px; padding: 10px; font-weight: 700; white-space: nowrap; }
.add-btn:hover { filter: brightness(1.06); }
.clock { padding: 4px 6px; }
.clock-time { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.clock-date { color: var(--side-muted); font-size: 12px; margin-top: 2px; white-space: nowrap; }
.pomo { background: var(--side-2); border-radius: 10px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.pomo-time { font-family: var(--mono); font-weight: 700; font-size: 15px; flex: 1; white-space: nowrap; }
.pomo-time small { font-family: var(--font); color: var(--side-muted); font-weight: 500; font-size: 11px; margin-left: 4px; }
.pomo button { color: var(--side-muted); padding: 4px; border-radius: 6px; }
.pomo button:hover { color: var(--side-text); background: var(--side); }
.pomo.run .pomo-time { color: #ffb4a4; }
.side-tools { display: flex; gap: 4px; }
.side-tools button { flex: 1; color: var(--side-muted); padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.side-tools button:hover { background: var(--side-2); color: var(--side-text); }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--side-muted); display: inline-block; margin-right: 6px; }
.sync-dot.remote { background: #5fd394; } .sync-dot.err { background: #ff7b6b; } .sync-dot.busy { background: #f3c25b; }

.app.collapsed .brand-name, .app.collapsed .nav-group, .app.collapsed .nav-item span, .app.collapsed .nav-item .badge,
.app.collapsed .add-btn span, .app.collapsed .pomo, .app.collapsed .clock-date, .app.collapsed .side-tools .lbl { display: none; }
.app.collapsed .nav-item { justify-content: center; padding: 12px 0; }
.app.collapsed .nav-item .dot-badge { display: block; }
.dot-badge { display: none; position: absolute; top: 7px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.app.collapsed .brand { flex-direction: column; padding: 2px 0 10px; }
.app.collapsed .clock-time { font-size: 13px; text-align: center; }
.app.collapsed .side-tools { flex-direction: column; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px 14px; flex-wrap: wrap; }
.main-title { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0; white-space: nowrap; }
.main-head .spacer { flex: 1; }
.main-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 28px 24px; }
.main-body.fill { display: flex; flex-direction: column; overflow: hidden; }

/* ── 공통 컴포넌트 ───────────────────────── */
.seg { display: inline-flex; background: var(--panel); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { padding: 7px 18px; border-radius: 9px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--side); color: #fff; }
:root[data-theme="dark"] .seg button.on { background: var(--text); color: var(--bg); }
.nav-date { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: var(--text); flex: none; }
.icon-btn:hover { border-color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.date-label { font-weight: 700; font-size: 17px; white-space: nowrap; min-width: 150px; text-align: center; }
.date-label .mono { font-weight: 500; color: var(--muted); font-size: 15px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-weight: 600; background: var(--surface); border: 1px solid var(--line-2); white-space: nowrap; }
.btn:hover { border-color: var(--text); }
.btn.dark { background: var(--side); color: #fff; border-color: var(--side); }
:root[data-theme="dark"] .btn.dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.danger { color: #c2412d; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1.5px solid transparent; white-space: nowrap; }
.chip.on { border-color: currentColor; }
.chip.urgent { background: var(--urgent-bg); color: var(--urgent-tx); }
.chip.normal { background: var(--normal-bg); color: var(--normal-tx); }
.chip.hold { background: var(--hold-bg); color: var(--hold-tx); }
.chip.none { background: var(--surface); color: var(--muted); }
.chip.solid.on, .chip.urgent.solid { }
.chip.toggle { background: transparent; border: 1.5px dashed var(--line-2); color: var(--muted); }
.chip.toggle.on { border-style: solid; border-color: var(--text); color: var(--text); background: var(--surface); }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--none-dot); }
.dot.urgent { background: var(--urgent-dot); } .dot.normal { background: var(--normal-dot); } .dot.hold { background: var(--hold-dot); }
.stars { color: #e3a33b; font-size: 12px; letter-spacing: -1px; white-space: nowrap; }
.dday { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dday.over { color: #c2412d; font-weight: 700; } .dday.today { color: var(--accent); font-weight: 700; }
.empty { color: var(--faint); font-size: 13px; text-align: center; padding: 18px 8px; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); }

.card-panel { background: var(--surface); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; }
.beige-panel { background: var(--panel); border-radius: var(--r-lg); padding: 20px 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-title { font-weight: 800; font-size: 16px; white-space: nowrap; }
.panel-sub { color: var(--muted); font-size: 12.5px; margin-left: auto; white-space: nowrap; }
.section-title { font-weight: 800; font-size: 15px; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title:first-child { margin-top: 0; }

/* 빠른 입력 */
.quick { display: flex; gap: 8px; margin-top: 12px; }
.quick input { flex: 1; height: 46px; border-radius: 12px; border-color: transparent; background: var(--surface); padding: 0 16px; }
.quick input:focus { border-color: var(--text); }
.quick .go { width: 46px; height: 46px; border-radius: 12px; background: var(--side); color: #fff; display: grid; place-items: center; flex: none; }
:root[data-theme="dark"] .quick .go { background: var(--text); color: var(--bg); }
.quick-hint { font-size: 11.5px; color: var(--faint); margin-top: 6px; padding-left: 4px; }

/* ── 업무 카드 ───────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task { position: relative; background: var(--surface); border-radius: 12px; padding: 13px 16px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; box-shadow: 0 1px 1px rgba(0,0,0,.03); border: 1.5px solid transparent; transition: opacity .15s, transform .1s; }
.task:hover { border-color: var(--line-2); }
.task .dot { margin-top: 6px; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 500; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.task-meta:empty { display: none; }
.task.placed { opacity: .5; background: var(--surface-2); }
.task.done .task-title { text-decoration: line-through; color: var(--faint); }
.task.done { opacity: .65; }
.task.dragging, .blk.dragging { opacity: .35; }
.task .acts { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; box-shadow: var(--shadow); z-index: 3; }
.task:hover .acts { display: flex; }
.acts button { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); position: relative; }
.acts button:hover { background: var(--surface-2); color: var(--text); }
.acts button.ok:hover { color: var(--ok); } .acts button.del:hover { color: #c2412d; }
.acts button[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--side); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.lane .task { background: var(--surface); }
.task.urgent-card { background: var(--urgent-bg); } .task.urgent-card .task-title { color: var(--urgent-tx); font-weight: 600; }
.task.normal-card { background: var(--normal-bg); } .task.normal-card .task-title { color: var(--normal-tx); font-weight: 600; }
.task.hold-card { background: var(--hold-bg); } .task.hold-card .task-title { color: var(--hold-tx); font-weight: 600; }
.drop-line { height: 3px; background: var(--accent); border-radius: 3px; margin: -6px 0; }
.drop-hot { outline: 2px dashed var(--accent); outline-offset: -4px; }

/* ── 인박스 ─────────────────────────────── */
.inbox-grid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; height: 100%; min-height: 0; }
.list-panel { display: flex; flex-direction: column; min-height: 0; }
.list-panel .task-list { flex: 1; overflow-y: auto; min-height: 60px; margin: 0 -6px; padding: 2px 6px 6px; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-row.sub { margin-bottom: 14px; }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; min-height: 0; height: 100%; }
.lane { border-radius: var(--r-lg); padding: 16px 14px; display: flex; flex-direction: column; min-height: 0; }
.lane.urgent { background: var(--urgent-lane); } .lane.normal { background: var(--normal-lane); } .lane.hold { background: var(--hold-lane); }
.lane-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 4px; }
.lane-head .lt { font-weight: 800; font-size: 15px; }
.lane.urgent .lt { color: var(--urgent-tx); } .lane.normal .lt { color: var(--normal-tx); } .lane.hold .lt { color: var(--hold-tx); }
.lane-head .cnt { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lane .task-list { flex: 1; overflow-y: auto; min-height: 80px; margin: 0 -4px; padding: 2px 4px 30px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-content: start; align-items: start; overflow-y: auto; height: 100%; padding-bottom: 20px; }
.proj { background: var(--panel); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; max-height: 420px; }
.proj.unassigned { background: transparent; border: 2px dashed var(--line-2); }
.proj .task-list { overflow-y: auto; min-height: 50px; padding: 2px 2px 8px; }

/* ── 플래너 ─────────────────────────────── */
.planner-grid { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 20px; height: 100%; min-height: 0; }
.planner-grid .list-panel .task { padding: 11px 14px; }
.plan-panel { display: flex; flex-direction: column; min-height: 0; padding: 18px 20px 14px; }
.tl-wrap { flex: 1; overflow: auto; min-height: 0; position: relative; border-top: 1px solid var(--line); }
.tl { display: grid; position: relative; }
.tl-hours { position: relative; }
.tl-hour { height: var(--hour); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 4px; border-top: 1px solid var(--line); }
.tl-col { position: relative; border-left: 1px solid var(--line); }
.tl-col .slot { height: var(--hour); border-top: 1px solid var(--line); }
.tl-col .slot.half { border-top-style: dashed; }
.tl-col.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.tl-col.drop-hot { outline: none; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.tl-ghost { position: absolute; left: 6px; right: 6px; border: 2px dashed var(--accent); border-radius: 10px; pointer-events: none; z-index: 5; background: color-mix(in srgb, var(--accent) 10%, transparent); font-size: 11px; font-family: var(--mono); color: var(--accent); padding: 2px 8px; }
.tl-heads { display: grid; position: sticky; top: 0; z-index: 6; background: var(--surface); }
.tl-head { padding: 10px 10px 8px; font-weight: 800; font-size: 15px; border-left: 1px solid var(--line); cursor: pointer; white-space: nowrap; }
.tl-head small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 3px; }
.tl-head.today { color: var(--accent); }
.blk { position: absolute; border-radius: 10px; padding: 6px 10px; overflow: hidden; cursor: grab; font-size: 13px; z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.blk .bt { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.blk .bs { font-size: 11.5px; opacity: .85; white-space: nowrap; }
.blk.short { flex-direction: row; align-items: center; gap: 8px; padding: 2px 10px; }
.blk.short .bt { white-space: nowrap; flex: 1; }
.blk.urgent { background: var(--urgent-bg); color: var(--urgent-tx); }
.blk.normal, .blk.none { background: var(--normal-bg); color: var(--normal-tx); }
.blk.hold { background: var(--hold-bg); color: var(--hold-tx); }
.blk.routine { background: var(--routine-bg); color: var(--routine-tx); }
.blk.meeting { background: var(--meeting-bg); color: var(--meeting-tx); }
.blk.gcal { background: var(--gcal-bg); color: var(--gcal-tx); cursor: default; }
.blk.done .bt { text-decoration: line-through; opacity: .6; }
.blk .rz { position: absolute; left: 0; right: 0; height: 8px; cursor: ns-resize; }
.blk .rz.top { top: 0; } .blk .rz.bot { bottom: 0; }
.blk .rz.bot::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 26px; height: 3px; margin-left: -13px; border-radius: 3px; background: currentColor; opacity: 0; }
.blk:hover .rz.bot::after { opacity: .35; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.untimed { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.untimed-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.untimed-grid { display: grid; gap: 8px; }
.untimed-cell { min-height: 44px; border-radius: 10px; background: var(--surface-2); padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; max-height: 120px; overflow-y: auto; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 8px; padding: 4px 9px; font-size: 12.5px; font-weight: 600; cursor: grab; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.urgent { background: var(--urgent-bg); color: var(--urgent-tx); } .pill.normal, .pill.none { background: var(--normal-bg); color: var(--normal-tx); }
.pill.hold { background: var(--hold-bg); color: var(--hold-tx); } .pill.routine { background: var(--routine-bg); color: var(--routine-tx); }
.pill.meeting { background: var(--meeting-bg); color: var(--meeting-tx); } .pill.gcal { background: var(--gcal-bg); color: var(--gcal-tx); cursor: pointer; }
.pill.ghost, .blk.ghost { background: transparent; border: 1.5px dashed var(--hold-dot); color: var(--muted); cursor: pointer; box-shadow: none; }
.pill.done { text-decoration: line-through; opacity: .55; }
.pill .tm { font-family: var(--mono); font-weight: 500; font-size: 11px; opacity: .8; margin-right: 4px; }

/* 월간 */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(108px, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); flex: 1; min-height: 0; overflow: auto; }
.month-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 0 6px; }
.month-dow div { padding-left: 8px; }
.mcell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; }
.mcell.out { background: var(--surface-2); }
.mcell.out .mnum { color: var(--faint); }
.mcell .mnum { font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.mcell.today .mnum span { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; }
.mcell.wkend .mnum, .mcell.hol .mnum { color: #c2412d; }
.mcell .hname { font-size: 10.5px; color: #c2412d; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcell .mitems { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; min-height: 0; flex: 1; }
.mcell .pill { padding: 2px 6px; font-size: 11.5px; border-radius: 6px; display: block; }

/* ── 일반 카드 그리드 ─────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--surface); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer; border: 1.5px solid transparent; min-width: 0; position: relative; }
.card:hover { border-color: var(--line-2); }
.card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.card .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card .body { margin-top: 8px; font-size: 13px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* 카테고리 탭 (이미지 3 스타일) */
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; background: var(--surface); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); margin-bottom: 16px; }
.cat-tabs button.ct { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.cat-tabs button.ct:hover { background: var(--surface-2); color: var(--text); }
.cat-tabs button.ct.on { background: var(--side); color: #fff; }
:root[data-theme="dark"] .cat-tabs button.ct.on { background: var(--text); color: var(--bg); }
.cat-tabs .cnt { font-family: var(--mono); font-size: 11px; opacity: .7; }
.cat-ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; flex: none; }

/* 미팅 */
.meet-list { display: flex; flex-direction: column; gap: 10px; }
.meet { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center; background: var(--surface); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); cursor: pointer; border: 1.5px solid transparent; }
.meet:hover { border-color: var(--line-2); }
.meet .md { text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.meet .md b { display: block; font-size: 22px; font-family: var(--mono); line-height: 1.1; }
.meet .md span { font-size: 12px; color: var(--muted); }
.meet.past { opacity: .7; }
.att { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--panel); font-size: 11px; font-weight: 700; margin-left: -6px; border: 2px solid var(--surface); }
.att:first-child { margin-left: 0; }

/* 노트 */
.notebook { background: var(--panel); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 18px; }
.notebook-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.notebook-head input.nb-title { font-weight: 800; font-size: 17px; background: transparent; border-color: transparent; padding: 4px 6px; flex: 1; }
.notebook-head input.nb-title:hover { border-color: var(--line-2); }
.memos { columns: 260px; column-gap: 12px; margin-top: 12px; max-height: 560px; overflow-y: auto; }
.memo { break-inside: avoid; background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; cursor: pointer; border: 1.5px solid transparent; }
.memo:hover { border-color: var(--line-2); }
.memo .mt { font-weight: 700; margin-bottom: 4px; }
.memo .mb { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; max-height: 220px; overflow: hidden; }
.memo .mf { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--faint); }
.memo.pinned { border-color: var(--accent); }
.notebook .quick input { background: var(--surface); }
.notebook .quick select { height: 46px; border-radius: 12px; border-color: transparent; }

/* 루틴 */
.routine-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.1fr); gap: 20px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .kl { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .kv { font-size: 24px; font-weight: 800; font-family: var(--mono); margin-top: 2px; }
.kpi .kv small { font-size: 13px; color: var(--muted); font-weight: 500; }
.bar { height: 6px; background: var(--panel); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.rcard { background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 10px; cursor: pointer; border: 1.5px solid transparent; }
.rcard:hover { border-color: var(--line-2); }
.rcard.off { opacity: .55; }
.rcard .rt { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rcard .rd { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.hist { display: flex; gap: 4px; margin-top: 10px; align-items: center; }
.hist i { width: 16px; height: 16px; border-radius: 4px; background: var(--panel); display: block; }
.hist i.ok { background: var(--ok); } .hist i.miss { background: #e2735f; } .hist i.wait { background: transparent; border: 1.5px dashed var(--line-2); } .hist i.today { background: #f3c25b; }
.hist small { margin-left: 6px; color: var(--muted); font-size: 11.5px; }
.inst { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); margin-bottom: 6px; }
.inst.done .it { text-decoration: line-through; color: var(--faint); }
.inst .it { flex: 1; min-width: 0; font-weight: 500; cursor: pointer; }
.check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; color: transparent; background: var(--surface); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.check svg { width: 13px; height: 13px; stroke-width: 3; }
.day-group { margin-bottom: 14px; }
.day-label { font-size: 12.5px; font-weight: 800; color: var(--muted); margin: 0 0 6px 2px; display: flex; gap: 6px; align-items: center; }
.day-label.today { color: var(--accent); }

/* 오늘/이번주 */
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.xitem { background: var(--surface); border-radius: 12px; margin-bottom: 8px; border: 1.5px solid transparent; }
.xitem:hover { border-color: var(--line-2); }
.xhead { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; }
.xhead .xt { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.xitem.done .xt { text-decoration: line-through; color: var(--faint); }
.xbody { padding: 0 14px 12px 44px; font-size: 13px; color: var(--muted); display: none; overflow-wrap: anywhere; }
.xitem.open .xbody { display: block; }
.xbody .row { margin-top: 8px; }

/* 즐겨찾기 */
.bm { background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bm-top { display: flex; align-items: center; gap: 10px; }
.bm-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.bm-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-url { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 8px; padding: 5px 8px; font-size: 12.5px; }
.cred .cl { color: var(--muted); width: 22px; font-size: 11px; font-weight: 700; }
.cred .cv { flex: 1; min-width: 0; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred button { color: var(--muted); padding: 3px; border-radius: 5px; } .cred button:hover { color: var(--text); background: var(--panel); }
.vault-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 10px; padding: 0 12px; border: 1px solid var(--line-2); height: 40px; min-width: 220px; }
.search input { border: 0; padding: 0; background: transparent; flex: 1; }

/* 완료 */
.done-box { max-width: 860px; }
.done-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border-radius: 10px; margin-bottom: 6px; }
.done-row .dt { flex: 1; min-width: 0; }

/* ── 모달 ───────────────────────────────── */
.modal-root { position: fixed; inset: 0; z-index: 50; display: none; }
.modal-root.open { display: grid; place-items: center; }
.modal-back { position: absolute; inset: 0; background: rgba(20,24,34,.38); }
.modal { position: relative; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.wide { width: min(860px, calc(100vw - 32px)); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px 10px; }
.modal-h h3 { margin: 0; font-size: 18px; font-weight: 800; flex: 1; }
.modal-b { padding: 6px 22px 16px; overflow-y: auto; }
.modal-f { display: flex; align-items: center; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid var(--line); }
.modal-f .spacer { flex: 1; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > label, .flabel { font-size: 12px; font-weight: 700; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.title-input { font-size: 18px; font-weight: 700; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; padding: 6px 0; background: transparent; }
.title-input:focus { border-color: var(--text); }
.star-pick { display: inline-flex; gap: 2px; }
.star-pick button { font-size: 22px; color: var(--line-2); line-height: 1; padding: 0 2px; }
.star-pick button.on { color: #e3a33b; }
.seg.small button { padding: 5px 12px; font-size: 13px; }
.type-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 22px 6px; }
.type-tabs button { padding: 8px 14px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.type-tabs button.on { background: var(--side); color: #fff; }
:root[data-theme="dark"] .wd-pick button.on, :root[data-theme="dark"] .nav-item.on { background: var(--text); color: var(--bg); }
:root[data-theme="dark"] .type-tabs button.on { background: var(--text); color: var(--bg); }
.wd-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.wd-pick button { width: 36px; height: 34px; border-radius: 8px; background: var(--surface-2); font-weight: 700; color: var(--muted); }
.wd-pick button.on { background: var(--side); color: #fff; }
.action-items .ai { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.action-items .ai input[type=text] { flex: 1; }
.info { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
.warn-box { font-size: 12.5px; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.popover { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; min-width: 150px; }
.popover button { text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.popover button:hover { background: var(--surface-2); }
.popover .ph { font-size: 11px; color: var(--muted); padding: 4px 10px; font-weight: 700; }

/* 토스트 */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--side); color: #fff; border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; font-size: 13.5px; max-width: 380px; animation: tin .18s ease-out; }
.toast button { color: #ffb4a4; font-weight: 700; }
.toast.alarm { background: var(--accent); }
.toast.alarm button { color: #fff; text-decoration: underline; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* 검색 */
.search-results { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.sr { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.sr:hover, .sr.on { background: var(--surface-2); }
.sr .k { font-size: 11px; color: var(--muted); width: 54px; flex: none; font-weight: 700; }

/* ── v2: 상태 · 담당자 · 진행도 · 후속 작업 ───────── */
.st { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.st-todo { background: #ecebe7; color: #6f6b63; } .st-doing { background: #dbe6fb; color: #2f57b0; } .st-review { background: #ece1f7; color: #7444a8; }
.st-done { background: #d9efe2; color: #2c7a51; } .st-hold { background: var(--hold-bg); color: var(--hold-tx); }
:root[data-theme="dark"] .st-todo { background: #3a3d44; color: #c9c5bd; } :root[data-theme="dark"] .st-doing { background: #24375e; color: #a9c4ff; }
:root[data-theme="dark"] .st-review { background: #3b2c52; color: #d4b6f5; } :root[data-theme="dark"] .st-done { background: #1f3d2d; color: #93dbb2; }
.who { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.who b { width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10px; display: grid; place-items: center; flex: none; }
.task-prog { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.prog { flex: 1; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; min-width: 40px; }
.prog i { display: block; height: 100%; border-radius: 4px; background: var(--normal-dot); }
.task.done .prog i, .st-done + .prog i { background: var(--ok); }
.prog-n { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.task.has-next { padding-bottom: 10px; }
.task-next { display: flex; align-items: center; gap: 5px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed color-mix(in srgb, var(--text) 18%, transparent); font-size: 11.5px; color: var(--muted); font-weight: 600; }
.chain-arrow { display: flex; justify-content: center; color: var(--muted); margin: -6px 0; height: 14px; align-items: center; }
.chain-arrow svg { width: 14px; height: 14px; }
.who-filter { height: 30px; padding: 0 8px; font-size: 12.5px; border-radius: 999px; }

/* 인박스 보드 (분류 기준별 열 + 하위 그룹) */
.group-pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.group-pick .faint { font-size: 12px; }
.board { display: flex; gap: 14px; overflow-x: auto; height: 100%; min-height: 0; padding-bottom: 6px; }
.board > .lane { flex: 1 0 270px; max-width: 420px; }
.board.priority > .lane { flex: 1 1 0; min-width: 220px; max-width: none; }
.lane .lane-body { flex: 1; overflow-y: auto; min-height: 80px; margin: 0 -4px; padding: 2px 4px 30px; }
.lane .lane-body > .task-list { min-height: 100%; padding: 0; margin: 0; overflow: visible; }
.lane.neutral { background: var(--panel); }
.lane.add-col { flex: 0 0 180px; display: grid; place-items: center; background: transparent; border: 2px dashed var(--line-2); }
.st-lane.st-todo { background: #f2f1ee; } .st-lane.st-doing { background: #eef3fd; } .st-lane.st-review { background: #f5effb; } .st-lane.st-done { background: #eef7f1; } .st-lane.st-hold { background: var(--hold-lane); }
:root[data-theme="dark"] .st-lane { background: var(--panel) !important; }
.subgroup { margin-bottom: 12px; }
.sub-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 4px 6px; border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent); margin-bottom: 8px; }
.sub-head .cnt { margin-left: auto; font-family: var(--mono); font-weight: 500; }
.subgroup .task-list { gap: 8px; min-height: 30px; }

/* 업무 페이지 */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; }
.log-col { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); padding-left: 20px; }
.logbox { flex: 1; min-height: 240px; max-height: 520px; overflow-y: auto; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-top: 6px; }
.log-row { display: flex; gap: 10px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); line-height: 1.45; }
.log-row:last-child { border-bottom: 0; }
.log-row.note { color: var(--text); } .log-row.create { color: var(--ok); }
.log-ts { color: var(--faint); font-size: 11px; white-space: nowrap; padding-top: 1px; }
.log-task { display: inline-block; font-weight: 700; margin-right: 6px; color: var(--normal-tx); }
.log-by { color: var(--faint); }
.log-row s { color: var(--faint); }
.rel-box { background: var(--surface-2); border-radius: 12px; padding: 12px; margin-top: 4px; }
.rel { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; cursor: pointer; flex-wrap: wrap; }
.rel.cur { border: 2px solid var(--text); cursor: default; font-weight: 700; }
.rel-box .chain-arrow { margin: 2px 0; }
.status-seg button.on { background: var(--side); }
input[type=range] { padding: 0; border: 0; accent-color: var(--accent); }

/* 업무 복사 팝업 */
.copy-list { max-height: 52vh; overflow: auto; }
.copy-table, .ins-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.copy-table th, .ins-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.copy-table td, .ins-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.copy-table td .task-prog { margin: 0; min-width: 90px; }

/* 캘린더 타임라인(간트) */
.gantt { overflow: auto; flex: 1; padding: 0; }
.gt-row { display: flex; min-width: max-content; border-bottom: 1px solid var(--line); }
.gt-label { position: sticky; left: 0; z-index: 3; width: 220px; flex: none; background: var(--surface); padding: 7px 12px; font-size: 12.5px; display: flex; align-items: center; gap: 6px; border-right: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gt-label.sub { padding-left: 24px; color: var(--muted); cursor: pointer; }
.gt-label .cnt { margin-left: auto; font-family: var(--mono); color: var(--faint); font-size: 11px; }
.gt-head { position: sticky; top: 0; z-index: 4; background: var(--surface); }
.gt-head .gt-label { font-weight: 700; color: var(--muted); font-size: 12px; z-index: 5; }
.gt-days { display: flex; }
.gt-day { flex: none; text-align: center; font-size: 11.5px; font-weight: 700; padding: 4px 0; line-height: 1.2; border-left: 1px solid var(--line); }
.gt-day small { display: block; font-weight: 500; color: var(--faint); font-size: 10px; }
.gt-day b { display: block; font-size: 10px; color: var(--accent); }
.gt-day.off { color: #c2412d; background: var(--surface-2); } .gt-day.today { background: var(--accent); color: #fff; } .gt-day.today small { color: #fff; }
.gt-group { background: var(--surface-2); }
.gt-group .gt-label { background: var(--surface-2); font-weight: 800; color: var(--text); }
.gt-track { position: relative; height: 34px; flex: none; }
.gt-bg { position: absolute; inset: 0; display: flex; }
.gt-bg i { flex: none; height: 100%; border-left: 1px solid var(--line); }
.gt-bg i.off { background: color-mix(in srgb, var(--surface-2) 70%, transparent); } .gt-bg i.today { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.gt-bar { position: absolute; top: 6px; height: 22px; border-radius: 7px; overflow: hidden; cursor: pointer; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.gt-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: currentColor; opacity: .18; }
.gt-bar span { position: relative; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; } .gt-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.gt-mtg { position: absolute; top: 10px; width: 14px; height: 14px; background: var(--meeting-bg); transform: rotate(45deg); border-radius: 3px; cursor: pointer; }

/* 인사이트 · 루틴 담당자별 */
.kpi.warn .kv { color: #c2412d; }
.hbar { position: relative; height: 18px; background: var(--surface-2); border-radius: 5px; min-width: 120px; }
.hbar i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 5px; }
.hbar span { position: relative; padding-left: 8px; font-size: 12px; line-height: 18px; }
.ins-table td.over { color: #c2412d; font-weight: 700; }
.ins-log { max-height: 520px; overflow-y: auto; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.inst .it small { font-weight: 400; }
.inst { flex-wrap: wrap; row-gap: 6px; }
.inst .it { flex: 1 1 160px; }
.blk-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, currentColor 15%, transparent); }
.blk-prog i { display: block; height: 100%; background: currentColor; opacity: .6; }

/* 메뉴: 등록 → 계획 흐름 표시 */
.step-tag { font-style: normal; font-size: 10px; font-weight: 800; background: var(--accent); color: #fff; border-radius: 6px; padding: 1px 6px; margin-left: 2px; }
.flow-arrow { text-align: center; color: var(--accent); font-weight: 800; line-height: 1; margin: -2px 0; font-size: 13px; }
.app.collapsed .step-tag, .app.collapsed .flow-arrow { display: none; }
.share-help { line-height: 1.7; }
.share-help code { background: var(--surface); padding: 0 5px; border-radius: 4px; font-size: 11.5px; }

/* 노션 DB 링크 */
.db-links { display: flex; gap: 6px; margin-bottom: 8px; }
.db-link { display: flex; align-items: center; gap: 6px; flex: 1; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--side-2); color: var(--side-text); text-decoration: none; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.db-link:hover { background: var(--side-2); }
.db-link.sub { flex: 0 0 auto; color: var(--side-muted); }
.db-link em { font-style: normal; font-size: 10px; color: var(--side-muted); margin-left: auto; }
.app.collapsed .db-links { flex-direction: column; } .app.collapsed .db-link span, .app.collapsed .db-link em { display: none; } .app.collapsed .db-link { justify-content: center; padding: 7px 0; }

/* 노션 로그인 */
.user-box { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px; background: var(--side-2); color: var(--side-text); font-weight: 700; font-size: 13px; }
.user-box:hover { filter: brightness(1.15); }
.user-box img, .user-box b { width: 24px; height: 24px; border-radius: 50%; flex: none; object-fit: cover; display: grid; place-items: center; color: #fff; font-size: 11px; }
.user-box .un { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-box .nbadge { font-size: 10px; font-weight: 900; background: #fff; color: #111; border-radius: 4px; padding: 0 4px; }
.user-box.login { background: transparent; border: 1.5px dashed var(--side-muted); color: var(--side-muted); justify-content: center; }
.app.collapsed .user-box { justify-content: center; padding: 6px 0; } .app.collapsed .user-box .un, .app.collapsed .user-box .nbadge { display: none; }
.me-card { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.me-card img, .me-card > b { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: #fff; font-size: 16px; flex: none; }
.mode-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.mode-opt.on { border-color: var(--text); background: var(--surface-2); }
.mode-opt input { margin-top: 3px; }
.user-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.ul-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.ul-row img, .ul-row > b { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: #fff; font-size: 12px; flex: none; }
.badge-inline { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; margin-left: 6px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) { .editor-grid { grid-template-columns: 1fr; } .log-col { border-left: 0; padding-left: 0; } .board { height: auto; } }

/* 반응형 */
.mobile-menu { display: none !important; }
.app.nonav .mobile-menu { display: none !important; }
@media (max-width: 980px) {
  .inbox-grid, .planner-grid, .routine-grid { grid-template-columns: 1fr; height: auto; }
  .main-body.fill { overflow: auto; display: block; }
  .lanes { grid-template-columns: 1fr; height: auto; }
  .lane .task-list, .list-panel .task-list { max-height: 420px; }
  .plan-panel { min-height: 640px; }
}
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .app .sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .app.mobile-open .sidebar { transform: none; }
  .mobile-menu { display: grid !important; }
  .main-head { padding: 16px 16px 10px; }
  .main-body { padding: 4px 16px 20px; }
  .main-title { font-size: 22px; }
}
