/* 이음 — second-brain dark UI. Linear/Obsidian/Reflect-flavored. */
:root {
  /* Claude — warm paper / clay */
  --bg: #EDEAE0;          /* warm oat paper */
  --bg-elev: #FBFAF6;     /* drawer / panels */
  --surface: #FFFFFF;     /* cards */
  --surface-2: #F6F3EC;
  --surface-3: #EDE9DF;
  --hover: #F2EFE7;
  --line: rgba(45,40,30,.09);
  --line-2: rgba(45,40,30,.14);
  --line-strong: rgba(45,40,30,.22);

  --text: #211F1B;
  --text-2: #57534A;
  --text-3: #8A857A;
  --text-faint: #B6B1A4;

  --accent: #C2613F;          /* clay, a touch deeper & calmer */
  --accent-bright: #A64A29;   /* darker — readable text/links on light */
  --accent-soft: #F1E6DE;
  --accent-line: rgba(194,97,63,.34);
  --accent-glow: rgba(194,97,63,.20);
  --accent-ink: #fff;         /* text/icon color ON an accent-filled surface */
  --lead-bg: #F7EFE9;         /* flat soft tint for the lead insight */

  --ok: #5E8B55;
  --radius: 11px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(60,50,30,.04);
  --shadow-pop: 0 6px 22px -10px rgba(60,50,30,.18), 0 1px 3px rgba(60,50,30,.07);

  --font: 'Pretendard', system-ui, sans-serif;
  --serif: 'Newsreader', 'Noto Serif KR', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --topbar-h: 60px;
  --topbar-bg: rgba(247,245,239,.82);
  --glass: rgba(255,255,255,.86);
  --scrim: rgba(40,36,28,.32);
}

/* ═══════ vibes (modern theme presets, switchable via Tweaks) ═══════ */
/* 팝 — Soft Pop: cool light, vivid indigo, round & friendly */
html[data-vibe="pop"] {
  --bg: #ECEEF3; --bg-elev: #FFFFFF; --surface: #FFFFFF; --surface-2: #F3F4F8; --surface-3: #E9EAF1; --hover: #F0F1F6;
  --line: rgba(22,24,45,.08); --line-2: rgba(22,24,45,.13); --line-strong: rgba(22,24,45,.20);
  --text: #15161D; --text-2: #494C5C; --text-3: #82869A; --text-faint: #B4B7C6;
  --accent: #5A52F0; --accent-bright: #4A40E2; --accent-soft: #E9E8FD; --accent-line: rgba(90,82,240,.26); --accent-glow: rgba(90,82,240,.22); --lead-bg: #EBEAFD; --accent-ink: #fff;
  --serif: 'Pretendard', system-ui, sans-serif;
  --radius: 17px; --radius-sm: 11px;
  --topbar-bg: rgba(255,255,255,.8); --glass: rgba(255,255,255,.9); --scrim: rgba(22,24,45,.34);
}
html[data-vibe="pop"] .login-h, html[data-vibe="pop"] .drawer-title, html[data-vibe="pop"] .insight.lead p,
html[data-vibe="pop"] .empty-h, html[data-vibe="pop"] .g-panel-title { font-weight: 720; letter-spacing: -.03em; }
html[data-vibe="pop"] .tc-name { font-weight: 700; letter-spacing: -.02em; }
html[data-vibe="pop"] .btn-primary, html[data-vibe="pop"] .btn-tg { border-radius: 999px; }
html[data-vibe="pop"] .badge { border-radius: 999px; }

/* 볼드 — Editorial: warm high-contrast, punchy coral, sharp corners */
html[data-vibe="editorial"] {
  --bg: #F1EEE6; --bg-elev: #FBFAF6; --surface: #FFFFFF; --surface-2: #F4F1E9; --surface-3: #E9E5DA; --hover: #EFECE3;
  --line: rgba(30,28,20,.13); --line-2: rgba(30,28,20,.20); --line-strong: rgba(30,28,20,.34);
  --text: #141310; --text-2: #4C4940; --text-3: #847F76; --text-faint: #B0ABA0;
  --accent: #F0512B; --accent-bright: #D33C18; --accent-soft: #FCE4DC; --accent-line: rgba(240,81,43,.34); --accent-glow: rgba(240,81,43,.22); --lead-bg: #FBE6DE; --accent-ink: #fff;
  --radius: 5px; --radius-sm: 3px;
  --topbar-bg: rgba(241,238,230,.85); --glass: rgba(255,255,255,.9); --scrim: rgba(30,28,20,.36);
}
html[data-vibe="editorial"] .tc-name { font-weight: 750; letter-spacing: -.02em; }
html[data-vibe="editorial"] .brand-name { font-weight: 750; letter-spacing: -.03em; }
html[data-vibe="editorial"] .search, html[data-vibe="editorial"] .seg,
html[data-vibe="editorial"] .field input { border-radius: 6px; }
html[data-vibe="editorial"] .btn-primary, html[data-vibe="editorial"] .btn-tg { border-radius: 6px; }

/* 다크 — Neon: charcoal dark, electric violet */
html[data-vibe="neon"] {
  --bg: #0E0F13; --bg-elev: #15171D; --surface: #15171D; --surface-2: #1B1E26; --surface-3: #232730; --hover: #1E212A;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12); --line-strong: rgba(255,255,255,.20);
  --text: #ECEEF3; --text-2: #A6ABBB; --text-3: #6E7384; --text-faint: #4A4E5C;
  --accent: #8B7CFF; --accent-bright: #A99BFF; --accent-soft: rgba(139,124,255,.16); --accent-line: rgba(139,124,255,.5); --accent-glow: rgba(139,124,255,.4); --lead-bg: rgba(139,124,255,.12); --accent-ink: #0E0F13;
  --radius: 14px; --radius-sm: 9px;
  --topbar-bg: rgba(14,15,19,.82); --glass: rgba(22,24,30,.82); --scrim: rgba(0,0,0,.5);
}
html[data-vibe="neon"] .btn-primary { font-weight: 700; }
html[data-vibe="neon"] .empty-ico, html[data-vibe="neon"] .tg-pill { box-shadow: 0 0 0 1px var(--line) inset; }

/* 카오스 — signature: ink dark, electric lime, scattered-dot backdrop (chaos), tidy grid (order) */
html[data-vibe="chaos"] {
  --bg: #0A0B0D; --bg-elev: #121419; --surface: #101216; --surface-2: #16191F; --surface-3: #1E222A; --hover: #181B22;
  --line: rgba(255,255,255,.06); --line-2: rgba(255,255,255,.11); --line-strong: rgba(255,255,255,.18);
  --text: #F2F3F0; --text-2: #A7ABA4; --text-3: #6C7068; --text-faint: #474B45;
  --accent: #C9F24E; --accent-bright: #D7FB67; --accent-soft: rgba(201,242,78,.13); --accent-line: rgba(201,242,78,.5); --accent-glow: rgba(201,242,78,.4); --lead-bg: rgba(201,242,78,.08); --accent-ink: #0A0B0D;
  --radius: 12px; --radius-sm: 8px;
  --topbar-bg: rgba(10,11,13,.82); --glass: rgba(18,20,25,.84); --scrim: rgba(0,0,0,.55);
}
html[data-vibe="chaos"] .brand-name { font-family: 'Space Grotesk', var(--font); font-weight: 700; letter-spacing: .01em; }
html[data-vibe="chaos"] .btn-primary { font-weight: 700; }
html[data-vibe="chaos"] .graph-wrap { background: transparent; }

/* scattered-dot backdrop — only in chaos vibe */
.bgfield { position: fixed; inset: 0; width: 100vw; height: 100vh; display: none; pointer-events: none; z-index: 0; }
html[data-vibe="chaos"] .bgfield { display: block; }
/* keep the foreground tidy: content sits above the field */
.map, .todo, .detail, .graph-wrap, .empty-card, .login-card { position: relative; z-index: 1; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
#root { height: 100%; }
::selection { background: var(--accent-soft); }

/* scrollbars */
.scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
.scroll::-webkit-scrollbar-thumb:hover { background: var(--line-strong); background-clip: padding-box; border: 3px solid transparent; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* iOS Safari는 입력 폰트가 16px 미만이면 포커스 시 화면을 자동 확대한다.
   터치/모바일 폭에서만 텍스트 입력·textarea를 16px로 올려 자동 확대를 막는다(핀치줌은 유지).
   select 는 iOS 에서 포커스 시 피커가 떠 확대되지 않으므로 제외 → 좁은 단위 셀렉터 디자인 보존. */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  textarea {
    font-size: 16px;
  }
}

/* ───────── app shell ───────── */
.app { height: 100%; display: flex; }
/* 메인만 스크롤(사이드바는 고정) — overflow 가 없으면 body 가 스크롤돼 사이드바가 화면 높이까지만 그려지고
   스크롤 시 그 아래가 비어 보였다(네브바 끊김, 2026-06-10). min-height:0 은 flex 자식 스크롤 보장용. */
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }

/* unified left sidebar */
.sidebar {
  width: 248px; flex-shrink: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--bg-elev);
  z-index: 20;
}
.sb-brand {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid var(--line);
}
.sb-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 10px; }
.sb-group + .sb-group { margin-top: 18px; }
.sb-glabel {
  display: flex; align-items: center; gap: 7px;
  padding: 0 11px 8px; font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-3); font-family: var(--mono);
}
.sb-gcount { color: var(--text-faint); }
.sb-item {
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 9px; margin-bottom: 2px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2); text-align: left;
  transition: background .13s, color .13s;
}
.sb-item:hover { background: var(--hover); color: var(--text); }
.sb-item.on { background: var(--accent-soft); color: var(--text); }
.sb-item.on svg { color: var(--accent); }
.sb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-count { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); flex-shrink: 0; }
.sb-item.on .sb-count { color: var(--accent-bright); }
.sb-badge { display: inline-flex; color: var(--accent); flex-shrink: 0; opacity: .85; }
.sb-para-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--card-c, var(--text-faint)); }
.sb-item[data-para=project]  { --card-c: var(--para-project); }
.sb-item[data-para=area]     { --card-c: var(--para-area); }
.sb-item[data-para=resource] { --card-c: var(--para-resource); }
.sb-item[data-para=archive]  { --card-c: var(--para-archive); }
/* PARA 그룹 — 컬러 레일: 그룹 전체에 PARA 색 주입(--card-c) 후 왼쪽 세로 띠로 "자기 색 구역" 표현. */
.sb-para-group[data-para=project]  { --card-c: var(--para-project); }
.sb-para-group[data-para=area]     { --card-c: var(--para-area); }
.sb-para-group[data-para=resource] { --card-c: var(--para-resource); }
.sb-para-group[data-para=archive]  { --card-c: var(--para-archive); }
.sb-para-group { position: relative; margin-left: 5px; padding-left: 12px; }
.sb-para-group::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 2.5px; border-radius: 2px;
  background: var(--card-c); opacity: .5; transition: opacity .14s;
}
.sb-para-group:hover::before { opacity: .8; }
/* 헤더 라벨을 PARA 색으로 물들이고, 점은 레일로 대체했으니 그룹 내부 점은 모두 숨김. */
.sb-para-group .sb-glabel { color: var(--card-c); }
.sb-para-group .sb-para-dot { display: none; }
.sb-glabel .sb-gcount { margin-left: auto; }
/* PARA 그룹 접기 토글: 라벨 전체가 버튼. 셰브론은 펼침=아래(90°), 접힘=오른쪽(0°). */
.sb-gtoggle { width: 100%; background: none; border: none; cursor: pointer; text-align: left; }
.sb-gtoggle:hover { color: var(--text); }
.sb-para-group .sb-gtoggle:hover { filter: brightness(1.15); }
.sb-gchevron { display: inline-flex; transition: transform .16s; transform: rotate(90deg); opacity: .75; }
.sb-para-group.collapsed .sb-gchevron { transform: rotate(0deg); }
.sb-para-group.collapsed::before { opacity: .25; }
.sb-foot {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  transition: background .13s;
}
.sb-foot:hover { background: var(--hover); }
.sb-foot .sb-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-logout { flex-shrink: 0; color: var(--text-3); opacity: .65; transition: opacity .13s, color .13s; }
.sb-foot:hover .sb-logout { opacity: 1; color: var(--accent-bright); }

.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  position: relative; z-index: 30;
}
/* mobile-only hamburger (off-canvas sidebar toggle) */
.nav-burger { display: none; width: 36px; height: 36px; flex-shrink: 0; place-items: center; border-radius: 9px; color: var(--text-2); margin-right: -4px; transition: background .14s, color .14s; }
.nav-burger:hover { background: var(--hover); color: var(--text); }

.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-name { font-size: 16px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }

.search {
  flex: 1; max-width: 440px; min-width: 0;
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text-3);
  transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--line-strong); background: var(--surface-2); }
.search input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--text-3); }
.search kbd {
  font-family: var(--mono); font-size: 10.5px; color: var(--text-3);
  border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; background: var(--bg);
}

/* ── 보이스 챗 (검색창 옆) ── */
.voice-trigger {
  width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 10px; color: var(--accent-bright);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  cursor: pointer; transition: background .14s, transform .1s;
}
.voice-trigger:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.voice-trigger.on { background: var(--accent); color: var(--accent-ink); }
.voice-trigger:active { transform: scale(.94); }
.voice-panel {
  position: fixed; top: calc(var(--topbar-h) + 10px); right: 18px; z-index: 120;
  width: min(380px, calc(100vw - 28px)); max-height: min(70vh, 560px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.4); overflow: hidden;
}
.voice-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.voice-title { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--text); }
.voice-title svg { color: var(--accent); }
.voice-x { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--text-3); cursor: pointer; }
.voice-x:hover { background: var(--hover); color: var(--text); }
.voice-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.voice-empty { margin: auto; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.6; padding: 20px 8px; }
.voice-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.voice-msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.voice-msg.assistant { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 5px; }
.voice-msg.busy { color: var(--text-3); font-style: italic; }
.voice-ctrl { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-top: 1px solid var(--line); flex-shrink: 0; }
.voice-mic {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-bright);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent); cursor: pointer; transition: background .14s;
}
.voice-mic:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.voice-mic.live { background: var(--danger); color: #fff; border-color: var(--danger); animation: voicePulse 1.1s ease-in-out infinite; }
.voice-mic:disabled { opacity: .5; cursor: default; }
@keyframes voicePulse {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--danger) 0%, transparent); }
}
.voice-input { flex: 1; min-width: 0; height: 38px; padding: 0 13px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 14px; outline: none; }
.voice-input:focus { border-color: var(--line-strong); }
.voice-send { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: opacity .14s; }
.voice-send:disabled { opacity: .4; cursor: default; }
@media (max-width: 560px) {
  .voice-panel { right: 8px; left: 8px; width: auto; top: calc(var(--topbar-h) + 6px); }
}

