:root {
  color-scheme: light;
  --background: #f7f9fc;
  --surface: #fff;
  --text: #182337;
  --muted: #58677c;
  --line: #dde4ed;
  --primary: #2458d3;
  --primary-soft: #edf3ff;
  --success: #11734d;
  --danger: #b63333;
  --radius: 12px;
  --mono: Consolas, "SFMono-Regular", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); font-size: 15px; line-height: 1.65; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
button, .button, input, select, textarea { border-radius: 8px; }
button, .button { min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; }
button:hover, .button:hover { background: #f0f4fa; border-color: #b2c1d5; text-decoration: none; }
button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.primary:hover { background: #1947b4; border-color: #1947b4; }
.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.danger { color: var(--danger); }
:focus-visible { outline: 3px solid #82a9ff; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(27px, 3.4vw, 38px); font-weight: 700; letter-spacing: -.035em; line-height: 1.3; }
h2 { font-size: 20px; letter-spacing: -.025em; }
h3 { font-size: 16px; }
code, pre { font-family: var(--mono); }
code { overflow-wrap: anywhere; font-size: .9em; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 13px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 50; background: var(--surface); padding: 12px; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 76px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner { max-width: 1400px; margin: auto; padding: 14px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #19376a; color: #fff; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.brand strong { display: block; font-size: 16px; line-height: 1.4; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.topnav { display: flex; align-items: center; gap: 25px; }
.topnav a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.topnav a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.workspace { max-width: 1400px; margin: auto; padding: 42px 36px 70px; }
.intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.intro p { color: var(--muted); margin-top: 13px; max-width: 680px; }
.intro .button { flex-shrink: 0; margin-top: 6px; }
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 28px; }
.catalog-controls { display: flex; gap: 12px; margin-bottom: 16px; }
.catalog-controls .search { flex: 1; }
.search { position: relative; }
.search input { padding-left: 39px; width: 100%; }
.search::before { content: ""; position: absolute; top: 16px; left: 15px; width: 11px; height: 11px; border: 1.8px solid var(--muted); border-radius: 50%; }
.search::after { content: ""; position: absolute; top: 27px; left: 26px; width: 6px; height: 1.8px; background: var(--muted); transform: rotate(45deg); }
input, select, textarea { min-height: 44px; border: 1px solid #cbd5e2; background: #fff; color: var(--text); padding: 10px 12px; width: 100%; }
input::placeholder, textarea::placeholder { color: #738198; }
textarea { min-height: 106px; resize: vertical; line-height: 1.65; }
.catalog-controls select { width: 145px; }
.results-line { margin-bottom: 17px; font-size: 13px; color: var(--muted); }
.model-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.model-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.model-card h2 { font: 600 15px/1.6 var(--mono); overflow-wrap: anywhere; }
.model-card .description { color: var(--muted); font-size: 14px; }
.model-card .card-body { flex: 1; }
.card-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.resolution-tag { font-family: var(--mono); font-size: 12px; color: #35547f; white-space: nowrap; }
.ratio-label { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; border-radius: 5px; background: #f0f4fa; padding: 3px 8px; font: 12px/1.5 var(--mono); color: #354862; }
.card-footer { border-top: 1px solid #edf0f5; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.card-footer button { font-size: 13px; padding: 5px 9px; min-height: 40px; }
.aside-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 21px; background: var(--surface); margin-bottom: 18px; }
.aside-panel h2 { font-size: 15px; margin-bottom: 12px; }
.aside-panel p { font-size: 13px; color: var(--muted); margin-bottom: 13px; }
.aside-panel a { font-size: 13px; }
.aside-panel .endpoint { display: block; font-size: 12px; color: var(--text); padding: 10px; background: var(--background); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 14px; overflow-wrap: anywhere; }
.aside-panel ul { padding-left: 18px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.aside-panel li + li { margin-top: 8px; }
.notice { border: 1px solid #d8e4f8; background: #f0f5fd; color: #37527b; border-radius: 8px; padding: 12px 15px; font-size: 13px; }
.notice.error { background: #fff1f1; border-color: #efcaca; color: #9b2f2f; }
.notice.success { background: #eff9f3; border-color: #c6e7d3; color: #18623e; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 65px 22px; border: 1px dashed #c9d4e4; border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.footer { max-width: 1328px; margin: 0 auto; padding: 25px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 16px; }
dialog { width: min(880px, calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 16px; padding: 0; color: var(--text); box-shadow: 0 25px 80px #12213c33; }
dialog::backdrop { background: #14223777; backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.dialog-head h2 { overflow-wrap: anywhere; }
.dialog-content { padding: 26px 28px; }
.dialog-content > p { margin-bottom: 22px; color: var(--muted); }
.detail-section + .detail-section { margin-top: 24px; }
.detail-section h3 { margin-bottom: 12px; }
.detail-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.detail-table th, .detail-table td { padding: 11px 12px; border-bottom: 1px solid #e7edf4; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.detail-table th { font-weight: 500; color: var(--muted); width: 32%; background: #f8fafd; }
.detail-table td { white-space: pre-wrap; }
.code-box { border-radius: 10px; background: #172337; color: #dfebff; overflow: hidden; }
.code-toolbar { padding: 12px 17px; border-bottom: 1px solid #334259; display: flex; justify-content: space-between; gap: 12px; align-items: center; font: 12px var(--mono); }
.code-toolbar button { min-height: 36px; padding: 4px 10px; font-size: 12px; background: #263752; border-color: #445775; color: #fff; }
.code-box pre { margin: 0; padding: 20px; font-size: 12px; line-height: 1.8; overflow: auto; max-height: 590px; white-space: pre; }
.api-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 1fr); gap: 32px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h2 { margin-bottom: 18px; }
.panel + .panel { margin-top: 20px; }
.endpoint-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.endpoint-row:last-child { border-bottom: none; padding-bottom: 0; }
.endpoint-row p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.method { color: var(--success); font: 700 12px var(--mono); margin-right: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; }
.span-2 { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.api-explorer { position: sticky; top: 25px; }
.api-explorer .panel { margin-bottom: 18px; }
.api-explorer .actions { margin-top: 20px; }
.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: 28px; background: #f3f6fb; }
.login-card { width: min(430px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 45px #18253b07; }
.login-card .brand { margin-bottom: 32px; }
.login-card h1 { font-size: 25px; margin-bottom: 8px; }
.login-card > p { color: var(--muted); margin-bottom: 26px; }
.login-card .field { margin-bottom: 18px; }
.login-card .primary { width: 100%; margin-top: 6px; }
.login-card .return-link { display: block; text-align: center; margin-top: 20px; font-size: 13px; }
.login-card .notice { margin: 16px 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); }
.admin-topbar .topbar-inner { max-width: none; padding: 14px 28px; }
.admin-layout { display: grid; grid-template-columns: 312px minmax(0, 1fr); min-height: calc(100dvh - 76px); }
.model-sidebar { background: #fff; border-right: 1px solid var(--line); padding: 23px 18px; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 5px; margin-bottom: 17px; }
.sidebar-heading h1 { font-size: 17px; letter-spacing: 0; }
.sidebar-heading button { font-size: 13px; padding: 7px 10px; min-height: 40px; }
.model-sidebar .search { margin-bottom: 12px; }
.model-sidebar select { margin-bottom: 16px; }
.admin-model-list { display: flex; flex-direction: column; gap: 6px; }
.model-row { padding: 12px; text-align: left; border: 1px solid transparent; font-weight: 400; background: transparent; }
.model-row:hover { background: #f5f8fd; }
.model-row.selected { background: var(--primary-soft); border-color: #c9dafc; }
.model-row strong { font: 600 12px/1.6 var(--mono); display: block; overflow-wrap: anywhere; margin-bottom: 5px; }
.model-row small { font-size: 12px; color: var(--muted); }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #7c889c; vertical-align: middle; }
.status-dot.live { background: #229669; }
.editor { padding: 31px clamp(22px, 4vw, 54px) 70px; min-width: 0; max-width: 1250px; width: 100%; margin: 0 auto; }
.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.editor-heading h2 { font-size: 25px; margin-bottom: 5px; overflow-wrap: anywhere; }
.editor-heading p { color: var(--muted); font-size: 13px; }
.editor-heading .actions { flex-shrink: 0; }
.editor .notice { margin-bottom: 20px; }
.editor-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.editor-tab { border: 0; border-radius: 0; padding: 12px 0; background: transparent; color: var(--muted); white-space: nowrap; font-size: 14px; border-bottom: 2px solid transparent; }
.editor-tab[aria-selected="true"] { border-bottom-color: var(--primary); color: var(--primary); }
.editor-tab:hover { background: transparent; }
.form-section { padding: 25px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 20px; }
.form-section h3 { margin-bottom: 19px; }
.form-section > .hint { margin: -9px 0 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.section-heading h3 { margin: 0; }
.reference-grid { display: grid; grid-template-columns: 100px 1fr 1fr; gap: 12px; align-items: center; }
.reference-grid > span { font-size: 13px; }
.reference-grid .column-label { font-size: 12px; color: var(--muted); }
.override-card { border: 1px solid var(--line); border-radius: 9px; padding: 20px; margin-top: 16px; }
.override-card .form-grid { gap: 16px; }
.override-card > .actions { justify-content: space-between; margin-bottom: 18px; }
.override-card > .actions strong { font-size: 14px; }
.override-card .reference-grid { grid-template-columns: 80px 1fr 1fr; }
.override-card details { margin-top: 18px; }
.override-card summary { font-size: 13px; color: var(--primary); cursor: pointer; padding: 8px 0; }
.override-card details > .form-grid { margin-top: 13px; }
.form-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; font-size: 12px; color: var(--muted); }
.password-dialog { max-width: 480px; }
.password-dialog .field { margin-bottom: 18px; }
.status-text { color: var(--success); }
.toast { position: fixed; z-index: 60; bottom: 24px; left: 50%; transform: translateX(-50%); background: #17365b; color: #fff; border-radius: 10px; padding: 12px 22px; box-shadow: 0 10px 30px #14243a25; max-width: calc(100% - 32px); font-size: 14px; }
@media (min-width: 1100px) {
  .model-sidebar { position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; }
}
@media (max-width: 1100px) {
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .catalog-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .admin-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .editor-heading { flex-direction: column; }
  .api-layout { grid-template-columns: 1fr; }
  .api-explorer { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar-inner { padding: 14px 20px; flex-wrap: wrap; gap: 12px; }
  .topnav { gap: 20px; width: 100%; overflow: auto; }
  .topnav a { font-size: 13px; flex-shrink: 0; }
  .workspace { padding: 28px 20px 40px; }
  .intro { flex-direction: column; gap: 16px; }
  .intro p { font-size: 14px; }
  .model-grid, .catalog-aside { grid-template-columns: 1fr; }
  .catalog-controls { flex-wrap: wrap; }
  .catalog-controls .search { flex-basis: 100%; }
  .catalog-controls select { width: calc(50% - 6px); }
  .model-card { padding: 20px; }
  .footer { margin: 0 20px; flex-direction: column; gap: 6px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .admin-topbar .topbar-inner { padding: 14px 18px; }
  .admin-topbar .actions { gap: 3px; flex-wrap: wrap; }
  .admin-topbar .actions button, .admin-topbar .actions a { padding: 8px; font-size: 12px; }
  .admin-layout { grid-template-columns: 1fr; }
  .model-sidebar { border-right: none; border-bottom: 1px solid var(--line); padding: 20px; }
  .admin-model-list { max-height: 215px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .model-row { padding: 10px; min-width: 0; }
  .editor { padding: 25px 20px 50px; }
  .editor-heading h2 { font-size: 23px; }
  .editor-tabs { gap: 22px; }
  .form-section { padding: 21px 18px; }
  .reference-grid, .override-card .reference-grid { grid-template-columns: 66px 1fr 1fr; gap: 8px; }
  .reference-grid input { padding: 9px 8px; min-width: 0; }
  input, select, textarea { font-size: 16px; }
  .dialog-head, .dialog-content { padding: 20px; }
  .detail-table { font-size: 13px; }
  .detail-table th, .detail-table td { padding: 10px 8px; }
  .form-bottom { align-items: flex-start; flex-direction: column; }
  .login-card { padding: 28px; }
  .override-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
