:root {
  color-scheme: dark;
  --bg: oklch(0.08 0.01 260);
  --bg-gradient-start: oklch(0.05 0.015 260);
  --bg-gradient-end: oklch(0.12 0.025 280);
  --surface: oklch(0.16 0.015 260);
  --surface-strong: oklch(0.22 0.02 260);
  --ink: oklch(0.94 0.01 95);
  --muted: oklch(0.55 0.02 95);
  --line: oklch(0.28 0.02 260);
  --primary: oklch(0.72 0.18 60);
  --primary-dark: oklch(0.55 0.16 55);
  --accent: oklch(0.62 0.18 288);
  --chinese: oklch(0.72 0.22 20);
  --math: oklch(0.70 0.18 260);
  --english: oklch(0.68 0.17 305);
  --science: oklch(0.72 0.15 165);
  --star-white: oklch(1 0 0);
  --star-blue: oklch(0.85 0.08 240);
  --star-yellow: oklch(0.92 0.12 85);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --topbar-height: 68px;
  --panel-width: 360px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }

body { 
  background: radial-gradient(ellipse at 50% 50%, oklch(0.06 0.015 260) 0%, oklch(0.02 0.005 260) 70%, oklch(0.01 0.003 260) 100%);
  color: var(--ink); 
  overflow: hidden;
}

button, input, select { font: inherit; }
button { color: inherit; }

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--primary) 38%, transparent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.app-shell { height: 100%; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-height); flex: 0 0 var(--topbar-height);
  display: flex; align-items: center; gap: 28px; padding: 0 22px;
  border-bottom: 1px solid rgba(100, 130, 180, 0.25);
  background: rgba(15, 20, 35, 0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(140, 170, 220, 0.08), 0 4px 24px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; min-width: 148px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 16px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 3px; letter-spacing: .14em; }
.brand-mark { width: 34px; height: 34px; position: relative; display: block; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 1.5px solid var(--primary); border-radius: 50%; inset: 8px 1px; transform: rotate(22deg); }
.brand-mark::after { transform: rotate(-34deg); }
.brand-mark i { position: absolute; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; z-index: 1; }
.brand-mark i:nth-child(1) { left: 13px; top: 13px; width: 10px; height: 10px; background: var(--primary-dark); }
.brand-mark i:nth-child(2) { left: 0; top: 14px; }
.brand-mark i:nth-child(3) { right: 2px; top: 5px; width: 6px; height: 6px; }

.search-wrap { position: relative; width: min(570px, 48vw); margin: 0 auto; }
.search-wrap > svg { position: absolute; left: 14px; top: 50%; width: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; pointer-events: none; }
.search-wrap input { width: 100%; height: 40px; padding: 0 75px 0 42px; border: 0; border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--ink); transition: background .18s, box-shadow .18s; }
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap input:focus { background: var(--bg); box-shadow: 0 0 0 1px var(--line); outline: 3px solid color-mix(in oklch, var(--primary) 35%, transparent); }
.search-wrap kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; background: var(--bg); }
.search-results { position: absolute; left: 0; right: 0; top: 48px; max-height: 340px; overflow: auto; padding: 6px; background: rgba(15, 20, 30, 0.98); border: 1px solid rgba(80, 100, 140, 0.5); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(100, 150, 255, 0.1); z-index: 40; backdrop-filter: blur(10px); }
.search-result { width: 100%; border: 0; background: transparent; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; text-align: left; cursor: pointer; color: #ffffff; }
.search-result:hover, .search-result:focus-visible { background: rgba(80, 100, 140, 0.2); }
.search-result i { width: 8px; height: 8px; border-radius: 50%; background: var(--subject-color); box-shadow: 0 0 6px var(--subject-color); }
.search-result span { font-size: 13px; font-weight: 650; color: #ffffff; }
.search-result small { font-size: 11px; color: #88a0c0; }
.fish-easter-egg { position: relative; overflow: hidden; }
.fish-easter-egg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,180,255,0.15), rgba(0,255,200,0.1), rgba(255,200,50,0.1)); opacity: 0; transition: opacity 0.3s; }
.fish-easter-egg:hover::before { opacity: 1; }
.fish-easter-egg i { animation: fishPulse 0.8s ease-in-out infinite; }
@keyframes fishPulse { 0%, 100% { box-shadow: 0 0 6px var(--subject-color); } 50% { box-shadow: 0 0 14px var(--subject-color), 0 0 24px rgba(0,200,255,0.5); } }