/* ── 자비스: 풀페이지 보이스 어시스턴트 ── */
.jv-page {
  position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 28%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%), var(--bg);
}
.jv-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.jv-orb { position: relative; width: 260px; height: 260px; display: grid; place-items: center; flex-shrink: 0; user-select: none; pointer-events: none; }
.jv-canvas { width: 100%; height: 100%; display: block; }
.jv-glow { position: absolute; inset: -40px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 65%); filter: blur(22px); opacity: .5; transition: opacity .4s; animation: jvBreathe 4.5s ease-in-out infinite; }
.jv-ring { position: absolute; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.jv-ring.r1 { inset: 0; }
.jv-ring.r2 { inset: 26px; border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.jv-ring.r3 { inset: 52px; border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.jv-core { position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent-bright) 90%, #fff), var(--accent)); box-shadow: 0 0 28px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 0 16px rgba(255,255,255,.25); animation: jvBreathe 4.5s ease-in-out infinite; }
.jv-stage.state-idle .jv-ring.r1 { animation: jvSpin 26s linear infinite; }
.jv-stage.state-idle .jv-ring.r3 { animation: jvSpin 34s linear infinite reverse; }
.jv-stage.state-listening .jv-glow { opacity: .9; }
.jv-stage.state-listening .jv-ring.r1 { animation: jvRipple 1.5s ease-out infinite; }
.jv-stage.state-listening .jv-ring.r2 { animation: jvRipple 1.5s ease-out .5s infinite; }
.jv-stage.state-listening .jv-ring.r3 { animation: jvRipple 1.5s ease-out 1s infinite; }
.jv-stage.state-listening .jv-core { animation: jvBreathe 1.6s ease-in-out infinite; }
.jv-stage.state-speaking .jv-glow { opacity: .95; animation: jvGlowPulse .5s ease-in-out infinite; }
.jv-stage.state-speaking .jv-core { animation: jvPulse .42s ease-in-out infinite; }
.jv-stage.state-speaking .jv-ring.r1 { animation: jvSpin 8s linear infinite; }
.jv-stage.state-thinking .jv-ring.r1 { animation: jvSpin 1.4s linear infinite; border-color: var(--accent-bright) transparent transparent transparent; border-width: 2.5px; }
.jv-stage.state-thinking .jv-glow { opacity: .7; }
@keyframes jvBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes jvSpin { to { transform: rotate(360deg); } }
@keyframes jvRipple { 0% { transform: scale(.72); opacity: .85; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes jvPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes jvGlowPulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
.jv-status { font-size: 13px; letter-spacing: .04em; color: var(--text-3); }
.jv-bubble { max-width: min(640px, 90%); font-size: 18px; line-height: 1.55; color: var(--text); font-family: var(--serif);
  display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.jv-bubble.user { color: var(--text-2); font-size: 15px; }
.jv-hello { max-width: 460px; color: var(--text-3); font-size: 14px; line-height: 1.6; }
.jv-err { max-width: 460px; color: var(--danger); font-size: 13px; line-height: 1.55; padding: 10px 14px; border-radius: 10px; cursor: pointer; background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.jv-log { flex-shrink: 0; max-height: 26vh; overflow-y: auto; padding: 0 24px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 720px; margin: 0 auto; mask-image: linear-gradient(to bottom, transparent, #000 14px); }
.jv-msg { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.5; }
.jv-msg .jv-who { flex-shrink: 0; width: 34px; font-weight: 650; font-size: 11px; padding-top: 2px; color: var(--text-3); }
.jv-msg.user .jv-who { color: var(--accent); }
.jv-msg .jv-text { color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.jv-msg .jv-text.dim { color: var(--text-3); }
.jv-dock { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 13px; padding: 14px 20px 24px; width: 100%; max-width: 640px; margin: 0 auto; }
.jv-hf { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-3); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: all .14s; }
.jv-hf.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.jv-mic { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--accent-ink); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent-bright) 85%, #fff), var(--accent)); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent); border: none; transition: transform .1s; }
.jv-mic:active { transform: scale(.93); }
.jv-mic.live { background: radial-gradient(circle at 35% 30%, #ff8a8a, var(--danger)); animation: jvMicPulse 1.2s ease-out infinite; }
.jv-mic:disabled { opacity: .5; cursor: default; }
@keyframes jvMicPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 50%, transparent); } 100% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--danger) 0%, transparent); } }
/* 입력바: 글래스 캡슐 하나에 입력+전송+음성. 포커스 시 액센트 글로우로 살아있는 느낌. */
.jv-textrow { display: flex; align-items: center; gap: 4px; width: 100%; padding: 5px 5px 5px 17px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-pop); transition: border-color .16s, box-shadow .16s; }
.jv-textrow:focus-within { border-color: var(--accent-line); box-shadow: var(--shadow-pop), 0 0 0 3px var(--accent-glow); }
.jv-input { flex: 1; min-width: 0; height: 38px; padding: 0; border: none; background: none; color: var(--text); font-size: 14.5px; outline: none; }
.jv-input::placeholder { color: var(--text-faint); }
.jv-send { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform .12s, opacity .12s; }
.jv-send:not(:disabled):hover { transform: scale(1.07); }
.jv-send:not(:disabled):active { transform: scale(.94); }
.jv-send:disabled { opacity: .35; cursor: default; }
.jv-mic-sm { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: none; background: transparent; color: var(--accent); cursor: pointer; transition: transform .1s, background .14s; }
.jv-mic-sm:active { transform: scale(.92); }
.jv-mic-sm:hover { background: var(--accent-soft); }

/* ── 채팅 뷰: ChatGPT/Claude 식 연속 대화(기본 화면) ── */
.jv-chathead { flex-shrink: 0; display: flex; justify-content: flex-end; padding: 8px 20px 0; width: 100%; max-width: 760px; margin: 0 auto; }
.jv-newchat { font-size: 12.5px; font-weight: 600; color: var(--text-3); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; transition: color .12s, border-color .12s; }
.jv-newchat:hover { color: var(--text); border-color: var(--line-strong); }
.jv-chat { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 24px 20px 8px; width: 100%; max-width: 760px; margin: 0 auto; }
.jv-chat .jv-hello { margin: auto; text-align: center; }
.jv-cmsg { display: flex; flex-direction: column; max-width: 100%; animation: jvRise .26s cubic-bezier(.2,.7,.2,1) both; }
.jv-cmsg.user { align-items: flex-end; }
.jv-cmsg.assistant { align-items: flex-start; }
.jv-cap { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 680; letter-spacing: .07em; color: var(--text-3); margin-bottom: 5px; }
.jv-cap svg { color: var(--accent); }
.jv-ctext { font-size: 15px; line-height: 1.65; word-break: break-word; }
.jv-cmsg.user .jv-ctext { max-width: 82%; padding: 10px 15px; border-radius: 18px 18px 5px 18px; background: var(--accent); color: var(--accent-ink); white-space: pre-wrap; box-shadow: 0 3px 10px -4px var(--accent-glow); }
.jv-cmsg.assistant .jv-ctext { max-width: 100%; color: var(--text); }
.jv-ctext.dim { color: var(--text-3); }

/* 빈 화면 웰컴 히어로: 발광 스파크 + 세리프 인사 + 추천 질문 칩(순차 등장) */
.jv-hero { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px; }
.jv-hero > * { animation: jvRise .5s cubic-bezier(.2,.7,.2,1) both; }
.jv-hero-orb { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(circle at 32% 28%, var(--surface), var(--accent-soft));
  border: 1px solid var(--accent-line); box-shadow: 0 0 0 8px var(--accent-glow), 0 12px 32px -12px var(--accent-glow);
  animation: jvRise .5s cubic-bezier(.2,.7,.2,1) both, jvHeroFloat 5.5s ease-in-out 1s infinite; }
.jv-hero-title { font-family: var(--serif); font-size: 23px; font-weight: 560; letter-spacing: -.01em; color: var(--text); animation-delay: .07s; }
.jv-hero-sub { font-size: 13.5px; color: var(--text-3); line-height: 1.65; max-width: 320px; animation-delay: .14s; }
.jv-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.jv-chip { font-size: 13px; font-weight: 560; color: var(--text-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 15px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .15s, box-shadow .15s; animation: jvRise .5s cubic-bezier(.2,.7,.2,1) both; }
.jv-chip:hover { color: var(--accent-bright); border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 4px 12px -6px var(--accent-glow); }
.jv-chip:active { transform: translateY(0); }
.jv-chip:disabled { opacity: .5; cursor: default; }
@keyframes jvRise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes jvHeroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 생각 중 인디케이터: 점 3개 + 지금 조회 중인 기록(툴) 라벨 — "근거를 찾고 있다"를 보여준다 */
.jv-think { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.jv-think .dots { display: flex; gap: 4px; }
.jv-think .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: jvDot 1.2s ease-in-out infinite; }
.jv-think .dots i:nth-child(2) { animation-delay: .15s; }
.jv-think .dots i:nth-child(3) { animation-delay: .3s; }
.jv-think .lbl { font-size: 12.5px; color: var(--text-3); }
@keyframes jvDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.jv-ctext.md p { margin: 0 0 8px; }
.jv-ctext.md p:last-child { margin-bottom: 0; }
.jv-ctext.md ul { margin: 6px 0; padding-left: 20px; }
.jv-ctext.md li { margin: 3px 0; }
.jv-ctext.md strong { font-weight: 700; color: var(--text); }
.jv-ctext.md em { font-style: italic; }
.jv-ctext.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.jv-ctext.md pre { margin: 8px 0; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.jv-ctext.md pre code { padding: 0; border: none; background: none; font-size: .88em; }
.jv-ctext.md .md-h { font-weight: 700; font-size: 1.02em; color: var(--text); margin: 10px 0 4px; }
.jv-ctext.md a { color: var(--accent); text-decoration: underline; }

/* ── 음성 오버레이: 풀스크린 우주(자비스) — 테마와 무관하게 항상 딥스페이스 ── */
/* HUD 는 하단 정렬 — 오브 코어는 위쪽(캔버스 38% 지점)에 그려지므로 자막·마이크와 안 겹친다. */
.jv-overlay { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 16px; padding: 24px 24px calc(28px + env(safe-area-inset-bottom, 0px)); text-align: center;
  background:
    radial-gradient(90% 65% at 72% 18%, rgba(62,82,165,.30), transparent 62%),
    radial-gradient(85% 60% at 22% 85%, rgba(36,110,150,.22), transparent 60%),
    #05070F;
  animation: jvFadeIn .3s ease-out; }
@keyframes jvFadeIn { from { opacity: 0; } to { opacity: 1; } }
/* 오브 캔버스가 화면 전체 = 별밭+궤도가 배경으로 깔리고, 그 위에 자막·마이크가 떠 있는 HUD 구도 */
.jv-overlay .jv-orb { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.jv-overlay .jv-status, .jv-overlay .jv-bubble, .jv-overlay .jv-hello, .jv-overlay .jv-err,
.jv-overlay .jv-mic, .jv-overlay .jv-hf { position: relative; z-index: 1; }
.jv-overlay .jv-status { color: #8FA3C8; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.jv-overlay .jv-bubble { color: #EAF0FA; text-shadow: 0 2px 20px rgba(0,0,0,.65), 0 0 2px rgba(0,0,0,.4); }
.jv-overlay .jv-bubble.user { color: #A9B7D0; }
.jv-overlay .jv-hello { color: #7E8BA8; }
.jv-overlay .jv-hf { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #8FA3C8; }
.jv-overlay .jv-hf.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.jv-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); cursor: pointer; z-index: 1; }
.jv-overlay .jv-close { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); color: #C7D2E8; }
.jv-overlay .jv-close:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.jv-close:hover { color: var(--text); border-color: var(--line-strong); }
.jv-overlay .jv-mic { margin-top: 4px; box-shadow: 0 8px 32px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 1px rgba(255,255,255,.08); }

@media (max-width: 560px) {
  .jv-orb { width: 170px; height: 170px; }
  .jv-core { width: 76px; height: 76px; }
  .jv-chat { padding: 16px 14px 8px; }
}

/* segmented view toggle */
.seg { display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; flex-shrink: 0; }
.seg button {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 13px; border-radius: 7px; font-size: 13px; font-weight: 550; color: var(--text-3);
  transition: color .14s, background .14s;
}
.seg button:hover { color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(60,50,30,.08); }
.seg button.on svg { color: var(--accent); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--text-3); transition: background .14s, color .14s; }
.icon-btn:hover { background: var(--hover); color: var(--text-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--text-2); }

.stage { flex: 1; min-height: 0; position: relative; }

/* ───────── map view ───────── */
.map { height: 100%; overflow-y: auto; }
.map-inner { max-width: 1180px; margin: 0 auto; padding: 30px 26px 64px; }

.section-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); font-family: var(--mono); white-space: nowrap; }

/* insights */
.insights { margin-bottom: 34px; }
.insights-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; min-width: 0; }
.hint-inline { font-size: 12px; color: var(--text-3); margin-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.insights-head .spark { color: var(--accent); display: flex; }
.hint-inline { font-size: 12px; color: var(--text-3); margin-left: 2px; }
@media (max-width: 620px) { .hint-inline { display: none; } }
.insight-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; }
.insight {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 19px;
  background: var(--surface); position: relative; overflow: hidden;
  transition: border-color .15s;
}
.insight:hover { border-color: var(--line-2); }
.insight.lead { background: var(--lead-bg); border-color: var(--line); }
.insight p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.insight.lead p { font-family: var(--serif); font-size: 18px; font-weight: 480; line-height: 1.5; }
.insight .meta { margin-top: 12px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.chip-link { color: var(--accent-bright); font-weight: 550; }

/* theme grid */
.themes-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 14px; }
.themes-head > span { white-space: nowrap; }

/* ─── bridges module ─── */
.bridges { margin-bottom: 34px; }
.bridges-grid { display: flex; flex-direction: column; gap: 8px; }
.bridge-row {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 16px;
  padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); transition: border-color .15s, background .15s;
}
.bridge-row:hover { border-color: var(--line-2); background: var(--surface-2); }
.br-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.br-side.r { align-items: flex-end; text-align: right; }
.br-title { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.br-theme { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.br-rel {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--accent-bright);
  padding: 4px 10px; border: 1px solid var(--accent-line); border-radius: 999px;
  background: var(--accent-soft); white-space: nowrap;
}
@media (max-width: 620px) {
  .bridge-row { flex-direction: column; align-items: stretch; gap: 9px; }
  .br-side.r { align-items: flex-start; text-align: left; }
}

/* ─── featured hero (bento) ─── */
.theme-hero {
  display: flex; gap: 26px; text-align: left; width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 22px 24px; margin-bottom: 16px; cursor: pointer;
  transition: border-color .16s, background .16s;
}
.theme-hero:hover { border-color: var(--line-strong); background: var(--surface-2); }
.hero-left { flex: 0 0 36%; min-width: 0; display: flex; flex-direction: column; }
.hero-name { font-size: 21px; font-weight: 680; letter-spacing: -.02em; }
.hero-blurb { margin-top: 8px; font-size: 13.5px; color: var(--text-3); line-height: 1.5; }
.hero-meta { margin-top: auto; padding-top: 18px; display: flex; gap: 16px; align-items: center; font-size: 12.5px; white-space: nowrap; }
.hero-right { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; align-content: center; }
@media (max-width: 760px) {
  .theme-hero { flex-direction: column; gap: 16px; }
  .hero-left { flex: none; }
  .hero-right { grid-template-columns: 1fr; }
}

/* ─── compact list ─── */
.theme-rows { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.theme-row2 { width: 100%; text-align: left; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .14s; }
.theme-row2:last-child { border-bottom: none; }
.theme-row2:hover { background: var(--surface-2); }
.tr-name { flex: 0 0 138px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-conn { flex: 0 0 116px; font-size: 12px; color: var(--accent-bright); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tr-chips { flex: 1; min-width: 0; display: flex; gap: 7px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.tr-chip { flex-shrink: 0; font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-count { flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
@media (max-width: 680px) { .tr-chips { display: none; } }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.theme-card {
  text-align: left; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 20px 20px 16px; cursor: pointer;
  display: flex; flex-direction: column; min-height: 200px;
  transition: border-color .16s, background .16s, transform .16s;
}
.theme-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tc-name { font-size: 17px; font-weight: 640; letter-spacing: -.01em; }
.tc-count { font-family: var(--mono); font-size: 12px; color: var(--text-3); flex-shrink: 0; padding-top: 3px; }
.tc-conn { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 12px; color: var(--accent-bright); font-weight: 500; white-space: nowrap; }
.tc-conn svg { opacity: .9; }
.tc-list { margin-top: 15px; display: flex; flex-direction: column; gap: 9px; }
.tc-atom { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.tc-atom .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-more { margin-top: auto; padding-top: 13px; font-size: 12.5px; color: var(--text-3); }

/* ─── PARA lanes ─── */
:root {
  --para-project: #6fae6a;   /* 지금 굴러가는 일 — 살아있는 초록 */
  --para-area:    #6f8bb0;   /* 계속 관리하는 책임 — 차분한 파랑 */
  --para-resource:#9a8fa6;   /* 참고·관심 — 무채에 가까운 보라 */
  --para-archive: #8a93a6;   /* 끝났거나 묵힌 것 — 흐린 회색 */
}
.para-lane { margin-bottom: 30px; }
.para-lane:last-child { margin-bottom: 0; }
.lane-head {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding: 0; background: none;
}
.lane-head.clickable { cursor: pointer; }
.lane-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--lane-c, var(--text-3)); }
.lane-name { font-size: 15px; font-weight: 660; letter-spacing: -.01em; color: var(--text); }
.lane-sub { font-size: 12.5px; color: var(--text-3); }
.lane-count { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.lane-chev { margin-left: auto; display: flex; color: var(--text-3); transition: transform .16s; }
.lane-chev.open { transform: rotate(90deg); }
.para-lane[data-para=project]  { --lane-c: var(--para-project); }
.para-lane[data-para=area]     { --lane-c: var(--para-area); }
.para-lane[data-para=resource] { --lane-c: var(--para-resource); }
.para-lane[data-para=archive]  { --lane-c: var(--para-archive); }
.para-lane[data-para=archive] .lane-name { color: var(--text-2); }
/* per-PARA left accent on cards/rows */
.theme-card[data-para] { border-left: 3px solid var(--card-c, var(--line)); }
.theme-row2[data-para] { box-shadow: inset 3px 0 0 var(--card-c, transparent); }
[data-para=project]  { --card-c: var(--para-project); }
[data-para=area]     { --card-c: var(--para-area); }
[data-para=resource] { --card-c: var(--para-resource); }
[data-para=archive]  { --card-c: var(--para-archive); }
.theme-card[data-para=archive], .theme-row2[data-para=archive] { opacity: .82; }

/* kind badge */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 7px 0 5px; border-radius: 6px; font-size: 11px; font-weight: 550; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); flex-shrink: 0; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; opacity: .8; }
.kind-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* status */
.st-done { color: var(--text-3); }
.st-done .txt { text-decoration: none; }
.st-dropped { opacity: .42; }
.st-dropped .txt { text-decoration: line-through; }

/* ───────── drawer ───────── */
.scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(2px); z-index: 40; opacity: 1; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 92vw);
  background: var(--bg-elev); border-left: 1px solid var(--line-2);
  z-index: 41; display: flex; flex-direction: column;
  box-shadow: -20px 0 50px -30px rgba(60,50,30,.30);
  transform: none;
}
.drawer-head { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.drawer-title { font-family: var(--serif); font-size: 24px; font-weight: 560; letter-spacing: -.01em; }
.drawer-sub { margin-top: 7px; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 26px 30px; }
.close-x { position: absolute; top: 20px; right: 22px; }

.atom-row { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.atom-row:last-child { border-bottom: none; }
.atom-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; margin-top: 1px; }
.atom-main { flex: 1; min-width: 0; }
.atom-title { font-size: 14.5px; line-height: 1.45; color: var(--text); }
/* 단일 양식: 제목 아래 요약(1~2줄) · 평문 출처 캡션. */
.atom-summary { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.atom-source { margin-top: 7px; font-size: 11.5px; color: var(--text-3); overflow-wrap: anywhere; }
/* 요약(atom.text)이 리치 마크다운일 때: 박스 없이 본문 타이포만. 문단·불릿·체크박스 정렬. */
.atom-md { line-height: 1.6; }
.atom-md > :first-child { margin-top: 0; }
.atom-md > :last-child { margin-bottom: 0; }
.atom-md p { margin: 7px 0; }
.atom-md ul, .atom-md ol { margin: 7px 0; padding-left: 20px; }
.atom-md li { margin: 2px 0; }
.atom-md li:has(> input[type="checkbox"]) { list-style: none; }
.atom-md li > input[type="checkbox"] { margin: 0 7px 0 -18px; vertical-align: baseline; width: 13px; height: 13px; accent-color: var(--accent); }
.atom-md strong { font-weight: 650; color: var(--text); }
.atom-md code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.atom-md h1, .atom-md h2, .atom-md h3, .atom-md h4 { font-size: 15px; font-weight: 650; margin: 11px 0 5px; line-height: 1.35; }
.atom-md a { color: var(--accent-bright); text-decoration: none; }
.atom-md a:hover { text-decoration: underline; }
.atom-md blockquote { margin: 7px 0; padding: 2px 12px; border-left: 3px solid var(--accent-line); color: var(--text-2); }
/* 출처 카드(SourceCard) 우측 핀/케밥 묶음. */
.card-side { display: flex; align-items: center; flex-shrink: 0; }
.card-side .atom-pin { margin: 10px 2px 0 0; }
.card-side .kebab { margin: 10px 8px 0 0; }
.atom-meta { margin-top: 6px; display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.atom-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
/* 출처 도메인 + 원문 보기를 한 줄 버튼 페어로 묶는다. */
.atom-foot { margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.atom-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; color: var(--text-2); }
.atom-link .fav { width: 16px; height: 16px; border-radius: 4px; background: var(--surface-3); display: grid; place-items: center; font-size: 9px; color: var(--text-3); flex-shrink: 0; }
.atom-link .fav-img { width: 16px; height: 16px; border-radius: 4px; background: var(--surface-3); object-fit: contain; flex-shrink: 0; }
.atom-link-dom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atom-link-ext { color: var(--text-faint); display: flex; flex-shrink: 0; }
a.atom-link { text-decoration: none; transition: border-color .15s, color .15s; }
a.atom-link:hover { border-color: var(--accent-line); color: var(--accent-bright); }
a.atom-link:hover .atom-link-ext { color: var(--accent-bright); }

/* 본문(원문 마크다운) 토글 + 렌더 영역 */
.atom-body-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; color: var(--text-3); cursor: pointer; transition: border-color .15s, color .15s; flex-shrink: 0; }
.atom-body-toggle:hover { border-color: var(--accent-line); color: var(--accent-bright); }
.atom-body-toggle .abt-chevron { display: inline-flex; transition: transform .16s; }
.md-body { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.md-body > :first-child { margin-top: 0; }
.md-body > :last-child { margin-bottom: 0; }
.md-body h1, .md-body h2, .md-body h3, .md-body h4 { margin: 18px 0 8px; line-height: 1.35; color: var(--text); font-weight: 600; }
.md-body h1 { font-size: 19px; } .md-body h2 { font-size: 17px; } .md-body h3 { font-size: 15.5px; } .md-body h4 { font-size: 14.5px; }
.md-body p { margin: 8px 0; }
.md-body ul, .md-body ol { margin: 8px 0; padding-left: 22px; }
.md-body li { margin: 3px 0; }
/* GFM 체크박스(- [ ] 항목): marked 가 클래스 없이 <input>만 넣어 disc 불릿과 체크박스가 겹쳐 보인다.
   체크박스가 든 li 는 불릿을 끄고, 체크박스를 불릿 자리(좌측 거터)로 당겨 체크리스트처럼 정렬. */
.md-body li:has(> input[type="checkbox"]) { list-style: none; }
.md-body li > input[type="checkbox"] { margin: 0 7px 0 -20px; vertical-align: baseline; width: 13px; height: 13px; accent-color: var(--accent); }
.md-body a { color: var(--accent-bright); text-decoration: none; }
.md-body a:hover { text-decoration: underline; }
.md-body code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.md-body pre { background: var(--surface-3); padding: 12px 14px; border-radius: 8px; overflow-x: auto; margin: 10px 0; }
.md-body pre code { background: none; padding: 0; }
.md-body blockquote { margin: 10px 0; padding: 4px 14px; border-left: 3px solid var(--accent-line); color: var(--text-2); }
.md-body hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.md-body img { max-width: 100%; border-radius: 8px; }
.md-body table { border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.md-body th, .md-body td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }

/* 원문(노트) 전용 페이지: 읽기 좋게 폭을 좁히고 본문 글꼴을 키운다 */
.note-view { height: 100%; overflow-y: auto; }
.note-inner { max-width: 720px; margin: 0 auto; padding: 24px 26px 80px; }
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 0; }
.note-edit { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 560; color: var(--text-2); padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); transition: border-color .15s, color .15s; }
.note-edit:hover { border-color: var(--accent-line); color: var(--accent-bright); }
.note-edit-form { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.note-title { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--text); margin: 0; }
.note-meta { margin-top: 11px; display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.note-meta-top { margin: 6px 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.note-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.note-body { margin-top: 0; padding: 0; border: none; background: none; font-size: 15.5px; line-height: 1.78; }
.note-empty { color: var(--text-3); font-size: 14px; padding: 20px 0; }

/* 검색 결과 클릭으로 들어왔을 때 해당 항목을 잠깐 강조한다(스크롤 + 플래시). */
.atom-row.row-focus {
  border-radius: 10px;
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
  border-bottom-color: transparent;
  animation: rowFocus 2.2s ease-out;
}
@keyframes rowFocus {
  0%   { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-line); }
  55%  { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-line); }
  100% { background: transparent;        box-shadow: 0 0 0 2px transparent; }
}
@media (max-width: 620px) {
  .note-inner { padding: 18px 16px 64px; }
  .note-title { font-size: 22px; }
  .note-body { font-size: 15px; line-height: 1.72; }
}

/* 연결(잇기): 항목 행의 🔗 배지를 눌러 펼치는 연관 항목 목록 */
.conn-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 5px 1px 4px; border: 1px solid var(--accent-line); border-radius: 6px; background: var(--accent-soft); color: var(--accent-bright); font-size: 11.5px; font-weight: 550; cursor: pointer; transition: filter .15s; white-space: nowrap; }
.conn-badge:hover { filter: brightness(1.05); }
.conn-badge .conn-chev { display: inline-flex; transition: transform .18s; margin-left: 1px; }
.conn-badge.open .conn-chev { transform: rotate(180deg); }
.conn-list { margin-top: 11px; margin-right: -82px; padding-top: 3px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.conn-head { display: flex; align-items: center; gap: 5px; padding: 9px 4px 5px; font-family: var(--mono); font-size: 11px; letter-spacing: .01em; color: var(--text-3); }
.conn-head .conn-head-n { color: var(--accent-bright); font-weight: 600; }
.conn-item { display: flex; align-items: flex-start; gap: 9px; width: 100%; text-align: left; padding: 9px 6px; border: none; background: none; border-radius: 8px; color: var(--text-2); cursor: pointer; transition: background .14s, color .14s; }
.conn-item:hover { background: var(--hover); color: var(--text); }
.conn-item-icon { display: inline-flex; color: var(--text-3); flex: 0 0 auto; margin-top: 1px; }
.conn-item-txt { font-size: 13.5px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; flex: 1 1 auto; }
.conn-item-theme { flex: 0 0 auto; align-self: flex-start; margin-top: 1px; font-size: 10.5px; font-family: var(--mono); color: var(--accent-bright); padding: 1px 6px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); white-space: nowrap; }
.conn-item-go { flex: 0 0 auto; align-self: flex-start; margin-top: 1px; display: inline-flex; color: var(--text-faint); }
.conn-item:hover .conn-item-go { color: var(--accent-bright); }
/* keep short labels/meta on one line (Korean keep-all otherwise breaks per-syllable) */
.drawer-sub > span, .atom-meta > span, .drawer-section-h > span, .tc-more { white-space: nowrap; }

.drawer-section-h { margin: 22px 0 6px; display: flex; align-items: center; justify-content: space-between; }

/* ───────── search results (item-level) ───────── */
.search-results { display: flex; flex-direction: column; }
.sr-row { width: 100%; display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); background: none; border-left: none; border-right: none; border-top: none; text-align: left; cursor: pointer; align-items: flex-start; }
.sr-row:last-child { border-bottom: none; }
.sr-row:hover .atom-title { color: var(--accent-bright); }
.sr-theme { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 550; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); white-space: nowrap; }
.sr-sub { margin-top: 7px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.sr-point { margin-top: 7px; display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.sr-point .kind-dot { margin-top: 6px; flex-shrink: 0; }

/* ───────── 케밥(⋮) 더보기 메뉴 + 인라인 수정 폼 ───────── */
.kebab { position: relative; display: inline-flex; flex-shrink: 0; margin-top: 1px; }
.kebab-btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--text-3); background: none; border: none; cursor: pointer; }
.kebab-btn:hover { background: var(--surface-2); color: var(--text); }
.kebab-scrim { position: fixed; inset: 0; z-index: 25; }
.kebab-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; min-width: 130px; display: flex; flex-direction: column; padding: 5px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.kebab-mi { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); padding: 7px 10px; border-radius: 8px; cursor: pointer; text-align: left; background: none; border: none; white-space: nowrap; }
.kebab-mi:hover { background: var(--surface-2); }
.kebab-mi svg { color: var(--text-3); }
.kebab-mi.danger { color: var(--danger, #d9534f); }
.kebab-mi.danger svg { color: var(--danger, #d9534f); }
.kebab-mi.danger:hover { background: color-mix(in srgb, var(--danger, #d9534f) 12%, transparent); }

.atom-row .kebab { align-self: flex-start; }

.edit-form { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ef-label { font-size: 11px; font-weight: 600; color: var(--text-3); margin-top: 4px; }
.ef-text { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; resize: vertical; }
.ef-body { font-family: var(--mono); font-size: 13px; line-height: 1.6; min-height: 160px; }
.ef-text:focus { outline: none; border-color: var(--accent-line); }
.ef-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ef-sel { font: inherit; font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.ef-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.ef-cancel, .ef-save { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }
.ef-cancel { background: var(--surface-2); color: var(--text-2); }
.ef-cancel:hover { border-color: var(--line-strong); }
.ef-save { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ef-save:hover { filter: brightness(1.05); }
.ef-save:disabled, .ef-cancel:disabled { opacity: .5; cursor: default; }

.theme-rename { font: inherit; font-size: 26px; font-weight: 720; letter-spacing: -.02em; color: var(--text); background: var(--surface-2); border: 1px solid var(--accent-line); border-radius: 10px; padding: 2px 10px; max-width: 100%; }
.theme-rename:focus { outline: none; }

/* ───────── graph view ───────── */
.graph-wrap { position: absolute; inset: 0; overflow: hidden; background: var(--bg); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.graph-wrap.panning { cursor: grabbing; }
.graph-svg { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }
.g-link { stroke: var(--line-2); fill: none; stroke-width: 1; transition: stroke .15s, opacity .15s, stroke-width .15s; }
.g-link.bridge { stroke: var(--accent-line); stroke-width: 1.5; }
/* 임베딩 유사도로 자동 형성된 원자↔원자 연결: 점선으로 구분. */
.g-link.rel { stroke-dasharray: 3 3; opacity: .7; }
.g-link.dim { opacity: .12; }
.g-link.hot { stroke: var(--accent); opacity: .95; stroke-width: 1.8; }
.g-node { cursor: grab; transition: opacity .15s; }
.g-node:active { cursor: grabbing; }
.g-node.dim { opacity: .22; }
.node-c { fill: var(--text-3); stroke: var(--bg); stroke-width: 1.5; transition: fill .15s; }
.g-theme .node-c { fill: var(--text-2); }
.g-theme[data-para=project]  .node-c { fill: var(--para-project); }
.g-theme[data-para=area]     .node-c { fill: var(--para-area); }
.g-theme[data-para=resource] .node-c { fill: var(--para-resource); }
.g-theme[data-para=archive]  .node-c { fill: var(--para-archive); }
.g-node.nbr .node-c { fill: var(--text); }
.g-node.hot .node-c { fill: var(--accent); }
.g-node.sel .node-c { fill: var(--accent); stroke: var(--accent-bright); stroke-width: 2; }
.g-label { fill: var(--text-3); font-family: var(--font); font-weight: 500; pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; transition: opacity .18s; }
.g-theme .g-label { fill: var(--text); font-weight: 600; }
.g-node.hot .g-label, .g-node.nbr .g-label { fill: var(--text); }
.g-atom .g-label { opacity: 0; }
.g-atom.showlabel .g-label { opacity: 1; }

.graph-legend { position: absolute; left: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; padding: 13px 15px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 12px; z-index: 5; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.zoom-ctl { position: absolute; right: 18px; bottom: 18px; display: flex; flex-direction: column; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; z-index: 5; }
.zoom-ctl button { width: 36px; height: 34px; display: grid; place-items: center; color: var(--text-2); }
.zoom-ctl button:hover { background: var(--hover); color: var(--text); }
.zoom-ctl button + button { border-top: 1px solid var(--line); }

.g-panel { position: absolute; top: 16px; right: 16px; width: 320px; max-height: calc(100% - 32px); overflow-y: auto; background: var(--bg-elev); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 6; padding: 20px; }
.g-panel-kicker { font-size: 11px; color: var(--text-3); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.g-panel-title { font-family: var(--serif); font-size: 21px; font-weight: 560; letter-spacing: -.01em; margin-top: 7px; }
.g-panel-blurb { margin: 8px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.lg-dot { display: inline-block; border-radius: 50%; background: var(--text-2); flex-shrink: 0; }
.g-hint { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); font-size: 12.5px; color: var(--text-3); background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; z-index: 5; white-space: nowrap; max-width: calc(100% - 32px); }

/* ───────── login ───────── */
.login { height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; }
.login-brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 30px; }
.login-h { font-family: var(--serif); font-size: 27px; font-weight: 560; letter-spacing: -.01em; text-align: center; }
.login-sub { margin: 12px 0 26px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); text-align: center; }
.field { display: block; margin-bottom: 12px; }
.field input { width: 100%; height: 46px; padding: 0 15px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px; color: var(--text); font-size: 15px; outline: none; transition: border-color .15s; }
.field input:focus { border-color: var(--accent-line); }
.field input::placeholder { color: var(--text-3); }
.btn-primary { width: 100%; height: 46px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 650; white-space: nowrap; transition: filter .15s; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-tg { width: 100%; height: 46px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 14.5px; font-weight: 550; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 11px; transition: background .15s; }
.btn-tg:hover { background: var(--surface-3); }
.login-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-faint); font-size: 12px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-foot { margin-top: 26px; text-align: center; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.sent { margin-top: 16px; padding: 13px 15px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 11px; font-size: 13.5px; color: var(--text); display: flex; gap: 10px; align-items: flex-start; }

/* ── 구글 로그인 + 텔레그램 연동 게이트 ── */
.btn-google { width: 100%; height: 46px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font-size: 14.5px; font-weight: 620; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .15s, border-color .15s, transform .15s; }
.btn-google:hover { background: var(--surface-2); border-color: var(--accent-line); transform: translateY(-1px); }
.btn-google:active { transform: translateY(0); }
html[data-vibe="pop"] .btn-google { border-radius: 999px; }
html[data-vibe="editorial"] .btn-google { border-radius: 6px; }
.lk-err { margin-bottom: 14px; padding: 11px 14px; border-radius: 11px; border: 1px solid color-mix(in srgb, #e5484d 40%, transparent); background: color-mix(in srgb, #e5484d 10%, transparent); color: var(--text); font-size: 13px; line-height: 1.5; text-align: center; }
.lk-email { margin: 10px auto 0; width: fit-content; display: flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; color: var(--text-2); }
/* 연동 코드 — 탑승권 절취선 카드. 누르면 보낼 메시지가 통째로 복사된다. */
.lk-code { display: block; width: 100%; margin: 4px 0 12px; padding: 16px 14px 18px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--accent-line); cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.lk-code:hover { background: var(--surface-2); }
.lk-code.copied { border-style: solid; border-color: var(--accent); }
.lk-code-label { display: block; margin-bottom: 11px; font-size: 12px; color: var(--text-3); transition: color .2s; }
.lk-code.copied .lk-code-label { color: var(--accent-bright); font-weight: 620; }
.lk-digits { display: flex; justify-content: center; gap: 7px; }
.lk-digit { width: 40px; height: 52px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--accent-bright); animation: lk-pop .5s cubic-bezier(.22,.68,.16,1) both; }
@keyframes lk-pop { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
.lk-wait { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.lk-wait.ok { color: var(--accent-bright); font-weight: 620; }
.lk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: lk-pulse 1.6s ease-in-out infinite; }
.lk-wait.ok .lk-dot { animation: none; box-shadow: 0 0 0 5px var(--accent-soft); }
@keyframes lk-pulse { 0%,100% { box-shadow: 0 0 0 0 var(--accent-glow); opacity: 1; } 50% { box-shadow: 0 0 0 7px transparent; opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .lk-digit, .lk-dot { animation: none; } }

/* ───────── empty state ───────── */
.empty { height: 100%; display: grid; place-items: center; padding: 24px; }
.empty-card { text-align: center; max-width: 420px; }
.empty-ico { width: 70px; height: 70px; margin: 0 auto 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--accent); }
.empty-h { font-family: var(--serif); font-size: 23px; font-weight: 560; letter-spacing: -.01em; }
.empty-p { margin: 11px 0 22px; font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.tg-pill { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; }
.tg-pill code { font-family: var(--mono); font-size: 13px; color: var(--accent-bright); }

/* responsive */
@media (max-width: 880px) {
  .insight-grid { grid-template-columns: 1fr; }
  .search { max-width: none; }
  .seg button span { display: none; }
}
/* ───────── theme detail (inline page) ───────── */
.detail { height: 100%; overflow-y: auto; }
.detail-inner { max-width: 1120px; margin: 0 auto; padding: 24px 26px 72px; }
.detail-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-3); padding: 6px 10px 6px 6px; margin-bottom: 12px; border-radius: 8px; white-space: nowrap; }
.detail-back:hover { color: var(--text); background: var(--hover); }
.detail-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.detail-title { font-size: 28px; font-weight: 720; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
/* PARA 배지 + 이동 메뉴 (detail) */
.para-ctrl { position: relative; display: inline-flex; }
.para-ctrl[data-para=project]  { --card-c: var(--para-project); }
.para-ctrl[data-para=area]     { --card-c: var(--para-area); }
.para-ctrl[data-para=resource] { --card-c: var(--para-resource); }
.para-ctrl[data-para=archive]  { --card-c: var(--para-archive); }
.para-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; cursor: pointer; }
.para-badge:hover { border-color: var(--line-strong); }
.para-badge:disabled { opacity: .55; cursor: default; }
.para-badge svg { opacity: .7; }
.para-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--card-c, var(--text-3)); }
.para-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 150px; display: flex; flex-direction: column; padding: 5px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.para-mi { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); padding: 7px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.para-mi:hover { background: var(--surface-2); }
.para-mi.on { color: var(--text); }
.para-mi svg { margin-left: auto; color: var(--ok); }
.detail-sub { margin-top: 11px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.detail-sub > span { white-space: nowrap; }
.detail-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.detail-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.detail-sec-head .section-label { display: inline-flex; align-items: center; gap: 7px; }
.detail-atoms { display: flex; flex-direction: column; }

@media (max-width: 760px) {
  /* sidebar → off-canvas left drawer */
  .nav-burger { display: grid; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(280px, 84vw);
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 18px 0 50px -30px rgba(0, 0, 0, .5);
    z-index: 60;
  }
  .sidebar.open { transform: none; }
  .sb-scrim { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(2px); z-index: 55; }
  .topbar { padding: 0 16px; gap: 12px; }
  /* graph overlays → keep within smaller viewport */
  .g-panel { width: min(300px, calc(100vw - 32px)); padding: 16px; }
}
@media (max-width: 620px) {
  .map-inner { padding: 22px 16px 50px; }
  .detail-inner { padding: 20px 16px 56px; }
  .brand-name { display: none; }
  .detail-title { font-size: 23px; }
  .graph-legend { left: 12px; bottom: 12px; padding: 10px 12px; }
  .zoom-ctl { right: 12px; bottom: 12px; }
  /* 본문 토글·렌더 영역: 좁은 화면에서 출처/원문 버튼 탭 영역 확대 */
  .atom-link, .atom-body-toggle { height: 36px; }
  .md-body { padding: 13px 14px; font-size: 14.5px; line-height: 1.72; border-radius: 12px; }
  .md-body h1 { font-size: 18px; } .md-body h2 { font-size: 16px; } .md-body h3 { font-size: 15px; }
  .md-body ul, .md-body ol { padding-left: 19px; }
  .md-body pre { font-size: 12px; padding: 11px 12px; }
  .md-body table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ───────── 할일(todo) 뷰 ───────── */
.todo { height: 100%; overflow-y: auto; }
.todo-inner { max-width: 800px; margin: 0 auto; padding: 28px 26px 80px; }
.todo-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.todo-sub { font-size: 12.5px; color: var(--text-3); }
.todo-empty, .todo-hint { font-size: 13px; color: var(--text-3); padding: 14px 2px; }
.todo-hint { color: var(--text-faint); }

/* 오늘 — Big 3 히어로 */
.todo-today {
  margin-bottom: 30px; padding: 20px 22px 8px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--lead-bg); position: relative;
}
.todo-today::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2.5px; background: var(--accent-line);
  border-radius: var(--radius) 0 0 var(--radius);
}
.tt-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.tt-star { color: var(--accent); display: flex; }
.tt-title { font-family: var(--serif); font-size: 19px; font-weight: 560; letter-spacing: -.01em; color: var(--text); }
.tt-count { font-family: var(--mono); font-size: 12px; color: var(--accent-bright); padding: 1px 9px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--surface); }
.todo-list.elevated { border-color: var(--line-2); box-shadow: none; }

.today-empty { padding: 8px 2px 22px; text-align: center; color: var(--text-3); }
.te-star { display: inline-flex; color: var(--accent-line); margin-bottom: 8px; }
.te-text { font-family: var(--serif); font-size: 15.5px; color: var(--text-2); }
.te-sub { margin-top: 5px; font-size: 12px; color: var(--text-3); }

.todo-sec { margin-top: 28px; }
.todo-sec-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.ts-name { font-size: 13px; font-weight: 660; color: var(--text); letter-spacing: .02em; text-transform: uppercase; font-family: var(--mono); }
.ts-count { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }

/* overflow:hidden 금지 — Kebab(⋮) 드롭다운이 행 컨테이너 경계에서 잘리기 때문.
   모서리 둥글림은 첫/마지막 행에 직접 줘서 hidden 없이도 라운드 유지. */
.todo-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.todo-list .todo-row:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.todo-list .todo-row:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

.todo-group { margin-top: 18px; }
.todo-group:first-child { margin-top: 0; }
.tg-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 600; padding: 0 2px 8px; background: none; border: none; }
.tg-head.clickable { cursor: pointer; width: 100%; text-align: left; }
.tg-head.clickable:hover { color: var(--accent-bright); }
.tg-head.clickable:hover .tg-go { opacity: 1; }
.tg-head.muted { color: var(--text-3); font-weight: 500; }
.tg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tg-c, var(--accent)); flex-shrink: 0; }
.tg-count { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.tg-go { display: flex; color: var(--text-faint); opacity: 0; transition: opacity .14s; }
.tg-head[data-para=project]  { --tg-c: var(--para-project); }
.tg-head[data-para=area]     { --tg-c: var(--para-area); }
.tg-head[data-para=resource] { --tg-c: var(--para-resource); }
.tg-head[data-para=archive]  { --tg-c: var(--para-archive); }

.todo-row { display: flex; align-items: flex-start; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--line); transition: background .12s; }
.todo-row:last-child { border-bottom: none; }
.todo-row:hover { background: var(--surface-2); }
.todo-row.done:hover { background: none; }
.todo-check { flex-shrink: 0; width: 19px; height: 19px; margin-top: 1px; border-radius: 6px; border: 1.8px solid var(--line-strong); background: var(--bg-elev); cursor: pointer; transition: border-color .12s, background .12s; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.todo-check:hover { border-color: var(--ok); }
.todo-check.checked { border-color: var(--ok); background: var(--ok); color: #fff; cursor: default; }
/* 완료 행 체크 = 해제 토글 버튼: 탭하면 다시 열림. hover 시 살짝 어둡게만. */
button.todo-check.checked { cursor: pointer; transition: filter .12s; }
button.todo-check.checked:hover { filter: brightness(.92); }
.todo-main { flex: 1; min-width: 0; }
.todo-text { font-size: 14.5px; line-height: 1.5; color: var(--text); word-break: break-word; }
.todo-text.done { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-faint); }
.todo-meta { margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--text-3); }
.todo-theme { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 10.5px; white-space: nowrap; }
.todo-theme .tt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tt-c, var(--para-resource)); flex-shrink: 0; }
.todo-theme[data-para=project]  { --tt-c: var(--para-project); }
.todo-theme[data-para=area]     { --tt-c: var(--para-area); }
.todo-theme[data-para=resource] { --tt-c: var(--para-resource); }
.todo-theme[data-para=archive]  { --tt-c: var(--para-archive); }
.todo-theme.inbox { color: var(--text-faint); gap: 4px; }
.todo-date { font-family: var(--mono); color: var(--text-faint); white-space: nowrap; }
.todo-star { flex-shrink: 0; background: none; border: none; cursor: pointer; color: var(--text-faint); padding: 3px; margin: -2px -2px 0 0; border-radius: 8px; transition: color .12s, transform .1s, background .12s; }
.todo-star:hover { color: var(--accent-bright); background: var(--accent-soft); transform: scale(1.1); }
.todo-star.on { color: var(--accent-bright); }
.todo-pin { flex-shrink: 0; background: none; border: none; cursor: pointer; color: var(--text-faint); padding: 3px; margin: -2px 0 0 0; border-radius: 8px; transition: color .12s, transform .1s, background .12s; }
.todo-pin:hover { color: var(--accent-bright); background: var(--accent-soft); transform: scale(1.1); }
.todo-pin.on { color: var(--accent-bright); }

/* 영구 핀(중요) — 주제 헤더 / 원자 행. 오늘 고르기 ☆ 와 구분되는 장기 중요표시. */
.atom-pin { flex-shrink: 0; align-self: flex-start; width: 28px; height: 28px; margin-top: 1px; display: grid; place-items: center; background: none; border: none; cursor: pointer; color: var(--text-faint); border-radius: 8px; transition: color .12s, transform .1s, background .12s; }
.atom-pin:hover { color: var(--accent-bright); background: var(--accent-soft); transform: scale(1.1); }
.atom-pin.on { color: var(--accent-bright); }
.atom-pin:disabled { opacity: .5; cursor: default; }
.theme-pin { flex-shrink: 0; display: inline-flex; align-items: center; background: none; border: none; cursor: pointer; color: var(--text-faint); padding: 4px; border-radius: 8px; transition: color .12s, transform .1s, background .12s; }
.theme-pin:hover { color: var(--accent-bright); background: var(--accent-soft); transform: scale(1.1); }
.theme-pin.on { color: var(--accent-bright); }
.theme-pin:disabled { opacity: .5; cursor: default; }

.done-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 660; color: var(--text-2); padding: 5px 0; letter-spacing: .02em; text-transform: uppercase; font-family: var(--mono); }
.done-toggle:hover { color: var(--text); }
.dt-chev { display: flex; transition: transform .15s; color: var(--text-3); }
.dt-chev.open { transform: rotate(90deg); }
.dt-hint { font-family: var(--sans, inherit); font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-faint); }
.done-body { margin-top: 14px; }
.done-more { margin-top: 16px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: border-color .14s, color .14s; }
.done-more:hover { border-color: var(--line-strong); color: var(--text); }
.done-more:disabled { opacity: .55; cursor: default; }

@media (max-width: 620px) {
  .todo-inner { padding: 22px 16px 60px; }
  .todo-today { padding: 16px 16px 6px; }
}

/* density: compact */
.density-compact .map-inner { padding-top: 20px; }
.density-compact .insights { margin-bottom: 26px; }
.density-compact .insight-grid { gap: 11px; }
.density-compact .insight { padding: 14px 16px; }
.density-compact .theme-grid { gap: 12px; }
.density-compact .theme-card { padding: 16px 16px 13px; min-height: 168px; }
.density-compact .tc-list { gap: 7px; margin-top: 12px; }

/* ═══════════════════════════════════════════════════════════════════
   디자인 고도화 (B) — 모션 · 분위기 · 타이포 · 폴리시
   색/테마(vibe·PARA) 토큰은 일절 손대지 않는다. 여기 있는 건 전부
   기존 색 변수를 그대로 쓰는 표현 레이어(움직임·깊이·여백·질감)다.
   되돌리려면 이 블록만 지우면 된다.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 진입 모션: 본문 섹션이 아래에서 살짝 떠오르며 시차로 등장 ── */
@keyframes sb-rise { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: none; } }
@keyframes sb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sb-slide-r { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .map-inner > *, .todo-inner > *, .detail-inner > * {
    animation: sb-rise .55s cubic-bezier(.22,.68,.16,1) both;
  }
  .map-inner > *:nth-child(1), .todo-inner > *:nth-child(1), .detail-inner > *:nth-child(1) { animation-delay: .03s; }
  .map-inner > *:nth-child(2), .todo-inner > *:nth-child(2), .detail-inner > *:nth-child(2) { animation-delay: .09s; }
  .map-inner > *:nth-child(3), .todo-inner > *:nth-child(3), .detail-inner > *:nth-child(3) { animation-delay: .15s; }
  .map-inner > *:nth-child(4), .todo-inner > *:nth-child(4), .detail-inner > *:nth-child(4) { animation-delay: .21s; }
  .map-inner > *:nth-child(n+5), .todo-inner > *:nth-child(n+5), .detail-inner > *:nth-child(n+5) { animation-delay: .27s; }

  .graph-svg { animation: sb-fade .7s ease both; }
  .g-panel { animation: sb-slide-r .34s cubic-bezier(.22,.68,.16,1) both; }
  .drawer { animation: sb-slide-r .34s cubic-bezier(.22,.68,.16,1) both; }
  .login-card, .empty-card { animation: sb-rise .6s cubic-bezier(.22,.68,.16,1) both; }
}

/* ── 분위기 배경: 메인 무대 뒤로 accent-glow(테마색) 두 줄기를 아주 옅게.
      콘텐츠(.map/.todo/.detail/그래프/카드)는 z-index:1로 그 위에 뜬다. ── */
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(72% 60% at 90% -8%, var(--accent-glow), transparent 64%),
    radial-gradient(56% 52% at -8% 108%, var(--accent-glow), transparent 66%);
  opacity: .42;
}

/* ── 타이포: 디스플레이(serif) 제목은 균형 줄바꿈 + 광학 사이징으로 더 단단하게 ── */
.insight.lead p, .drawer-title, .g-panel-title, .login-h, .empty-h,
.detail-title, .hero-name, .tt-title, .tc-name, .login-sub, .empty-p {
  text-wrap: balance;
}
.drawer-title, .g-panel-title, .login-h, .empty-h, .detail-title, .hero-name, .tt-title {
  font-optical-sizing: auto;
}

/* ── 카드 마이크로 인터랙션: hover 시 살짝 떠오르며 그림자 깊이 ── */
@media (prefers-reduced-motion: no-preference) {
  .insight, .theme-card, .theme-hero, .bridge-row {
    transition: border-color .16s, background .16s,
                transform .2s cubic-bezier(.22,.68,.16,1), box-shadow .2s;
    will-change: transform;
  }
  .insight:hover, .theme-card:hover, .theme-hero:hover, .bridge-row:hover {
    transform: translateY(-2px); box-shadow: var(--shadow-pop);
  }
  .sb-item:active, .seg button:active, .btn-primary:active,
  .todo-row .todo-check:active { transform: translateY(.5px); }
}

/* ── 포커스 가시성: 키보드 이동 시 테마색 외곽선(마우스 클릭엔 안 뜸) ── */
:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
  border-radius: 7px;
}
/* 텍스트 입력류는 항상 :focus-visible 에 매칭 → 자체/컨테이너 border 가 이미 포커스를 표시하므로
   전역 사각 링을 빼서 이중 외곽선(둥근 캡슐 안 각진 링)을 방지한다. */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

/* ═══════════════════════════════════════════════════════════════════
   지도 뷰 고도화 (B) — 레인 밴드 · 다리 연결선 · 카드 어포던스 · 라벨 마커
   전부 기존 색 변수만 사용. 공간 구성과 어포던스만 강화한다.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 섹션 라벨(테마/검색 헤더) 앞 accent 틱: 구획 시작을 또렷하게.
      인사이트·다리 헤더는 이미 아이콘이 있어 themes-head 에만 단다. ── */
.themes-head .section-label { position: relative; padding-left: 16px; }
.themes-head .section-label::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── PARA 레인을 가로 밴드로: 레인 사이 hairline 으로 리듬을 준다.
      (첫 레인은 themes-head 바로 아래라 구분선 생략) ── */
.para-lane + .para-lane { border-top: 1px solid var(--line); padding-top: 24px; }

/* ── 레인 점에 PARA색 소프트 링: 레인 색 정체성을 은은하게 강조 ── */
.lane-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lane-c) 16%, transparent); }

