@font-face { font-family: "Spoqa Han Sans"; src: url("/assets/fonts/SpoqaHanSansRegular.ttf") format("truetype"); font-style: normal; font-weight: 100 500; font-display: swap; }
@font-face { font-family: "Spoqa Han Sans"; src: url("/assets/fonts/SpoqaHanSansBold.ttf") format("truetype"); font-style: normal; font-weight: 600 900; font-display: swap; }
@font-face { font-family: "NanumGothicCoding"; src: url("/assets/fonts/NanumGothicCoding.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "NanumGothicCoding"; src: url("/assets/fonts/NanumGothicCoding-Bold.ttf") format("truetype"); font-style: normal; font-weight: 600 900; font-display: swap; }

:root {
  color-scheme: light;
  --ui-font: "Spoqa Han Sans", "Malgun Gothic", sans-serif;
  --text-font: "NanumGothicCoding", "Malgun Gothic", monospace;
  --font-mono: var(--text-font);
  font-family: var(--ui-font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  /* 크기·모양 토큰은 테마와 무관하며 모든 도구 탭이 같은 값을 씁니다. */
  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 15px;
  --fs-xl: 18px;
  --fs-display: 28px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --control-sm: 28px;
  --control-md: 36px;
  --ease: .16s ease;
  --spring: .42s cubic-bezier(.2, 1.65, .35, 1);
  --glass-blur: blur(24px) saturate(180%);
  --glass-card-blur: blur(18px) saturate(165%);
  --ambient-blue: rgb(106 146 212 / .36);
  --ambient-violet: rgb(124 144 186 / .32);
  --ambient-mist: rgb(152 178 220 / .34);
  --ambient-deep: rgb(86 118 180 / .24);
  --glass-prism: rgb(116 144 210 / .15);
  --glass-sheen: linear-gradient(135deg, rgb(255 255 255 / .42) 0%, rgb(255 255 255 / .08) 44%, transparent 72%);
  --glass-sheen-hover: linear-gradient(135deg, rgb(255 255 255 / .58) 0%, rgb(255 255 255 / .14) 48%, var(--glass-prism) 100%);
  --dock-shadow: 0 2px 4px rgb(65 76 130 / .08), 0 10px 24px -10px rgb(79 88 144 / .3);
  --shadow-raised: 0 1px 2px #161a2a0f, 0 6px 18px -8px #161a2a1f;
  --shadow-panel: 0 1px 2px #161a2a0a, 0 16px 40px -16px #161a2a2e;
  --shadow-float: 0 2px 6px #161a2a14, 0 20px 48px -12px #161a2a40;
  /* Liquid glass: 바깥 패널은 얕은 투명 트레이로 두고 내부 카드·에디터·컨트롤에 다층 유리 굴절과 광택 테두리를 입힙니다. */
  --glass-bg: rgb(255 255 255 / .56);
  --glass-bg-strong: rgb(255 255 255 / .32);
  --glass-bg-dialog: rgb(248 250 255 / .84);
  --glass-lens: rgb(255 255 255 / .9);
  --glass-edge: rgb(86 106 164 / .22);
  --glass-highlight: inset 0 1px 0 rgb(255 255 255 / .92), inset 0 0 0 1px rgb(255 255 255 / .44);
  --control-bg: rgb(255 255 255 / .52);
  --control-bg-hover: rgb(255 255 255 / .78);
  --scrim: rgb(14 17 30 / .26);
  --on-focus: #ffffff;
  --highlight: var(--focus);
  --highlight-bg: color-mix(in srgb, var(--focus) 14%, var(--surface));
  --page-bg: #e8edf5;
  --surface-solid: #ffffff;
  --surface-raised-solid: #f8fafd;
  --surface-muted-solid: #edf1f8;
  --surface: rgb(255 255 255 / .56);
  --surface-raised: rgb(255 255 255 / .68);
  --surface-muted: rgb(232 238 249 / .52);
  --text-primary: #191a19;
  --text-secondary: #565c66;
  --text-tertiary: #767e8a;
  --border: rgb(86 106 164 / .2);
  --border-strong: rgb(74 94 152 / .32);
  --accent: #202220;
  --accent-text: #ffffff;
  --focus: #5365c5;
  --editor-bg: rgb(255 255 255 / .48);
  --editor-fg: #242624;
  --editor-gutter: rgb(238 243 252 / .44);
  --editor-gutter-text: #7e8694;
  --editor-gutter-border: rgb(86 106 164 / .16);
  --editor-active-line: rgb(196 214 246 / .32);
  --editor-selection: #dce4fa;
  --editor-selection-focused: #cbd7f8;
  --editor-selection-blend: darken;
  --code-keyword: #5833a2;
  --code-operator: #3f443e;
  --code-comment: #525950;
  --code-string: #16603a;
  --code-number: #8e4708;
  --code-constant: #8d2e40;
  --code-type: #1a5e7e;
  --code-function: #264fa0;
  --code-name: #6e4919;
  --diff-left-bg: rgb(250 226 223 / .72);
  --diff-right-bg: rgb(222 243 227 / .72);
  --diff-char-bg: #f4dda3;
  --diff-char-line: #8f6c20;
  --diff-label-bg: #f8f1df;
  --diff-label-text: #6c5a32;
  --diff-blank-a: rgb(236 240 248 / .55);
  --diff-blank-b: rgb(224 230 242 / .55);
  --diff-missing: #929a91;
  --diff-overview-left: #c85c53;
  --diff-overview-right: #4a9163;
  --status-bg: rgb(255 255 255 / .58);
  --status-text: #414740;
  --note-bg: rgb(232 238 249 / .58);
  --note-border: #c6c9c3;
  --note-text: #575c56;
  --error-bg: #fff1ef;
  --error-border: #d3695f;
  --error-text: #7b2b25;
  --error-strong: #b33b32;
  --error-shadow: #40171026;
  background: var(--page-bg);
  color: var(--text-primary);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page-bg: #0e121b;
    --ambient-blue: rgb(58 98 168 / .32);
    --ambient-violet: rgb(74 96 144 / .28);
    --ambient-mist: rgb(48 80 138 / .26);
    --ambient-deep: rgb(88 116 172 / .22);
    --glass-prism: rgb(144 172 242 / .13);
    --glass-sheen: linear-gradient(135deg, rgb(255 255 255 / .1) 0%, rgb(255 255 255 / .02) 44%, transparent 72%);
    --glass-sheen-hover: linear-gradient(135deg, rgb(255 255 255 / .16) 0%, rgb(255 255 255 / .04) 48%, var(--glass-prism) 100%);
    --dock-shadow: 0 2px 6px rgb(0 0 0 / .25), 0 12px 28px -10px rgb(0 0 0 / .6);
    --surface-solid: #171b26;
    --surface-raised-solid: #1e2330;
    --surface-muted-solid: #242a38;
    --surface: rgb(20 25 38 / .54);
    --surface-raised: rgb(28 34 50 / .64);
    --surface-muted: rgb(32 40 58 / .5);
    --text-primary: #f0f1ee;
    --text-secondary: #b0b7c4;
    --text-tertiary: #8891a0;
    --border: rgb(176 198 242 / .16);
    --border-strong: rgb(176 198 242 / .26);
    --accent: #f1f2ef;
    --accent-text: #171817;
    --focus: #9da9ff;
    --editor-bg: rgb(16 20 32 / .48);
    --editor-fg: #e4e7e1;
    --editor-gutter: rgb(20 25 38 / .44);
    --editor-gutter-text: #858e9e;
    --editor-gutter-border: rgb(176 198 242 / .12);
    --editor-active-line: rgb(72 98 158 / .22);
    --editor-selection: #3a4567;
    --editor-selection-focused: #485783;
    --editor-selection-blend: lighten;
    --code-keyword: #caaefc;
    --code-operator: #d6dad4;
    --code-comment: #9ea79d;
    --code-string: #a2e0b6;
    --code-number: #f2ba7e;
    --code-constant: #faaab9;
    --code-type: #96d7f2;
    --code-function: #b4c6ff;
    --code-name: #e5c994;
    --diff-left-bg: rgb(68 36 35 / .68);
    --diff-right-bg: rgb(32 58 42 / .68);
    --diff-char-bg: #65532b;
    --diff-char-line: #ebc877;
    --diff-label-bg: #413721;
    --diff-label-text: #e8d39f;
    --diff-blank-a: rgb(30 36 50 / .55);
    --diff-blank-b: rgb(38 45 62 / .55);
    --diff-missing: #8a948b;
    --diff-overview-left: #e17e76;
    --diff-overview-right: #73c18b;
    --status-bg: rgb(22 27 40 / .58);
    --status-text: #d4d8d1;
    --note-bg: rgb(28 34 50 / .58);
    --note-border: #555b55;
    --note-text: #c3c8c0;
    --error-bg: #351f1d;
    --error-border: #b75a52;
    --error-text: #f0c3be;
    --error-strong: #c85a50;
    --error-shadow: #00000080;
    --glass-bg: rgb(24 30 46 / .56);
    --glass-bg-strong: rgb(18 23 36 / .34);
    --glass-bg-dialog: rgb(24 29 44 / .88);
    --glass-lens: rgb(255 255 255 / .15);
    --glass-edge: rgb(192 212 255 / .16);
    --glass-highlight: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 0 0 1px rgb(255 255 255 / .05);
    --control-bg: rgb(255 255 255 / .08);
    --control-bg-hover: rgb(255 255 255 / .15);
    --scrim: rgb(0 0 0 / .5);
    --on-focus: #14172b;
    --shadow-raised: 0 1px 2px #00000040, 0 8px 20px -10px #00000066;
    --shadow-panel: 0 1px 2px #00000033, 0 20px 48px -16px #00000080;
    --shadow-float: 0 2px 8px #00000040, 0 24px 56px -12px #000000a6;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #0e121b;
  --ambient-blue: rgb(58 98 168 / .32);
  --ambient-violet: rgb(74 96 144 / .28);
  --ambient-mist: rgb(48 80 138 / .26);
  --ambient-deep: rgb(88 116 172 / .22);
  --glass-prism: rgb(144 172 242 / .13);
  --glass-sheen: linear-gradient(135deg, rgb(255 255 255 / .1) 0%, rgb(255 255 255 / .02) 44%, transparent 72%);
  --glass-sheen-hover: linear-gradient(135deg, rgb(255 255 255 / .16) 0%, rgb(255 255 255 / .04) 48%, var(--glass-prism) 100%);
  --dock-shadow: 0 2px 6px rgb(0 0 0 / .25), 0 12px 28px -10px rgb(0 0 0 / .6);
  --surface-solid: #171b26;
  --surface-raised-solid: #1e2330;
  --surface-muted-solid: #242a38;
  --surface: rgb(20 25 38 / .54);
  --surface-raised: rgb(28 34 50 / .64);
  --surface-muted: rgb(32 40 58 / .5);
  --text-primary: #f0f1ee;
  --text-secondary: #b0b7c4;
  --text-tertiary: #8891a0;
  --border: rgb(176 198 242 / .16);
  --border-strong: rgb(176 198 242 / .26);
  --accent: #f1f2ef;
  --accent-text: #171817;
  --focus: #9da9ff;
  --editor-bg: rgb(16 20 32 / .48);
  --editor-fg: #e4e7e1;
  --editor-gutter: rgb(20 25 38 / .44);
  --editor-gutter-text: #858e9e;
  --editor-gutter-border: rgb(176 198 242 / .12);
  --editor-active-line: rgb(72 98 158 / .22);
  --editor-selection: #3a4567;
  --editor-selection-focused: #485783;
  --editor-selection-blend: lighten;
  --code-keyword: #caaefc;
  --code-operator: #d6dad4;
  --code-comment: #9ea79d;
  --code-string: #a2e0b6;
  --code-number: #f2ba7e;
  --code-constant: #faaab9;
  --code-type: #96d7f2;
  --code-function: #b4c6ff;
  --code-name: #e5c994;
  --diff-left-bg: rgb(68 36 35 / .68);
  --diff-right-bg: rgb(32 58 42 / .68);
  --diff-char-bg: #65532b;
  --diff-char-line: #ebc877;
  --diff-label-bg: #413721;
  --diff-label-text: #e8d39f;
  --diff-blank-a: rgb(30 36 50 / .55);
  --diff-blank-b: rgb(38 45 62 / .55);
  --diff-missing: #8a948b;
  --diff-overview-left: #e17e76;
  --diff-overview-right: #73c18b;
  --status-bg: rgb(22 27 40 / .58);
  --status-text: #d4d8d1;
  --note-bg: rgb(28 34 50 / .58);
  --note-border: #555b55;
  --note-text: #c3c8c0;
  --error-bg: #351f1d;
  --error-border: #b75a52;
  --error-text: #f0c3be;
  --error-strong: #c85a50;
  --error-shadow: #00000080;
  --glass-bg: rgb(24 30 46 / .56);
  --glass-bg-strong: rgb(18 23 36 / .34);
  --glass-bg-dialog: rgb(24 29 44 / .88);
  --glass-lens: rgb(255 255 255 / .15);
  --glass-edge: rgb(192 212 255 / .16);
  --glass-highlight: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 0 0 1px rgb(255 255 255 / .05);
  --control-bg: rgb(255 255 255 / .08);
  --control-bg-hover: rgb(255 255 255 / .15);
  --scrim: rgb(0 0 0 / .5);
  --on-focus: #14172b;
  --shadow-raised: 0 1px 2px #00000040, 0 8px 20px -10px #00000066;
  --shadow-panel: 0 1px 2px #00000033, 0 20px 48px -16px #00000080;
  --shadow-float: 0 2px 8px #00000040, 0 24px 56px -12px #000000a6;
}
:root[data-theme="light"] { color-scheme: light; }
/* Background gradient presets */
:root[data-bg-gradient="ocean"] {
  --ambient-blue: rgb(106 146 212 / .36);
  --ambient-violet: rgb(148 116 212 / .32);
  --ambient-mist: rgb(180 200 240 / .34);
  --ambient-deep: rgb(86 118 180 / .24);
  --glass-prism: rgb(116 144 210 / .15);
}
:root[data-bg-gradient="sunset"] {
  --ambient-blue: rgb(238 120 108 / .34);
  --ambient-violet: rgb(240 168 80 / .32);
  --ambient-mist: rgb(245 190 150 / .32);
  --ambient-deep: rgb(210 90 85 / .24);
  --glass-prism: rgb(240 150 110 / .15);
}
:root[data-bg-gradient="aurora"] {
  --ambient-blue: rgb(142 108 235 / .34);
  --ambient-violet: rgb(68 185 200 / .30);
  --ambient-mist: rgb(185 140 230 / .30);
  --ambient-deep: rgb(105 75 195 / .24);
  --glass-prism: rgb(140 120 220 / .15);
}
:root[data-bg-gradient="emerald"] {
  --ambient-blue: rgb(72 182 145 / .34);
  --ambient-violet: rgb(64 165 185 / .30);
  --ambient-mist: rgb(130 205 175 / .32);
  --ambient-deep: rgb(52 140 110 / .24);
  --glass-prism: rgb(80 180 150 / .15);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme])[data-bg-gradient="ocean"] {
    --ambient-blue: rgb(72 108 178 / .30);
    --ambient-violet: rgb(108 78 182 / .28);
    --ambient-mist: rgb(136 164 220 / .26);
    --ambient-deep: rgb(88 116 172 / .22);
    --glass-prism: rgb(144 172 242 / .13);
  }
  :root:not([data-theme])[data-bg-gradient="sunset"] {
    --ambient-blue: rgb(190 85 75 / .30);
    --ambient-violet: rgb(180 120 50 / .26);
    --ambient-mist: rgb(150 80 65 / .24);
    --ambient-deep: rgb(160 65 60 / .20);
    --glass-prism: rgb(210 110 80 / .14);
  }
  :root:not([data-theme])[data-bg-gradient="aurora"] {
    --ambient-blue: rgb(108 72 195 / .30);
    --ambient-violet: rgb(45 140 160 / .26);
    --ambient-mist: rgb(120 75 170 / .24);
    --ambient-deep: rgb(85 50 160 / .20);
    --glass-prism: rgb(130 95 210 / .14);
  }
  :root:not([data-theme])[data-bg-gradient="emerald"] {
    --ambient-blue: rgb(48 135 105 / .30);
    --ambient-violet: rgb(40 120 140 / .26);
    --ambient-mist: rgb(45 115 90 / .24);
    --ambient-deep: rgb(35 105 80 / .20);
    --glass-prism: rgb(60 145 120 / .14);
  }
}

:root[data-theme="dark"][data-bg-gradient="ocean"] {
  --ambient-blue: rgb(72 108 178 / .30);
  --ambient-violet: rgb(108 78 182 / .28);
  --ambient-mist: rgb(136 164 220 / .26);
  --ambient-deep: rgb(88 116 172 / .22);
  --glass-prism: rgb(144 172 242 / .13);
}
:root[data-theme="dark"][data-bg-gradient="sunset"] {
  --ambient-blue: rgb(190 85 75 / .30);
  --ambient-violet: rgb(180 120 50 / .26);
  --ambient-mist: rgb(150 80 65 / .24);
  --ambient-deep: rgb(160 65 60 / .20);
  --glass-prism: rgb(210 110 80 / .14);
}
:root[data-theme="dark"][data-bg-gradient="aurora"] {
  --ambient-blue: rgb(108 72 195 / .30);
  --ambient-violet: rgb(45 140 160 / .26);
  --ambient-mist: rgb(120 75 170 / .24);
  --ambient-deep: rgb(85 50 160 / .20);
  --glass-prism: rgb(130 95 210 / .14);
}
:root[data-theme="dark"][data-bg-gradient="emerald"] {
  --ambient-blue: rgb(48 135 105 / .30);
  --ambient-violet: rgb(40 120 140 / .26);
  --ambient-mist: rgb(45 115 90 / .24);
  --ambient-deep: rgb(35 105 80 / .20);
  --glass-prism: rgb(60 145 120 / .14);
}

/* Contrast & readability preset */
:root[data-bg-gradient="contrast"],
:root[data-bg-gradient="contrast"][data-theme="light"],
:root[data-bg-gradient="contrast"][data-theme="dark"] {
  --surface: var(--surface-solid);
  --surface-raised: var(--surface-raised-solid);
  --surface-muted: var(--surface-muted-solid);
  --editor-bg: var(--surface-solid);
  --editor-gutter: var(--surface-muted-solid);
  --control-bg: var(--surface-solid);
  --control-bg-hover: var(--surface-muted-solid);
  --glass-sheen: none;
  --glass-sheen-hover: none;
  --border: var(--border-strong);
}
:root[data-bg-gradient="contrast"]:not([data-theme="dark"]) {
  --text-primary: #000000;
  --text-secondary: #3c424a;
}
:root[data-bg-gradient="contrast"][data-theme="dark"] {
  --text-primary: #ffffff;
  --text-secondary: #c0c7d4;
}
@media (prefers-color-scheme: dark) {
  :root[data-bg-gradient="contrast"]:not([data-theme]) {
    --text-primary: #ffffff;
    --text-secondary: #c0c7d4;
  }
}
:root[data-bg-gradient="contrast"] body {
  background: var(--page-bg);
}
:root[data-bg-gradient="contrast"] body::before,
:root[data-bg-gradient="contrast"] body::after {
  display: none !important;
}
:root[data-bg-gradient="contrast"] .topbar,
:root[data-bg-gradient="contrast"] .tool-tabs,
:root[data-bg-gradient="contrast"] .subtab-nav,
:root[data-bg-gradient="contrast"] .panel,
:root[data-bg-gradient="contrast"] .dialog-floating,
:root[data-bg-gradient="contrast"] .floating-message,
:root[data-bg-gradient="contrast"] .error-floating,
:root[data-bg-gradient="contrast"] .editor-card,
:root[data-bg-gradient="contrast"] .utility-card,
:root[data-bg-gradient="contrast"] .profiler-card,
:root[data-bg-gradient="contrast"] .profiler-procedures li,
:root[data-bg-gradient="contrast"] .profiler-grid,
:root[data-bg-gradient="contrast"] .profiler-grid th,
:root[data-bg-gradient="contrast"] .note-editor,
:root[data-bg-gradient="contrast"] .note-content,
:root[data-bg-gradient="contrast"] .note-preview,
:root[data-bg-gradient="contrast"] .note-preview th,
:root[data-bg-gradient="contrast"] .note-table-card,
:root[data-bg-gradient="contrast"] .note-table-card .note-grid-column,
:root[data-bg-gradient="contrast"] .note-table-card .note-grid-row,
:root[data-bg-gradient="contrast"] .note-table-card .note-grid-corner,
:root[data-bg-gradient="contrast"] .todo-overview,
:root[data-bg-gradient="contrast"] .todo-create,
:root[data-bg-gradient="contrast"] .todo-row,
:root[data-bg-gradient="contrast"] .todo-empty,
:root[data-bg-gradient="contrast"] .todo-undo-bar,
:root[data-bg-gradient="contrast"] .chat-form,
:root[data-bg-gradient="contrast"] .chat-room,
:root[data-bg-gradient="contrast"] .chat-bubble,
:root[data-bg-gradient="contrast"] .chat-detail-content,
:root[data-bg-gradient="contrast"] .chat-comment,
:root[data-bg-gradient="contrast"] .hrtimeline-controls,
:root[data-bg-gradient="contrast"] .gantt-container,
:root[data-bg-gradient="contrast"] .gantt-cell-fixed,
:root[data-bg-gradient="contrast"] .button-secondary,
:root[data-bg-gradient="contrast"] select,
:root[data-bg-gradient="contrast"] .check-label,
:root[data-bg-gradient="contrast"] .note-radio,
:root[data-bg-gradient="contrast"] .todo-filters button,
:root[data-bg-gradient="contrast"] .info-note,
:root[data-bg-gradient="contrast"] .status {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
:root[data-bg-gradient="contrast"] .topbar,
:root[data-bg-gradient="contrast"] .tool-tabs,
:root[data-bg-gradient="contrast"] .subtab-nav,
:root[data-bg-gradient="contrast"] .panel,
:root[data-bg-gradient="contrast"] .dialog-floating {
  background: var(--surface-solid);
  border-color: var(--border-strong);
}
:root[data-bg-gradient="contrast"] .tool-tab[aria-selected="true"],
:root[data-bg-gradient="contrast"] .subtab-btn[aria-selected="true"],
:root[data-bg-gradient="contrast"] .subtab-btn.active {
  background: var(--surface-muted-solid);
  border-color: var(--border-strong);
}
:root[data-bg-gradient="contrast"] .tool-tab-lens {
  background: var(--surface-muted-solid);
  border-color: var(--border-strong);
  box-shadow: none;
}
:root[data-bg-gradient="contrast"] .tool-tab-lens::after {
  display: none;
}
:root[data-bg-gradient="contrast"] .info-note {
  background: var(--surface-muted-solid);
}
:root[data-bg-gradient="contrast"] .status:not(.error) {
  background: var(--surface-solid);
  border-color: var(--border-strong);
}

body { position: relative; isolation: isolate; min-width: 320px; height: 100dvh; margin: 0; background: var(--page-bg); color: var(--text-primary); display: flex; flex-direction: column; transition: background-color .2s ease, color .2s ease; }
body::before, body::after { content: ""; position: fixed; inset: -12%; z-index: 0; pointer-events: none; will-change: transform; display: none; }
body::before { background: radial-gradient(circle 420px at 26% 32%, var(--ambient-blue), transparent 70%), radial-gradient(circle 460px at 76% 68%, var(--ambient-mist), transparent 72%); filter: blur(44px); animation: ambient-drift-a 22s ease-in-out infinite alternate; }
body::after { background: radial-gradient(circle 440px at 72% 28%, var(--ambient-violet), transparent 70%), radial-gradient(circle 400px at 30% 78%, var(--ambient-deep), transparent 72%); filter: blur(52px); animation: ambient-drift-b 28s ease-in-out infinite alternate; }
:root:is([data-bg-gradient="ocean"], [data-bg-gradient="sunset"], [data-bg-gradient="aurora"], [data-bg-gradient="emerald"]) body { background: radial-gradient(ellipse 760px 380px at 18% 8%, var(--ambient-blue), transparent 72%), radial-gradient(ellipse 680px 360px at 82% 14%, var(--ambient-violet), transparent 72%), radial-gradient(ellipse 840px 460px at 50% 54%, var(--ambient-mist), transparent 76%), radial-gradient(ellipse 760px 420px at 22% 88%, var(--ambient-deep), transparent 74%), radial-gradient(ellipse 720px 400px at 84% 86%, var(--ambient-blue), transparent 74%), var(--page-bg); }
:root:is([data-bg-gradient="ocean"], [data-bg-gradient="sunset"], [data-bg-gradient="aurora"], [data-bg-gradient="emerald"]) body::before,
:root:is([data-bg-gradient="ocean"], [data-bg-gradient="sunset"], [data-bg-gradient="aurora"], [data-bg-gradient="emerald"]) body::after { display: block; }
@keyframes ambient-drift-a { 0% { transform: translate3d(-2.5%, -1.5%, 0) scale(1); } 100% { transform: translate3d(3%, 2.5%, 0) scale(1.06); } }
@keyframes ambient-drift-b { 0% { transform: translate3d(2.5%, 2%, 0) scale(1.04); } 100% { transform: translate3d(-3%, -2%, 0) scale(.97); } }
button, select, input, textarea { font: inherit; }
textarea, input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"], input[type="number"], [contenteditable="true"] { font-family: var(--text-font); }
pre, code, samp { font-family: var(--ui-font); }
button { color: inherit; }
a { color: inherit; }
::placeholder { color: var(--text-tertiary); opacity: 1; font-weight: 400; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* 상단바 */
.topbar { flex-shrink: 0; position: sticky; top: 0; z-index: 20; height: 40px; border-bottom: 1px solid var(--glass-edge); background: var(--glass-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.topbar-inner { width: min(1920px, calc(100% - 32px)); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { display: grid; width: 24px; height: 24px; place-items: center; border-radius: var(--radius-sm); background: var(--accent) linear-gradient(180deg, rgb(255 255 255 / .2), transparent 60%); color: var(--accent-text); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), var(--shadow-raised); font-size: var(--fs-md); font-weight: 750; letter-spacing: -.06em; }
.brand-name { font-size: var(--fs-xs); font-weight: 750; letter-spacing: .14em; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.tag { color: var(--text-tertiary); font-size: var(--fs-2xs); font-weight: 650; letter-spacing: .16em; }
.licenses { color: var(--text-secondary); font-size: var(--fs-sm); text-decoration: none; transition: color var(--ease); }
.licenses span { margin-left: 4px; color: var(--text-tertiary); }
.licenses:hover { color: var(--text-primary); }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-sm); padding: 0 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: var(--control-bg); box-shadow: var(--glass-highlight); color: var(--text-secondary); font-size: var(--fs-sm); text-decoration: none; cursor: pointer; transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.theme-toggle:hover { background: var(--control-bg-hover); border-color: var(--border-strong); color: var(--text-primary); }
.theme-icon { font-size: 15px; line-height: 1; }
.status-indicator-dot { color: #10b981; font-size: 10px; line-height: 1; display: inline-block; }

/* 도구 탭과 패널 골격 */
.app-shell { position: relative; z-index: 1; width: min(1920px, calc(100% - 32px)); margin: 0 auto; padding: 8px 0 4px; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.tool-tabs { flex-shrink: 0; align-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: fit-content; max-width: 100%; margin: 0 0 10px; padding: 4px; border: 1px solid var(--glass-edge); border-radius: 22px; background: linear-gradient(115deg, var(--glass-prism), transparent 40%, var(--glass-prism)), var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); position: relative; isolation: isolate; z-index: 10; box-shadow: var(--glass-highlight), var(--dock-shadow); }
.tool-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; transition: background-color var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease); }
.tool-tab:hover { background: var(--glass-sheen-hover), var(--control-bg); color: var(--text-primary); }
/* 선택한 탭은 유리 위에 맺힌 렌즈처럼 더 불투명하고 밝게 떠 보이게 합니다. */
.tool-tab[aria-selected="true"] { border-color: var(--glass-edge); background: var(--glass-lens); color: var(--text-primary); box-shadow: var(--glass-highlight), var(--shadow-raised); }
.tool-tab[aria-selected="true"] .tab-index { color: var(--highlight); }
.tool-tab-lens { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: linear-gradient(135deg, rgb(255 255 255 / .24), transparent 48%, var(--glass-prism)), var(--glass-lens); box-shadow: var(--glass-highlight), inset 0 -1px 0 var(--glass-prism), 0 2px 6px rgb(58 68 121 / .12); transform-origin: 0 0; }
.tool-tab-lens::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(110deg, transparent 15%, rgb(255 255 255 / .2) 38%, transparent 60%); pointer-events: none; }
.tool-tabs:not([data-liquid-ready]) .tool-tab-lens, .subtab-nav:not([data-liquid-ready]) .tool-tab-lens { visibility: hidden; }
.tool-tabs[data-liquid-ready] .tool-tab[aria-selected="true"], .subtab-nav[data-liquid-ready] .subtab-btn[aria-selected="true"] { border-color: transparent; background: transparent; box-shadow: none; }
.tab-index { color: var(--text-tertiary); font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 16px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: linear-gradient(145deg, rgb(255 255 255 / .14), transparent 45%, var(--glass-prism)), var(--glass-bg-strong); box-shadow: var(--glass-highlight), var(--shadow-panel); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); overflow: hidden; }
.panel[aria-busy="true"] { cursor: progress; }
.toolbar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tool-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tool-heading h2 { margin: 0; font-size: var(--fs-md); line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
.tool-heading p { margin: 0; color: var(--text-tertiary); font-size: var(--fs-2xs); line-height: 1.2; }
.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.toolbar label { color: var(--text-secondary); font-size: var(--fs-xs); }
.toolbar .button, .toolbar select, .toolbar .check-label { min-height: var(--control-sm); padding: 0 10px; font-size: var(--fs-xs); }
.toolbar select { padding: 0 24px 0 10px; }
.toolbar .check-label { padding: 0 10px; }
.page-footer { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 0; color: var(--text-tertiary); font-size: 10px; font-weight: 600; letter-spacing: .08em; min-height: 22px; }
.footer-actions { display: flex; align-items: center; gap: 8px; }
.page-footer .licenses { font-size: 11px; }
.page-footer .theme-toggle { min-height: 20px; padding: 0 8px; font-size: 11px; gap: 4px; }
.page-footer .theme-icon { font-size: 11px; }
.page-footer .status-indicator-dot { font-size: 7px; }

/* 버튼과 입력 컨트롤 */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-md); padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer; transition: opacity var(--ease), transform var(--ease), background-color var(--ease), border-color var(--ease), color var(--ease); }
.button:disabled { opacity: .55; cursor: wait; }
/* 주 버튼은 불투명한 강조색 위에 얕은 광택만 얹어 글자 대비를 그대로 유지합니다. */
.button-primary { background: var(--accent) linear-gradient(180deg, rgb(255 255 255 / .16), transparent 55%); color: var(--accent-text); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 -1px 0 rgb(0 0 0 / .12), 0 1px 2px rgb(0 0 0 / .14), 0 6px 16px -8px rgb(0 0 0 / .4); }
.button-primary:hover:not(:disabled) { background-color: color-mix(in srgb, var(--accent) 86%, var(--focus)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .26), inset 0 -1px 0 rgb(0 0 0 / .12), 0 2px 4px rgb(0 0 0 / .14), 0 10px 22px -8px rgb(0 0 0 / .45); }
.button-secondary { border-color: var(--glass-edge); background: var(--glass-sheen), var(--control-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-secondary); }
.button-secondary:hover:not(:disabled) { background: var(--glass-sheen-hover), var(--control-bg-hover); border-color: var(--border-strong); color: var(--text-primary); }
.button-danger { border-color: var(--error-border); background: var(--error-strong) linear-gradient(180deg, rgb(255 255 255 / .16), transparent 55%); color: #ffffff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 -1px 0 rgb(0 0 0 / .12), 0 1px 2px rgb(0 0 0 / .14), 0 6px 16px -8px var(--error-shadow); }
.button-danger:hover:not(:disabled) { background-color: color-mix(in srgb, var(--error-strong) 86%, #000000); border-color: var(--error-strong); color: #ffffff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .26), inset 0 -1px 0 rgb(0 0 0 / .12), 0 2px 4px rgb(0 0 0 / .14), 0 10px 22px -8px var(--error-shadow); }
.button-secondary.button-danger { border-color: var(--glass-edge); background: var(--glass-sheen), var(--control-bg); box-shadow: var(--glass-highlight); color: var(--text-secondary); }
.button-secondary.button-danger:hover:not(:disabled) { border-color: var(--error-border); background: var(--error-bg); color: var(--error-text); }
.button-copy { min-height: var(--control-sm); padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); font-size: var(--fs-sm); cursor: pointer; transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.button-copy:hover:not(:disabled) { border-color: var(--glass-edge); background: var(--glass-sheen-hover), var(--control-bg-hover); box-shadow: var(--glass-highlight); color: var(--text-primary); }
.button-copy:disabled { opacity: .55; cursor: default; }
kbd { margin-left: 4px; padding: 2px 5px; border: 1px solid currentColor; border-radius: var(--radius-xs); font-family: inherit; font-size: var(--fs-2xs); font-weight: 500; opacity: .72; }
select { min-height: var(--control-md); padding: 0 30px 0 12px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--glass-sheen), var(--control-bg); color: var(--text-primary); font-size: var(--fs-sm); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); transition: border-color var(--ease), background-color var(--ease); }
select option { background: var(--surface-solid); color: var(--text-primary); }
select:hover:not(:disabled) { background: var(--glass-sheen-hover), var(--control-bg-hover); border-color: color-mix(in srgb, var(--focus) 45%, var(--border-strong)); }
.select-label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.check-label { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-md); padding: 0 14px; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: var(--glass-sheen), var(--control-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); white-space: nowrap; cursor: pointer; transition: background-color var(--ease), border-color var(--ease); }
.check-label:hover { background: var(--glass-sheen-hover), var(--control-bg-hover); border-color: var(--border-strong); }
.check-label:has(input:checked) { border-color: var(--highlight); background: var(--highlight-bg); }
.check-label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.check-label input, .note-radio input { width: 14px; height: 14px; margin: 0; accent-color: var(--highlight); cursor: inherit; }
/* 선택 칩: 메모 선택과 할 일 필터가 같은 모양을 씁니다. */
.note-radio, .todo-filters button { display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-md); padding: 0 14px; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: var(--glass-sheen), var(--control-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.note-radio:hover, .todo-filters button:hover { background: var(--glass-sheen-hover), var(--control-bg-hover); border-color: var(--border-strong); color: var(--text-primary); }
.note-radio:has(input:checked), .todo-filters button[aria-pressed="true"] { border-color: var(--highlight); background: var(--highlight-bg); color: var(--text-primary); }
.note-radio:has(input:focus-visible), .todo-filters button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.note-radio:has(input:disabled) { opacity: .55; cursor: wait; }

/* 안내·상태·도움말 */
.info-note { flex-shrink: 0; display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 3px 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--glass-sheen), var(--note-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--note-text); }
.info-mark { display: grid; flex: 0 0 auto; width: 13px; height: 13px; place-items: center; border: 1px solid var(--note-border); border-radius: 50%; color: var(--text-secondary); font-size: 9px; font-weight: 700; }
.info-note p { margin: 0; font-size: var(--fs-2xs); line-height: 1.35; }
.install-banner { flex-wrap: wrap; align-items: center; }
.install-banner p:first-child { flex: 1 1 240px; }
.install-banner #install-manual { flex-basis: 100%; }
.status { flex-shrink: 0; min-height: unset; margin: 3px 0 0; padding: 3px 8px; overflow-wrap: anywhere; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--glass-sheen), var(--status-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--status-text); font-size: var(--fs-2xs); line-height: 1.3; }
.status.error { border-color: var(--error-border); background: var(--error-bg); box-shadow: none; color: var(--error-text); font-weight: 600; }
.status.error::before { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: var(--radius-xs); background: var(--error-strong); color: #ffffff; font-size: 10px; letter-spacing: .03em; content: "⚠ 오류"; }
.hint, .note-editor-help, .note-grid-help, .note-grid-limit, .todo-help { flex-shrink: 0; margin: 3px 0 0; color: var(--text-tertiary); font-size: 11px; line-height: 1.25; }
.hint span { padding: 0 2px; color: var(--border-strong); }
.error-floating { position: fixed; z-index: 1000; top: 50%; left: 50%; width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; transform: translate(-50%, -50%); border: 1px solid var(--error-border); border-radius: var(--radius-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--error-border) 24%, transparent), color-mix(in srgb, var(--error-border) 6%, transparent) 55%, rgb(255 255 255 / .1)); box-shadow: var(--glass-highlight), inset 0 -1px 0 rgb(255 255 255 / .12), 0 16px 64px var(--error-shadow); backdrop-filter: blur(18px) saturate(180%) brightness(1.06); -webkit-backdrop-filter: blur(18px) saturate(180%) brightness(1.06); color: var(--text-primary); font-size: var(--fs-md); line-height: 1.7; overflow-wrap: anywhere; transition: opacity .7s ease; }
.error-floating strong { display: block; margin-bottom: 8px; color: var(--text-primary); font-size: var(--fs-lg); }
.error-floating.is-fading { opacity: 0; pointer-events: none; }
/* 설정 창: 오류 팝업과 구분되는 중립 유리 대화상자이며, 넓은 그림자로 뒤 화면을 어둡게 가립니다. */
.dialog-floating { position: fixed; z-index: 1000; top: 50%; left: 50%; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; transform: translate(-50%, -50%); border: 1px solid var(--glass-edge); border-radius: var(--radius-lg); background: var(--glass-bg-dialog); box-shadow: var(--glass-highlight), var(--shadow-float), 0 0 0 100vmax var(--scrim); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); color: var(--text-primary); font-size: var(--fs-md); line-height: 1.6; }
.dialog-floating > strong { display: block; font-size: var(--fs-xl); font-weight: 650; letter-spacing: -.02em; }
.dialog-body { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.dialog-body .select-label { justify-content: space-between; color: var(--text-secondary); font-size: var(--fs-sm); }
.dialog-body .select-label select { min-width: 140px; }
.dialog-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.floating-message { position: fixed; right: 24px; bottom: 24px; z-index: 1000; max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px; border: 1px solid var(--glass-edge); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgb(255 255 255 / .22), rgb(255 255 255 / .04) 55%, rgb(255 255 255 / .12)); color: var(--text-primary); text-shadow: 0 1px 2px rgb(0 0 0 / .18); box-shadow: var(--glass-highlight), inset 0 -1px 0 rgb(255 255 255 / .12), var(--shadow-float); backdrop-filter: blur(18px) saturate(180%) brightness(1.06); -webkit-backdrop-filter: blur(18px) saturate(180%) brightness(1.06); font-size: var(--fs-md); font-weight: 600; line-height: 1.6; pointer-events: none; }
.floating-message.is-error { border-color: var(--error-border); background: linear-gradient(135deg, color-mix(in srgb, var(--error-border) 24%, transparent), color-mix(in srgb, var(--error-border) 6%, transparent) 55%, rgb(255 255 255 / .1)); color: var(--text-primary); }

