:root {
  color-scheme: light;
  --ink: #18283a;
  --muted: #526379;
  --line: #d8e1ea;
  --quiet: #f5f8fb;
  --blue: #1d55c7;
  --blue-dark: #154498;
  --amber: #a56615;
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: #f4f6f9;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, label, summary { -webkit-tap-highlight-color: transparent; }
button, .file-open, summary, input[type="checkbox"] { cursor: pointer; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button { color: inherit; }
button:disabled, input:disabled, select:disabled { cursor: default; opacity: .52; }
a { color: inherit; }
:is(button, a, select, input, textarea, summary, [tabindex]):focus-visible, .file-open:focus-within {
  outline: 3px solid #467be0;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.skip { position: fixed; left: 8px; top: -80px; z-index: 5; background: white; color: var(--blue-dark); padding: 12px; }
.skip:focus { top: 8px; }
.app-bar { background: #fff; border-bottom: 1px solid var(--line); }
.bar-inner, main { max-width: 1620px; padding-inline: clamp(18px, 3.5vw, 60px); margin-inline: auto; }
.bar-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 760; letter-spacing: .015em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-block; position: relative; width: 33px; height: 33px; overflow: hidden; border-radius: 8px; background: #194eb7; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; left: 8px; width: 18px; height: 2px; background: white; transform-origin: left center; }
.brand-mark::before { top: 24px; transform: rotate(-44deg); }
.brand-mark::after { top: 9px; transform: rotate(37deg); opacity: .7; }
.brand-mark i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: white; }
.brand-mark i:nth-child(1) { left: 5px; top: 6px; }
.brand-mark i:nth-child(2) { left: 5px; top: 21px; }
.brand-mark i:nth-child(3) { right: 6px; top: 10px; }
.file-tools { display: flex; align-items: center; gap: 7px; }
.button, .tool-button, .add-button, .text-button, .mobile-jump, .rule-remove {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  border: 1px solid transparent; border-radius: 7px; padding: 7px 13px; font-weight: 650; font-size: 14px; line-height: 1.4; text-decoration: none;
}
.tool-button { background: white; color: #35465b; border-color: var(--line); }
.tool-button:hover { background: var(--quiet); border-color: #a1b2c6; }
.file-open { position: relative; }
.file-open input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.primary { background: var(--blue); border-color: var(--blue); color: white; }
.primary:hover { background: var(--blue-dark); }
.export { margin-left: 3px; }
main { padding-block: 32px 52px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 23px; }
h1, h2, h3, p, dl, dt, dd { margin: 0; }
h1 { font-size: clamp(26px, 2.4vw, 39px); line-height: 1.25; letter-spacing: -.045em; font-weight: 750; }
.page-heading p { margin: 7px 0 0; max-width: 65ch; font-size: 15px; color: var(--muted); }
h2 { font-size: 18px; font-weight: 720; letter-spacing: -.02em; }
.workbench { display: grid; grid-template-columns: clamp(290px, 25vw, 360px) minmax(0, 1fr); align-items: start; gap: clamp(15px, 2vw, 30px); }
.panel { min-width: 0; background: white; border: 1px solid #d4dee9; border-radius: 12px; box-shadow: 0 2px 8px #18314908; }
.config-panel { overflow: hidden; }
.panel-head, .preview-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.text-button { min-height: 30px; padding: 3px 5px; color: var(--blue-dark); background: none; }
.text-button:hover, .rule-remove:hover { background: #eaf0f9; }
form { margin: 0; }
.form-block { border: 0; margin: 0; min-width: 0; padding: 16px 20px; }
.form-block + .form-block { border-top: 1px solid var(--line); }
.form-block label { display: block; font-size: 14px; font-weight: 630; color: #35465a; }
.form-block legend { float: left; font-weight: 700; font-size: 15px; color: var(--ink); padding: 0; margin: 0 0 10px; width: 100%; }
.form-block legend + * { clear: both; }
.form-block small { display: block; font-size: 13px; color: var(--muted); line-height: 1.55; }
input:not([type="file"], [type="checkbox"]), textarea, select {
  min-width: 0; width: 100%; padding: 7px 9px; min-height: 38px;
  color: var(--ink); background: #fff; border: 1px solid #b6c5d4; border-radius: 6px; font-size: 15px;
}
textarea { display: block; resize: vertical; line-height: 1.5; }
.form-block > label + :is(input,textarea), .time-row input, .link-rule label :is(input,select), .window-fields input { margin: 4px 0 0; }
.form-block > input + label, .form-block > textarea + label { margin-top: 12px; }
.form-block > textarea + small { margin-top: 5px; }
.time-row, .window-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.step-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 11px 0; }
.number-unit { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.number-unit input { width: 73px; font-variant-numeric: tabular-nums; }
input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.form-block .check-row, .form-block .rule-both { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.rules > small { margin-bottom: 10px; }
.bulk-tools {margin:10px 0;border:1px solid var(--line);border-radius:7px;background:#f7f9fc;}
.bulk-tools > summary {padding:8px 10px;color:var(--blue-dark);font-size:14px;font-weight:650;cursor:pointer;}
.bulk-section {display:grid;gap:7px;margin:0 10px;padding:11px 0;border-top:1px solid var(--line);}
.bulk-section > strong {font-size:14px;color:var(--ink);}
.bulk-options {display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.bulk-options > label:first-child {display:flex;align-items:center;gap:6px;}
.bulk-options input[type="number"] {max-width:9ch;margin-top:0;}
.bulk-section textarea {margin-top:0;font:14px/1.45 ui-monospace,monospace;}
.bulk-columns summary {font-size:13px;color:var(--muted);}
.bulk-columns small {margin-top:4px;}
.bulk-section .tool-button {justify-self:start;padding:4px 10px;font-size:14px;}
.bulk-status {margin:0 10px 10px;overflow-wrap:anywhere;color:#245847;font-size:14px;}
.bulk-status[data-error="true"] {color:#8b3329;}
#links-editor { display: grid; gap: 9px; }
.link-rule { display: grid; align-items: end; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(52px,.65fr); gap: 8px 6px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--quiet); }
.link-rule label { font-size: 12px; }
.link-rule label :is(select,input[type="number"]) { min-height: 34px; font-size: 14px; padding: 5px; }
.link-rule .rule-both { grid-column: 1/3; min-height: 29px; align-self: center; }
.link-rule .rule-both input { margin: 0; }
.rule-remove { justify-self: end; min-height: 29px; padding: 3px 5px; font-size: 13px; background: transparent; color: #91504d; }
.rule-window { grid-column: 1/-1; border-top: 1px solid var(--line); padding-top: 6px; font-size: 13px; color: var(--muted); }
.rule-window summary { width: fit-content; padding: 2px 0; }
.window-fields { margin-top: 5px; }
.window-fields input { font-size: 14px; }
.add-button { width: 100%; margin-top: 10px; color: var(--blue-dark); background: white; border: 1px dashed #a4bad9; }
.add-button:hover { background: #f0f5fc; }
.form-footer { padding: 15px 20px 18px; border-top: 1px solid var(--line); }
.form-footer .button { width: 100%; min-height: 42px; }
#error { border: 1px solid #dfb1a8; background: #fff5f1; color: #8b3329; padding: 9px 12px; font-size: 14px; border-radius: 6px; margin-bottom: 11px; }
.view-column { display: grid; gap: 16px; min-width: 0; }
.preview-panel { overflow: clip; min-width: 0; }
.preview-head { min-height: 60px; padding-inline: clamp(16px, 2vw, 30px); }
.zoom-control {display:inline-flex;gap:3px;padding:3px;border:1px solid #cbd7e4;border-radius:8px;background:var(--quiet);}
.zoom-control button {padding:5px 12px;border:0;border-radius:5px;background:transparent;color:var(--muted);font-size:14px;}
.zoom-control button[aria-pressed="true"] {background:#204e8b;color:#fff;font-weight:650;}
.activity-legend {position:sticky;top:0;z-index:2;display:flex;align-items:center;flex-wrap:wrap;gap:5px 16px;padding:8px 16px;background:#fff;border-block:1px solid var(--line);}
.legend-title {font-size:14px;font-weight:700;}
.activity-legend label {display:inline-flex;align-items:center;gap:6px;min-height:28px;font-size:14px;cursor:pointer;}
.activity-legend input {width:14px;height:14px;flex-basis:14px;}
.activity-legend label:has(input:not(:checked)) {color:var(--muted);}
.arc-key {position:relative;display:inline-block;width:26px;height:20px;color:#1d5ad7;}
.arc-key::before {content:"";position:absolute;left:0;right:4px;top:9px;border-top:2px solid currentColor;}
.arc-key::after {content:"";position:absolute;right:1px;top:6px;border-left:7px solid currentColor;border-block:4px solid transparent;}
.key-limited {color:#b45309;}.key-limited::before {border-top-style:dashed;}
.key-wait {width:20px;transform:rotate(90deg);color:#526170;}
.key-virtual {color:#77818d;}.key-virtual::before {border-top-style:dotted;}
#terminal-stats {margin-top:10px;font-size:14px;color:var(--muted);}
#chart-summary { font-size: clamp(18px, 1.4vw, 23px); font-weight: 680; padding: 20px clamp(16px, 2vw, 30px) 5px; overflow-wrap: anywhere; }
#chart-host { display: block; width: 100%; overflow: auto; max-height: min(68vh, 760px); overscroll-behavior: contain; scrollbar-color: #a8b8c9 #f4f7fb; background: white; }
#chart-host:focus-visible { outline-offset: -3px; }
#chart-host svg { display: block; min-width: 100%; height: auto; margin: 0 auto; }
.stat-strip { padding: 16px clamp(16px, 2vw, 30px); border-top: 1px solid var(--line); background: #f9fbfd; }
.stat-strip dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.stat-strip dl > div { padding: 1px 11px 1px clamp(13px, 2.1vw, 32px); border-left: 1px solid var(--line); }
.stat-strip dl > div:first-child { padding-left: 0; border-left: none; }
.stat-strip dt { color: var(--muted); font-size: 13px; }
.stat-strip dd { margin: 2px 0 0; font-size: clamp(21px, 2.2vw, 32px); line-height: 1.15; font-weight: 670; font-variant-numeric: tabular-nums; }
.detail-panel { min-width:0; padding:12px clamp(16px,2vw,30px); border-top:1px solid var(--line); background:white; }
.detail-panel h2 {font-size:15px;}
.detail-panel:has(.arc-info, #node-detail select) {position:sticky;bottom:0;z-index:1;background:#f2f7ff;border-top:2px solid var(--blue);}
.detail-panel:has(.arc-info, #node-detail select) #node-detail {max-height:min(24vh,14rem);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;}
#node-detail select {min-width:0;max-width:100%;text-overflow:ellipsis;}
#node-detail { margin-top: 5px; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
#node-detail ul { padding-left: 21px; margin: 8px 0; }
#node-detail button { border: 1px solid var(--line); border-radius: 5px; color: var(--blue); background: white; padding: 4px 7px; }
.mobile-jump { display: none; }
@media (max-width: 920px) and (min-width: 761px) {
  .bar-inner, main { padding-inline: 18px; }
  .workbench { grid-template-columns: 280px minmax(0, 1fr); gap: 12px; }
  .form-block, .panel-head, .form-footer { padding-inline: 15px; }
}
@media (max-width: 760px) {
  .bar-inner { min-height: 60px; flex-wrap: wrap; gap: 7px 14px; padding-block: 10px; }
  .file-tools { flex-wrap: wrap; }
  .tool-button, .export { min-height: 36px; padding: 7px 9px; }
  main { padding-block: 22px 32px; }
  .page-heading { align-items: start; margin-bottom: 15px; }
  .page-heading p { font-size: 14px; }
  .workbench { display: flex; flex-direction: column; gap: 15px; }
  .view-column { order: -1; width: 100%; gap: 10px; }
  .config-panel { width: 100%; }
  .mobile-jump { display: inline-flex; white-space: nowrap; flex-shrink: 0; min-height: 38px; color: var(--blue-dark); background: white; border-color: #c9d6e6; }
  .to-settings { display: none; }
  .preview-head { padding: 12px 14px; min-height: 48px; }
  #chart-summary { padding: 12px 14px 3px; }
  #chart-host { max-height: 65vh; }
  input:not([type="file"],[type="checkbox"]), select, textarea, .link-rule label :is(select,input[type="number"]), .window-fields input { font-size: 16px; }
  .link-rule { gap: 8px; }
}
@media (max-width: 480px) {
  .bar-inner, main { padding-inline: 12px; }
  .brand { font-size: 17px; gap: 7px; }
  .brand-mark { width: 30px; height: 30px; }
  .bar-inner { gap: 9px; }
  .file-tools { gap: 3px; }
  .tool-button, .export { font-size: 12px; padding: 6px 7px; }
  .page-heading { flex-wrap: wrap; }
  .to-settings { display: inline-flex; justify-self: end; }
  .activity-legend {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 6px;padding:4px 12px;}
  .legend-title {grid-column:1/-1;}
  .stat-strip { padding: 12px 14px; }
  .stat-strip dt { font-size: 12px; }
}
.config-tools {display:flex;gap:4px;align-items:center;}
.offline-download {align-self:start;justify-self:start;font-size:14px;color:#345c8a;text-underline-offset:3px;}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {outline:2px solid #a33e34;outline-offset:1px;}
.pager, .view-tools {display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
.pager[hidden] {display:none}
.pager button {border:1px solid #bdcad9;border-radius:5px;padding:5px 9px;background:white;color:#214d81;cursor:pointer;}
.pager button:disabled {color:#788696;background:#f4f6f8;cursor:default;}
.pager span,.view-range {font-size:13px;color:#475b70;}
.view-tools {background:#f5f8fc;margin:8px 0 0;padding:10px 16px;align-items:flex-end;}
.view-tools label {display:grid;gap:3px;font-size:13px;}
.view-tools select, .config-tools select, #export-scope {width:auto;max-width:15em;padding:5px 7px;font-size:14px;height:auto;}
.view-range {padding:6px 16px;}
.rule-rail {grid-column:1/-1}
.rule-rail summary {cursor:pointer;color:#345c8a;font-size:13px;}
.rail-fields {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;}
.rail-fields label {min-width:0;}
.arc-info {display:flex;flex-wrap:wrap;gap:5px 20px;margin:5px 0 0;}
.arc-info div {display:grid;gap:2px;}
.arc-info dt {font-size:13px;color:#53687d;}.arc-info dd {margin:0;color:#172e49;font-weight:600;}
.arc-info > div {min-width:0;max-width:100%;overflow-wrap:anywhere;}
.view-tools label,.config-tools,.config-tools label,.file-tools {min-width:0;max-width:100%;}
.view-tools select {min-width:0;max-width:min(15em,100%);text-overflow:ellipsis;}
.config-tools select {max-width:100%;text-overflow:ellipsis;}
.terminal-toolbar, .terminal-actions {display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;}
.terminal-toolbar {margin-top:10px;}
.terminal-toolbar label {flex:1 1 8rem;min-width:0;}
.terminal-toolbar select {text-overflow:ellipsis;}
#terminal-fields {display:grid;gap:7px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line);}
#terminal-fields h3 {margin:5px 0 0;font-size:14px;}
#terminal-fields h3 span {margin-left:4px;color:var(--muted);font-size:12px;font-weight:500;}
.terminal-editor label input,.terminal-editor select {display:block;margin-top:3px;}
.terminal-point {display:grid;grid-template-columns:minmax(0,1fr) minmax(5.2rem,0.55fr);gap:5px 8px;align-items:end;}
.terminal-point label {min-width:0;}
#terminal-exits {display:grid;gap:8px;}
.terminal-exit {border-left:2px solid #c6d6ed;padding-left:9px;}
.terminal-exit button {grid-column:1/-1;justify-self:end;}
.terminal-actions {justify-content:space-between;align-items:center;}
.terminal-editor .terminal-remove-exit,.terminal-actions .text-button {font-size:13px;color:#6f4550;}
.view-range {overflow-wrap:anywhere;}
@media(max-width:520px) {
  .view-tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  .view-tools > label:first-child,.view-tools > .pager {grid-column:1/-1;}
  .view-tools select {width:100%;max-width:100%;font-size:16px;}
  .stat-strip dd {font-size:clamp(15px,4.4vw,21px);overflow-wrap:anywhere;}
  .arc-info {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;}
  .config-tools {flex-wrap:wrap;}
}

.preview-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.preview-actions button { white-space:nowrap; }
.preview-actions #wide-chart { gap:6px; color:var(--blue-dark); border-color:#a8bddc; }
#wide-chart .collapse-icon, #wide-chart[aria-pressed="true"] .expand-icon { display:none; }
#wide-chart[aria-pressed="true"] .collapse-icon { display:inline; }
.preview-panel.is-atlas #view-controls > :not(.resource-field) { display:none; }

#atlas-host { display:flex; flex-direction:column; min-width:0; background:white; }
#atlas-controls {
  display:flex; flex-wrap:wrap; align-items:center; gap:6px; flex:none;
  padding:5px 16px; border-bottom:1px solid var(--line); background:var(--quiet);
}
.atlas-zoom-tools, .atlas-mode-tools {
  display:inline-flex; align-items:center; flex:none; border:1px solid #b8c7d7;
  border-radius:7px; background:#fff;
}
#atlas-controls button { min-height:32px; white-space:nowrap; font-size:14px; }
.atlas-mode-tools button, .atlas-zoom-tools button { border:0; border-radius:5px; background:transparent; }
.atlas-zoom-tools button { width:34px; color:var(--blue-dark); font-weight:700; }
#atlas-controls .atlas-zoom-tools button { font-size:20px; line-height:1; }
.atlas-mode-tools button { padding:3px 10px; }
.atlas-mode-tools button[aria-pressed="true"] { background:#204e8b; color:white; }
#atlas-controls button:not(:disabled):not([aria-pressed="true"]):hover { background:#eaf0f9; }
#atlas-controls button:focus-visible { position:relative; z-index:1; }
#atlas-zoom-level {
  min-width:5ch; padding-inline:3px; font-size:13px; font-weight:650;
  font-variant-numeric:tabular-nums; text-align:center;
}
#atlas-reset { padding:3px 8px; }
.atlas-touch-hint { display:none; }
@media (pointer:coarse) {
  #atlas-controls button { min-height:40px; }
  .atlas-zoom-tools button { width:40px; }
  .atlas-touch-hint { display:inline; }
  .atlas-desktop-hint, .atlas-key-hint { display:none; }
}
.atlas-surface { position:relative; width:100%; height:clamp(300px,60vh,680px); min-height:0; }
#atlas-canvas, #atlas-overlay { position:absolute; inset:0; display:block; width:100%; height:100%; }
#atlas-canvas { touch-action:none; cursor:crosshair; }
#atlas-host:has(#atlas-pan[aria-pressed="true"]) #atlas-canvas { cursor:grab; }
#atlas-host:has(#atlas-pan[aria-pressed="true"]) #atlas-canvas:active { cursor:grabbing; }
#atlas-canvas:focus-visible { outline-offset:-3px; }
#atlas-overlay { pointer-events:none; overflow:hidden; }
.atlas-selection, .atlas-cross-x, .atlas-cross-y { position:absolute; pointer-events:none; }
.atlas-selection { border:2px solid #164bc7; background:rgb(42 103 223 / 16%); }
.atlas-cross-x { top:0; bottom:0; width:0; border-left:1px dashed #294c7b; }
.atlas-cross-y { left:0; right:0; height:0; border-top:1px dashed #294c7b; }
.atlas-caption { flex:none; padding:8px 16px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
#atlas-status { min-height:1.5em; margin-top:2px; color:var(--ink); font-variant-numeric:tabular-nums; }

html.reading-chart, html.reading-chart body { overflow:hidden; overscroll-behavior:none; }
.preview-panel.is-reading {
  position:fixed; inset:0; z-index:9999; display:flex; flex-direction:column;
  width:100%; height:100vh; height:100dvh; max-width:none; max-height:none;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  margin:0; border:0; border-radius:0; background:#fff; overflow:hidden;
}
.is-reading .preview-head { min-height:0; padding:6px 16px; flex:none; }
.is-reading #chart-summary { flex:none; padding:4px 16px; font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.is-reading #chart-settings { flex:none; max-height:32vh; max-height:32dvh; overflow:auto; overscroll-behavior:contain; }
.is-reading:not(.settings-open) #chart-settings { display:none; }
.is-reading .view-tools { margin:0; padding-block:6px; }
.is-reading .activity-legend { position:static; flex:none; min-height:0; padding-block:1px; }
.is-reading :is(#atlas-host, #chart-host) { flex:1 1 0; min-height:0; max-height:none; }
.is-reading .atlas-surface { flex:1 1 0; height:auto; }
.is-reading .atlas-caption { padding:3px 12px; }
.is-reading .detail-panel { position:static; flex:none; padding:5px 16px; max-height:21vh; overflow:auto; }
.is-reading .detail-panel #node-detail { max-height:none; overflow:visible; }
.is-reading .stat-strip, .is-reading.is-atlas .detail-panel { display:none; }
@media (max-width:620px) {
  .preview-panel .preview-head { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:6px; }
  .preview-actions { display:contents; }
  .preview-head h2 { grid-area:1/1; }
  #reading-tools { grid-area:1/2; }
  #wide-chart { grid-area:1/3; }
  .preview-head .zoom-control { grid-area:2/1/3/-1; justify-self:start; }
  .preview-head .zoom-control button { min-height:32px; }
  .is-reading .preview-head { padding:5px 12px; }
  .is-reading .preview-head h2 { font-size:16px; }
  .is-reading #chart-summary { font-size:14px; padding:2px 12px; }
  .is-reading .legend-title { display:none; }
  .atlas-caption { padding-inline:12px; }
  .is-reading #atlas-status { min-height:3em; }
  #atlas-controls { padding-inline:10px; }
}
@media (max-width:520px) {
  #view-controls > label:first-child { grid-column:auto; }
  #view-controls .resource-field { grid-column:1 / -1; }
  .preview-panel.is-atlas #view-controls { display:flex; }
}
@media (max-height:460px) {
  .is-reading #chart-summary { display:none; }
  .is-reading .preview-head { padding-block:3px; }
  .is-reading #chart-settings { max-height:29vh; }
  .is-reading .detail-panel { max-height:18vh; }
}