/* ── 다리(bridges): 관계 알약 양옆에 짧은 연결선 → "이어짐" 은유 강화.
      모바일(세로 스택)에선 방향이 어긋나므로 숨김. ── */
@media (min-width: 621px) {
  .br-rel { position: relative; }
  .br-rel::before, .br-rel::after {
    content: ""; position: absolute; top: 50%; width: 14px; height: 1px;
    background: var(--accent-line);
  }
  .br-rel::before { right: 100%; margin-right: 5px; }
  .br-rel::after  { left: 100%;  margin-left: 5px; }
}

/* ── 주제 카드 "더 보기" 어포던스: hover 시 화살표가 살짝 미끄러지며 강조색 ── */
.tc-more { display: inline-flex; align-items: center; gap: 5px; transition: color .16s; }
.tc-more::after { content: "→"; font-size: 13px; transition: transform .18s; opacity: .8; }
@media (prefers-reduced-motion: no-preference) {
  .theme-card:hover .tc-more::after { transform: translateX(3px); }
}
.theme-card:hover .tc-more { color: var(--accent-bright); }
.theme-card:hover .tc-more::after { opacity: 1; }

/* ── 주제 카드 hover 시 PARA 좌측 강조선만 살짝 두껍게(색은 유지) ── */
.theme-card[data-para]:hover { border-left-width: 4px; }