/* 편집기 카드 (SQL · Diff · Profiler) */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; flex: 1; min-height: 0; }
.split-handle { display: none; position: relative; min-width: 0; align-self: stretch; cursor: col-resize; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: var(--radius-sm); }
.split-handle::before { content: ""; position: absolute; top: 50%; left: 50%; width: 5px; height: 44px; transform: translate(-50%, -50%); border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: var(--control-bg); box-shadow: var(--glass-highlight); transition: background-color var(--ease), border-color var(--ease); }
.split-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 21px; transform: translate(-50%, -50%); background: radial-gradient(circle, var(--text-secondary) 1px, transparent 1.5px) center / 3px 7px repeat-y; pointer-events: none; }
.split-handle:is(:hover, :focus-visible, .is-dragging)::before { background: var(--highlight-bg); border-color: var(--focus); }
.split-handle:is(:hover, :focus-visible, .is-dragging)::after { background-image: radial-gradient(circle, var(--focus) 1px, transparent 1.5px); }
.split-handle:focus-visible { outline-offset: -2px; }
.is-resizing-split, .is-resizing-split * { cursor: col-resize !important; user-select: none !important; -webkit-user-select: none !important; }
@media (width > 768px) {
  .editor-grid.is-resizable, .note-workspace.is-resizable:has(.note-preview:not([hidden])) { grid-template-columns: minmax(0, var(--split-left, 1fr)) var(--split-handle-size, 16px) minmax(0, var(--split-right, 1fr)); column-gap: 0; }
  .note-workspace.is-resizable { --split-handle-size: 12px; }
  .split-handle { display: block; }
}
@media (forced-colors: active) {
  .split-handle::before { background: ButtonFace; border-color: ButtonText; }
  .split-handle::after { background: ButtonText; width: 1px; height: 20px; }
  .split-handle:is(:hover, :focus-visible, .is-dragging)::before { border-color: Highlight; }
}
.editor-card { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--editor-bg); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); transition: border-color var(--ease), box-shadow var(--ease); }
.editor-card:hover { border-color: var(--border-strong); }
.editor-card > .editor { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.editor-title { display: flex; height: 30px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--glass-edge); background: var(--surface-raised); box-shadow: inset 0 1px 0 rgb(255 255 255 / .24); }
.editor-title h3 { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; font-size: var(--fs-xs); font-weight: 600; }
.editor-title .button-copy { min-height: 22px; padding: 0 8px; font-size: var(--fs-2xs); }
.editor-label { color: var(--text-tertiary); font-size: 10px; font-weight: 600; letter-spacing: .12em; white-space: nowrap; }
.cm-editor { flex: 1; height: 100%; min-height: 0; resize: none; overflow: hidden; background: transparent; color: var(--editor-fg); font-size: var(--fs-lg); }
.cm-scroller { overflow: auto; overscroll-behavior: contain; font-family: var(--text-font) !important; line-height: 23px !important; }
.cm-content { min-height: 100%; padding: 12px 0 !important; color: var(--editor-fg); line-height: 23px; }
.cm-line { position: relative; padding: 0 12px !important; }
.cm-gutters { border-right: 1px solid var(--editor-gutter-border) !important; background: var(--editor-gutter) !important; color: var(--editor-gutter-text) !important; }
.cm-activeLine, .cm-activeLineGutter { background: var(--editor-active-line) !important; }
.cm-cursor, .cm-dropCursor { border-left-color: var(--text-primary) !important; }
.cm-selectionBackground { background: var(--editor-selection) !important; }
.cm-focused .cm-selectionBackground { background: var(--editor-selection-focused) !important; }
/* 선택 영역을 글자 위에 겹쳐 그려 현재 줄·Diff 배경에 가리지 않게 합니다. 배경과 섞기만 하므로 글자색은 그대로입니다. */
.cm-selectionLayer { z-index: 1 !important; pointer-events: none; mix-blend-mode: var(--editor-selection-blend); }
.cm-content[contenteditable="false"] ~ .cm-cursorLayer { display: none; }
.cm-focused { outline: 2px solid var(--focus); outline-offset: -2px; }
.editor-notice { flex-shrink: 0; margin: 0; padding: 8px 12px; background: var(--note-bg); color: var(--note-text); font-size: var(--fs-xs); }
.diagnostic-line { background: var(--error-bg); }
.diagnostic-char { text-decoration: underline wavy var(--error-strong); }

