:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #232727;
  background: #f6f7f7;
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
  --muted: #606969;
  --line: #dce1e1;
  --accent: #185e59;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; letter-spacing: 0; }
button, input, select, summary { touch-action: manipulation; }
button { min-height: 40px; padding: 8px 16px; border: 1px solid #bdc7c6; border-radius: 5px; background: #fff; cursor: pointer; }
button:hover:not(:disabled) { background: #edf2f1; border-color: #788d8b; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: #114d49; }
button:disabled { opacity: .48; cursor: not-allowed; }
:focus-visible { outline: 3px solid #438b9a; outline-offset: 3px; }
input:not([type="checkbox"]), select { display: block; width: 100%; height: 43px; min-width: 0; padding: 8px 10px; border: 1px solid #bdc7c6; border-radius: 5px; background: #fff; }
input:disabled, select:disabled { background: #f0f2f2; }
input[type="checkbox"] { width: 19px; height: 19px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
input[type="checkbox"]:disabled { accent-color: #727b7a; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: 21px; font-weight: 600; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; margin: 28px 0 12px; }
.shell { width: min(1080px, 100%); padding: 0 28px; margin: 0 auto; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.header-content { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand { margin-right: 14px; color: var(--accent); font-weight: 750; }
.header-actions { display: flex; align-items: center; gap: 16px; min-width: 0; }
#username { color: var(--muted); max-width: 180px; overflow-wrap: anywhere; }
.icon-button { width: 42px; height: 42px; padding: 0; font-size: 25px; flex-shrink: 0; }
.connection-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 0; color: var(--muted); font-size: 12px; }
.connection-row strong { font-weight: 500; }
body[data-stale="true"] #connection { color: #945d12; }
.notice, .warning { padding: 10px 12px; border-left: 3px solid #b38530; background: #fff5de; color: #68490e; overflow-wrap: anywhere; }
.notice { margin-bottom: 14px; }
.notice[data-tone="info"] { background: #eaf2f1; border-color: #397a74; color: #214e48; }
.section { padding: 24px 0 30px; border-top: 1px solid var(--line); }
.section-heading { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.section-heading .meta { max-width: 55%; overflow-wrap: anywhere; text-align: right; }
.badge { font-size: 12px; border: 1px solid #c9d0d0; border-radius: 4px; padding: 2px 8px; color: #4e5a59; background: #fff; }
.runtime-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; }
.runtime-grid dt { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.runtime-grid dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.runtime-details { margin-top: 18px; }
summary { cursor: pointer; padding: 7px 0; color: var(--muted); }
.runtime-details .runtime-grid { padding-top: 12px; }
#runtimeWarning, #settingsConflict { margin-bottom: 16px; }
.operation { margin-top: 18px; border-left: 3px solid #85908f; padding: 10px 14px; background: #ecefef; overflow-wrap: anywhere; }
.operation p { margin: 4px 0; }
.enabled-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding-bottom: 22px; }
#switchStatus { flex-basis: 100%; color: #785714; }
.checkbox-label { display: inline-flex; gap: 10px; align-items: center; min-height: 34px; font-weight: 600; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field label { font-weight: 550; }
.unit { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 5px; }
.field-note, .meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.advanced { margin-top: 20px; }
.advanced summary .meta { margin-left: 12px; }
.cap-field { margin-top: 10px; max-width: 400px; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.form-actions > .meta { margin-right: auto; flex: 1; min-width: 160px; }
.version-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.version-grid .field-note { min-height: 20px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px; background: #ecefef; }
th:nth-child(1) { width: 24%; } th:nth-child(2) { width: 35%; } th:nth-child(3) { width: 25%; } th:nth-child(4) { width: 16%; }
td { padding: 16px 12px; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
td .meta { display: block; margin-top: 5px; }
.selection-line { display: block; }
.stable-action { min-width: 76px; }
.empty { color: var(--muted); padding: 20px 0; }
.login-section { max-width: 380px; padding: 32px 0 70px; }
.login-section h2 { margin-bottom: 24px; }
.login-section label { display: block; margin: 16px 0 7px; }
.login-section button { width: 100%; margin-top: 22px; }
dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #bdc7c6; border-radius: 8px; color: #232727; background: #fff; overflow: auto; }
dialog::backdrop { background: rgb(20 30 29 / 38%); }
.confirmation-changes { margin: 20px 0; }
.confirmation-changes > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.confirmation-changes dt { font-size: 12px; color: var(--muted); }
.confirmation-changes dd { margin: 4px 0 0; overflow-wrap: anywhere; }
#confirmationNote { color: #4e5a59; font-size: 13px; }
#confirmationError { margin-top: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
@media (max-width: 640px) {
  .shell { padding: 0 18px; }
  .header-content { min-height: 66px; }
  h1 { font-size: 19px; }
  .brand { margin-right: 6px; }
  .header-actions { gap: 8px; }
  #username { max-width: 88px; font-size: 12px; }
  .connection-row { flex-wrap: wrap; gap: 4px 12px; padding: 14px 0; }
  .section { padding: 20px 0 26px; }
  .runtime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
  .settings-grid, .version-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .enabled-row { gap: 4px; }
  .field-note { font-size: 12px; }
  input:not([type="checkbox"]), select { font-size: 16px; }
  button { min-height: 44px; }
  .form-actions > .meta { flex-basis: 100%; }
  .form-actions > button { flex: 1; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border-top: 1px solid var(--line); padding: 12px 0; }
  td { padding: 5px 0; border: 0; }
  td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; display: block; margin-bottom: 3px; }
  .stable-action { width: 100%; margin-top: 6px; }
  dialog { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