/* ═══════════════════════════════════════════════════════════════════
   그래프 · 상세 · 로그인 · 빈 상태 고도화 (B) — 초점·깊이·CTA 폴리시
   기존 색 변수만 사용. 움직임/그림자/여백 표현 레이어만 추가.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 그래프: 선택 노드가 은은하게 맥동 → 어디를 보고 있는지 또렷이 ── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes sb-node-pulse { 0%, 100% { stroke-width: 2; } 50% { stroke-width: 3.4; } }
  .g-node.sel .node-c { animation: sb-node-pulse 1.9s ease-in-out infinite; }
}
/* 떠 있는 글래스 오버레이(범례·줌·힌트)에 부드러운 그림자로 캔버스에서 들어올림 */
.graph-legend, .zoom-ctl, .g-hint { box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .3); }

/* ── 상세: 헤더 하단에 짧은 강조색 룰 → 에디토리얼 타이틀 시그니처 ── */
/* z-index: 헤더(PARA 드롭다운 포함)를 아래 항목 섹션 위로. 등장 애니메이션(sb-rise)이
   각 .detail-inner>* 를 독립 stacking context로 만들어, 헤더 안 드롭다운이 다음 섹션에
   가리던 문제를 막는다. */
.detail-head { position: relative; z-index: 5; }
.detail-head::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