/* Diff */
.has-diff-overview { padding-right: 12px; }
.diff-overview { position: absolute; top: 0; right: 0; bottom: 0; width: 12px; border-left: 1px solid var(--glass-edge); background: var(--surface-muted); cursor: pointer; }
.diff-sign { font-weight: 700; }
.diff-sign.removed { color: var(--diff-overview-left); }
.diff-sign.added { color: var(--diff-overview-right); }
.diff-left { background: var(--diff-left-bg) !important; }
.diff-right { background: var(--diff-right-bg) !important; }
.diff-char { background: var(--diff-char-bg); text-decoration: underline; text-decoration-color: var(--diff-char-line); }
.eol-label { padding: 1px 4px; line-height: 1; border-radius: var(--radius-xs); background: var(--diff-label-bg); color: var(--diff-label-text); font-size: var(--fs-2xs); }
.diff-blank { display: block; height: 23px; overflow: hidden; padding-left: 12px; box-sizing: border-box; background: repeating-linear-gradient(135deg, var(--diff-blank-a), var(--diff-blank-a) 5px, var(--diff-blank-b) 5px, var(--diff-blank-b) 6px); color: var(--text-tertiary); font-size: var(--fs-2xs); line-height: 23px; }
.diff-empty { color: var(--text-tertiary); }
.cm-line[data-diff]::before { position: absolute; left: -12px; width: 12px; color: var(--text-tertiary); font-weight: 700; text-align: center; content: attr(data-diff); }