.icon-button { width: 38px; height: 38px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon-button:hover { background: var(--surface-strong); }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 用户区 ---------- */
.user-area {
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 auto; margin-left: auto; margin-right: 4px;
}
.user-name {
  font-size: 13px; color: var(--muted); max-width: 100px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.remain-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: rgba(100, 220, 160, 0.12);
  color: rgb(100, 220, 160); white-space: nowrap;
}
.remain-badge.warning {
  background: rgba(255, 180, 80, 0.12);
  color: rgb(255, 180, 80);
}
.remain-badge.expired {
  background: rgba(255, 80, 80, 0.12);
  color: rgb(255, 80, 80);
}
.logout-btn {
  padding: 5px 14px; font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px; color: var(--muted); cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover {
  background: rgba(255, 70, 70, 0.15);
  border-color: rgba(255, 70, 70, 0.35);
  color: #ff7b7b;
}

.workspace { min-height: 0; flex: 1; display: flex; }
.graph-stage {
  --bg-shift-x: 0px;
  --bg-shift-y: 0px;
  position: relative;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  isolation: isolate;
  background: oklch(0.03 0.01 255);
}
.graph-stage::before,
.graph-stage::after { content: ""; position: absolute; pointer-events: none; }
.graph-stage::before {
  z-index: 0;
  inset: -24px;
  background: url("assets/cosmic-background.webp") 50% 46% / cover no-repeat;
  transform: translate3d(var(--bg-shift-x), var(--bg-shift-y), 0) scale(1.025);
  will-change: transform;
}
.graph-stage::after {
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(2, 7, 18, 0.18) 0 26%, rgba(2, 7, 18, 0.42) 70%, rgba(1, 4, 12, 0.62) 100%),
    linear-gradient(180deg, rgba(2, 6, 16, 0.24), rgba(2, 7, 18, 0.44));
}
#graphCanvas { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#graphCanvas:active { cursor: grabbing; }

.filter-bar { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; height: 44px; padding: 5px 7px 5px 14px; border: 1px solid rgba(100, 130, 180, 0.25); border-radius: 12px; background: rgba(15, 20, 35, 0.7); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(140, 170, 220, 0.05); z-index: 5; }
.filter-group { display: flex; align-items: center; gap: 3px; }
.filter-label { font-size: 12px; color: var(--muted); margin-right: 5px; }
.chip { min-width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.chip:hover { color: var(--ink); background: var(--surface-strong); }
.chip.is-active { color: white; background: var(--primary-dark); font-weight: 700; }
.divider { width: 1px; height: 20px; background: var(--line); }
.select-wrap { position: relative; }
.select-wrap select { height: 32px; padding: 0 30px 0 8px; border: 0; background: transparent; color: var(--ink); font-size: 12px; appearance: none; cursor: pointer; }
.select-wrap svg { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; pointer-events: none; }

.stage-copy { position: absolute; z-index: 3; top: 92px; left: 28px; width: 285px; pointer-events: none; padding: 16px 18px; border-radius: 12px; background: rgba(15, 20, 35, 0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(100, 130, 180, 0.12); }
.stage-copy p { color: var(--muted); font-size: 12px; margin: 0 0 9px; }
.stage-copy h1 { font-size: 22px; line-height: 1.35; letter-spacing: -.02em; text-wrap: balance; margin: 0 0 10px; text-shadow: 0 0 30px rgba(140, 170, 220, 0.3); }
.stage-copy #stageHint { font-size: 11px; }

.legend { position: absolute; z-index: 3; left: 24px; bottom: 23px; display: flex; align-items: center; gap: 3px; padding: 6px; background: rgba(15, 20, 35, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(100, 130, 180, 0.2); border-radius: 11px; }
.legend strong { font-size: 11px; color: var(--muted); padding: 0 8px 0 4px; }
.legend button { display: flex; align-items: center; gap: 6px; padding: 6px 7px; border: 0; border-radius: 6px; background: transparent; font-size: 11px; cursor: pointer; }
.legend button:hover { background: rgba(80, 100, 140, 0.2); }
.legend button.is-muted { opacity: .35; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 6px var(--dot); }

.graph-stats { position: absolute; z-index: 3; bottom: 28px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 11px; display: flex; gap: 16px; pointer-events: none; }
.graph-stats b { color: var(--ink); }
.canvas-controls { position: absolute; z-index: 3; right: 18px; bottom: 20px; display: flex; flex-direction: column; border: 1px solid rgba(100, 130, 180, 0.2); border-radius: 9px; overflow: hidden; background: rgba(15, 20, 35, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.canvas-controls button { width: 34px; height: 32px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.canvas-controls button + button { border-top: 1px solid rgba(100, 130, 180, 0.15); }
.canvas-controls button:hover { background: rgba(80, 100, 140, 0.25); }

.node-tooltip { position: absolute; max-width: 250px; padding: 10px 14px; border-radius: 10px; background: rgba(20, 25, 40, 0.95); color: white; font-size: 13px; line-height: 1.5; pointer-events: none; z-index: 100; transform: translate(14px, -50%); border: 1px solid rgba(100, 120, 160, 0.5); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 150, 255, 0.15); backdrop-filter: blur(8px); }
.node-tooltip::before { content: ''; position: absolute; left: -6px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 6px solid rgba(100, 120, 160, 0.5); }
.node-tooltip::after { content: ''; position: absolute; left: -5px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 5px solid rgba(20, 25, 40, 0.95); }
.node-tooltip b { display: block; font-size: 15px; margin-bottom: 4px; font-weight: 600; color: #ffffff; text-shadow: 0 0 10px rgba(100, 150, 255, 0.5); }
.node-tooltip span { color: #a0b0d0; font-size: 12px; }

.detail-panel { width: var(--panel-width); flex: 0 0 var(--panel-width); border-left: 1px solid rgba(100, 130, 180, 0.2); background: rgba(12, 16, 28, 0.75); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3); overflow: auto; z-index: 10; }
.panel-handle { display: none; }
.empty-detail { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 42px; text-align: center; }
.empty-detail h2 { margin: 28px 0 10px; font-size: 18px; }
.empty-detail > p { max-width: 29ch; margin: 0; color: var(--muted); line-height: 1.75; font-size: 13px; }
.orbit-icon { position: relative; width: 72px; height: 72px; }
.orbit-icon::before, .orbit-icon::after { content: ""; position: absolute; inset: 15px 2px; border: 1.5px solid var(--line); border-radius: 50%; transform: rotate(25deg); }
.orbit-icon::after { transform: rotate(-42deg); }
.orbit-icon span { position: absolute; width: 18px; height: 18px; left: 27px; top: 27px; border-radius: 50%; background: var(--primary); }
.orbit-icon i, .orbit-icon b { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--math); }
.orbit-icon i { left: 3px; top: 30px; }
.orbit-icon b { right: 5px; top: 10px; background: var(--chinese); }
.detail-tip { margin-top: 38px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.detail-tip span { color: var(--primary-dark); font-weight: 700; margin-right: 7px; }

.node-detail { min-height: 100%; }
.detail-head { position: relative; padding: 28px 26px 22px; border-bottom: 1px solid var(--line); }
.close-button { position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; color: var(--muted); cursor: pointer; }
.close-button:hover { background: var(--surface-strong); color: var(--ink); }
.topic-meta { display: flex; gap: 7px; padding-right: 30px; }
.topic-meta span { padding: 4px 8px; border-radius: 999px; background: var(--surface-strong); color: var(--muted); font-size: 10px; }
.topic-meta span:first-child { background: color-mix(in oklch, var(--topic-color) 13%, white); color: color-mix(in oklch, var(--topic-color) 78%, black); }
.detail-head h2 { margin: 16px 0 7px; font-size: 22px; line-height: 1.35; letter-spacing: -.02em; text-wrap: balance; }
.detail-head > p { margin: 0; color: var(--muted); font-size: 12px; }
.detail-body { padding: 0 0 16px; }

/* 菜单栏组件 */
.menu-section { border-bottom: 1px solid rgba(100, 130, 180, 0.15); }
.menu-section:last-child { border-bottom: none; }
.menu-header { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 22px; border: 0; background: transparent; cursor: pointer; color: var(--ink); transition: background .18s; }
.menu-header:hover { background: rgba(100, 140, 200, 0.06); }
.menu-num { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 20px; }
.menu-label { font-size: 14px; font-weight: 600; flex: 1; text-align: left; }
.menu-chevron { width: 18px; height: 18px; stroke: var(--muted); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s var(--ease); }
.menu-header.is-expanded .menu-chevron { transform: rotate(180deg); }
.menu-content { padding: 0 22px 16px; }
.menu-content[hidden] { display: none; }

/* 基础标签信息网格 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: rgba(100, 140, 200, 0.06); border-radius: 8px; border: 1px solid rgba(100, 130, 180, 0.12); }
.info-item .info-label { font-size: 10px; color: var(--muted); }
.info-item .info-value { font-size: 12px; color: var(--ink); font-weight: 500; }
.info-item.span-2 { grid-column: 1 / -1; }

/* 图谱逻辑链路三段式 */
.graph-chain { display: flex; flex-direction: column; align-items: center; gap: 0; }
.chain-tier { width: 100%; padding: 12px 14px; border-radius: 10px; text-align: center; }
.chain-tier.prereq { background: rgba(140, 120, 200, 0.1); border: 1px solid rgba(140, 120, 200, 0.2); }
.chain-tier.core { background: rgba(100, 150, 220, 0.15); border: 1px solid rgba(100, 150, 220, 0.3); margin: 8px 0; }
.chain-tier.derived { background: rgba(120, 180, 140, 0.1); border: 1px solid rgba(120, 180, 140, 0.2); }
.chain-tier-label { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.chain-tier.prereq .chain-tier-label { color: oklch(0.62 0.12 280); }
.chain-tier.core .chain-tier-label { color: oklch(0.65 0.14 250); }
.chain-tier.derived .chain-tier-label { color: oklch(0.62 0.12 150); }
.chain-tier-nodes { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.chain-tier-nodes .chain-node { padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; }
.chain-tier.prereq .chain-node { background: rgba(140, 120, 200, 0.2); color: oklch(0.72 0.1 280); }
.chain-tier.core .chain-node { background: rgba(100, 150, 220, 0.25); color: oklch(0.75 0.1 240); font-size: 13px; }
.chain-tier.derived .chain-node { background: rgba(120, 180, 140, 0.2); color: oklch(0.68 0.1 150); }
.chain-tier .chain-node.clickable { cursor: pointer; transition: all .18s; }
.chain-tier .chain-node.clickable:hover { filter: brightness(1.3); transform: scale(1.04); }
.chain-arrow { color: var(--muted); font-size: 16px; line-height: 1; margin: -2px 0; }
.chain-tier .empty-text { color: var(--muted); font-size: 11px; }

/* 核心目标 */
.goal-card { padding: 12px 14px; margin-bottom: 8px; border-radius: 8px; border: 1px solid rgba(100, 130, 180, 0.12); background: rgba(100, 140, 200, 0.05); }
.goal-card:last-child { margin-bottom: 0; }
.goal-card .goal-label { font-size: 10px; font-weight: 600; margin-bottom: 5px; }
.goal-card .goal-label.knowledge { color: oklch(0.68 0.15 250); }
.goal-card .goal-label.ability { color: oklch(0.68 0.15 60); }
.goal-card .goal-label.competency { color: oklch(0.68 0.15 165); }
.goal-card .goal-text { font-size: 12px; color: color-mix(in oklch, var(--ink) 82%, var(--bg)); line-height: 1.6; }

/* 知识内容 */
.knowledge-block { padding: 12px 14px; margin-bottom: 8px; border-radius: 8px; border: 1px solid rgba(100, 130, 180, 0.12); background: rgba(100, 140, 200, 0.05); }
.knowledge-block:last-child { margin-bottom: 0; }
.knowledge-block .kb-label { font-size: 10px; font-weight: 600; margin-bottom: 5px; color: var(--primary-dark); }
.knowledge-block .kb-text { font-size: 12px; color: color-mix(in oklch, var(--ink) 82%, var(--bg)); line-height: 1.7; }
.knowledge-block ul { margin: 0; padding-left: 16px; }
.knowledge-block li { font-size: 12px; color: color-mix(in oklch, var(--ink) 82%, var(--bg)); line-height: 1.7; }
.knowledge-block li + li { margin-top: 4px; }

/* 五步法 */
.five-steps { display: flex; flex-direction: column; gap: 6px; }
.step-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(100, 140, 200, 0.05); border: 1px solid rgba(100, 130, 180, 0.1); }
.step-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: white; }
.step-row:nth-child(1) .step-num { background: oklch(0.55 0.15 260); }
.step-row:nth-child(2) .step-num { background: oklch(0.55 0.15 290); }
.step-row:nth-child(3) .step-num { background: oklch(0.55 0.15 320); }
.step-row:nth-child(4) .step-num { background: oklch(0.55 0.15 150); }
.step-row:nth-child(5) .step-num { background: oklch(0.55 0.15 60); }
.step-body { flex: 1; }
.step-title { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.step-desc { font-size: 11px; color: color-mix(in oklch, var(--ink) 75%, var(--bg)); line-height: 1.6; }

.empty-text { color: var(--muted); font-size: 12px; font-style: italic; }

@media (max-width: 900px) {
  :root { --panel-width: 320px; }
  .brand small { display: none; }
  .brand { min-width: auto; }
  .topbar { gap: 14px; }
  .stage-copy { width: 220px; }
  .stage-copy h1 { font-size: 18px; }
  .graph-stats { display: none; }
}

@media (max-width: 720px) {
  :root { --topbar-height: 60px; }
  .topbar { padding: 0 6px; gap: 6px; }
  .brand { min-width: auto; gap: 4px; }
  .brand strong { display: none; }
  .brand small { display: none; }
  .brand-mark { width: 26px; height: 26px; }
  .search-wrap { flex: 1; min-width: 0; }
  .search-wrap kbd { display: none; }
  .search-wrap input { padding-right: 10px; font-size: 12px; }
  .search-wrap > svg { left: 8px; width: 15px; }
  .search-wrap input { padding-left: 28px; }
  .user-area { gap: 3px; margin-left: 2px; margin-right: 0; }
  .user-name { font-size: 10px; max-width: 40px; }
  .remain-badge { font-size: 8px; padding: 1px 4px; }
  .logout-btn { padding: 3px 6px; font-size: 10px; }
  .icon-button { display: none; }
  .search-results { left: -6px; right: -6px; }
  .search-result span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .search-result small { white-space: nowrap; font-size: 10px; }
  .workspace { position: relative; }
  .filter-bar { left: 10px; right: 10px; transform: none; width: auto; overflow-x: auto; justify-content: flex-start; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .stage-copy { top: 82px; left: 18px; }
  .stage-copy #stageHint { display: none; }
  .legend { left: 12px; bottom: 12px; max-width: calc(100% - 65px); overflow-x: auto; }
  .legend strong { display: none; }
  .detail-panel { position: absolute; left: 0; right: 0; bottom: 0; width: auto; max-height: 72%; border-left: 0; border-top: 1px solid var(--line); transform: translateY(100%); transition: transform .24s var(--ease); border-radius: 16px 16px 0 0; }
  .detail-panel.is-open { transform: translateY(0); }
  .detail-panel.show-handle { transform: translateY(calc(100% - 50px)); }
  .panel-handle { display: none; }
  .detail-panel.show-handle .panel-handle { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 6px; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
  .panel-handle-bar { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); }
  .panel-handle-text { font-size: 11px; color: rgba(255,255,255,0.4); }
  .empty-detail { display: none; }
  .canvas-controls { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .graph-stage::before { transform: scale(1.025); will-change: auto; }
}