/* ── 로그인: 기본 CTA에 강조색 소프트 글로우 → 시선이 자연히 모임 ── */
.btn-primary { box-shadow: 0 8px 22px -12px var(--accent); }
.btn-primary:hover { box-shadow: 0 10px 26px -10px var(--accent); }

/* ── 빈 상태: 아이콘에 강조색 헤일로 → 첫 화면의 초점 ── */
.empty-ico { box-shadow: 0 0 0 6px var(--accent-soft); }

/* ───────── 캘린더 뷰 ───────── */
.cal { height: 100%; overflow-y: auto; }
.cal-inner { max-width: 800px; margin: 0 auto; padding: 28px 26px 80px; }
.cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-sub { font-size: 12.5px; color: var(--text-3); margin-left: 10px; }
.cal-disconnect { font: inherit; font-size: 12px; color: var(--text-3); background: none; border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.cal-disconnect:hover { color: var(--accent-bright); border-color: var(--accent-line); }
.cal-empty { font-size: 13px; color: var(--text-3); padding: 24px 2px; text-align: center; }

.cal-banner { font-size: 12.5px; padding: 9px 13px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--line-2); }
.cal-banner.ok { background: var(--accent-soft); color: var(--accent-bright); border-color: var(--accent-line); }
.cal-banner.warn { background: var(--surface-2); color: var(--text-2); }
.cal-banner.err { background: var(--surface-2); color: var(--accent-bright); border-color: var(--accent-line); }

/* 툴바: 주 이동 + 범위 + 추가 버튼 */
.cal-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-nav { display: inline-flex; align-items: center; gap: 4px; }
.cal-navbtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.cal-navbtn:hover { border-color: var(--line-strong); color: var(--text); }
.cal-today { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer; }
.cal-today:hover { border-color: var(--line-strong); color: var(--text); }
.cal-range { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }

/* 주/월 토글 */
.cal-viewtoggle { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.cal-vbtn { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-3); background: none; border: none; padding: 6px 14px; cursor: pointer; }
.cal-vbtn + .cal-vbtn { border-left: 1px solid var(--line); }
.cal-vbtn:hover { color: var(--text); }
.cal-vbtn.on { color: var(--accent-ink); background: var(--accent); }