/* Profiler */
#profiler-input { flex-shrink: 0; }
#profiler-input .cm-editor { height: 90px; min-height: 60px; flex: none; }
#profiler-result { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; font-size: var(--fs-sm); padding-right: 4px; }
#profiler-result h3, .note-preview h3, .todo-list-heading h3, .todo-empty h3 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
#profiler-result h3 { margin: 16px 0 8px; }
#profiler-result h4 { margin: 12px 0 0; font-size: var(--fs-md); }
#profiler-result p { margin: 8px 0 0; }
#profiler-result summary { cursor: pointer; overflow-wrap: anywhere; font-weight: 600; }
#profiler-result details > .button-copy { margin-top: 6px; min-height: 22px; padding: 0 8px; font-size: var(--fs-2xs); }
#profiler-result pre { max-height: 280px; overflow: auto; margin: 6px 0 0; padding: 6px 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--surface-muted); box-shadow: var(--glass-highlight); white-space: pre-wrap; overflow-wrap: anywhere; }
.profiler-cards { display: grid; gap: 10px; }
.profiler-card, .profiler-procedures li { min-width: 0; padding: 12px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); transition: border-color var(--ease); }
.profiler-card:hover, .profiler-procedures li:hover { border-color: var(--border-strong); }
.profiler-card > summary, .profiler-procedures strong { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.profiler-card > * + *, .profiler-procedures li > * + * { margin-top: 8px; }
.profiler-procedures { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.profiler-procedures li > .button-copy { margin: 0 0 0 4px; min-height: 22px; padding: 0 8px; font-size: var(--fs-2xs); }
.profiler-grid { max-height: 420px; overflow: auto; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--surface); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.profiler-grid table { width: 100%; border-collapse: separate; border-spacing: 0; font: var(--fs-md) var(--ui-font); }
.profiler-grid th, .profiler-grid td { padding: 6px 10px; text-align: left; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); white-space: pre; }
.profiler-grid th { position: sticky; top: 0; background: var(--surface-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); font-weight: 600; }

/* 메모 */
.note-selector { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; margin: 0 0 6px; padding: 0; border: 0; }
.note-combo { display: none; width: 100%; }
.note-selector legend { margin-bottom: 3px; padding: 0; color: var(--text-secondary); font-size: var(--fs-2xs); }
.note-radio { min-height: 24px; padding: 0 8px; font-size: var(--fs-2xs); gap: 4px; }
.note-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: stretch; }
.note-workspace:has(.note-preview:not([hidden])) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.note-source { min-width: 0; height: 100%; display: flex; flex-direction: column; min-height: 0; }
.note-source-label { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); font-weight: 600; }
.note-source-label span { color: var(--text-secondary); font-size: var(--fs-2xs); font-weight: 400; }
.note-source-title { display: inline-flex; align-items: center; gap: 6px; }
.note-language-badge { display: inline-block; padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface-raised); color: var(--focus); font-size: 10px; font-weight: 600; letter-spacing: .03em; line-height: 1.3; vertical-align: middle; }
.note-language-badge[hidden] { display: none !important; }
.note-content { flex: 1; display: block; width: 100%; height: 100%; min-height: 0; padding: 10px 12px; box-sizing: border-box; resize: none; overflow: auto; overscroll-behavior: contain; color: inherit; background: var(--glass-sheen), var(--editor-bg); border: 1px solid var(--glass-edge); border-radius: var(--radius-md); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); font: var(--fs-lg)/1.6 var(--text-font); transition: border-color var(--ease); }
.note-content:hover { border-color: var(--border-strong); }
.note-content:focus-visible { outline-offset: -2px; }
.note-editor { flex: 1; min-height: 0; position: relative; margin-top: 4px; display: flex; flex-direction: column; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--editor-bg); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); transition: border-color var(--ease), box-shadow var(--ease); }
.note-editor:hover { border-color: var(--border-strong); }
.note-editor:focus-within { border-color: var(--focus); }
.note-editor .note-content { position: relative; margin-top: 0; background: transparent; border: 1px solid transparent; border-radius: var(--radius-md); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.note-editor .note-content:hover { border-color: transparent; }
.note-editor .note-content:focus-visible { outline: none; border-color: transparent; }
.note-highlight { position: absolute; inset: 0; margin: 0; padding: 10px 12px; box-sizing: border-box; overflow: hidden; pointer-events: none; border: 1px solid transparent; border-radius: var(--radius-md); font: var(--fs-lg)/1.6 var(--text-font); white-space: pre; color: var(--text-primary); }
.note-highlight code { display: block; font: inherit; will-change: transform; }
.note-editor.is-highlighted .note-content { color: transparent; caret-color: var(--text-primary); }
.note-editor.is-highlighted .note-content::selection { background: color-mix(in srgb, var(--code-function) 30%, transparent); }
.note-highlight .tok-keyword { color: var(--code-keyword); font-weight: 600; }
.note-highlight .tok-operator { color: var(--code-operator); }
.note-highlight .tok-comment { color: var(--code-comment); font-style: italic; }
.note-highlight .tok-string { color: var(--code-string); }
.note-highlight .tok-number { color: var(--code-number); }
.note-highlight .tok-constant { color: var(--code-constant); }
.note-highlight .tok-type { color: var(--code-type); }
.note-highlight .tok-function { color: var(--code-function); }
.note-highlight .tok-tag { color: var(--code-type); }
.note-highlight .tok-name { color: var(--code-name); }
.note-workspace:has(.note-preview:not([hidden])) :is(.note-editor, .note-content) { min-height: 0; height: 100%; max-height: none; }
.note-preview { min-width: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.note-preview h3 + .note-grid-help { margin-top: 6px; }
.note-preview pre { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: var(--fs-xs); }
.note-preview table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: var(--fs-sm); }
.note-preview th, .note-preview td { padding: 6px 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 80px; max-width: 420px; }
.note-preview th { position: sticky; top: 0; background: var(--surface-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); font-weight: 600; }
.note-preview td { background: transparent; }
.note-table-card { min-width: 0; height: 100%; margin-top: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.note-table-toolbar { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; border-bottom: 1px solid var(--glass-edge); background: var(--surface-raised); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22); font-size: var(--fs-xs); }
.note-grid-status { flex: 1; min-width: 100px; color: var(--text-secondary); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.note-table-toolbar .button-copy { flex-shrink: 0; min-height: 22px; padding: 0 8px; font-size: var(--fs-2xs); }
.note-grid-sql { padding-left: 6px; border-left: 1px solid var(--border); color: var(--text-secondary); font-size: var(--fs-2xs); }
.note-grid-sql ~ .button-copy { border-color: var(--border); }
.note-table-card .note-table-scroll { flex: 1; min-height: 0; max-height: none; position: relative; margin: 0; overflow: auto; overscroll-behavior: contain; user-select: none; }
.note-table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.note-table-card table { min-width: 100%; width: max-content; font-family: var(--ui-font); }
.note-table-card th, .note-table-card td { min-width: 100px; max-width: 360px; vertical-align: top; cursor: cell; }
.note-table-card .note-grid-column { position: sticky; top: 0; z-index: 2; min-width: 100px; padding: 6px 12px; background: var(--surface-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 500; text-align: center; cursor: pointer; }
.note-table-card .note-grid-row { position: sticky; left: 0; top: auto; z-index: 1; min-width: 38px; width: 38px; padding: 8px; background: var(--surface-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 400; text-align: center; cursor: pointer; }
.note-table-card .note-grid-corner { position: sticky; top: 0; left: 0; z-index: 3; min-width: 38px; width: 38px; padding: 6px 8px; background: var(--surface-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-secondary); text-align: center; cursor: pointer; }
.note-table-card .note-grid-heading { background: var(--surface-raised); font-weight: 600; }
.note-table-card .note-grid-cell.is-selected { background: color-mix(in srgb, var(--highlight) 20%, var(--surface)); color: var(--text-primary); }
.note-table-card .note-grid-cell.is-active { outline: 2px solid var(--focus); outline-offset: -2px; }
.note-table-card .note-grid-column:hover, .note-table-card .note-grid-row:hover, .note-table-card .note-grid-corner:hover { background: color-mix(in srgb, var(--highlight) 12%, var(--surface-muted)); }

/* To Do */
.todo-panel .toolbar-actions:has(#todo-reload[hidden]) { display: none; }
.todo-panel input[type="text"], .todo-panel input[type="search"], .todo-panel textarea { font-family: var(--ui-font); }
.todo-overview { flex-shrink: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(140px, 1.2fr); gap: 12px; align-items: center; margin-bottom: 6px; padding: 6px 12px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface-muted); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.todo-stat { display: flex; flex-direction: column; gap: 2px; }
.todo-stat > span, .todo-progress-wrap > span { color: var(--text-secondary); font-size: var(--fs-2xs); }
.todo-stat strong { font-size: 18px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.todo-stat-today strong { color: var(--highlight); }
.todo-progress-wrap { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 1px solid var(--border-strong); }
#todo-progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 20px; accent-color: var(--highlight); background: var(--border-strong); }
#todo-progress::-webkit-progress-bar { background: var(--border-strong); border-radius: 20px; }
#todo-progress::-webkit-progress-value { background: var(--highlight); border-radius: 20px; }
#todo-progress::-moz-progress-bar { background: var(--highlight); border-radius: 20px; }
.todo-create { flex-shrink: 0; display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 6px; padding: 6px 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface-raised); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.todo-create label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-2xs); font-weight: 600; color: var(--text-secondary); }
.todo-new-title-label { flex: 1 1 250px; }
.todo-new-date-label { flex: 0 1 145px; }
.todo-create input, .todo-find input { box-sizing: border-box; min-width: 0; width: 100%; height: var(--control-sm); padding: 0 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--control-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-primary); font-size: var(--fs-sm); }
.todo-create .button { min-height: var(--control-sm); padding: 0 10px; font-size: var(--fs-xs); }
.todo-date, #todo-new-date { font-variant-numeric: tabular-nums; }
.todo-controls { flex-shrink: 0; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.todo-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.todo-filters button { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: var(--glass-sheen), var(--control-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.todo-filters button span { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.todo-filters button:hover span, .todo-filters button[aria-pressed="true"] span { background: var(--surface-raised); }
.todo-find { display: flex; gap: 6px; min-width: 0; }
.todo-find input { width: 180px; }
.todo-find select { width: 110px; min-height: var(--control-sm); padding: 0 24px 0 8px; font-size: var(--fs-xs); }
.todo-list-heading { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.todo-list-heading h3 { margin: 0; font-size: var(--fs-sm); font-weight: 600; }
.todo-list-heading span { font-size: var(--fs-xs); color: var(--text-secondary); }
#todo-list { flex: 1; min-height: 0; display: grid; gap: 8px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; align-content: start; }
.todo-group-title { margin: 4px 0 0; color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 600; }
.todo-group-title:not(:first-child) { margin-top: 16px; }
.todo-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) var(--control-sm); align-items: start; gap: 12px; padding: 16px; border: 1px solid var(--glass-edge); border-left: 3px solid var(--highlight); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease); }
.todo-row:hover, .todo-row:focus-within { border-color: var(--highlight); background: var(--glass-sheen-hover), var(--surface-raised); box-shadow: var(--glass-highlight), var(--shadow-panel); }
.todo-check { width: 18px; height: 18px; margin: 7px 0 0; accent-color: var(--highlight); cursor: pointer; }
.todo-body { min-width: 0; }
.todo-title { display: block; width: 100%; min-height: 32px; padding: 4px 6px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-primary); font-size: var(--fs-lg); line-height: 1.5; font-weight: 600; transition: border-color var(--ease), background-color var(--ease); }
.todo-content { display: block; width: 100%; min-height: 44px; margin: 2px 0 8px; padding: 4px 6px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: var(--fs-md); line-height: 1.6; resize: vertical; transition: border-color var(--ease), background-color var(--ease); }
.todo-title:hover, .todo-content:hover { border-color: var(--border); }
.todo-title:focus, .todo-content:focus { border-color: var(--highlight); background: var(--control-bg); }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-left: 6px; }
.todo-date-label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--text-secondary); }
.todo-date { box-sizing: border-box; width: 112px; min-width: 0; max-width: 100%; height: var(--control-sm); padding: 0 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--control-bg); box-shadow: var(--glass-highlight); color: var(--text-primary); font-size: var(--fs-sm); }
.todo-badge { display: inline-flex; padding: 3px 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: var(--surface-muted); box-shadow: var(--glass-highlight); color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; }
.todo-badge.is-today { border-color: color-mix(in srgb, var(--highlight) 35%, var(--border)); background: var(--highlight-bg); color: var(--highlight); }
.todo-badge.is-overdue { border-color: var(--error-border); background: var(--error-bg); color: var(--error-text); }
.todo-badge.is-done { border-color: color-mix(in srgb, var(--code-string) 35%, var(--border)); background: color-mix(in srgb, var(--code-string) 9%, var(--surface)); color: var(--code-string); }
.todo-row.is-complete { border-left-color: var(--border-strong); background: var(--surface-muted); box-shadow: var(--glass-highlight); }
.todo-row.is-complete .todo-title { color: var(--text-secondary); text-decoration: line-through; }
.todo-remove { display: flex; align-items: center; justify-content: center; width: var(--control-sm); height: var(--control-sm); margin-top: 2px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer; transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.todo-remove:hover { border-color: var(--error-border); background: var(--error-bg); color: var(--error-text); }
.todo-panel input[aria-invalid="true"] { border-color: var(--error-border); }
.todo-field-error { margin: 6px 6px 0; font-size: var(--fs-sm); color: var(--error-text); }
.todo-create .todo-field-error { flex-basis: 100%; margin: 0; }
.todo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; padding: 24px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); text-align: center; background: var(--glass-sheen), var(--surface-muted); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.todo-empty-symbol { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 50%; background: var(--surface-raised); box-shadow: var(--glass-highlight); color: var(--highlight); font-size: 20px; }
.todo-empty p { margin: 8px 0 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.6; }
.todo-undo-bar { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 7px 12px 7px 16px; margin-bottom: 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface-raised); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); font-size: var(--fs-sm); }
#todo-deleted-title { overflow-wrap: anywhere; min-width: 0; }
#todo-undo { flex-shrink: 0; min-height: var(--control-sm); padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--highlight); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background-color var(--ease), border-color var(--ease); }
#todo-undo:hover { border-color: var(--border); background: var(--surface); }
.storage-info { flex-shrink: 0; margin-top: 3px; padding-top: 3px; border-top: 1px solid var(--border); color: var(--text-tertiary); font-size: var(--fs-2xs); line-height: 1.3; }
.storage-info summary { width: fit-content; font-size: var(--fs-2xs); cursor: pointer; }
.storage-info p { margin: 3px 0 0; }
.storage-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.storage-actions .button { min-height: 22px; padding: 0 8px; font-size: var(--fs-2xs); }

