body {
  width: 420px;
  margin: 0;
  padding: 12px 14px 14px;
  font: 13px/1.4 system-ui, -apple-system, sans-serif;
  color: #1d1d1f;
  background: #fff;
}
h1 { font-size: 15px; margin: 0 0 2px; }
h1 .muted { font-size: 11px; font-weight: normal; }
.muted { color: #6e6e73; margin: 0 0 8px; }
label { display: block; margin-bottom: 8px; font-weight: 600; }
label select { display: block; width: 100%; margin-top: 3px; padding: 4px; font: inherit; font-weight: normal; }
label.check { font-weight: normal; }
textarea {
  width: 100%; box-sizing: border-box; height: 180px;
  font: 11px/1.35 ui-monospace, Menlo, monospace;
  white-space: pre; overflow: auto; resize: vertical;
}
.buttons { display: flex; gap: 8px; }
button {
  flex: 1; padding: 7px; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid #0071e3; border-radius: 6px; background: #0071e3; color: #fff;
}
button + button { background: #fff; color: #0071e3; }
button.link {
  flex: none; padding: 0; margin: 0 0 8px; border: 0; background: none; color: #0071e3;
  font-weight: 500; text-decoration: underline; cursor: pointer;
}
#nativeExport, #saveOriginal { margin-top: 8px; display: block; }
#nativeExport[hidden], #allPages[hidden], #saveOriginal[hidden], #openHud[hidden], #hudModeRow[hidden], #frameNote[hidden], #updateNote[hidden], #rightClickSetup[hidden], #rightClickAllow[hidden], #chartPreview[hidden], #annotate[hidden], #variantBox[hidden], #timeOptions[hidden], #columnsBox[hidden] { display: none; }
button.link:disabled { opacity: 0.5; cursor: default; }
p.tip { background: #fff8e1; border-left: 3px solid #f5a623; padding: 4px 8px; margin: 0 0 8px; }
fieldset { border: 1px solid #d2d2d7; border-radius: 6px; margin: 0 0 8px; padding: 4px 8px 6px; }
legend { font-weight: 600; padding: 0 4px; }
#columns { display: flex; flex-wrap: wrap; gap: 2px 12px; max-height: 96px; overflow: auto; }
#columns label { font-weight: normal; margin: 0; white-space: nowrap; }
details { margin-top: 12px; border-top: 1px solid #e5e5ea; padding-top: 8px; }
summary { cursor: pointer; font-weight: 600; }
code { font-size: 12px; }
@media (prefers-color-scheme: dark) {
  body { background: #1c1c1e; color: #f5f5f7; }
  .muted { color: #a1a1a6; }
  textarea, select { background: #2c2c2e; color: #f5f5f7; border: 1px solid #3a3a3c; }
  button + button { background: transparent; color: #4ea1ff; border-color: #4ea1ff; }
  button.link { color: #4ea1ff; }
  details { border-color: #3a3a3c; }
  fieldset { border-color: #3a3a3c; }
  p.tip { background: #3a3220; }
}
#annotate { margin-top: 10px; }
.copyRow { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.copyRow span { width: 46px; flex: none; color: #6e6e73; }
.copyRow input { flex: 1; min-width: 0; padding: 3px 5px; font: inherit; border: 1px solid #d2d2d7; border-radius: 4px; }
button.small { flex: none; padding: 3px 8px; font-size: 12px; background: #fff; color: #0071e3; }
#imageList { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
#imageList button { flex: none; width: 124px; padding: 3px; background: #fff; border: 1px solid #d2d2d7; color: #1d1d1f; font-weight: normal; font-size: 11px; }
#imageList img { display: block; width: 100%; height: 70px; object-fit: contain; background: #f5f5f7; }
#imagePreview { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 8px; border: 1px solid #d2d2d7; }
#imagePreview[hidden], #readImage[hidden] { display: none; }
button.wide { display: block; width: 100%; margin-top: 8px; background: #fff; color: #0071e3; }
#moreOptions input { display: block; width: 100%; box-sizing: border-box; margin-top: 3px; padding: 4px; font: inherit; font-weight: normal; }
#chartPreview { margin: 0 0 8px; border: 1px solid #d2d2d7; border-radius: 6px; padding: 4px 4px 2px; }
#chartPreview svg { display: block; width: 100%; height: auto; }
.pv-grid { stroke: #e5e5ea; stroke-width: 1; }
.pv-label { font-size: 9px; fill: #6e6e73; }
.pv-vol { fill: #9aa4ad; }
.pv-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11px; padding: 2px 4px; }
.pv-legend i { display: inline-block; width: 10px; height: 3px; margin-right: 4px; vertical-align: middle; }
.pv-legend .pv-vol-key { height: 8px; background: #9aa4ad; }
@media (prefers-color-scheme: dark) {
  #chartPreview { border-color: #3a3a3c; }
  .pv-grid { stroke: #3a3a3c; }
  .pv-label { fill: #a1a1a6; }
}
#rightClickSetup { background: #eef5ff; border-left: 3px solid #0071e3; padding: 6px 8px; margin: 0 0 8px; }
#rightClickSetup p { margin: 0 0 6px; }
@media (prefers-color-scheme: dark) { #rightClickSetup { background: #1d2a3a; } }
#openHud { display: block; margin: 0 0 6px; }
html.fluid body { width: auto; box-sizing: border-box; }
#rescan { margin-left: 14px; }
#allPages { display: block; margin: -2px 0 8px; font-weight: 600; }