/* 주간 리스트: 요일 라벨 + 일정들 */
.cal-week { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cal-day { display: flex; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cal-day:last-child { border-bottom: none; }
.cal-day.today { background: var(--lead-bg); }
.cal-daycol { flex-shrink: 0; width: 46px; display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.cal-md { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }
.cal-day.today .cal-md { color: var(--accent-bright); }
.cal-wd { font-size: 11px; color: var(--text-3); }
.cal-events { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.cal-ev { display: flex; gap: 10px; align-items: baseline; }
.cal-ev-time { flex-shrink: 0; width: 92px; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.cal-ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-ev-title { font-size: 14px; color: var(--text); line-height: 1.45; word-break: break-word; }
.cal-ev-loc { font-size: 11.5px; color: var(--text-3); }
.cal-noev { color: var(--text-faint); font-size: 13px; padding-top: 2px; }

/* ── 월간 그리드 ── */
.cal-grid { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cal-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-grid-wd { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-align: center; padding: 9px 0; letter-spacing: .02em; }
.cal-grid-wd.wknd { color: var(--text-faint); }
.cal-grid-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-grid-body > .cal-cell:nth-last-child(-n+7) { border-bottom: none; }
.cal-cell[onclick], .cal-cell.has { cursor: pointer; }
.cal-cell-num { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-2); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 7px; }
.cal-cell.other { background: var(--surface-2); }
.cal-cell.other .cal-cell-num { color: var(--text-faint); }
.cal-cell.wknd:not(.other) .cal-cell-num { color: var(--text-3); }
.cal-cell.today .cal-cell-num { color: var(--accent-ink); background: var(--accent); }
.cal-cell-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { display: flex; align-items: baseline; gap: 4px; font-size: 11px; line-height: 1.5; color: var(--text); background: var(--accent-soft); border-left: 2px solid var(--accent); border-radius: 4px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-chip b { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--accent-bright); flex-shrink: 0; }
.cal-chip.allday { background: var(--accent); color: var(--accent-ink); border-left-color: var(--accent-bright); }
.cal-more { font-size: 10.5px; font-weight: 600; color: var(--text-3); padding: 0 5px; }

/* ── 날짜 클릭 → 하단 시트(그날 일정 전체) ── */
.cal-sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.32); }
.cal-sheet { width: 100%; max-width: 460px; max-height: 64vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-bottom: none; border-radius: 16px 16px 0 0; padding: 18px 20px 26px; box-shadow: 0 -12px 40px -16px rgba(0,0,0,.5); }
.cal-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-sheet-date { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--text); }
.cal-sheet-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.cal-sheet-x:hover { color: var(--text); border-color: var(--line-strong); }
.cal-sheet-list { display: flex; flex-direction: column; gap: 12px; }

/* 좁은 화면: 칸 높이 줄이고 칩 글자 축소 */
@media (max-width: 560px) {
  .cal-cell { min-height: 74px; padding: 4px 3px 6px; }
  .cal-chip { font-size: 10px; padding: 1px 3px; }
  .cal-chip b { display: none; }
  .cal-cell-num { font-size: 11px; width: 20px; height: 20px; }
}

/* 미연동 안내 카드 */
.cal-connect { max-width: 420px; margin: 48px auto; text-align: center; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); padding: 36px 30px; }
.cal-connect-icon { display: inline-flex; color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); border-radius: 50%; padding: 12px; margin-bottom: 18px; }
.cal-connect-title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--text); margin-bottom: 10px; }
.cal-connect-sub { font-size: 13px; line-height: 1.6; color: var(--text-3); margin-bottom: 22px; }
.cal-connect-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: 10px; padding: 11px 20px; text-decoration: none; box-shadow: 0 8px 22px -12px var(--accent); }
.cal-connect-btn:hover { filter: brightness(1.05); }

/* ───────────────────────── 통계 뷰 (sb_stats.jsx) ───────────────────────── */
.st { display: flex; flex-direction: column; height: 100%; }
.st-tabs { display: flex; gap: 2px; padding: 12px 18px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; }
.st-tab { font: inherit; font-size: 13px; font-weight: 600; color: var(--text-3); background: none; border: none; padding: 9px 13px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.st-tab:hover { color: var(--text); }
.st-tab.on { color: var(--accent-bright); border-bottom-color: var(--accent); }
.st-body { flex: 1; min-height: 0; position: relative; }
.st-scroll { position: absolute; inset: 0; overflow-y: auto; }
.st-inner { max-width: 880px; margin: 0 auto; padding: 26px 26px 90px; }

.st-h { display: flex; align-items: baseline; gap: 10px; }
.st-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.st-desc { font-size: 12.5px; line-height: 1.55; color: var(--text-3); margin: 6px 0 20px; }
.st-empty { font-size: 13px; line-height: 1.6; color: var(--text-3); text-align: center; padding: 64px 20px; }
.st-axis { font-family: var(--mono); font-size: 9.5px; fill: var(--text-3); }

/* 공용 항목 행 */
.st-atom { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.st-atom-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.st-atom-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-atom-title { font-size: 14px; line-height: 1.45; color: var(--text); word-break: break-word; }
.st-atom-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.st-atom-theme { font: inherit; font-size: 11.5px; color: var(--accent-bright); background: none; border: none; padding: 0; cursor: pointer; }
.st-atom-theme:hover { text-decoration: underline; }

/* 히트맵 */
.st-yearnav { display: flex; align-items: center; gap: 12px; margin: -8px 0 16px; }
.st-yearnav-y { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--text); min-width: 52px; text-align: center; }
.st-yearnav-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .12s, opacity .12s; }
.st-yearnav-btn:hover:not(:disabled) { background: var(--surface-2); }
.st-yearnav-btn:disabled { opacity: .35; cursor: default; }
.st-heat-wrap { overflow-x: auto; padding-bottom: 6px; }
.st-heat-c { cursor: default; transition: fill-opacity .12s; }
.st-heat-c[fill="var(--accent)"] { cursor: pointer; }
.st-heat-c.sel { stroke: var(--text); stroke-width: 1.5; }
.st-legend-row { display: flex; align-items: center; gap: 5px; margin-top: 12px; }
.st-legend-lbl { font-size: 11px; color: var(--text-3); }
.st-heat-key { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.st-daybox { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; }
.st-daybox-head { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* 타임라인 */
.st-tl { position: relative; }
.st-tl-group { position: relative; padding-left: 20px; padding-bottom: 14px; border-left: 2px solid var(--line); margin-left: 4px; }
.st-tl-group:last-child { border-left-color: transparent; }
.st-tl-date { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.st-tl-dot { position: absolute; left: -7px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.st-tl-n { color: var(--text-faint); font-weight: 500; }
.st-tl-items { display: flex; flex-direction: column; }

/* 테마 지도 (트리맵) */
.st-tree { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; }
.st-tree-cell { position: absolute; border: none; border-radius: 5px; cursor: pointer; overflow: hidden; padding: 7px 9px; text-align: left; transition: filter .12s; }
.st-tree-cell:hover { filter: brightness(1.08); }
.st-tree-lbl { display: flex; flex-direction: column; gap: 1px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.st-tree-lbl b { font-size: 13px; font-weight: 600; line-height: 1.2; }
.st-tree-lbl i { font-family: var(--mono); font-size: 11px; font-style: normal; opacity: .85; }

/* 테마 추이 */
.st-trend { width: 100%; }
.st-trend-svg { display: block; }
.st-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.st-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.st-legend-sw { width: 11px; height: 11px; border-radius: 3px; }

/* 허브 랭킹 */
.st-hubs { display: flex; flex-direction: column; gap: 8px; }
.st-hub { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 12px; font: inherit; background: none; border: none; padding: 5px 0; cursor: pointer; text-align: left; }
.st-hub-name { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-hub-name .st-atom-dot { margin-top: 0; }
.st-hub-track { display: flex; height: 16px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.st-hub-solo { background: var(--accent); opacity: .42; }
.st-hub-bridge { background: var(--accent); }
.st-hub:hover .st-hub-solo, .st-hub:hover .st-hub-bridge { filter: brightness(1.08); }
.st-hub-val { font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.st-hub-val i { font-style: normal; color: var(--accent-bright); }

@media (max-width: 640px) {
  .st-hub { grid-template-columns: 100px 1fr auto; gap: 8px; }
  .st-inner { padding: 22px 16px 80px; }
}

/* ── 운동(workout) 뷰 — 애슬레틱 데이터 콘솔 (모바일 퍼스트) ── */
@keyframes wkRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes wkGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wkPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

.wk-root { max-width: 820px; margin: 0 auto; padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
.wk-empty { font-size: 13.5px; color: var(--text-3); padding: 34px 6px; text-align: center; line-height: 1.6; }
.wk-empty b { color: var(--accent-bright); font-weight: 620; }

/* 상단바 */
.wk-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.wk-topbar h2 { position: relative; font-size: 25px; font-weight: 760; color: var(--text); letter-spacing: -.025em; padding-bottom: 3px; }
.wk-topbar h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 3px; border-radius: 3px; background: var(--accent); }

/* 서브탭(세그먼트) */
.wk-tabs { display: flex; gap: 3px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 20px; }
.wk-tabs button { flex: 1; height: 40px; border-radius: 999px; background: transparent; color: var(--text-2); font-size: 14px; font-weight: 580; letter-spacing: -.01em; transition: background .18s, color .18s; }
.wk-tabs button.on { background: var(--surface); color: var(--text); font-weight: 680; box-shadow: var(--shadow); }

.wk-list { display: flex; flex-direction: column; gap: 12px; }

/* ── 세션 카드(조회) ── */
.wk-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; animation: wkRise .3s ease both; }
.wk-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--wk-acc, var(--accent)); opacity: .9; }
.wk-card-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px 15px 18px; background: transparent; text-align: left; transition: background .15s; }
.wk-card-head:active { background: var(--hover); }
.wk-card-date { display: flex; flex-direction: column; align-items: center; min-width: 46px; }
.wk-card-date strong { font-size: 16px; font-weight: 720; color: var(--text); font-feature-settings: "tnum"; letter-spacing: -.02em; }
.wk-dow { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.wk-card-stat { display: flex; gap: 14px; flex: 1; }
.wk-card-stat span { font-size: 12px; color: var(--text-3); }
.wk-card-stat b { font-size: 15px; font-weight: 680; color: var(--text); margin-right: 2px; font-feature-settings: "tnum"; }
.wk-chev { font-size: 22px; color: var(--text-3); line-height: 1; transition: transform .2s; transform: rotate(90deg); }
.wk-chev.open { transform: rotate(-90deg); }

.wk-card-logs { list-style: none; margin: 0; padding: 0 16px 14px; display: flex; flex-direction: column; gap: 7px; }
.wk-card-logs li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.wk-log-name { color: var(--text); font-weight: 540; }
.wk-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.wk-log-sets { margin-left: auto; font-size: 12px; color: var(--text-3); font-feature-settings: "tnum"; }

.wk-card-detail { border-top: 1px solid var(--line); padding: 14px 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.wk-detail-ex { display: flex; flex-direction: column; gap: 6px; }
.wk-detail-exname { font-size: 13.5px; font-weight: 620; color: var(--text); }
.wk-detail-sets { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-detail-set { font-size: 12.5px; font-family: var(--mono); padding: 3px 9px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.wk-detail-set.skip { opacity: .42; text-decoration: line-through; }
.wk-card-memo { padding: 10px 12px; background: var(--surface); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2); line-height: 1.5; }
.wk-card-actions { display: flex; gap: 8px; }
.wk-card-actions button { flex: 1; height: 44px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13.5px; font-weight: 560; transition: background .15s, color .15s; }
.wk-card-actions button:active { background: var(--surface-3); }
.wk-card-actions .wk-danger { color: #B5453A; border-color: rgba(181,69,58,.28); }
.wk-card-actions .wk-danger:active { background: rgba(181,69,58,.08); }

/* ── 세션 작성/편집 폼 ── */
.wk-formhead { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.wk-formhead h2 { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.wk-back { width: 40px; height: 40px; flex-shrink: 0; margin-left: -10px; display: grid; place-items: center; border-radius: 999px; background: transparent; color: var(--text-2); transition: background .15s, color .15s; }
.wk-back:active { background: var(--hover); color: var(--text); }
.wk-form { display: flex; flex-direction: column; gap: 14px; }
.wk-form-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wk-date { height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--text); font-size: 15px; outline: none; transition: border-color .15s; }
.wk-date:focus { border-color: var(--accent-line); }
.wk-form-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 16px; color: var(--text-3); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.wk-form-empty p { font-size: 13.5px; line-height: 1.5; }

/* 종목 카드 */
.wk-ex { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.wk-ex-head { display: flex; align-items: center; gap: 9px; }
.wk-ex-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; }
.wk-ex-title { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 640; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ex-cattag { flex-shrink: 0; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-3); font-size: 11px; font-weight: 600; }
.wk-ex-del { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius-sm); background: transparent; color: var(--text-3); font-size: 16px; transition: background .15s; }
.wk-ex-del:active { background: var(--hover); }

/* 세트 표 — 라벨/행 동일 그리드. [세트#] [무게+단위] [×] [횟수] [✓] [✕] */
.wk-set-labels, .wk-set-row { display: grid; grid-template-columns: 26px 1fr 16px 1fr 44px 30px; gap: 7px; align-items: center; }
.wk-set-row { position: relative; }
.wk-set-labels { padding: 0 2px; }
.wk-set-labels span { font-size: 10.5px; font-weight: 600; color: var(--text-3); text-align: center; text-transform: uppercase; letter-spacing: .03em; }
.wk-set-no { text-align: center; font-size: 13px; font-weight: 660; color: var(--text-3); font-feature-settings: "tnum"; transition: color .15s; }
.wk-set-row.done .wk-set-no { color: var(--ok); }
/* 완료된 세트: 좌측 액센트 바 + 입력칸 옅은 초록 틴트 */
.wk-set-row.done::before { content: ""; position: absolute; left: -7px; top: 6px; bottom: 6px; width: 2.5px; border-radius: 2px; background: var(--ok); opacity: .9; }
.wk-set-in { width: 100%; height: 44px; padding: 0 6px; text-align: center; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--text); font-size: 15px; outline: none; transition: border-color .15s, background .15s; }
.wk-set-in:focus { border-color: var(--accent-line); background: var(--surface); }
.wk-set-row.done .wk-set-in { background: color-mix(in srgb, var(--ok) 7%, var(--surface-2)); border-color: color-mix(in srgb, var(--ok) 26%, var(--line-2)); }
/* 무게칸: 입력 + 단위 토글 버튼을 한 셀에 겹쳐 배치 */
.wk-set-field { position: relative; }
.wk-set-field .wk-set-in { padding-right: 34px; }
.wk-set-unit-btn { position: absolute; right: 4px; top: 4px; bottom: 4px; min-width: 28px; padding: 0 5px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); color: var(--text-3); font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1; transition: background .15s, color .15s, border-color .15s; }
.wk-set-unit-btn:active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-bright); }
.wk-set-row.done .wk-set-unit-btn { color: var(--ok); }
/* 무게 × 횟수 사이 곱셈 글리프 */
.wk-set-x { text-align: center; font-size: 13px; font-weight: 600; color: var(--text-faint); font-feature-settings: "tnum"; pointer-events: none; user-select: none; }
.wk-set-check { width: 100%; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-3); font-size: 16px; font-weight: 700; transition: background .15s, color .15s, border-color .15s; }
.wk-set-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.wk-set-del { width: 100%; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: transparent; color: var(--text-3); font-size: 20px; line-height: 1; transition: background .15s, color .15s; }
.wk-set-del:active { background: var(--hover); color: #B5453A; }
.wk-addset { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--text-2); font-size: 13.5px; font-weight: 560; transition: background .15s; }
.wk-addset:active { background: var(--surface-3); color: var(--text); }

/* 직전기록 힌트(탭하면 빈칸 자동입력) + PR 배지 */
.wk-set-line { position: relative; }
.wk-set-hint { display: inline-flex; align-items: center; gap: 5px; margin: 2px 0 4px 33px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 10.5px; color: var(--text-3); font-feature-settings: "tnum"; transition: background .15s, color .15s, border-color .15s; }
.wk-set-hint:active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-bright); }
.wk-set-hint-fill { font-size: 9.5px; font-weight: 600; color: var(--text-faint); }
.wk-pr-badge { position: absolute; top: 8px; right: 84px; font-size: 14px; line-height: 1; pointer-events: none; filter: drop-shadow(0 0 3px var(--accent, #c8a96a)); animation: wk-pr-pop .25s ease; }
@keyframes wk-pr-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.wk-addex { height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--radius); background: var(--accent-soft); border: 1px dashed var(--accent-line); color: var(--accent-bright); font-size: 14.5px; font-weight: 620; transition: filter .15s; }
.wk-addex:active { filter: brightness(.97); }
.wk-memo-in { min-height: 66px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; font-family: inherit; line-height: 1.5; outline: none; resize: vertical; transition: border-color .15s; }
.wk-memo-in:focus { border-color: var(--accent-line); }
.wk-memo-in::placeholder { color: var(--text-3); }

/* 하단 고정 저장바 */
.wk-form-bar { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px 0 calc(8px + env(safe-area-inset-bottom)); margin-top: 2px; background: linear-gradient(180deg, transparent, var(--bg) 26%); }
.wk-form-sum { display: flex; justify-content: center; gap: 18px; font-size: 12.5px; color: var(--text-3); font-feature-settings: "tnum"; }
.wk-form-sum b { color: var(--accent-bright); font-weight: 680; font-size: 14px; margin-right: 1px; }
.wk-form-actions { display: flex; gap: 10px; }
.wk-btn-ghost { height: 50px; padding: 0 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); font-size: 15px; font-weight: 560; transition: background .15s; }
.wk-btn-ghost:active { background: var(--surface-3); }
.wk-btn-primary { flex: 1; height: 50px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-size: 15.5px; font-weight: 680; box-shadow: var(--shadow-pop); transition: filter .15s, transform .1s; }
.wk-btn-primary:active { transform: scale(.99); filter: brightness(1.05); }
.wk-btn-primary:disabled, .wk-btn-ghost:disabled { opacity: .55; }
.wk-btn-end { flex: 1; height: 50px; border-radius: var(--radius); background: var(--ok); color: #fff; font-size: 15.5px; font-weight: 680; box-shadow: var(--shadow-pop); transition: filter .15s, transform .1s; }
.wk-btn-end:active { transform: scale(.99); filter: brightness(1.05); }
.wk-btn-end:disabled { opacity: .55; }

/* ── 라이브(진행중) 세션 ── */
.wk-live-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.wk-live-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: wk-live-pulse 1.6s ease-out infinite; flex-shrink: 0; }
@keyframes wk-live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.wk-live-elapsed { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--text); font-feature-settings: "tnum"; letter-spacing: .02em; }
.wk-live-tag { margin-left: auto; font-size: 11.5px; font-weight: 620; color: var(--accent-bright); text-transform: uppercase; letter-spacing: .05em; }

/* 휴식 타이머(폼 하단 고정) */
.wk-rest { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--accent-line); box-shadow: var(--shadow-pop); }
.wk-rest.done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.wk-rest-adj { width: 48px; height: 42px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); font-family: var(--mono); font-size: 13px; font-weight: 600; }
.wk-rest-adj:active { background: var(--hover); }
.wk-rest-adj:disabled { opacity: .4; }
.wk-rest-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wk-rest-time { font-family: var(--mono); font-size: 21px; font-weight: 600; color: var(--text); font-feature-settings: "tnum"; }
.wk-rest.done .wk-rest-time { color: var(--ok); font-size: 18px; }
.wk-rest-lbl { font-size: 11px; color: var(--text-3); }
.wk-rest-x { width: 38px; height: 42px; border-radius: var(--radius-sm); background: transparent; border: 0; color: var(--text-faint); font-size: 16px; }
.wk-rest-x:active { color: var(--text); }
/* 휴식 기본시간 선택(라이브 헤더) — pill + 커스텀 캐럿 */
.wk-rest-set { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px 0 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--accent-line); box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: border-color .15s, background .15s, box-shadow .15s; }
.wk-rest-set:active { background: var(--hover); }
.wk-rest-set:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.wk-rest-set-lbl { font-size: 9.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.wk-rest-set-sel { appearance: none; -webkit-appearance: none; background: transparent; border: 0; outline: none; margin: 0; padding: 0 15px 0 0; font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--accent-bright); font-feature-settings: "tnum"; cursor: pointer; line-height: 1; }
.wk-rest-set::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; margin-top: -4px; border-right: 1.7px solid var(--accent-bright); border-bottom: 1.7px solid var(--accent-bright); transform: rotate(45deg); opacity: .8; pointer-events: none; }