@media (max-width: 960px) {
  .app-shell { width: calc(100% - 24px); }
  .topbar-inner { width: calc(100% - 24px); }
  .panel { padding: 20px; }
  .toolbar { align-items: flex-start; flex-wrap: wrap; }
  .tool-heading { flex: 1 1 100%; }
  .toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }




}
@media (max-width: 768px) {
  :root { --glass-blur: blur(14px) saturate(160%); }
  html, body { height: auto; overflow-y: auto; }
  body { height: auto; min-height: 100vh; }
  .app-shell { height: auto; overflow: visible; padding-top: 12px; }
  .panel { height: auto; overflow: visible; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); flex: none; }
  .editor-card { min-height: 280px; }
  .cm-editor { height: 380px; min-height: 260px; flex: none; }
  .note-workspace { display: flex; flex-direction: column; flex: none; }
  .note-workspace:has(.note-preview:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  :is(.note-editor, .note-content) { min-height: 320px; height: auto; flex: none; }
  .note-workspace:has(.note-preview:not([hidden])) :is(.note-editor, .note-content) { height: 320px; min-height: 240px; }
  #todo-list { max-height: 480px; flex: none; }
  .subtab-panel { max-height: none; overflow: visible; flex: none; }
  .tool-tabs { box-shadow: var(--glass-highlight), var(--dock-shadow); }
  .note-radio { display: none; }
  .note-combo { display: block; }
  .todo-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; }
  .todo-progress-wrap { grid-column: 1 / -1; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border-strong); }
  .todo-create { padding: 12px; }
  .todo-new-title-label { flex-basis: 100%; }
  .todo-new-date-label { flex: 1 1 130px; }
  .todo-find { width: 100%; }
  .todo-find input { flex: 1; width: 0; }
  .todo-row { gap: 8px; padding: 12px; }
  .todo-stat strong { font-size: 24px; }
}
@media (max-width: 560px) {
  .topbar { height: 36px; }
  .topbar-inner, .app-shell { width: calc(100% - 20px); }
  .brand { gap: 6px; }
  .brand-mark { width: 22px; height: 22px; }
  .header-actions { gap: 8px; }
  .tag { display: none; }
  .licenses { font-size: var(--fs-xs); }
  #theme-toggle { width: var(--control-sm); justify-content: center; padding: 0; font-size: 0; }
  .theme-icon { font-size: 15px; }
  .app-shell { padding-top: 10px; }
  .tool-tabs { margin-bottom: 10px; }
  .panel { padding: 16px 12px; }
  .toolbar-actions { width: 100%; }
  .select-label { flex: 1 1 100%; }
  .check-label { flex: 1; }
  .page-footer { flex-wrap: wrap; }
  .cm-editor { height: 420px; }
  .note-selector, .todo-filters { gap: 6px; }
  .note-radio, .todo-filters button { gap: 6px; padding: 0 8px; }
  .note-preview { padding: 12px; }
  .note-table-card th, .note-table-card td { min-width: 90px; }
  .floating-message { right: 16px; bottom: 16px; }
}
/* 익명 채팅: 목록은 말풍선, 상세는 본문과 댓글 말풍선으로 구성합니다. */
.chat-live { color: var(--text-tertiary); font-size: var(--fs-xs); white-space: nowrap; }
.chat-live[data-state="live"] { color: var(--code-string); }
.chat-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; padding: 16px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface-raised); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.chat-form[hidden] { display: none; }
.chat-form label { display: flex; flex-direction: column; gap: 8px; color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 600; }
.chat-form small { font-weight: 400; color: var(--text-tertiary); }
.chat-form input, .chat-form textarea { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--control-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-primary); font: inherit; font-size: var(--fs-md); line-height: 1.6; resize: vertical; }
.chat-form input { height: var(--control-md); padding-top: 0; padding-bottom: 0; }
.chat-form input:focus-visible, .chat-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.chat-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.chat-bubble-title { max-width: 100%; overflow-wrap: anywhere; font-size: var(--fs-lg); font-weight: 650; line-height: 1.5; }
.chat-bubble-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text-secondary); font-size: var(--fs-xs); }
.chat-author { font-weight: 600; }
.chat-remaining { color: var(--text-tertiary); }
.chat-detail { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; gap: 12px; }
.chat-detail[hidden] { display: none; }
.chat-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chat-form-actions .hint { flex: 1 1 200px; margin: 0; }
/* 채팅방: 위가 오래된 글, 아래가 새 글이며 내 글은 오른쪽입니다. 입력창은 하단에 붙습니다. */
.chat-room { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--glass-edge); border-radius: var(--radius-lg); background: var(--glass-sheen), var(--surface-muted); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.chat-room[hidden] { display: none; }
.chat-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; height: auto; max-height: none; padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--text-secondary); text-align: center; font-size: var(--fs-sm); }
.chat-bubble { position: relative; display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; gap: 6px; align-self: flex-start; max-width: min(82%, 560px); margin-left: 10px; padding: 10px 14px; border: 1px solid var(--glass-edge); border-radius: 16px 16px 16px 4px; background: var(--glass-sheen), var(--surface); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--ease), border-color var(--ease), transform var(--ease); }
.chat-bubble::before, .chat-bubble::after { position: absolute; bottom: 6px; width: 0; height: 0; border: 7px solid transparent; content: ""; }
.chat-bubble::before { left: -8px; border-right-color: var(--glass-edge); border-left: 0; }
.chat-bubble::after { left: -6px; border-right-color: var(--surface); border-left: 0; transition: border-color var(--ease); }
.chat-bubble:hover { border-color: var(--focus); background: var(--glass-sheen-hover), var(--surface-raised); }
.chat-bubble:hover::before { border-right-color: var(--focus); }
.chat-bubble:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chat-bubble.is-mine { align-self: flex-end; align-items: flex-start; margin-right: 10px; margin-left: 0; border-color: var(--highlight); border-radius: 16px 16px 4px 16px; background: var(--highlight-bg); }
.chat-bubble.is-mine::before { right: -8px; left: auto; border-right: 0; border-left: 7px solid var(--highlight); }
.chat-bubble.is-mine::after { right: -6px; left: auto; border-right: 0; border-left: 7px solid var(--highlight-bg); }
.chat-bubble.is-new { animation: fade-up .24s ease both; }
.chat-compose { position: relative; display: flex; align-items: flex-end; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--glass-edge); background: var(--surface-raised); box-shadow: inset 0 1px 0 rgb(255 255 255 / .18); }
.chat-compose input, .chat-compose textarea { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 4px 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--control-bg); box-shadow: var(--glass-highlight); color: var(--text-primary); font: inherit; font-size: var(--fs-sm); line-height: 1.4; }
.chat-compose input { height: var(--control-sm); padding-top: 0; padding-bottom: 0; }
.chat-compose textarea { resize: none; }
.chat-compose input:focus-visible, .chat-compose textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.chat-compose .button { align-self: flex-end; flex-shrink: 0; min-height: var(--control-sm); padding: 0 10px; font-size: var(--fs-xs); }
.chat-compose kbd { opacity: .7; }
.chat-compose-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-comment-form { display: flex; flex-direction: column; gap: 8px; }
.chat-comment-form .chat-compose { border: 1px solid var(--glass-edge); border-radius: var(--radius-md); }
.chat-comment-form .hint { margin: 0; }
.chat-detail-content.is-empty { color: var(--text-tertiary); }
.chat-owner-actions { display: flex; flex-shrink: 0; gap: 8px; }
.chat-owner-actions .button[hidden] { display: none; }
.chat-detail-heading h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-xl); line-height: 1.45; }
.chat-detail-heading h3[hidden] { display: none; }
.chat-detail-head { display: flex; flex-direction: column; gap: 8px; }
.chat-detail-content { flex-shrink: 0; max-height: 25vh; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 12px 16px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface-raised); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); overflow-wrap: anywhere; white-space: pre-wrap; font-size: var(--fs-md); line-height: 1.75; }
.chat-detail-content[hidden] { display: none; }
.chat-comments-title { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: var(--fs-md); }
.chat-comments-title span { padding: 0 8px; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text-secondary); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.chat-comments { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; max-height: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.chat-comment { align-self: flex-start; max-width: min(100%, 560px); padding: 9px 14px; border: 1px solid var(--glass-edge); border-radius: 14px 14px 14px 4px; background: var(--glass-sheen), var(--surface-muted); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.chat-comment.is-mine { align-self: flex-end; border-color: var(--highlight); border-radius: 14px 14px 4px 14px; background: var(--highlight-bg); }
.chat-comment.is-new { animation: fade-up .24s ease both; }
.chat-comment-head { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: var(--fs-xs); }
.chat-badge { padding: 0 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-text); font-size: var(--fs-2xs); font-weight: 600; }
.chat-time { color: var(--text-tertiary); }
.chat-comment-text { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: var(--fs-md); line-height: 1.65; }
.chat-comment-label { color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 600; }
.chat-detail-head, .chat-detail-content { animation: fade-up .24s ease both; }
@media (max-width: 720px) {
  .chat-bubble { max-width: 90%; }
  .chat-list { padding: 14px 12px; }
  .chat-comment { max-width: 92%; }
}

/* 동작 애니메이션: 요소가 나타나는 순간(탭 전환·결과 표시·알림·할 일 목록 갱신)에만 짧게 재생합니다. */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes glass-pop-in {
  0% { opacity: 0; translate: 0 12px; scale: .9; }
  60% { opacity: 1; translate: 0 -2px; scale: 1.025; }
  80% { translate: 0 1px; scale: .995; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes status-flash { 0% { box-shadow: 0 0 0 0 var(--highlight); opacity: .55; } 40% { box-shadow: 0 0 0 3px transparent; opacity: 1; } 100% { box-shadow: 0 0 0 0 transparent; opacity: 1; } }
@keyframes check-pop { 50% { transform: scale(1.25); } }
/* 패널 전환은 liquid-motion의 방향성 애니메이션이 담당합니다. 팝업은 종료 후 opacity를 점유하지 않습니다. */
.floating-message:not([hidden]) { transform-origin: 100% 100%; animation: glass-pop-in .42s cubic-bezier(.2, .7, .2, 1); }
.error-floating:not([hidden]), .dialog-floating:not([hidden]) { transform-origin: 0 0; animation: glass-pop-in .42s cubic-bezier(.2, .7, .2, 1); }
.status.is-updated { animation: status-flash .6s ease-out; }
#profiler-result > * { animation: fade-up .3s ease both; }
#profiler-result > :nth-child(2) { animation-delay: .05s; }
#profiler-result > :nth-child(3) { animation-delay: .1s; }
#profiler-result > :nth-child(n+4) { animation-delay: .15s; }
.profiler-card, .profiler-procedures li { animation: fade-up .3s ease both; }
.profiler-cards > :nth-child(2), .profiler-procedures li:nth-child(2) { animation-delay: .04s; }
.profiler-cards > :nth-child(3), .profiler-procedures li:nth-child(3) { animation-delay: .08s; }
.profiler-cards > :nth-child(n+4), .profiler-procedures li:nth-child(n+4) { animation-delay: .12s; }
details[open] > :not(summary) { animation: fade-in .22s ease both; }
.note-preview:not([hidden]), .note-table-card, .todo-empty, #todo-undo-bar:not([hidden]), .todo-field-error:not([hidden]), .todo-group-title { animation: fade-up .24s ease both; }
.todo-row { animation: fade-up .22s ease both; }
.todo-check:checked { animation: check-pop .28s ease; }
.button-primary:hover:not(:disabled), .button-danger:hover:not(:disabled) { transform: translateY(-1px); }
.button, .tool-tab, .subtab-btn, .button-copy, .note-radio, .todo-filters button, .theme-toggle, .todo-remove { transition: background-color var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), opacity var(--ease), transform var(--spring); }
:is(.button, .button-copy, .tool-tab, .subtab-btn, .note-radio, .todo-filters button, .theme-toggle, .todo-remove):active:not(:disabled) { transform: translateY(1px) scale(.94, .9); transition-duration: .1s; transition-timing-function: ease-out; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  :is(.button, .button-copy, .tool-tab, .subtab-btn, .note-radio, .todo-filters button, .theme-toggle, .todo-remove):is(:hover, :active) { transform: none !important; }
}

/* Edge 앱(PWA) 창 제어 오버레이: 상단바가 제목 표시줄을 대신하고 오른쪽 창 버튼 영역을 비워 둡니다. */
@media (display-mode: window-controls-overlay) {
  .topbar { position: sticky; top: 0; z-index: 20; height: max(40px, env(titlebar-area-height, 40px)); box-sizing: border-box; padding-left: env(titlebar-area-x, 0px); padding-right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw)); app-region: drag; -webkit-app-region: drag; user-select: none; -webkit-user-select: none; }
  .topbar-inner { width: calc(100% - 32px); }
  .topbar a, .topbar button { app-region: no-drag; -webkit-app-region: no-drag; }
  .tool-tabs { top: auto; }
}

