@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}
@font-face {
  font-family: JetBrains;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 800;
}
:root {
  --bg: #f4f6f8;
  --panel: #fff;
  --subtle: #f8fafb;
  --line: #e5e9ed;
  --text: #253247;
  --secondary: #65738a;
  --muted: #6e7b8d;
  --accent: #127d6a;
  --accent-bg: #eaf5f1;
  --code: #fdfefe;
  --blue: #3066b0;
  --orange: #ac591c;
  --string: #2f8060;
  --danger: #c1414a;
  --shadow: 0 12px 45px #172d4320;
  color-scheme: light;
}
:root.dark {
  --bg: #0e1725;
  --panel: #152132;
  --subtle: #17273a;
  --line: #29384b;
  --text: #e2eaf5;
  --secondary: #a1afc4;
  --muted: #9baac0;
  --accent: #77d2b7;
  --accent-bg: #163d36;
  --code: #121f30;
  --blue: #85b6ff;
  --orange: #f6bb82;
  --string: #8dd8b4;
  --danger: #ff99a0;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    13px/1.55 Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
input,
textarea {
  outline: none;
}
input,
select {
  border: 1px solid var(--line);
  background: var(--panel);
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
}
svg {
  display: block;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: #98cbbc66;
}
button,
a {
  transition:
    background 0.15s,
    color 0.15s;
}
button:hover {
  background: var(--subtle);
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  padding: 12px;
  background: var(--panel);
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.app-header {
  height: 85px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  gap: 20px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.brand strong {
  font-size: 22px;
  letter-spacing: 0.5px;
  line-height: 1.1;
}
.brand-en {
  font-size: 16px;
  letter-spacing: -0.5px;
  margin-left: 10px;
}
.brand small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: var(--secondary);
}
.header-center {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: var(--secondary);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--secondary);
  font-size: 12px;
}
.header-nav > a {
  margin-right: 10px;
}
.header-nav > a:hover {
  color: var(--accent);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex-shrink: 0;
  border-radius: 6px;
  color: var(--secondary);
}
.app-body {
  display: flex;
  min-height: calc(100dvh - 85px);
}
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 27px 18px 15px;
  min-height: calc(100dvh - 85px);
}
.eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.7px;
  color: var(--secondary);
}
.sidebar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.sidebar-heading .eyebrow {
  font-size: 8px;
  letter-spacing: 1.3px;
}
.database-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  background: var(--accent-bg);
  border-radius: 8px;
  position: relative;
}
.database-symbol {
  color: var(--accent);
  padding: 7px;
  border: 1px solid #127d6a25;
  border-radius: 7px;
}
.database-card > div {
  min-width: 0;
  flex: 1;
}
.database-card strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.database-card > div > span {
  display: block;
  font-size: 9px;
  color: var(--secondary);
  margin-top: 3px;
}
.local-badge {
  font-size: 8px;
  color: var(--accent);
  padding: 2px 4px;
  border: 1px solid #127d6a30;
  border-radius: 3px;
}
.sidebar-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 36px;
  padding: 8px 12px;
  background: var(--panel);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
}
.button svg {
  width: 14px;
  height: 14px;
}
.button:hover {
  border-color: #abb8bd;
  background: var(--subtle);
}
.button.small {
  font-size: 10px;
  padding: 7px 9px;
  flex: 1;
  min-height: 34px;
}
.button.primary {
  color: #fff;
  background: #127d6a;
  border-color: #127d6a;
  min-height: 37px;
  padding: 8px 15px;
}
.button.primary:hover {
  background: #0d6657;
}
.button.primary kbd {
  font-size: 10px;
  color: #c3e4db;
  margin-left: 5px;
}
.button.danger {
  color: var(--danger);
}
.schema-search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 25px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--subtle);
}
.schema-search svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.schema-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 10px;
}
.schema-heading {
  display: flex;
  justify-content: space-between;
  padding: 23px 5px 12px;
  color: var(--secondary);
  font-size: 10px;
}
.schema-heading > span:last-child {
  font-size: 9px;
  background: var(--subtle);
  padding: 0 5px;
  border-radius: 4px;
}
.schema-tree {
  flex: 1;
  min-height: 150px;
}
.schema-object {
  margin-bottom: 3px;
}
.object-row {
  display: flex;
  align-items: center;
  gap: 3px;
}
.object-toggle {
  width: 22px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--secondary);
  border-radius: 4px;
}
.object-toggle svg {
  width: 12px;
  height: 12px;
}
.object-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
.object-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 32px;
  font:
    11px JetBrains,
    monospace;
  text-align: left;
  padding: 5px 3px;
  border-radius: 4px;
}
.object-name:hover {
  color: var(--accent);
  background: var(--accent-bg);
}
.object-name svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.object-fields {
  padding: 3px 0 8px 29px;
}
.field {
  display: flex;
  align-items: center;
  gap: 6px;
  font:
    10px/2.5 JetBrains,
    monospace;
  color: var(--secondary);
}
.field svg {
  width: 11px;
  height: 11px;
  color: #b98132;
}
.field .field-type {
  margin-left: auto;
  font-size: 8px;
  color: var(--muted);
  max-width: 60px;
  overflow: hidden;
}
.field-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-lower {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  padding: 8px 7px;
  min-height: 36px;
  font-size: 11px;
  color: var(--secondary);
  border-radius: 5px;
}
.sidebar-link svg {
  width: 15px;
  height: 15px;
}
.sidebar-link > span:last-child {
  margin-left: auto;
  font:
    9px JetBrains,
    monospace;
}
.local-note {
  margin-top: 20px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
}
.local-note > span {
  color: var(--accent);
  display: block;
  margin-bottom: 7px;
}
.local-note strong {
  font-size: 10px;
}
.local-note p {
  font-size: 10px;
  line-height: 1.9;
  color: var(--secondary);
  margin-top: 5px;
}
.local-note a {
  display: inline-block;
  font-size: 9px;
  color: var(--accent);
  margin-top: 7px;
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font:
    9px JetBrains,
    monospace;
  color: var(--secondary);
}
.sidebar-footer .status-dot {
  width: 4px;
  height: 4px;
}
.workspace {
  flex: 1;
  min-width: 0;
  padding: 27px 30px 0;
  max-width: 1800px;
  margin: 0 auto;
}
.workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 23px;
  gap: 12px;
}
.workspace-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.workspace-title h1 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.8px;
  margin-top: 5px;
}
.workspace-title h1 > span {
  color: var(--accent);
}
.workspace-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.workspace-actions .button {
  font-size: 10px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.editor-tabs-row {
  height: 45px;
  display: flex;
  align-items: center;
  background: var(--subtle);
  border-bottom: 1px solid var(--line);
  padding-right: 15px;
}
.query-tabs {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  align-self: stretch;
  scrollbar-width: thin;
}
.query-tab {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 115px;
  padding: 0 8px 0 15px;
  gap: 10px;
  border-right: 1px solid var(--line);
  border-top: 2px solid transparent;
  font-size: 10px;
  color: var(--secondary);
}
.query-tab[aria-selected="true"] {
  background: var(--panel);
  border-top-color: var(--accent);
  color: var(--text);
}
.query-tab > span {
  color: var(--accent);
  font:
    10px JetBrains,
    monospace;
}
.tab-close {
  width: 20px;
  height: 24px;
  margin-left: auto;
  font-size: 15px;
  color: var(--muted);
  display: grid;
  place-items: center;
  border-radius: 3px;
}
.query-tab[aria-selected="false"] .tab-close {
  opacity: 0.5;
}
.editor-language {
  margin-left: auto;
  font:
    9px JetBrains,
    monospace;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 20px;
  white-space: nowrap;
}
.tiny-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--secondary);
}
.editor-container {
  height: 305px;
  display: flex;
  position: relative;
  background: var(--code);
}
.line-numbers {
  width: 48px;
  flex-shrink: 0;
  text-align: right;
  padding: 19px 12px 19px 0;
  font:
    11px/23px JetBrains,
    monospace;
  color: #92a0b0;
  overflow: hidden;
  user-select: none;
  white-space: pre;
}
.editor-code {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
}
.editor-code pre,
.editor-code textarea {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 19px 20px 19px 0;
  font:
    12px/23px JetBrains,
    "Microsoft YaHei",
    monospace;
  white-space: pre;
  tab-size: 2;
  overflow: auto;
  resize: none;
  letter-spacing: 0;
  word-spacing: 0;
}
.editor-code pre {
  pointer-events: none;
  overflow: hidden;
  color: var(--text);
}
.editor-code pre code {
  font: inherit;
}
.editor-code textarea {
  width: 100%;
  height: 100%;
  color: transparent;
  caret-color: var(--accent);
  -webkit-text-fill-color: transparent;
}
.editor-code textarea::placeholder {
  color: var(--secondary);
  -webkit-text-fill-color: var(--secondary);
}
.editor-code textarea:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #127d6a15;
}
.sql-keyword {
  color: var(--blue);
  font-weight: 600;
}
.sql-string {
  color: var(--string);
}
.sql-number {
  color: var(--orange);
}
.sql-comment {
  color: #7d8c9e;
  font-style: italic;
}
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 57px;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
}
.run-actions,
.editor-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.selection-hint {
  font-size: 9px;
  color: var(--secondary);
}
.editor-tools {
  gap: 7px;
}
.text-button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 6px;
  min-height: 32px;
  font-size: 10px;
  color: var(--secondary);
  border-radius: 4px;
}
.text-button svg {
  width: 13px;
  height: 13px;
}
.editor-tools .icon-button {
  width: 30px;
  min-width: 30px;
  height: 32px;
}
.editor-tools .icon-button svg {
  width: 14px;
  height: 14px;
}
.example-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 15px 2px 18px;
  font-size: 10px;
  color: var(--secondary);
  flex-wrap: wrap;
}
.example-strip > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--secondary);
}
.example-strip svg {
  width: 12px;
  height: 12px;
  color: #b47732;
}
.example-strip > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.example-strip button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 4px;
  font-size: 9px;
  padding: 4px 9px;
}
.example-strip button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.results-heading {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.view-tabs {
  display: flex;
  align-self: stretch;
  gap: 20px;
}
.view-tabs > button {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 0 3px;
  border-bottom: 2px solid transparent;
  color: var(--secondary);
  white-space: nowrap;
}
.view-tabs > button[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.view-tabs svg {
  width: 14px;
  height: 14px;
}
.view-tabs #result-count {
  font:
    8px JetBrains,
    monospace;
  padding: 1px 5px;
  background: var(--accent-bg);
  border-radius: 4px;
}
.result-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.result-search {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 8px;
}
.result-search svg {
  width: 12px;
  height: 12px;
  color: var(--muted);
}
.result-search input {
  border: 0;
  background: transparent;
  width: 120px;
  min-width: 0;
  font-size: 9px;
}
.query-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 17px;
  color: var(--secondary);
  font-size: 9px;
  background: var(--subtle);
  border-bottom: 1px solid var(--line);
  min-height: 35px;
}
.query-status .status-dot {
  width: 5px;
  height: 5px;
}
.query-status.error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 6%, var(--panel));
  white-space: pre-wrap;
  word-break: break-word;
}
.query-status.error .status-dot {
  background: var(--danger);
}
.result-table {
  overflow: auto;
  max-height: 430px;
  min-height: 220px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font:
    10px/1.6 JetBrains,
    "Microsoft YaHei",
    monospace;
  text-align: left;
  white-space: nowrap;
}
.data-table th {
  position: sticky;
  top: 0;
  background: var(--subtle);
  font-weight: 500;
  color: var(--secondary);
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.data-table th button {
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 11px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.data-table td {
  padding: 9px 15px;
  max-width: 400px;
  text-overflow: ellipsis;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: var(--subtle);
}
.data-table .row-index {
  width: 40px;
  padding: 9px 12px;
  text-align: right;
  color: var(--muted);
  font-size: 8px;
  border-right: 1px solid var(--line);
}
.data-table .number {
  color: var(--blue);
}
.data-table .null {
  font-style: italic;
  color: var(--muted);
  font-size: 9px;
}
.data-table .blob {
  color: var(--orange);
}
.result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 35px;
  color: var(--secondary);
  text-align: center;
}
.result-empty > span {
  background: var(--accent-bg);
  color: var(--accent);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 13px;
}
.result-empty > span svg {
  width: 26px;
  height: 26px;
}
.result-empty strong {
  font-size: 13px;
  color: var(--text);
}
.result-empty p {
  margin-top: 6px;
  font-size: 11px;
}
.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 45px;
  border-top: 1px solid var(--line);
  padding: 5px 15px;
  font-size: 9px;
  color: var(--secondary);
}
.pagination {
  display: flex;
  align-items: center;
  gap: 9px;
  font:
    9px Inter,
    sans-serif;
}
.pagination > label {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pagination select {
  font-size: 9px;
  border-radius: 4px;
  padding: 2px;
}
.pagination .icon-button {
  width: 24px;
  min-width: 24px;
  height: 27px;
}
.pagination svg {
  width: 12px;
  height: 12px;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  margin: 19px 2px 20px;
  font-size: 8px;
  color: var(--secondary);
}
.workspace-footer > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.workspace-footer svg {
  width: 11px;
  height: 11px;
}
.footer-dot {
  margin: 0 3px;
  color: var(--line);
}
.menu-wrap {
  position: relative;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 180px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 5px;
  box-shadow: var(--shadow);
}
.menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border-radius: 4px;
  font-size: 11px;
}
.menu button:hover {
  color: var(--accent);
  background: var(--accent-bg);
}
dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: 85dvh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  padding: 25px;
  box-shadow: var(--shadow);
  overflow: auto;
}
dialog::backdrop {
  background: #14223770;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 21px;
  margin-top: 5px;
  letter-spacing: -0.5px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}