/* 재개 배너 / 운동 시작 CTA */
.wk-resume { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.wk-resume-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wk-resume-t { font-size: 11.5px; font-weight: 620; color: var(--accent-bright); text-transform: uppercase; letter-spacing: .04em; }
.wk-resume-elapsed { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--text); font-feature-settings: "tnum"; }
.wk-resume-go { margin-left: auto; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13.5px; font-weight: 660; flex-shrink: 0; }
.wk-resume-go:active { filter: brightness(1.06); }
.wk-resume-end { height: 40px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; font-weight: 560; flex-shrink: 0; }
.wk-resume-end:active { background: var(--surface-3); }
.wk-resume-x { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: transparent; border: 0; color: var(--text-faint); flex-shrink: 0; }
.wk-resume-x:active { color: var(--danger, #d9534f); background: var(--hover); }
.wk-start-cta { width: 100%; height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-size: 15.5px; font-weight: 680; box-shadow: var(--shadow-pop); transition: filter .15s, transform .1s; }
.wk-start-cta:active { transform: scale(.99); filter: brightness(1.06); }

/* ── 통계 ── */
.wk-stats { display: flex; flex-direction: column; gap: 14px; }

/* 이번주 펄스(히어로) */
.wk-pulse { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-pop); animation: wkRise .3s ease both; }
.wk-pulse-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 20px 8px; background: var(--surface); }
.wk-pulse-n { font-size: 28px; font-weight: 780; color: var(--text); font-feature-settings: "tnum"; letter-spacing: -.03em; line-height: 1; }
.wk-pulse-cell:first-child .wk-pulse-n { color: var(--accent-bright); }
.wk-pulse-l { font-size: 11px; font-weight: 540; color: var(--text-3); letter-spacing: .01em; }

/* 패널 공통 */
.wk-stats-grid { display: flex; flex-direction: column; gap: 14px; }
.wk-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 18px; animation: wkRise .34s ease both; }
.wk-panel-h { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: -.01em; margin-bottom: 14px; }
.wk-panel-sub { font-size: 11px; font-weight: 540; color: var(--text-3); }

/* 도넛 + 범례 */
.wk-donut-row { display: flex; align-items: center; gap: 18px; }
.wk-donut { width: 122px; height: 122px; flex-shrink: 0; animation: wkPop .4s ease both; }
.wk-donut-num { font-size: 30px; font-weight: 780; fill: var(--text); font-feature-settings: "tnum"; letter-spacing: -.03em; }
.wk-donut-lbl { font-size: 11px; font-weight: 540; fill: var(--text-3); }
.wk-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.wk-legend-item { display: flex; align-items: center; gap: 8px; }
.wk-legend-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 3px; }
.wk-legend-lbl { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-legend-pct { font-size: 12.5px; font-weight: 660; color: var(--text); font-feature-settings: "tnum"; }

/* 주간 추이 */
.wk-trend { display: flex; align-items: flex-end; gap: 6px; height: 124px; }
.wk-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.wk-trend-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.wk-trend-bar { width: 100%; border-radius: 5px 5px 2px 2px; background: var(--surface-3); transition: height .45s cubic-bezier(.2,.7,.2,1); transform-origin: bottom; animation: wkGrow .5s ease both; }
.wk-trend-bar.now { background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line); }
.wk-trend-x { font-size: 9px; color: var(--text-faint); font-feature-settings: "tnum"; white-space: nowrap; }

/* 막대 차트 */
.wk-bars { display: flex; flex-direction: column; gap: 11px; }
.wk-bar-row { display: grid; grid-template-columns: 78px 1fr 60px; gap: 10px; align-items: center; }
.wk-bar-lbl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.wk-bar-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 3px; }
.wk-bar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wk-rank { width: 17px; height: 17px; flex-shrink: 0; display: grid; place-items: center; border-radius: 5px; background: var(--surface-3); color: var(--text-3); font-size: 10.5px; font-weight: 760; font-feature-settings: "tnum"; }
.wk-rank.r1 { background: var(--accent); color: var(--accent-ink); }
.wk-rank.r2 { background: var(--accent-soft); color: var(--accent-bright); }
.wk-rank.r3 { background: var(--accent-soft); color: var(--accent-bright); }
.wk-bar-track { height: 13px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wk-bar-fill { height: 100%; border-radius: 999px; min-width: 4px; transform-origin: left; animation: wkGrow .5s cubic-bezier(.2,.7,.2,1) both; transition: width .4s ease; }
.wk-bar-val { font-size: 12px; font-weight: 560; color: var(--text-2); text-align: right; font-feature-settings: "tnum"; }

/* ── 루틴 ── */
.wk-routines { display: flex; flex-direction: column; gap: 12px; }
.wk-routine { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wk-routine-head { display: flex; align-items: baseline; gap: 10px; }
.wk-routine-head strong { font-size: 16px; font-weight: 680; color: var(--text); }
.wk-routine-n { font-size: 12px; color: var(--text-3); }
.wk-routine-ex { display: flex; flex-wrap: wrap; gap: 7px; }
.wk-chip { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.wk-routine-start { height: 46px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-bright); font-size: 14.5px; font-weight: 640; transition: filter .15s; }
.wk-routine-start:active { filter: brightness(.97); }
.wk-routine-head .wk-routine-icon { margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); transition: background .15s, color .15s; }
.wk-routine-head .wk-routine-icon + .wk-routine-icon { margin-left: 6px; }
.wk-routine-icon:active { background: var(--surface-3); }
.wk-routine-icon-del:active { color: #C24F7A; }
.wk-routine-new { height: 48px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--radius); background: var(--accent-soft, var(--surface-2)); border: 1px dashed var(--accent-line, var(--line-2)); color: var(--accent-bright, var(--text-2)); font-size: 14.5px; font-weight: 640; transition: filter .15s; }
.wk-routine-new:active { filter: brightness(.97); }
.wk-chip { display: inline-flex; align-items: baseline; gap: 6px; }
.wk-chip-tmpl { font-size: 11px; color: var(--text-3); font-feature-settings: "tnum"; }

/* ── 루틴 생성/편집 폼 ── */
.wk-rt-name { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 15.5px; font-weight: 560; }
.wk-rt-ex { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.wk-rt-move { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-3); font-size: 11px; line-height: 1; transition: background .15s; }
.wk-rt-move:active { background: var(--surface-3); }
.wk-rt-move:disabled { opacity: .35; }
.wk-rt-ex .wk-ex-head .wk-rt-move:first-of-type { margin-left: auto; }
.wk-rt-fields { display: flex; gap: 10px; }
.wk-rt-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.wk-rt-field > span { font-size: 11.5px; color: var(--text-3); font-weight: 560; }
.wk-rt-field input { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 15px; text-align: center; font-feature-settings: "tnum"; }

/* ── 현재 세션을 루틴으로 저장 ── */
.wk-save-routine { width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--text-2); font-size: 13.5px; font-weight: 600; transition: background .15s; }
.wk-save-routine:active { background: var(--surface-3); }
.wk-save-routine:disabled { opacity: .5; }

/* ── 로그 캘린더 ── */
.wk-cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wk-cal-nav { display: inline-flex; align-items: center; gap: 6px; }
.wk-cal-navbtn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 20px; line-height: 1; transition: background .15s; }
.wk-cal-navbtn:active { background: var(--surface-3); }
.wk-cal-today { height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 560; transition: background .15s; }
.wk-cal-today:active { background: var(--surface-3); }
.wk-cal-title { font-size: 17px; font-weight: 680; color: var(--text); font-feature-settings: "tnum"; }

.wk-cal-grid { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.wk-cal-wdh { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.wk-cal-wd { font-size: 11px; font-weight: 600; color: var(--text-3); text-align: center; padding: 8px 0; }
.wk-cal-wd.wknd { color: var(--text-faint); }
.wk-cal-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.wk-cal-cell { min-height: 62px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wk-cal-cell:nth-child(7n) { border-right: none; }
.wk-cal-body > .wk-cal-cell:nth-last-child(-n+7) { border-bottom: none; }
.wk-cal-cell.has { cursor: pointer; }
.wk-cal-cell.has:active { background: var(--hover); }
.wk-cal-num { font-size: 12.5px; font-weight: 600; color: var(--text-2); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; font-feature-settings: "tnum"; }
.wk-cal-cell.other { background: var(--surface-2); }
.wk-cal-cell.other .wk-cal-num { color: var(--text-faint); }
.wk-cal-cell.wknd:not(.other) .wk-cal-num { color: var(--text-3); }
.wk-cal-cell.today .wk-cal-num { color: var(--accent-ink); background: var(--accent); }
.wk-cal-mark { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.wk-cal-dots { display: flex; gap: 3px; }
.wk-cal-dot { width: 6px; height: 6px; border-radius: 50%; }
.wk-cal-sets { font-size: 9.5px; font-weight: 600; color: var(--text-3); font-feature-settings: "tnum"; }

/* ── 날짜 시트 ── */
.wk-sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); }
.wk-sheet { width: 100%; max-width: 560px; max-height: 78vh; overflow-y: auto; background: var(--bg); border-top-left-radius: 18px; border-top-right-radius: 18px; padding: 16px 14px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px -16px rgba(0,0,0,.5); }
.wk-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wk-sheet-date { font-size: 16px; font-weight: 680; color: var(--text); font-feature-settings: "tnum"; }
.wk-sheet-x { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 20px; line-height: 1; }
.wk-sheet-x:active { background: var(--surface-3); }
.wk-sheet-list { display: flex; flex-direction: column; gap: 12px; }

/* ── 종목 선택 picker(바텀시트) ── */
.wk-pick-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); padding-bottom: var(--wk-kb, 0px); transition: padding-bottom .18s ease; }
.wk-pick { width: 100%; max-width: 560px; height: 86vh; max-height: calc(100dvh - var(--wk-kb, 0px) - 12px); display: flex; flex-direction: column; background: var(--bg); border-top-left-radius: 18px; border-top-right-radius: 18px; box-shadow: 0 -12px 40px -16px rgba(0,0,0,.5); overflow: hidden; }
.wk-pick-search input[type="search"]::-webkit-search-decoration,
.wk-pick-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.wk-pick-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.wk-pick-title { font-size: 16px; font-weight: 680; color: var(--text); }
.wk-pick-x { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); }
.wk-pick-x:active { background: var(--surface-3); }
.wk-pick-search { display: flex; align-items: center; gap: 8px; margin: 0 16px; padding: 0 12px; height: 44px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--text-3); }
.wk-pick-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font-size: 15px; font-family: inherit; }
.wk-pick-clear { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--text-2); }
.wk-pick-chips { display: flex; gap: 7px; overflow-x: auto; padding: 12px 16px 10px; scrollbar-width: none; }
.wk-pick-chips::-webkit-scrollbar { display: none; }
.wk-pick-chip { flex-shrink: 0; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; font-weight: 560; transition: background .15s, color .15s, border-color .15s; }
.wk-pick-chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-bright); }
.wk-pick-list { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.wk-pick-group { margin-bottom: 6px; }
.wk-pick-grouphd { position: sticky; top: 0; padding: 8px 2px 5px; background: var(--bg); font-size: 11.5px; font-weight: 680; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; z-index: 1; }
.wk-pick-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: var(--radius-sm); background: transparent; border: 0; text-align: left; transition: background .12s; }
.wk-pick-item:active { background: var(--hover); }
.wk-pick-item.on { background: var(--accent-soft); }
.wk-pick-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; }
.wk-pick-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 560; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-pick-badge { flex-shrink: 0; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); font-size: 10.5px; font-weight: 600; }
.wk-pick-added-tag { flex-shrink: 0; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-bright); font-size: 10.5px; font-weight: 600; }
.wk-pick-check { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1.6px solid var(--line-strong); color: transparent; transition: background .12s, border-color .12s, color .12s; }
.wk-pick-item.on .wk-pick-check { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--accent-ink); }
.wk-pick-empty { padding: 32px 0; text-align: center; color: var(--text-3); font-size: 13.5px; }
.wk-pick-new { width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 10px; margin-bottom: 4px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px dashed var(--accent-line); color: var(--accent-bright); font-size: 14px; font-weight: 560; }
.wk-pick-new b { font-weight: 700; }
.wk-pick-newcat { padding: 12px 10px; margin-bottom: 6px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.wk-pick-newcat-lbl { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.wk-pick-newcat-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.wk-pick-newcat-chips button { height: 34px; padding: 0 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-size: 13px; font-weight: 560; }
.wk-pick-newcat-chips button:active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-bright); }
.wk-pick-newcat-chips button:disabled { opacity: .5; }
.wk-pick-bar { display: flex; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--surface); }
.wk-pick-bar .wk-btn-ghost { flex: 0 0 auto; min-width: 88px; }
.wk-pick-bar .wk-btn-primary { flex: 1; }