/* HR Timeline */
.hrtimeline-panel:not([hidden]) { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.hrtimeline-container { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 8px; overflow: hidden; }
.hrtimeline-controls { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface-raised); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
.hrtimeline-base-date-container { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 600; }
.hrtimeline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hrtimeline-form > span { color: var(--text-tertiary); }
.hrtimeline-form input, .hrtimeline-base-date-container input { min-width: 0; height: var(--control-sm); padding: 0 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--control-bg); box-shadow: var(--glass-highlight); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); color: var(--text-primary); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.hrtimeline-form .button { min-height: var(--control-sm); padding: 0 10px; font-size: var(--fs-xs); }
.hrtimeline-form input:invalid:not(:placeholder-shown) { border-color: var(--error-border); }
#hrtimeline-base-date, #hrtimeline-date { width: 120px; }
#hrtimeline-start, #hrtimeline-end { width: 84px; }
.hrtimeline-form input[type="text"]#hrtimeline-employee { flex: 0 1 140px; }
.hrtimeline-form input[type="text"]#hrtimeline-task { flex: 1 1 180px; }
.gantt-container { flex: 1; min-height: 180px; position: relative; display: flex; flex-direction: column; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); }
#hrtimeline-list { flex-shrink: 0; max-height: 180px; overflow-y: auto; overscroll-behavior: contain; }
.gantt-header-row, .gantt-row { display: flex; min-width: max-content; border-bottom: 1px solid var(--border); }
.gantt-row:last-child { border-bottom: none; }
.gantt-cell-fixed { position: sticky; left: 0; z-index: 2; display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 120px; padding: 8px; border-right: 1px solid var(--border); background: var(--surface-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); font-size: var(--fs-sm); font-weight: 600; }
.gantt-header-row .gantt-cell-fixed { background: var(--surface-muted); color: var(--text-secondary); }
.gantt-emp-cell:hover { background: var(--surface-muted); }
.gantt-timeline-header-container, .gantt-timeline-cell-container { display: flex; }
.gantt-day-header { display: flex; flex-direction: column; flex-shrink: 0; width: 360px; /* 12 hours * 30px */ border-right: 1px solid var(--border); }
.gantt-day-title { padding: 6px 4px; border-bottom: 1px solid var(--border); background: var(--surface-muted); font-size: var(--fs-sm); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.gantt-hours-row { display: flex; background: var(--surface-raised); }
.gantt-hour-label { flex: 1; padding: 3px 0; border-right: 1px dashed var(--border); color: var(--text-secondary); font-size: var(--fs-2xs); text-align: center; font-variant-numeric: tabular-nums; }
.gantt-hour-label:last-child { border-right: none; }
.gantt-day-cell { position: relative; display: flex; flex-shrink: 0; width: 360px; height: 40px; border-right: 1px solid var(--border); }
.gantt-hour-grid { flex: 1; border-right: 1px dashed var(--border); }
.gantt-hour-grid:last-child { border-right: none; }
.gantt-task-block { position: absolute; top: 5px; z-index: 1; display: flex; align-items: center; height: 30px; padding: 0 6px; overflow: hidden; border-radius: var(--radius-sm); background: var(--focus) linear-gradient(180deg, rgb(255 255 255 / .18), transparent 60%); color: var(--on-focus); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), var(--shadow-raised); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; transition: filter var(--ease); }
.gantt-task-block:hover { filter: brightness(1.08); }
.gantt-task-content { overflow: hidden; text-overflow: ellipsis; }

