/* The reference drawer keeps a neutral surface while the workspace previews changes. */
.wa-pref-drawer {
  --pref-ink: #30343b; --pref-muted: #72727f; --pref-line: #e1e2e8; --pref-blue: #1677ff; --pref-surface: #fff;
  position: fixed; inset: 0 0 0 auto; width: min(384px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--pref-line); border-radius: 0; background: var(--pref-surface); color: var(--pref-ink); box-shadow: -8px 0 28px #17212c12; font: 14px/1.5 "PingFang SC", "Microsoft YaHei", sans-serif; color-scheme: light; overflow: hidden;
}
.wa-pref-drawer[open] { display: flex; flex-direction: column; animation: wa-pref-enter .18s ease-out; }
.wa-pref-drawer::backdrop { background: #0006; }
.wa-pref-drawer.is-pinned { z-index: 110; }
.wa-pref-modal-open { overflow: hidden; }
.wa-pref-drawer button, .wa-pref-drawer input, .wa-pref-drawer textarea { font: inherit; }
.wa-pref-drawer button { color: inherit; cursor: pointer; }
.wa-pref-drawer button:disabled { cursor: default; opacity: .5; }
.wa-pref-drawer button:focus-visible, .wa-pref-drawer input:focus-visible, .wa-pref-drawer textarea:focus-visible { outline: 2px solid var(--pref-blue); outline-offset: 2px; }
.wa-pref-drawer svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.wa-pref-header { flex: none; height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--pref-line); }
.wa-pref-header > div:first-child { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.wa-pref-header h2 { font-size: 16px; margin: 0; font-weight: 650; }
.wa-pref-header > div > span { font-size: 12px; color: var(--pref-muted); }
.wa-pref-tools { display: flex; gap: 6px; }
.wa-pref-tools button { position: relative; padding: 5px; display: grid; place-items: center; background: transparent; border: 0; color: #727780; }
.wa-pref-tools button[aria-pressed="true"] { color: var(--pref-blue); }
.wa-pref-tools .is-configured:after { content: ""; position: absolute; right: 1px; top: 1px; width: 7px; height: 7px; background: var(--pref-blue); border-radius: 50%; border: 1px solid #fff; }
.wa-pref-tabs { flex: none; margin: 7px 11px 0; padding: 3px; background: #f3f4f6; border: 1px solid #e1e2e8; border-radius: 8px; display: flex; gap: 2px; }
.wa-pref-tabs button { flex: 1; padding: 5px 4px; border: 0; background: transparent; border-radius: 5px; color: var(--pref-muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.wa-pref-tabs button[aria-selected="true"] { background: #fff; color: var(--pref-blue); box-shadow: 0 1px 3px #00000009; }
.wa-pref-scroll { overflow-y: auto; flex: 1; min-height: 0; padding: 18px 26px 12px 12px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9c9cc transparent; }
.wa-pref-section { margin: 0 0 27px; }
.wa-pref-section:last-child { margin-bottom: 5px; }
.wa-pref-section h3 { font-size: 16px; font-weight: 650; margin: 0 0 9px; }
.wa-pref-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 8px; gap: 10px; }
.wa-pref-row.is-disabled { color: #a5a5a9; }
.wa-pref-tip { font-size: 12px; color: var(--pref-muted); margin-left: 4px; }
.wa-pref-switch { width: 36px; height: 20px; flex: none; border: 0; border-radius: 20px; padding: 2px; background: #e3e3e8; transition: background .15s; }
.wa-pref-switch span { width: 16px; height: 16px; display: block; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; transition: transform .15s; }
.wa-pref-switch[aria-checked="true"] { background: var(--pref-blue); }
.wa-pref-switch[aria-checked="true"] span { transform: translateX(16px); }
.wa-pref-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; row-gap: 7px; }
.wa-pref-theme { padding: 0; background: transparent; border: 0; font-size: 12px !important; color: var(--pref-muted) !important; text-align: center; }
.wa-pref-swatch { height: 46px; display: grid; place-items: center; border: 1px solid var(--pref-line); border-radius: 7px; margin-bottom: 5px; }
.wa-pref-swatch i { height: 20px; width: 20px; border-radius: 6px; background: var(--swatch); }
.wa-pref-swatch svg { width: 23px; height: 23px; color: #8d9198; }
.wa-pref-theme:hover .wa-pref-swatch { border-color: #91caff; }
.wa-pref-theme[aria-pressed="true"] .wa-pref-swatch { border: 2px solid var(--pref-blue); }
.wa-pref-custom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--pref-muted); gap: 8px; margin-top: 12px; }
.wa-pref-custom input { width: 33px; height: 26px; padding: 2px; border: 1px solid var(--pref-line); background: #fff; border-radius: 4px; }
.wa-pref-custom span { font-variant-numeric: tabular-nums; }
.wa-pref-segment { display: flex; gap: 8px; }
.wa-pref-segment button { flex: 1; min-width: 0; border: 1px solid var(--pref-line); border-radius: 4px; padding: 3px 5px; background: #fff; box-shadow: 0 1px 3px #0000000e; }
.wa-pref-segment button[aria-pressed="true"] { background: var(--pref-blue); color: #fff; border-color: var(--pref-blue); }
.wa-pref-font { display: flex; align-items: center; gap: 8px; }
.wa-pref-font > div { display: flex; align-items: center; flex: 1; border: 1px solid var(--pref-line); border-radius: 6px; height: 36px; box-shadow: 0 1px 3px #00000008; overflow: hidden; }
.wa-pref-font button { width: 38px; padding: 7px; border: 0; background: transparent; color: var(--pref-muted); }
.wa-pref-font input { width: 0; flex: 1; text-align: center; appearance: textfield; border: 0; outline-offset: -2px; background: #fff; color: var(--pref-ink); }
.wa-pref-font input::-webkit-inner-spin-button { appearance: none; }
.wa-pref-font > span, .wa-pref-hint { font-size: 12px; color: var(--pref-muted); }
.wa-pref-hint { line-height: 1.8; margin: 12px 0 0; }
.wa-pref-status { flex: none; margin: 0; padding: 5px 12px; font-size: 11px; color: var(--pref-muted); border-top: 1px solid #f2f3f5; }
.wa-pref-footer { flex: none; min-height: 51px; padding: 8px 12px 8px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--pref-line); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.wa-pref-footer button { white-space: nowrap; background: transparent; border: 0; font-size: 12px; padding: 7px 4px; }
.wa-pref-footer .wa-pref-primary { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; background: var(--pref-blue); color: #fff; border-radius: 5px; padding: 7px 8px; font-weight: 600; }
.wa-pref-primary svg { width: 13px; height: 13px; }
.wa-pref-layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.wa-pref-layouts button { border: 1px solid var(--pref-line); border-radius: 7px; padding: 12px; background: #fff; }
.wa-pref-layouts button[aria-pressed="true"] { border-color: var(--pref-blue); color: var(--pref-blue); }
.wa-pref-layout-preview { height: 76px; display: flex; gap: 4px; background: #f1f4f8; border: 1px solid #e1e7ef; border-radius: 3px; padding: 6px; margin-bottom: 8px; }
.wa-pref-layout-preview i { width: 24%; background: #9dc6ff; border-radius: 2px; }
.wa-pref-layout-preview b { flex: 1; background: #fff; border-top: 9px solid #d4e3f8; }
.wa-pref-layout-preview.top { flex-direction: column; }
.wa-pref-layout-preview.top i { height: 10px; width: 100%; }
.wa-pref-shortcuts p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid #f0f1f4; font-size: 12px; }
.wa-pref-shortcuts kbd { font-family: inherit; font-size: 11px; padding: 1px 4px; border: 1px solid var(--pref-line); border-radius: 3px; background: #f8f9fb; }
.wa-pref-secondary { margin-top: 12px; padding: 7px 12px; border: 1px solid var(--pref-line); border-radius: 5px; background: #fff; }
.wa-pref-export { width: 100%; height: 220px; margin-top: 12px; font-size: 12px !important; border: 1px solid var(--pref-line); border-radius: 5px; }
.wa-pref-component-preview { display: grid; gap: 12px; margin-top: 14px; }
.wa-pref-component-preview .wa-pref-demo-button { background: var(--brand-action); color: var(--brand-on-action); border: 1px solid var(--brand-action); border-radius: var(--radius); font-size: var(--wa-font-size); padding: 8px 12px; }
.wa-pref-component-preview input { padding: 8px 12px; border: 1px solid var(--pref-line); border-radius: var(--radius); font-size: var(--wa-font-size); }
.wa-pref-component-preview > span { font-size: 12px; color: var(--pref-muted); }

html[data-wa-mode="dark"] .shell { background: var(--brand-paper); }
html[data-wa-dark-sidebar="true"] .rail { --brand-text-muted: #b4bdcc; --brand-border: #344155; --brand-paper: #18212f; --brand-surface: #223044; background: #18212f; color: #edf2fa; }
html[data-wa-dark-sidebar="true"] .rail .brand { color: #edf2fa; }
html[data-wa-dark-sidebar="true"] .rail .nav-panel-inner { background: var(--brand-surface); }
html[data-wa-dark-sidebar="true"][data-wa-dark-submenu="true"] .rail .nav-panel-inner { background: #0f1724; }
html[data-wa-dark-header="true"] .topbar { background: #18212f; color: #edf2fa; --brand-text-muted: #b4bdcc; --brand-border: #344155; --muted: #b4bdcc; --line: #344155; }
html[data-wa-show-breadcrumb="false"] #breadcrumb { display: none; }
html[data-wa-show-footer="false"] .workspace > .footer { display: none; }
html[data-wa-sticky-header="true"] .topbar { position: sticky; top: 0; z-index: 30; background: var(--brand-paper); }
html[data-wa-sticky-header="true"][data-wa-dark-header="true"] .topbar { background: #18212f; }
html[data-wa-content-width="centered"] #main { width: 100%; max-width: 1280px; margin-inline: auto; }
html[data-wa-collapsed="true"][data-wa-layout="sidebar"] { --rail-width: 82px; }
html[data-wa-collapsed="true"][data-wa-layout="sidebar"] .rail { padding-inline: 7px; }
html[data-wa-collapsed="true"][data-wa-layout="sidebar"] .rail .brand { padding: 0; justify-content: center; }
html[data-wa-collapsed="true"][data-wa-layout="sidebar"] .brand-word, html[data-wa-collapsed="true"][data-wa-layout="sidebar"] .nav-chevron { display: none; }
html[data-wa-collapsed="true"][data-wa-layout="sidebar"] .rail .nav-heading { flex-direction: column; padding: 8px 3px; gap: 4px; font-size: calc(11px * var(--wa-font-scale)); }
html[data-wa-collapsed="true"][data-wa-layout="sidebar"] .rail .nav-child { padding: 7px 2px; justify-content: center; font-size: calc(10px * var(--wa-font-scale)); text-align: center; white-space: normal; }
html[data-wa-density="compact"] :is(td, th, .list-row, .vxe-cell) { padding-top: 5px; padding-bottom: 5px; }
html[data-wa-density="relaxed"] :is(td, th, .list-row, .vxe-cell) { padding-top: 16px; padding-bottom: 16px; }
html[data-wa-reduced-motion="true"] *, html[data-wa-reduced-motion="true"] *:before, html[data-wa-reduced-motion="true"] *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
@media (min-width: 761px) {
  html[data-wa-layout="top"] .shell { flex-direction: column; }
  html[data-wa-layout="top"] .rail { position: relative; width: 100%; flex-direction: row; align-items: center; padding: 10px 22px; gap: 22px; z-index: 40; border-right: 0; border-bottom: 1px solid var(--brand-border); overflow: visible; }
  html[data-wa-layout="top"] .rail #nav-items { flex-direction: row; flex: 1; overflow: visible; padding: 0; min-width: 0; }
  html[data-wa-layout="top"] .nav-group { position: relative; flex: none; }
  html[data-wa-layout="top"] .rail .nav-heading { min-height: 38px; padding: 7px; gap: 5px; }
  html[data-wa-layout="top"] .rail .nav-heading > svg:first-child { display: none; }
  html[data-wa-layout="top"] .rail .nav-panel { position: absolute; top: 100%; left: 0; width: 190px; max-height: 0; background: var(--brand-surface); box-shadow: 0 8px 24px #0002; border-radius: var(--radius); }
  html[data-wa-layout="top"] .rail .is-open > .nav-panel { max-height: min(70vh, 640px); overflow: auto; grid-template-rows: 1fr; }
  html[data-wa-layout="top"] .rail .nav-panel-inner { min-height: 0; }
  html[data-wa-layout="top"] .rail .nav-link { flex-direction: row; font-size: 12px; padding: 7px; }
  html[data-wa-layout="top"] .rail .nav-preferences { margin-top: 0; }
  html[data-wa-layout="top"] .rail-home { margin: 0; flex: none; font-size: 16px; }
  html[data-wa-layout="top"] .workspace { margin-left: 0; width: 100%; }
}
@media (max-width: 1050px) and (min-width: 761px) {
  html[data-wa-layout="top"] .rail { gap: 8px; padding-inline: 10px; }
  html[data-wa-layout="top"] .brand-word { display: none; }
  html[data-wa-layout="top"] .rail .nav-heading, html[data-wa-layout="top"] .rail .nav-link { font-size: 11px; padding-inline: 5px; }
}
@media (max-width: 760px) {
  .wa-preferences-trigger { flex: none; }
  .top-actions { gap: 8px; }
}
@media (max-width: 360px) {
  .wa-pref-header { padding-inline: 10px; }
  .wa-pref-header > div > span { font-size: 10px; }
  .wa-pref-tools { gap: 0; }
  .wa-pref-tabs button { font-size: 12px; }
  .wa-pref-footer { padding-left: 12px; gap: 8px; }
}
@keyframes wa-pref-enter { from { transform: translateX(30px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wa-pref-drawer[open] { animation: none; } .wa-pref-switch, .wa-pref-switch span { transition: none; } }