/* 데스크탑 — 2단 통계 그리드 + 넉넉한 캘린더 */
@media (min-width: 720px) {
  .wk-root { max-width: 1200px; padding: 28px 24px 80px; }
  .wk-cal-cell { min-height: 88px; }
  .wk-cal-num { font-size: 13.5px; }
  .wk-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .wk-pulse-n { font-size: 32px; }
  .wk-pulse-cell { padding: 24px 8px; }
  .wk-donut { width: 130px; height: 130px; }
  .wk-form-actions { justify-content: flex-end; }
  .wk-btn-primary { flex: 0 0 auto; min-width: 200px; }
}
@media (hover: hover) {
  .wk-card-head:hover { background: var(--hover); }
  .wk-pick-item:hover { background: var(--hover); }
  .wk-routine-start:hover, .wk-addex:hover { filter: brightness(.98); }
}

/* ───────── 다이어그램 보관함 (window.SBDiagrams) ───────── */
.dg-page { padding: 28px 32px 64px; max-width: 1180px; margin: 0 auto; width: 100%; }
.dg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dg-h1 { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--text); margin: 0; }
.dg-sub { color: var(--text-3); font-size: 13px; margin: 6px 0 0; }

.dg-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); border-radius: 9px; padding: 8px 14px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.dg-btn:hover { background: var(--hover); }
.dg-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dg-btn.primary:hover { background: var(--accent-bright); }
.dg-btn.danger { color: var(--danger); border-color: var(--line); }
.dg-btn.danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.dg-btn.ghost { background: transparent; }
.dg-btn:disabled { opacity: .55; cursor: default; }

.dg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.dg-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; }
.dg-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.dg-card-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 0; }
.dg-badge { font-family: var(--mono); font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-bright); border: 1px solid var(--accent-line); }
.dg-card-del { background: transparent; border: 0; color: var(--text-faint); cursor: pointer; padding: 3px; border-radius: 5px; }
.dg-card-del:hover { color: var(--danger); background: var(--hover); }
.dg-card-preview { height: 150px; margin: 10px 12px; border-radius: var(--radius-sm); background: var(--bg);
  border: 1px solid var(--line-2); overflow: hidden; position: relative; }
.dg-card-scale { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; padding: 8px; }
.dg-card-scale .dg-mermaid svg, .dg-card-scale img, .dg-card-scale iframe { max-width: 100%; max-height: 134px; }
.dg-card-scale iframe { width: 100%; height: 100%; border: 0; }
.dg-card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 14px 13px; }
.dg-card-title { font-size: 14px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-card-date { font-family: var(--mono); font-size: 11px; color: var(--text-faint); flex-shrink: 0; }

.dg-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 80px 20px; color: var(--text-3); text-align: center; }
.dg-empty p { margin: 0; font-size: 14px; }

/* 렌더러 공통 */
.dg-mermaid { display: flex; justify-content: center; }
.dg-mermaid svg { max-width: 100%; height: auto; }
.dg-img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.dg-html { width: 100%; min-height: 120px; border: 0; background: #fff; border-radius: var(--radius-sm); }
.dg-excalidraw { width: 100%; height: 68vh; min-height: 360px; border: 0; background: var(--bg); border-radius: var(--radius-sm); }
.dg-card-scale .dg-excalidraw.thumb { width: 100%; height: 100%; min-height: 0; pointer-events: none; }
.dg-err, .dg-err-msg { color: var(--danger); font-size: 12px; font-family: var(--mono); white-space: pre-wrap; word-break: break-word; }
.dg-err { padding: 10px; }

/* 전체 보기 */
.dg-full { display: flex; flex-direction: column; height: 100%; }
.dg-full-bar { display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.dg-back { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; color: var(--text-2); cursor: pointer; font-size: 13px; }
.dg-back:hover { color: var(--text); }
.dg-full-title { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--text); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-full-actions { display: flex; gap: 8px; }
.dg-full-summary { flex: 0 0 auto; padding: 14px 32px; border-bottom: 1px solid var(--line); color: var(--text-2);
  font-size: 14px; line-height: 1.6; white-space: pre-wrap; background: var(--surface-2); }
.dg-full-stage { flex: 1; overflow: auto; padding: 32px; }

/* 에디터 모달 */
.dg-modal-scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px; }
.dg-modal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); width: min(640px, 100%);
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow-pop); padding: 20px; }
.dg-modal-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--serif); font-size: 17px;
  font-weight: 600; color: var(--text); margin-bottom: 16px; }
.dg-x { background: transparent; border: 0; color: var(--text-3); cursor: pointer; padding: 2px; }
.dg-x:hover { color: var(--text); }
.dg-fmt-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.dg-fmt-tab { flex: 1; padding: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2);
  border-radius: 8px; cursor: pointer; font-size: 13px; }
.dg-fmt-tab.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-bright); font-weight: 500; }
.dg-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 14px; font-family: var(--sans); margin-bottom: 12px; }
.dg-textarea { width: 100%; box-sizing: border-box; min-height: 150px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  resize: vertical; margin-bottom: 12px; }
.dg-summary { width: 100%; box-sizing: border-box; min-height: 52px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 13.5px; line-height: 1.5;
  resize: vertical; margin-bottom: 12px; }
.dg-input:focus, .dg-textarea:focus, .dg-summary:focus { outline: none; border-color: var(--accent-line); }
.dg-file { margin-bottom: 12px; }
.dg-file input { color: var(--text-2); font-size: 13px; }
.dg-hint { color: var(--text-faint); font-size: 11.5px; margin-top: 6px; }
.dg-preview-box { border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg); padding: 16px;
  margin-bottom: 12px; max-height: 320px; overflow: auto; }
.dg-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

@media (max-width: 720px) {
  .dg-page { padding: 18px 16px 56px; }
  .dg-full-bar, .dg-full-stage { padding-left: 16px; padding-right: 16px; }
  .dg-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .dg-card-preview { height: 110px; }
}

/* 복사 등 짧은 피드백 토스트 — 화면 하단 가운데, 자동 사라짐. */
.sb-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  transform: translate(-50%, 12px);
  background: var(--text);
  color: var(--bg);
  font: 600 13px/1 var(--font-ui, inherit);
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .18s ease, transform .18s ease;
}
.sb-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── 브리핑 구독 뷰 ── */
.brief-wrap { max-width: 720px; margin: 0 auto; padding: 24px 18px 60px; }
.brief-title { font-size: 20px; font-weight: 700; margin: 4px 0 2px; color: var(--text); }
.brief-sub { font-size: 13px; color: var(--text-2); margin: 0 0 18px; }
.brief-list { display: flex; flex-direction: column; gap: 12px; }
.brief-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.brief-info { min-width: 0; }
.brief-name { font-size: 15px; font-weight: 600; color: var(--text); }
.brief-sched { font-size: 12px; color: var(--accent); margin-top: 2px; }
.brief-desc { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.brief-empty { padding: 48px 0; text-align: center; color: var(--text-2); font-size: 14px; }

/* 브리핑 토글(자체 스타일 — tweaks 패널 의존 제거) */
.brief-toggle { position: relative; width: 46px; height: 28px; border: 0; border-radius: 999px;
  background: var(--line-strong, #c7c7cc); cursor: pointer; flex: 0 0 auto; padding: 0; transition: background .15s; }
.brief-toggle[data-on="1"] { background: #34c759; }
.brief-toggle i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.brief-toggle[data-on="1"] i { transform: translateX(18px); }

/* ── 지난 브리핑(히스토리) 아코디언 ── */
.brief-hist-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 30px 0 2px; }
.brief-hist-list { display: flex; flex-direction: column; gap: 8px; }
.brief-hist-item { background: var(--card, #fff); border: 1px solid var(--line, #e5e5ea);
  border-radius: 12px; overflow: hidden; }
.brief-hist-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  cursor: pointer; list-style: none; font-size: 14px; user-select: none; }
.brief-hist-head::-webkit-details-marker { display: none; }
.brief-hist-head::after { content: "›"; margin-left: auto; color: var(--text-2);
  font-size: 18px; transition: transform .15s; }
.brief-hist-item[open] .brief-hist-head::after { transform: rotate(90deg); }
.brief-hist-badge { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft, rgba(10,132,255,.12)); border-radius: 999px; padding: 2px 9px; }
.brief-hist-date { font-weight: 600; color: var(--text); }
.brief-hist-name { color: var(--text-2); font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.brief-hist-body { padding: 0 14px 14px; font-size: 14px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word; border-top: 1px solid var(--line, #e5e5ea); padding-top: 12px; }

/* ── 브리핑 카드 펼침(per-card 아코디언) ── */
.brief-card-wrap { display: flex; flex-direction: column; }
.brief-card.expanded { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
/* 카드 본문을 클릭 영역(버튼)으로 — 버튼 기본 스타일 리셋 */
.brief-info-btn { flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: 0;
  padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.brief-name { display: flex; align-items: center; gap: 6px; }
.brief-chev { color: var(--text-2); font-size: 18px; line-height: 1; transition: transform .15s; }
.brief-chev.open { transform: rotate(90deg); }
.brief-acc { border: 1px solid var(--line); border-top: 0; border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px; background: var(--surface); padding: 4px 18px 16px; }
.brief-acc-state { padding: 18px 0 6px; text-align: center; color: var(--text-2); font-size: 13px; }
.brief-acc-timeline { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
.brief-acc-entry { border-left: 2px solid var(--line-strong, #c7c7cc); padding-left: 12px; }
.brief-acc-date { font-size: 13px; font-weight: 600; color: var(--text); display: flex;
  align-items: baseline; gap: 8px; flex-wrap: wrap; }
.brief-acc-name { font-weight: 500; color: var(--text-2); font-size: 12px; }
.brief-acc-body { margin-top: 5px; font-size: 13.5px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word; }

/* ── 브리핑 상세 풀뷰(클릭해서 들어가는 뷰) ── */
.brief-detail-head { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 2px; }
.brief-back { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--text); font-size: 22px;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0 0 2px; }
.brief-back:hover { background: var(--card, #fff); }
.brief-detail-titles { min-width: 0; flex: 1 1 auto; }
.brief-detail-titles .brief-title { margin: 2px 0 0; }
.brief-filter { display: flex; gap: 8px; margin: 16px 0 4px; flex-wrap: wrap; }
.brief-filter-btn { font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  transition: background .12s, color .12s, border-color .12s; }
.brief-filter-btn.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.brief-detail-logs { margin-top: 6px; }
.brief-detail-logs .brief-acc-timeline { padding-top: 6px; }

/* ── 할일 빠른 입력(Brain Dump) ── */
.todo-dump { display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s, background .15s; }
.todo-dump:focus-within { border-color: var(--accent); background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-glow); }
.td-icon { display: inline-flex; color: var(--text-3); flex: 0 0 auto; transition: color .15s; }
.todo-dump:focus-within .td-icon { color: var(--accent); }
.td-input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none;
  font: inherit; font-size: 15px; color: var(--text); padding: 6px 0; letter-spacing: -.01em; }
.td-input::placeholder { color: var(--text-3); }
.td-add { flex: 0 0 auto; border: 0; border-radius: 9px; padding: 8px 16px; font-size: 13.5px;
  font-weight: 650; color: var(--accent-ink); background: var(--accent); cursor: pointer;
  transition: filter .15s, opacity .15s, transform .1s; }
.td-add:hover:not(:disabled) { filter: brightness(1.06); }
.td-add:active:not(:disabled) { transform: scale(.96); }
.td-add:disabled { opacity: .35; cursor: default; }

/* ── 서버 현황 뷰 ── */
/* 자체 스크롤 컨테이너로(다른 뷰와 동일) — stage 를 넘쳐 흐르지 않게 해서
   .stage::before 배경 그라데이션이 한 화면을 항상 꽉 채우도록(모바일 끊김 방지). */
.srv-wrap { max-width: 760px; margin: 0 auto; padding: 24px 18px 60px; height: 100%; overflow-y: auto; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.srv-wrap::-webkit-scrollbar { width: 8px; }
.srv-wrap::-webkit-scrollbar-track { background: transparent; }
.srv-wrap::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.srv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.srv-title { font-size: 20px; font-weight: 700; margin: 4px 0; color: var(--text); }
.srv-fresh { font-size: 12px; color: var(--text-2); }
.srv-fresh.stale { color: #ff9f0a; font-weight: 600; }
.srv-gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.srv-gauge { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.srv-gauge-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.srv-gauge-pct { font-weight: 700; color: var(--text); }
.srv-bar { height: 8px; border-radius: 999px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.srv-bar i { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.srv-gauge-detail { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.srv-subhead { font-size: 14px; font-weight: 600; color: var(--text); margin: 20px 0 8px; }
.srv-clist { display: flex; flex-direction: column; gap: 8px; }
.srv-crow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.srv-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.srv-dot.on { background: #34c759; }
.srv-dot.off { background: var(--text-2); opacity: .5; }
.srv-cinfo { flex: 1 1 auto; min-width: 0; }
.srv-cname { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-cstatus { font-size: 12px; color: var(--text-2); }
.srv-cres { font-size: 12px; color: var(--text-2); text-align: right; flex: 0 0 auto; }
.srv-cdown { color: var(--text-2); opacity: .7; }
.srv-empty { padding: 40px 0; text-align: center; color: var(--text-2); font-size: 14px; }

/* ==형광펜== — 원문 보기 강조. 종이 위에 칠한 노란 형광펜 느낌. */
mark.hl {
  background: linear-gradient(transparent 8%, rgba(255, 221, 87, .55) 8%, rgba(255, 221, 87, .55) 92%, transparent 92%);
  color: inherit;
  padding: 0 .12em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