/* 08 유틸리티 (converter) 탭 스타일 */
.subtab-nav { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 3px; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: linear-gradient(115deg, var(--glass-prism), transparent 40%, var(--glass-prism)), var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); position: relative; isolation: isolate; box-shadow: var(--glass-highlight), var(--dock-shadow); }
.subtab-btn { position: relative; z-index: 1; min-height: 28px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.subtab-btn:hover { background: var(--glass-sheen-hover), var(--control-bg); color: var(--text-primary); }
.subtab-btn[aria-selected="true"], .subtab-btn.active { background: var(--glass-lens); border-color: var(--glass-edge); color: var(--text-primary); box-shadow: var(--glass-highlight), var(--shadow-raised); }
.subtab-nav[data-liquid-ready] .subtab-btn[aria-selected="true"], .subtab-nav[data-liquid-ready] .subtab-btn.active { border-color: transparent; background: transparent; box-shadow: none; }
.subtab-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.subtab-panel[hidden] { display: none !important; }
.converter-controls { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.converter-controls .button, .converter-controls select { min-height: var(--control-sm); padding: 0 10px; font-size: var(--fs-xs); }
.converter-controls select { padding-right: 24px; }
#subtab-converter .editor-grid { flex: 1; min-height: 360px; }

.utility-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; margin-top: 8px; }
.utility-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--glass-edge); border-radius: var(--radius-md); background: var(--glass-sheen), var(--surface); box-shadow: var(--glass-highlight), var(--shadow-raised); backdrop-filter: var(--glass-card-blur); -webkit-backdrop-filter: var(--glass-card-blur); transition: border-color var(--ease), box-shadow var(--ease); }
.utility-card:hover { border-color: var(--border-strong); background: var(--glass-sheen-hover), var(--surface-raised); }
.utility-card h3 { margin: 0; font-size: var(--fs-md); font-weight: 700; color: var(--text-primary); }
.utility-card-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.date-fields-grid { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.field-row .field-name { width: 130px; flex-shrink: 0; font-weight: 600; color: var(--text-secondary); }
.field-row input { flex: 1; min-width: 0; height: var(--control-sm); padding: 0 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-xs); background: var(--control-bg); box-shadow: var(--glass-highlight); color: var(--text-primary); font-family: var(--font-mono); font-size: var(--fs-sm); }
.field-row input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }

.date-badges-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-pill); background: var(--surface-muted); box-shadow: var(--glass-highlight); color: var(--text-secondary); font-size: var(--fs-2xs); }
.badge .badge-val { color: var(--text-primary); font-weight: 600; }