#dialog-body {
  font-size: 12px;
  color: var(--secondary);
}
#dialog-body p {
  margin: 8px 0;
}
#dialog-body input[type="text"],
#dialog-body select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 7px 0 13px;
  font-size: 13px;
}
#dialog-body label {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: 11px;
}
.dialog-preview {
  overflow: auto;
  max-height: 210px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 12px;
}
.history-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 9px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.history-item > div {
  flex: 1;
  min-width: 0;
}
.history-item strong {
  font-size: 11px;
  color: var(--text);
}
.history-item pre {
  font:
    10px/1.7 JetBrains,
    monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 75px;
  overflow: hidden;
  margin: 8px 0;
  color: var(--secondary);
}
.history-item small {
  font-size: 9px;
}
.history-item .button {
  font-size: 10px;
}
.shortcut-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 13px;
  align-items: center;
}
.shortcut-list kbd {
  border: 1px solid var(--line);
  background: var(--subtle);
  border-radius: 4px;
  padding: 4px 8px;
  font:
    10px JetBrains,
    monospace;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--panel);
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 100;
  max-width: calc(100vw - 40px);
  box-shadow: var(--shadow);
}
.result-chart {
  padding: 24px 30px;
  max-height: 430px;
  min-height: 240px;
  overflow: auto;
}
.chart-title {
  font-size: 12px;
  margin-bottom: 18px;
}
.chart-row {
  display: grid;
  grid-template-columns: 105px 1fr 70px;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-size: 11px;
}
.chart-label {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.chart-track {
  height: 22px;
  background: var(--subtle);
  border-radius: 3px;
  overflow: hidden;
}
.chart-bar {
  height: 100%;
  background: #268d78;
  border-radius: 3px;
  min-width: 2px;
}
.chart-value {
  font:
    10px JetBrains,
    monospace;
  color: var(--accent);
  text-align: right;
}
.sidebar-empty {
  font-size: 11px;
  color: var(--secondary);
  padding: 10px 6px;
}
.mobile-only {
  display: none;
}
.noscript {
  padding: 30px;
  background: var(--panel);
}
@media (min-width: 1600px) {
  .workspace {
    padding-left: 45px;
    padding-right: 45px;
  }
  .editor-container {
    height: 340px;
  }
  .result-table {
    max-height: 480px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 218px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace {
    padding: 24px 20px 0;
  }
  .header-center {
    display: none;
  }
  .selection-hint {
    display: none;
  }
  .workspace-title h1 {
    font-size: 20px;
  }
  .workspace-actions {
    gap: 5px;
  }
  .workspace-actions .button {
    padding: 7px 9px;
  }
  .editor-tools {
    gap: 2px;
  }
  .editor-toolbar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .workspace-footer {
    font-size: 8px;
  }
  .brand-en {
    font-size: 15px;
  }
}
@media (max-width: 800px) {
  .app-header {
    height: 72px;
    padding: 0 18px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand strong {
    font-size: 21px;
  }
  .header-nav {
    gap: 3px;
  }
  .header-nav > a {
    font-size: 10px;
    margin-right: 3px;
  }
  .sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    width: 265px;
    transform: translateX(-100%);
    overflow: auto;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-flex;
  }
  .sidebar-heading .mobile-only {
    width: 25px;
    min-width: 25px;
    height: 25px;
  }
  .mobile-backdrop {
    position: fixed;
    inset: 0;
    background: #13213688;
    z-index: 40;
  }
  .app-body {
    min-height: calc(100dvh - 72px);
  }
  .workspace {
    padding: 22px 20px 0;
  }
  .workspace-title h1 {
    font-size: 22px;
  }
  .workspace-top {
    gap: 18px;
    flex-wrap: wrap;
  }
  .workspace-title > .icon-button {
    margin-left: -6px;
  }
  .workspace-actions {
    margin-left: 36px;
    gap: 7px;
  }
  .workspace-actions .button {
    font-size: 11px;
  }
  .workspace-footer {
    font-size: 9px;
  }
  .workspace-footer > span:last-child {
    display: none;
  }
  .editor-container {
    height: 295px;
  }
  .result-table {
    max-height: 400px;
  }
  .editor-code pre,
  .editor-code textarea {
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .app-header {
    padding: 0 14px;
  }
  .brand {
    gap: 8px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand-en {
    font-size: 12px;
    margin-left: 6px;
  }
  .brand small {
    font-size: 8px;
  }
  .header-nav > a {
    display: none;
  }
  .workspace {
    padding: 20px 13px 0;
  }
  .workspace-title h1 {
    font-size: 21px;
  }
  .workspace-title .eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
  }
  .workspace-top {
    margin-bottom: 17px;
    gap: 13px;
  }
  .workspace-actions {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }
  .workspace-actions .button {
    font-size: 10px;
    min-height: 39px;
    gap: 5px;
    padding: 7px 8px;
  }
  .workspace-actions .button svg {
    width: 13px;
  }
  .editor-language {
    display: none;
  }
  .query-tab {
    min-width: 108px;
  }
  .editor-container {
    height: 300px;
  }
  .line-numbers {
    width: 34px;
    padding-right: 8px;
    font-size: 10px;
  }
  .editor-code pre,
  .editor-code textarea {
    font-size: 12px;
    padding-top: 17px;
  }
  .line-numbers {
    padding-top: 17px;
  }
  .editor-toolbar {
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px;
  }
  .run-actions {
    width: 100%;
    justify-content: space-between;
  }
  .run-actions .selection-hint {
    display: block;
    font-size: 8px;
  }
  .editor-tools {
    justify-content: flex-end;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 5px;
  }
  .text-button {
    min-height: 36px;
    font-size: 10px;
    padding: 6px 9px;
  }
  .editor-tools .icon-button {
    min-width: 36px;
    min-height: 36px;
  }
  .example-strip {
    gap: 9px;
    margin: 14px 0;
  }
  .example-strip > span {
    width: 100%;
    font-size: 10px;
  }
  .example-strip button {
    font-size: 10px;
    min-height: 32px;
  }
  .results-heading {
    padding: 0 10px;
    height: 48px;
  }
  .view-tabs {
    gap: 13px;
  }
  .view-tabs > button {
    font-size: 10px;
  }
  .result-search {
    width: 90px;
    padding: 4px;
  }
  .result-search input {
    width: 100%;
    font-size: 8px;
  }
  .result-actions {
    gap: 3px;
  }
  .result-actions > .menu-wrap > .icon-button {
    width: 29px;
    min-width: 29px;
  }
  .query-status {
    font-size: 9px;
    padding: 9px 11px;
    align-items: flex-start;
  }
  .query-status .status-dot {
    margin-top: 4px;
  }
  .data-table {
    font-size: 11px;
  }
  .data-table th button {
    padding: 10px 12px;
  }
  .data-table td {
    padding: 10px 12px;
  }
  .result-footer {
    padding: 7px 10px;
    gap: 4px;
    flex-wrap: wrap;
  }
  .pagination {
    gap: 5px;
  }
  .workspace-footer {
    font-size: 8px;
    margin: 16px 0;
  }
  .chart-row {
    grid-template-columns: 70px 1fr 50px;
    gap: 7px;
  }
  .result-chart {
    padding: 20px 16px;
  }
  .header-nav .icon-button {
    min-width: 38px;
    height: 40px;
  }
  .schema-search input,
  #dialog-body input {
    font-size: 16px;
  }
  .history-item {
    flex-wrap: wrap;
  }
  .dialog-heading h2 {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Keep the workspace dense without sacrificing Chinese text readability. */
.data-table {
  font-size: 12px;
}
.object-name {
  font-size: 12px;
}
.editor-code pre,
.editor-code textarea {
  font-size: 13px;
}
.button {
  font-size: 12px;
}
.workspace-actions .button {
  font-size: 11px;
}
.query-tab {
  font-size: 11px;
}
.local-note p {
  font-size: 11px;
}
.text-button {
  font-size: 11px;
}
.query-status {
  font-size: 11px;
}
.example-strip button {
  font-size: 10px;
}
@media (max-width: 480px) {
  .button,
  .workspace-actions .button {
    min-height: 44px;
  }
  .icon-button,
  .editor-tools .icon-button,
  .header-nav .icon-button {
    min-width: 44px;
    min-height: 44px;
  }
  .object-name,
  .object-toggle,
  .sidebar-link {
    min-height: 44px;
  }
  .sidebar-actions .button.small {
    min-height: 44px;
  }
  .text-button {
    min-height: 44px;
  }
  .editor-code pre,
  .editor-code textarea {
    font-size: 13px;
  }
  .data-table {
    font-size: 12px;
  }
  .query-status {
    font-size: 10px;
  }
  .workspace-actions .button {
    font-size: 10px;
  }
  .result-actions > .menu-wrap > .icon-button {
    min-width: 36px;
    width: 36px;
  }
  .pagination .icon-button {
    min-width: 32px;
    min-height: 36px;
  }
  .query-tab {
    min-width: 140px;
  }
  .tab-close {
    width: 32px;
    height: 36px;
  }
  .example-strip button {
    min-height: 36px;
  }
  .result-search input {
    font-size: 10px;
  }
}
