:root {
  --paper: #f2f1e9;
  --surface: #fcfbf6;
  --ink: #253b2c;
  --muted: #62705e;
  --forest: #2f543b;
  --forest-dark: #203d2a;
  --line: #dce0d4;
  --sage: #e9ede1;
  --error: #9b553e;
  --sans: 'Trebuchet MS', 'Segoe UI', sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .46; cursor: not-allowed; }
a { color: inherit; }
[hidden] { display: none !important; }
button, summary, select, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #7a995e; outline-offset: 3px; }
button { transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.app-shell { max-width: 1720px; margin: 0 auto; padding: 0 24px; }
.topbar { min-height: 84px; display: flex; gap: 24px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #aab89e; border-radius: 12px; color: var(--forest); }
.brand-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 12px; }
.brand b { font: 600 22px var(--serif); letter-spacing: -.5px; }
.brand small { color: var(--muted); font-size: 13px; }
.topbar-meta { display: flex; align-items: center; gap: 9px; margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #78975b; }
.meta-divider { height: 13px; width: 1px; background: #d0d7c8; margin: 0 3px; }
.file-menu { position: relative; z-index: 5; }
.file-menu summary { list-style: none; border: 1px solid #cbd2c2; border-radius: 7px; padding: 9px 13px; background: var(--surface); display: flex; align-items: center; gap: 19px; font-size: 13px; }
.file-menu summary::-webkit-details-marker { display: none; }
.file-menu summary:hover, .file-menu[open] summary { background: var(--sage); }
.file-menu-items { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; padding: 6px; border: 1px solid #cdd5c4; border-radius: 10px; background: var(--surface); box-shadow: 0 12px 40px #22302120; }
.file-menu-items button { display: flex; align-items: center; width: 100%; gap: 11px; border: 0; background: transparent; text-align: left; min-height: 40px; padding: 9px 10px; border-radius: 5px; font-size: 13px; }
.file-menu-items button:hover:not(:disabled) { background: var(--sage); }
.file-menu-items button span { font-size: 19px; width: 20px; text-align: center; color: var(--muted); }
.file-menu-items .reset-button { border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; margin-top: 4px; padding-top: 12px; }
.workspace { display: grid; grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr); align-items: start; gap: 16px; }
.workspace-panel { min-width: 0; border: 1px solid #d3d9cb; border-radius: 14px; background: var(--surface); overflow: hidden; }
.panel-heading { min-height: 92px; padding: 21px 22px 19px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-heading h1, .panel-heading h2 { font: 400 27px/1.1 var(--serif); letter-spacing: -.65px; margin: 0; }
.panel-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.panel-index { color: #a4ae99; font: 12px var(--mono); align-self: flex-start; margin-top: 5px; }
.tool-tabs { padding: 0 17px; display: flex; gap: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f5f5ee; }
.tool-tab { position: relative; min-height: 49px; padding: 0 12px; border: 0; background: transparent; color: #62705e; font-size: 13px; white-space: nowrap; }
.tool-tab:hover { background: #e9eddf; color: var(--ink); }
.tool-tab.active { color: var(--forest-dark); font-weight: 600; }
.tool-tab.active::after { content: ''; position: absolute; bottom: 0; height: 3px; left: 12px; right: 12px; border-radius: 3px 3px 0 0; background: var(--forest); }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 3px; padding: 0 4px; border-radius: 5px; color: #62705e; background: #e2e8d9; font: 11px var(--mono); }
.tool-panel { min-height: 591px; }
.tool-panel.active { animation: panel-enter .2s ease-out; }
.sql-terminal { position: relative; margin: 17px 17px 0; border: 1px solid #354b3e; border-radius: 9px; background: #18271f; color: #dae4d5; overflow: hidden; }
.sql-terminal:focus-within { border-color: #9bb582; box-shadow: 0 0 0 2px #a2ba8226; }
.editor-toolbar { height: 39px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #334337; background: #223229; font: 11px var(--mono); color: #a1b29d; }
.terminal-session { display: flex; align-items: center; gap: 13px; }
.terminal-dots { display: inline-flex; gap: 5px; }
.terminal-dots i { width: 6px; height: 6px; border-radius: 50%; background: #64785c; }
.terminal-dots i:first-child { background: #bc8b6b; }
.terminal-dots i:nth-child(2) { background: #c4b37a; }
.terminal-dots i:last-child { background: #91a877; }
.terminal-mode { color: #899a83; font-size: 11px; }
.editor-wrap { display: flex; height: 202px; }
.gutter-viewport { flex: 0 0 38px; overflow: hidden; border-right: 1px solid #2b3d30; }
.line-gutter { padding: 18px 8px 18px 0; white-space: pre; color: #647c64; text-align: right; font: 13px/1.75 var(--mono); }
.editor-code { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.highlight-viewport { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sql-highlight, #sql-editor { margin: 0; padding: 18px 15px; border: 0; border-radius: 0; font: 13px/1.75 var(--mono); font-variant-ligatures: none; letter-spacing: 0; tab-size: 2; white-space: pre; overflow-wrap: normal; word-break: normal; }
.sql-highlight { width: max-content; min-width: 100%; color: #dae4d5; }
#sql-editor { position: relative; width: 100%; height: 100%; resize: none; display: block; outline: 0; background: transparent; color: transparent; caret-color: #eff8dc; -webkit-text-fill-color: transparent; overflow: auto; scrollbar-color: #52664c #18271f; }
#sql-editor::placeholder { color: #8b9d80; -webkit-text-fill-color: #8b9d80; }
#sql-editor::selection { background: #788e614d; }
.sql-keyword { color: #b9cf93; }
.sql-string { color: #e2bd8c; }
.sql-comment { color: #7c9479; font-style: italic; }
.sql-number { color: #dca58e; }
.sql-function { color: #8ec7c1; }
.sql-identifier { color: #dddbb8; }
.sql-parameter { color: #cfb4d6; }
.sql-operator { color: #a9c6b0; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; min-height: 34px; gap: 10px; padding: 6px 13px; border-top: 1px solid #2c3f31; color: #889e80; font-size: 11px; }
.shortcut-hint { white-space: nowrap; }
kbd { font: 11px var(--mono); padding: 2px 4px; border: 1px solid #485940; border-radius: 3px; color: #b4c6a6; margin-right: 3px; }
.sql-terminal.executed { animation: terminal-run .55s ease-out; }
.run-row { padding: 14px 17px 10px; display: flex; align-items: center; gap: 8px; }
.run-button, .plan-button { min-height: 37px; border-radius: 6px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; }
.run-button { border: 1px solid var(--forest); color: #f3f6e9; background: var(--forest); font-weight: 600; }
.run-button > span:first-child { font-size: 10px; color: #c8dda8; }
.run-button:hover:not(:disabled) { background: var(--forest-dark); border-color: var(--forest-dark); }
.run-button:active:not(:disabled) { transform: translateY(1px); }
.plan-button { border: 1px solid #cdd5c4; background: transparent; color: #596c50; }
.plan-button:hover:not(:disabled) { background: var(--sage); }
.run-state { margin-left: auto; font: 11px var(--mono); color: #55713f; }
.run-state.error { color: var(--error); }
.sql-rules { margin: 0 17px 12px; font-size: 11px; color: #62705e; }
.sql-rules summary { width: fit-content; min-height: 26px; display: flex; align-items: center; gap: 6px; list-style: none; }
.sql-rules summary::-webkit-details-marker { display: none; }
.sql-rules summary::before { content: '+'; font: 14px var(--mono); }
.sql-rules[open] summary::before { content: '−'; }
.sql-rules[open] { padding-bottom: 5px; }
.sql-rules p { margin: 6px 0 8px; line-height: 1.6; max-width: 62ch; }
.result-region { min-height: 215px; border-top: 1px solid var(--line); }
.result-placeholder { min-height: 195px; padding: 26px 20px; display: flex; align-items: center; justify-content: center; gap: 13px; color: #95a088; }
.result-placeholder b { font: 400 19px var(--serif); color: #596e50; }
.result-placeholder p { max-width: 37ch; font-size: 12px; color: #62705e; margin: 6px 0 0; }
.result-icon { font: 30px var(--serif); color: #9eae8f; }
.result-header { min-height: 42px; padding: 10px 17px; display: flex; gap: 10px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: #f5f6ef; font: 10px/1.5 var(--mono); color: #62705e; }
.result-header > span:last-child { text-align: right; }
.revision-flag { color: #8e6244; font-size: 10px; font-weight: 400; }
.result-context { border-top: 1px solid var(--line); padding: 9px 17px; color: #62705e; font-size: 11px; }
.result-context summary { min-height: 25px; display: list-item; width: fit-content; }
.result-context pre { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.6 var(--mono); color: #62705e; }
.result-table-wrap { overflow: auto; max-height: 320px; scrollbar-color: #c2cbb6 #f2f4eb; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 12px; }
.data-table th { position: sticky; top: 0; z-index: 1; padding: 11px 13px; border-bottom: 1px solid #d9dfce; background: #f0f3e9; color: #596b50; font: 11px var(--mono); font-weight: 500; }
.data-table td { max-width: 280px; padding: 10px 13px; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #e9eddf; color: #455c40; }
.data-table tbody tr:nth-child(even) { background: #f8f9f2; }
.data-table tbody tr:hover { background: #eff3e6; }
.column-index { margin-left: 7px; font-size: 10px; color: #62705e; }
.number-value { font-variant-numeric: tabular-nums; color: #5c7051; }
.null-value, .empty-string { color: #62705e; font: italic 12px var(--serif); }
.empty-result { padding: 28px 19px; color: #62705e; font-size: 13px; text-align: center; }
.error-box { margin: 15px 17px; padding: 13px 15px; background: #f6eae1; border-left: 3px solid #bd8060; border-radius: 0 5px 5px 0; color: #975c43; font: 12px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.plan-inline { margin: 0 17px 17px; padding: 12px; background: var(--sage); color: #62705e; }
.data-browser { display: grid; grid-template-columns: 157px minmax(0, 1fr); min-height: 591px; }
.table-rail { padding: 17px 0; border-right: 1px solid var(--line); background: #f7f8f0; }
.rail-title { display: flex; justify-content: space-between; padding: 0 12px 13px; font-size: 11px; color: #62705e; }
.table-list { padding: 0 6px; }
.table-item { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 36px; border: 0; border-radius: 5px; background: transparent; padding: 7px; text-align: left; font: 11px var(--mono); color: #62705e; }
.table-item:hover { background: #eaf0df; }
.table-item.active { background: #e0e9d4; color: #39562e; font-weight: 600; }
.table-item span:last-child { overflow: hidden; text-overflow: ellipsis; }
.table-icon { font-size: 13px; color: #9aa98a; }
.rail-empty { padding: 12px; color: #62705e; font-size: 12px; }
.table-content { min-width: 0; }
.table-detail-head { padding: 18px 17px 16px; border-bottom: 1px solid var(--line); }
.table-detail-head h3 { margin: 0 0 6px; font: 400 22px var(--serif); overflow-wrap: anywhere; }
.table-stats { font: 11px var(--mono); color: #62705e; }
.schema-badge { font: 10px var(--mono); border: 1px solid #dbe2d0; border-radius: 4px; padding: 3px 5px; color: #62705e; vertical-align: middle; }
.schema-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.schema-pill { padding: 4px 6px; border: 1px solid #e0e6d5; border-radius: 4px; font: 10px/1.4 var(--mono); color: #62705e; overflow-wrap: anywhere; max-width: 100%; }
.schema-pill i { color: #62705e; font-style: normal; }
.schema-pill.pk { background: #edf1e5; color: #627a50; }
.schema-pill.fk { background: #f5f0e5; border-color: #e9dfca; color: #8e6244; }
.table-content .result-table-wrap { max-height: 380px; }
.table-page { padding: 12px; display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); color: #62705e; font: 10px/1.5 var(--mono); }
.page-controls { display: inline-flex; gap: 7px; align-items: center; }
.page-controls button { min-width: 32px; min-height: 32px; border: 1px solid #d4ddc8; border-radius: 4px; background: transparent; font-size: 18px; }
.page-controls button:hover:not(:disabled) { background: var(--sage); }
.plan-view { padding-bottom: 20px; }
.plan-toolbar { padding: 15px 17px; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); color: #62705e; font: 10px/1.5 var(--mono); }
.plan-stale { color: #8e6244; }
.plan-svg-wrap { overflow: auto; padding: 15px; min-height: 175px; }
.plan-svg { display: block; max-width: none; margin: auto; font-family: var(--mono); }
.plan-node rect { fill: #eef2e6; stroke: #cedabe; stroke-width: 1; }
.plan-node text { fill: #576d49; font-size: 10px; }
.plan-node .plan-id { fill: #62705e; font-size: 9px; }
.plan-edge { stroke: #b9c8a7; stroke-width: 1.2; fill: none; }
.plan-explain { padding: 0 17px; color: #62705e; font-size: 12px; line-height: 1.65; }
.raw-toggle { min-height: 34px; margin: 0 17px 10px; padding: 5px 9px; border: 1px solid #d9e1cd; border-radius: 5px; background: transparent; color: #55713f; font-size: 12px; }
.raw-toggle:hover { background: var(--sage); }
.raw-plan { margin: 0 17px; overflow: auto; }
.raw-plan .data-table { min-width: 420px; }
.plan-origin { margin: 14px 17px 0; border-top: 1px solid var(--line); padding-top: 13px; color: #62705e; font: 11px var(--mono); }
.plan-origin code { display: block; margin-top: 7px; white-space: pre-wrap; overflow-wrap: anywhere; color: #55713f; line-height: 1.6; }
.history-view { padding: 0 17px; }
.history-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.history-top { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; font: 11px var(--mono); color: #62705e; }
.history-id { color: #62705e; }
.history-source { color: #55713f; }
.history-status { margin-left: auto; }
.history-status.success { color: #55713f; }
.history-status.error, .history-error { color: #8e6244; }
.history-stale { color: #8e6244; font-size: 10px; }
.history-sql { margin: 11px 0; color: #576f49; font: 12px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.history-params, .history-error { margin: 7px 0; font: 11px/1.6 var(--mono); overflow-wrap: anywhere; }
.history-params { color: #8e6244; }
.history-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; color: #62705e; font: 10px var(--mono); }
.history-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.history-actions button { min-height: 32px; padding: 6px 8px; border: 1px solid #dbe3cf; border-radius: 4px; background: transparent; color: #55713f; font: 10px var(--sans); }
.history-actions button:hover:not(:disabled) { background: var(--sage); }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 19px 3px 22px; color: #62705e; font-size: 11px; }
.footer span:first-child { color: #62705e; }
.footer span:first-child > span { margin: 0 6px; color: #b2bca8; }
.modal-dialog { width: min(480px, calc(100% - 32px)); padding: 23px; border: 1px solid #becbad; border-radius: 13px; background: var(--surface); color: var(--ink); box-shadow: 0 25px 100px #18251f44; }
.modal-dialog::backdrop { background: #1b2b227a; backdrop-filter: blur(3px); }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.eyebrow { font: 11px var(--mono); color: #62705e; }
.close-dialog { width: 33px; height: 33px; border: 0; border-radius: 5px; background: transparent; color: #62705e; font-size: 25px; }
.close-dialog:hover { background: var(--sage); }
.modal-dialog h2 { margin: 14px 0 9px; font: 400 28px var(--serif); letter-spacing: -.4px; }
.modal-copy { margin: 0 0 21px; color: #62705e; font-size: 13px; line-height: 1.65; }
.dialog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; color: #62705e; }
.field input, .field select { width: 100%; min-width: 0; min-height: 39px; padding: 7px 9px; border: 1px solid #cfdcc0; border-radius: 5px; background: #f7f9f0; font-size: 12px; color: #526d42; }
.field-help { font-size: 11px; color: #62705e; line-height: 1.45; }
.dialog-preview { margin-top: 19px; padding: 12px 13px; border-left: 2px solid #8da971; background: #eef3e5; border-radius: 0 5px 5px 0; color: #62705e; font: 11px/1.7 var(--mono); overflow-wrap: anywhere; }
.preview-sql { color: #55713f; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.primary-button, .secondary-button { min-height: 38px; padding: 8px 14px; border-radius: 5px; font-size: 12px; }
.primary-button { background: var(--forest); border: 1px solid var(--forest); color: #f2f6e8; }
.primary-button:hover { background: var(--forest-dark); }
.primary-button span { margin-left: 10px; }
.secondary-button { border: 1px solid #d1dcc4; background: transparent; color: #62705e; }
.secondary-button:hover { background: var(--sage); }
.danger-button { background: #93684b; border-color: #93684b; }
.danger-button:hover { background: #80573d; }
.compact-dialog { width: min(430px, calc(100% - 32px)); }
.toast-region { position: fixed; z-index: 20; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.toast { max-width: min(430px, calc(100vw - 32px)); padding: 14px 17px; border: 1px solid #bed0a8; border-left: 3px solid #7b9c5b; border-radius: 6px; background: #f8fbf0; box-shadow: 0 8px 28px #2538211c; color: #55713f; font-size: 13px; line-height: 1.55; animation: toast-in .22s ease-out; }
.toast.error { border-color: #dfbfa3; border-left-color: #ad7851; background: #fff8ec; color: #8e6244; }
.inline-warning { margin: 0 18px 14px; padding: 12px; border-left: 2px solid #b98b5c; background: #f5eee0; color: #8e6244; font-size: 12px; line-height: 1.6; }
.connection-error { color: var(--error) !important; }
.connected { color: #55713f; }
.startup-error { line-height: 1.8; }
.startup-error .secondary-button { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes panel-enter { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes terminal-run { 0% { box-shadow: 0 0 0 3px #98b27966; } 100% { box-shadow: 0 0 0 0 #98b27900; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1540px) {
  body { font-size: 15px; }
  .app-shell { padding: 0 32px; }
  .sql-highlight, #sql-editor { font-size: 13px; }
  .line-gutter { font-size: 13px; }
  .editor-wrap { height: 215px; }
}
@media (max-width: 1100px) {
  .app-shell { padding: 0 17px; }
  .workspace { gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .panel-heading { padding-left: 17px; padding-right: 17px; }
  .tool-tabs { padding: 0 8px; gap: 0; }
  .tool-tab { padding: 0 9px; font-size: 12px; }
  .sql-terminal { margin-left: 12px; margin-right: 12px; }
  .sql-highlight, #sql-editor { padding-left: 11px; padding-right: 11px; }
  .data-browser { grid-template-columns: 130px minmax(0, 1fr); }
  .table-item { font-size: 10px; }
  .footer span:nth-child(2) { display: none; }
}
@media (max-width: 850px) {
  .workspace { grid-template-columns: 1fr; gap: 17px; }
  .topbar { min-height: 76px; }
  .brand > span:last-child { gap: 8px; }
  .topbar-meta { font-size: 11px; }
  .brand small { display: none; }
  .tools-column { margin-bottom: 2px; }
  .panel-heading { min-height: 85px; }
  .tool-tabs { padding: 0 13px; }
  .tool-tab { padding: 0 13px; font-size: 13px; }
  .sql-terminal { margin-left: 17px; margin-right: 17px; }
  .sql-highlight, #sql-editor { font-size: 13px; padding-left: 15px; }
  .line-gutter { font-size: 13px; }
  .data-browser { grid-template-columns: 165px minmax(0, 1fr); }
  .table-item { font-size: 11px; }
  .tool-panel { min-height: 540px; }
}
@media (max-width: 520px) {
  .app-shell { padding: 0 10px; }
  .topbar { min-height: 70px; gap: 10px; }
  .brand { gap: 8px; }
  .brand b { font-size: 20px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark svg { width: 25px; height: 25px; }
  .topbar-meta { display: none; }
  .file-menu { margin-left: auto; }
  .file-menu summary { padding: 8px 10px; font-size: 12px; gap: 10px; }
  .workspace-panel { border-radius: 11px; }
  .panel-heading { padding: 19px 16px; }
  .panel-heading h1, .panel-heading h2 { font-size: 26px; }
  .panel-heading p { font-size: 11px; }
  .tool-tabs { padding: 0 7px; overflow: auto; }
  .tool-tab { padding: 0 9px; font-size: 12px; min-height: 46px; }
  .tab-count { min-width: 17px; height: 18px; font-size: 10px; }
  .sql-terminal { margin: 12px 11px 0; }
  .terminal-mode { display: none; }
  .editor-wrap { height: 218px; }
  .gutter-viewport { flex-basis: 30px; }
  .sql-highlight, #sql-editor { font-size: 12px; padding-left: 10px; }
  .line-gutter { font-size: 12px; }
  .editor-footer { font-size: 10px; padding-left: 9px; padding-right: 9px; }
  .shortcut-hint { font-size: 0; }
  .shortcut-hint kbd { font-size: 10px; }
  .run-row { padding: 12px 11px 8px; gap: 7px; }
  .run-button, .plan-button { font-size: 12px; padding: 0 11px; }
  .run-state { font-size: 10px; }
  .sql-rules { margin-left: 12px; margin-right: 12px; }
  .result-header { padding: 10px 12px; font-size: 9px; align-items: flex-start; }
  .result-placeholder { padding: 25px 16px; }
  .result-placeholder b { font-size: 18px; }
  .data-browser { grid-template-columns: 110px minmax(0, 1fr); }
  .table-item { font-size: 10px; padding: 8px 4px; gap: 4px; }
  .table-detail-head { padding: 16px 11px; }
  .table-detail-head h3 { font-size: 20px; }
  .table-stats, .schema-pill { font-size: 10px; }
  .history-view { padding: 0 12px; }
  .history-top { gap: 7px; font-size: 10px; }
  .history-sql { font-size: 11px; }
  .history-actions button { font-size: 10px; }
  .plan-toolbar { font-size: 9px; padding: 12px; }
  .footer { font-size: 10px; padding: 16px 3px; gap: 8px; }
  .modal-dialog { padding: 19px; }
  .dialog-fields { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .toast-region { right: 16px; bottom: 16px; }
}
@media (forced-colors: active) {
  #sql-editor { color: CanvasText; -webkit-text-fill-color: CanvasText; caret-color: CanvasText; }
  .highlight-viewport { display: none; }
  .sql-terminal { border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