.diff-fields-row, .offset-fields-row { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.diff-arrow { font-size: var(--fs-lg); color: var(--text-tertiary); margin-bottom: 6px; }
.field-stacked { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 100px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); }
.field-stacked input, .field-stacked select { width: 100%; height: var(--control-sm); padding: 0 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-xs); background: var(--control-bg); box-shadow: var(--glass-highlight); color: var(--text-primary); font: inherit; font-size: var(--fs-sm); }
.field-stacked input:focus, .field-stacked select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }

.diff-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stat-pill { padding: 4px 10px; border: 1px solid var(--glass-edge); border-radius: var(--radius-xs); background: var(--control-bg); box-shadow: var(--glass-highlight); font-size: var(--fs-xs); color: var(--text-secondary); }
.stat-pill strong { color: var(--text-primary); }
.stat-pill.stat-highlight { border-color: var(--highlight); background: var(--highlight-bg); color: var(--text-primary); font-weight: 600; }

.card-divider { border: 0; border-top: 1px dashed var(--border); margin: 6px 0; }
.offset-result-row { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-secondary); padding: 6px 0; }
.offset-result-row strong { color: var(--text-primary); font-family: var(--font-mono); font-size: var(--fs-md); }

.uuid-options-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.uuid-textarea { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-sm); background: var(--control-bg); box-shadow: var(--glass-highlight); color: var(--text-primary); font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5; resize: vertical; }
.uuid-textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }

/* 투명도 줄이기·고대비 설정 또는 backdrop-filter 미지원 환경에서는 유리 대신 불투명 면을 씁니다. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root, :root[data-theme="light"], :root[data-theme="dark"] {
    --surface: var(--surface-solid);
    --surface-raised: var(--surface-raised-solid);
    --surface-muted: var(--surface-muted-solid);
    --editor-bg: var(--surface-solid);
    --editor-gutter: var(--surface-muted-solid);
    --control-bg: var(--surface-solid);
    --control-bg-hover: var(--surface-muted-solid);
    --glass-sheen: none;
    --glass-sheen-hover: none;
  }
  body { background: var(--page-bg); }
  body::before, body::after { display: none; }
  .topbar, .tool-tabs, .subtab-nav, .panel, .dialog-floating, .floating-message, .error-floating, .editor-card, .utility-card, .profiler-card, .profiler-procedures li, .profiler-grid, .profiler-grid th, .note-editor, .note-content, .note-preview, .note-preview th, .note-table-card, .note-table-card .note-grid-column, .note-table-card .note-grid-row, .note-table-card .note-grid-corner, .todo-overview, .todo-create, .todo-row, .todo-empty, .todo-undo-bar, .chat-form, .chat-room, .chat-bubble, .chat-detail-content, .chat-comment, .hrtimeline-controls, .gantt-container, .gantt-cell-fixed, .button-secondary, select, .check-label, .note-radio, .todo-filters button, .info-note, .status { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .topbar, .tool-tabs, .subtab-nav, .panel, .dialog-floating { background: var(--surface-solid); border-color: var(--border-strong); }
  .tool-tab[aria-selected="true"], .subtab-btn[aria-selected="true"], .subtab-btn.active { background: var(--surface-muted-solid); border-color: var(--border-strong); }
  .tool-tab-lens { background: var(--surface-muted-solid); border-color: var(--border-strong); box-shadow: none; }
  .tool-tab-lens::after { display: none; }
  .floating-message { background: var(--accent); color: var(--accent-text); text-shadow: none; }
  .error-floating, .floating-message.is-error { background: var(--error-bg); }
  .floating-message.is-error { color: var(--error-text); }
  .info-note { background: var(--surface-muted-solid); }
  .status:not(.error) { background: var(--surface-solid); border-color: var(--border-strong); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root, :root[data-theme="light"], :root[data-theme="dark"] {
    --surface: var(--surface-solid);
    --surface-raised: var(--surface-raised-solid);
    --surface-muted: var(--surface-muted-solid);
    --editor-bg: var(--surface-solid);
    --editor-gutter: var(--surface-muted-solid);
    --control-bg: var(--surface-solid);
    --control-bg-hover: var(--surface-muted-solid);
    --glass-sheen: none;
    --glass-sheen-hover: none;
  }
  .topbar, .tool-tabs, .subtab-nav, .panel, .dialog-floating { background: var(--surface-solid); }
  .tool-tab-lens { background: var(--surface-raised-solid); }
  .floating-message { background: var(--accent); color: var(--accent-text); text-shadow: none; }
  .error-floating, .floating-message.is-error { background: var(--error-bg); }
  .floating-message.is-error { color: var(--error-text); }
}

/* -------------------------------------------------------------
 * 07 API Tester Styles
 * ------------------------------------------------------------- */
.api-panel { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.api-workspace { display: flex; gap: 12px; flex: 1; min-height: 0; position: relative; }
.api-history-sidebar { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; transition: width var(--ease), transform var(--ease); }
.api-history-sidebar.collapsed { width: 0; min-width: 0; border: none; padding: 0; overflow: hidden; display: none; }
.history-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-raised); flex-shrink: 0; }
.history-header h3 { margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--text-primary); }
.api-history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding: 4px; gap: 4px; min-height: 0; }
.history-empty { padding: 24px 12px; text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }
.history-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: background var(--ease), border-color var(--ease); font-size: var(--fs-xs); text-align: left; }
.history-item:hover, .history-item:focus-visible { background: var(--surface-raised); border-color: var(--border); outline: none; }
.method-badge { flex-shrink: 0; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-xs); text-transform: uppercase; }
.method-get { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.method-post { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.method-put { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.method-delete { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.method-patch { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.method-head, .method-options { background: rgba(107, 114, 128, 0.15); color: #6b7280; }
.history-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-weight: 500; color: var(--text-primary); }
.history-meta { flex-shrink: 0; font-size: 10px; color: var(--text-muted); }

.api-split-container { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, var(--split-left, 1fr)) 10px minmax(0, var(--split-right, 1fr)); grid-template-rows: minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.api-request-pane, .api-response-pane { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-width: 0; min-height: 0; overflow: hidden; }
.api-request-pane { overflow-y: auto; }
.api-url-bar { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.api-method-select { width: 110px; height: var(--control-md); font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--control-bg); color: var(--text-primary); padding: 0 8px; }
.api-url-input { flex: 1; min-width: 0; height: var(--control-md); font-family: var(--font-mono); font-size: var(--fs-sm); border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--control-bg); color: var(--text-primary); padding: 0 10px; }
.api-url-input:focus, .api-method-select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.api-options-row { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--text-secondary); flex-shrink: 0; }
.checkbox-label { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.api-field-group { display: flex; flex-direction: column; gap: 6px; }
.api-field-group:not(.api-body-group) { flex-shrink: 0; }
.api-field-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); }
.api-field-header { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.api-headers-textarea { width: 100%; font-family: var(--font-mono); font-size: var(--fs-sm); padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--control-bg); color: var(--text-primary); resize: vertical; box-sizing: border-box; }
.api-body-group { flex: 1; display: flex; flex-direction: column; min-height: 120px; }
.api-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; background: var(--surface-raised); }

.api-res-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.api-res-status-group { display: flex; align-items: center; gap: 8px; }
.badge-status { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-xs); padding: 4px 8px; border-radius: var(--radius-xs); background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-secondary); }
.status-2xx { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: #10b981; }
.status-3xx { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.4); color: #3b82f6; }
.status-4xx { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); color: #f59e0b; }
.status-5xx { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #ef4444; }
.api-res-actions { display: flex; gap: 6px; }
.api-res-error-box { padding: 10px; border-radius: var(--radius-xs); background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border); font-size: var(--fs-xs); font-family: var(--font-mono); flex-shrink: 0; }
.api-res-headers-list { max-height: 160px; overflow-y: auto; padding: 8px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-xs); display: flex; flex-direction: column; gap: 4px; font-family: var(--font-mono); font-size: var(--fs-xs); flex-shrink: 0; }
.header-row { display: flex; gap: 6px; word-break: break-all; }
.header-key { color: var(--text-secondary); flex-shrink: 0; }
.header-val { color: var(--text-primary); }

@media (max-width: 768px) {
  .api-workspace { flex-direction: column; min-height: auto; }
  .api-history-sidebar { width: 100%; max-height: 200px; }
  .api-split-container { display: flex; flex-direction: column; }
  .api-url-bar { flex-wrap: wrap; }
  .api-url-input { width: 100%; }
  .api-body-group { min-height: 220px; }
  .api-response-pane { min-height: 320px; }
}

/* -------------------------------------------------------------
 * Crypto & Security Subtab Styles
 * ------------------------------------------------------------- */
.crypto-textarea { width: 100%; font-family: var(--font-mono); font-size: var(--fs-sm); padding: 8px; border: 1px solid var(--glass-edge); border-radius: var(--radius-xs); background: var(--control-bg); color: var(--text-primary); resize: vertical; box-sizing: border-box; }
.hash-results-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.hash-block { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--surface-raised); border: 1px solid var(--glass-edge); border-radius: var(--radius-xs); }
.hash-title { font-size: var(--fs-xs); color: var(--text-secondary); font-family: var(--font-mono); }
.jwt-split-views { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.jwt-pane { display: flex; flex-direction: column; gap: 4px; }
.jwt-pane-header { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--text-secondary); }
.jwt-code-pre { min-height: 110px; max-height: 200px; overflow: auto; padding: 8px; background: var(--surface-raised); border: 1px solid var(--glass-edge); border-radius: var(--radius-xs); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-primary); margin: 0; white-space: pre-wrap; word-break: break-all; }
.jwt-exp-text { font-size: var(--fs-xs); font-family: var(--font-mono); color: var(--text-secondary); }
.card-field-error { padding: 6px 8px; background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border); border-radius: var(--radius-xs); font-size: var(--fs-xs); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.moji-candidates-container { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; margin-top: 6px; }
.moji-candidate-item { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--surface-raised); border: 1px solid var(--glass-edge); border-radius: var(--radius-xs); cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.moji-candidate-item:hover, .moji-candidate-item:focus-visible { border-color: var(--focus); background: var(--surface-raised-hover); outline: none; }
.moji-desc { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.moji-fixed { font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); word-break: break-all; }
.moji-copy-hint { font-size: 10px; color: var(--accent); margin-top: 2px; }
.moji-empty { padding: 16px; text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }

@media (forced-colors: active) {
  body { background: Canvas; }
  body::before, body::after { display: none; }
  .topbar, .tool-tabs, .subtab-nav, .panel, .dialog-floating, .floating-message, .error-floating, .editor-card, .utility-card, .profiler-card, .note-editor, .note-preview, .note-table-card, .todo-row, .chat-room { background: Canvas; color: CanvasText; border-color: ButtonText; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tool-tab-lens { background: Highlight; border-color: Highlight; box-shadow: none; forced-color-adjust: none; }
  .tool-tab-lens::after { display: none; }
  .tool-tab[aria-selected="true"], .tool-tabs[data-liquid-ready] .tool-tab[aria-selected="true"], .subtab-btn[aria-selected="true"], .subtab-nav[data-liquid-ready] .subtab-btn[aria-selected="true"] { background: Highlight; color: HighlightText; border-color: Highlight; forced-color-adjust: none; }
  .tool-tab[aria-selected="true"] .tab-index { color: HighlightText; }
  :focus-visible { outline-color: Highlight; }
  .tool-tab[aria-selected="true"]:focus-visible, .subtab-btn[aria-selected="true"]:focus-visible { outline-color: ButtonText; }
}

