/* wft.css — Web Serial Flash Tool styles.
   Scoped under .wft so it never bleeds into the surrounding doc theme. */

.wft {
  --wft-accent: #0066cc;
  --wft-accent-hover: #0056b3;
  --wft-ok: #2e7d32;
  --wft-warn: #b26a00;
  --wft-err: #c62828;
  --wft-border: #d9d9d9;
  --wft-bg-soft: #f6f7f9;
  --wft-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.wft * { box-sizing: border-box; }

/* ---- Documentation prose around the tool ----------------------------------
   The page is authored as raw HTML (resource/web_flash_tool*.rst) rather than
   Sphinx-styled RST, so the intro / usage / troubleshooting blocks carry their
   own styling here. These wrappers are siblings of (not inside) .wft, so they
   use literal colors instead of the --wft-* variables. */

.wft-browser-note {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  background: #fff8e1;
  color: #8a6d00;
  font-size: 14px;
  line-height: 1.6;
}
.wft-browser-note a { color: #8a6d00; text-decoration: underline; }

.wft-doc { margin: 28px 0 0; }
.wft-doc-title {
  margin: 0 0 16px;
  padding-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #0066cc;
}

.wft-steps {
  margin: 0;
  padding: 0;
  list-style: none !important;
  counter-reset: wft-step;
}
.wft-steps > li {
  list-style: none !important;
  position: relative;
  padding: 0 0 14px 42px;
  margin: 0 0 14px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
  color: #444;
  line-height: 1.65;
}
.wft-steps > li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.wft-steps > li::before {
  counter-increment: wft-step;
  content: counter(wft-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0066cc;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
}
.wft-steps strong { color: #222; }
.wft-steps em { font-style: normal; font-weight: 600; color: #0066cc; }

.wft-trouble { margin: 0; padding-left: 20px; }
.wft-trouble > li {
  margin: 0 0 12px;
  font-size: 15px;
  color: #444;
  line-height: 1.65;
}
.wft-trouble strong { color: #222; }

.wft-doc code,
.wft-browser-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: #eef1f4;
  padding: 1px 5px;
  border-radius: 4px;
}


.wft-step {
  border: 1px solid var(--wft-border);
  border-radius: var(--wft-radius);
  padding: 18px 20px;
  margin: 0 0 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wft-step-title { margin: 0; font-size: 16px; font-weight: 600; }

.wft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.wft-field { display: flex; flex-direction: column; gap: 4px; }
.wft-field-inline { flex-direction: row; align-items: center; gap: 8px; }
/* margin:0 keeps the label vertically centered against sibling selects/buttons
   in a .wft-row (the doc theme otherwise gives <label> a bottom margin). */
.wft-label { margin: 0; font-size: 13px; font-weight: 600; color: #444; }
/* Inline label+control groups sit on the same line as adjacent buttons. */
.wft-row > .wft-field-inline { align-self: center; }

.wft-select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--wft-border);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}
.wft-field-inline .wft-select { width: auto; }

.wft-note { font-size: 13px; color: #666; }
.wft-note:empty { display: none; }
/* Prevent inline margin shift when .wft-note appears as a flex-row child */
.wft-row > .wft-note { margin-top: 0; }

.wft-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.wft-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: var(--wft-accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.wft-btn:hover:not(:disabled) { background: var(--wft-accent-hover); }
.wft-btn:disabled { background: #b8c2cc; cursor: not-allowed; }
.wft-btn-primary { font-weight: 600; }
.wft-btn-ghost { background: transparent; color: var(--wft-accent); border: 1px solid var(--wft-border); }
.wft-btn-ghost:hover:not(:disabled) { background: var(--wft-bg-soft); }

.wft-status { font-size: 14px; font-weight: 600; }
.wft-status-on { color: var(--wft-ok); }
.wft-status-off { color: #888; }

.wft-progress {
  flex: 1 1 200px;
  height: 16px;
  background: #e8eaed;
  border-radius: 8px;
  overflow: hidden;
  min-width: 160px;
}
.wft-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00a651, #2e7d32);
  transition: width .35s ease;
}
.wft-progress-pct { font-variant-numeric: tabular-nums; min-width: 3em; text-align: right; }

/* Two labelled groups inside step 1: "select application" / "select device". */
.wft-subgroup { margin-bottom: 16px; }
.wft-subgroup:last-child { margin-bottom: 0; }
.wft-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--wft-accent);
  margin-bottom: 8px;
}

/* Device selection radio group (step 2). Each device/variant is a selectable
   chip; the picked one is highlighted via the .wft-radio-checked class (toggled
   in JS so it works without :has() on older supported browsers). */
.wft-radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.wft-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--wft-border);
  border-radius: var(--wft-radius);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  transition: border-color .15s, background .15s, color .15s;
}
.wft-radio:hover { border-color: var(--wft-accent); }
.wft-radio-input { accent-color: var(--wft-accent); margin: 0; cursor: pointer; }
.wft-radio-checked {
  border-color: var(--wft-accent);
  background: #eef5fc;
  color: var(--wft-accent);
  font-weight: 600;
}

/* Device requirements panel — deliberately prominent (warm accent + left bar)
   so the user notices the board's prerequisites right after picking it. */
.wft-requirements {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #ffe0a3;
  border-left: 4px solid var(--wft-warn);
  border-radius: var(--wft-radius);
  background: #fff8ec;
  color: #5a4300;
  font-size: 14px;
  line-height: 1.5;
}
.wft-requirements-title {
  font-weight: 700;
  color: var(--wft-warn);
  margin-bottom: 6px;
}
.wft-requirements-list { margin: 0 0 6px; padding-left: 20px; }
.wft-requirements-list:last-child,
.wft-requirements-note:last-child { margin-bottom: 0; }
.wft-requirements-note { margin: 0; }

.wft-log {
  margin: 0;
  padding: 12px;
  height: 200px;
  overflow-y: auto;
  background: #1e1e1e;
  color: #e0e0e0;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}
.wft-logbar { display: flex; align-items: center; gap: 10px; }
.wft-logline { margin: 0; }
.wft-log-debug { color: #9aa0a6; }
.wft-log-info  { color: #d6e4ff; }
.wft-log-warn  { color: #ffcc66; }
.wft-log-error { color: #ff8a80; }

/* ---- Serial console (independent of the flash log) ------------------------ */
.wft-console {
  margin: 0;
  padding: 12px;
  height: 400px;
  overflow-y: auto;
  background: #1e1e1e;
  color: #e0e0e0;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}
.wft-cmdbar { display: flex; gap: 8px; }
.wft-cmd-input {
  flex: 1 1 auto;
  padding: 8px 10px;
  border: 1px solid var(--wft-border);
  border-radius: 6px;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}
.wft-cmd-input:disabled { background: #f0f0f0; color: #999; cursor: not-allowed; }

.wft-history {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid var(--wft-border);
  border-radius: 6px;
  background: var(--wft-bg-soft);
}
.wft-history-item {
  padding: 6px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #ececec;
  user-select: none;
}
.wft-history-item:last-child { border-bottom: none; }
.wft-history-item:hover { background: #e8eef7; }
.wft-history-empty {
  padding: 10px;
  font-size: 13px;
  color: #888;
  text-align: center;
}

.wft-incompat {
  border: 1px solid #f0c36d;
  background: #fff8e1;
  border-radius: var(--wft-radius);
  padding: 16px 18px;
}
.wft-incompat h3 { margin: 0 0 8px; color: var(--wft-warn); }

/* ---- Source-mode toggle: online / local flash ---------------------------- */
.wft-source-toggle {
  display: inline-flex;
  border: 1px solid var(--wft-accent);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}
.wft-source-toggle-btn {
  padding: 7px 18px;
  border: none;
  background: #fff;
  color: var(--wft-accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.wft-source-toggle-btn:not(:last-child) { border-right: 1px solid var(--wft-accent); }
.wft-source-toggle-btn:hover { background: #eef5fc; }
.wft-source-toggle-btn.active {
  background: var(--wft-accent);
  color: #fff;
}

/* Online selection-mode toggle (by application / chip / platform). Reuses the
   source-toggle pill styling, but lives inside the "select firmware" step box
   (after its title), so its bottom margin is dropped for the step's flex gap. */
.wft-selmode-toggle {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0;
}

/* ---- Local-mode folder picker & file status ------------------------------ */
.wft-local-folder { display: flex; flex-direction: column; gap: 8px; }
.wft-folder-path { font-size: 13px; color: #555; word-break: break-all; }
.wft-rename-warn { font-size: 13px; color: var(--wft-warn); }
.wft-filestatus { display: flex; flex-direction: column; gap: 4px; }
.wft-filestatus-item { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.wft-filestatus-found  { color: var(--wft-ok); }
.wft-filestatus-missing { color: var(--wft-err); }
.wft-filestatus-optional { color: var(--wft-warn); }
.wft-filestatus-ignored { color: #999; }

/* Layout table notes */
.wft-table-note { margin-top: 12px; padding: 10px 12px; background: var(--wft-bg-soft); border-radius: 6px; border: 1px solid var(--wft-border); }
.wft-table-note p { margin: 0 0 4px; font-size: 13px; color: #666; line-height: 1.5; }
.wft-table-note p:last-child { margin-bottom: 0; }

/* Refresh button sits next to the folder path */
.wft-folder-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- Image layout table (Step 3: Select firmware) ------------------------- */
.wft-table-wrap { overflow-x: auto; }
.wft-layout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
.wft-layout-table th, .wft-layout-table td {
  border: 1px solid var(--wft-border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
}
.wft-layout-table th {
  background: var(--wft-bg-soft);
  font-weight: 600;
  font-size: 12px;
  color: #444;
}
.wft-layout-table td input[type="text"] {
  border: 1px solid var(--wft-border);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 13px;
  width: 100%;
  min-width: 100px;
  box-sizing: border-box;
}
.wft-layout-table td input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  .wft-layout-table th { background: #333; color: #ccc; }
  .wft-layout-table td input[type="text"] { background: #1f1f1f; color: #eee; border-color: #555; }
}

@media (prefers-color-scheme: dark) {
  .wft-source-toggle-btn {
    background: #2b2b2b;
    color: #8ab4f8;
  }
  .wft-source-toggle-btn:hover { background: #1f2a3a; }
  .wft-source-toggle-btn.active { background: var(--wft-accent); color: #fff; }
  .wft-folder-path { color: #aaa; }
}

.wft-error {
  border-radius: var(--wft-radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid;
}
.wft-error-user { background: #fff8e1; border-color: #f0c36d; }
.wft-error-tool { background: #fdecea; border-color: #f5a9a0; }
.wft-error-net  { background: #fdecea; border-color: #f5a9a0; }
.wft-error-title { margin: 0 0 6px; font-size: 15px; }
.wft-error-user .wft-error-title { color: var(--wft-warn); }
.wft-error-tool .wft-error-title, .wft-error-net .wft-error-title { color: var(--wft-err); }
.wft-error-msg { margin: 0 0 8px; }
.wft-consent { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 10px; font-size: 14px; }

/* Dark theme support (Furo / RTD dark) */
@media (prefers-color-scheme: dark) {
  .wft-step { background: #2b2b2b; border-color: #444; }
  .wft-select { background: #1f1f1f; color: #eee; border-color: #555; }
  .wft-label, .wft-note { color: #bbb; }

  .wft-radio { background: #1f1f1f; color: #ddd; border-color: #555; }
  .wft-radio-checked { background: #24344a; color: #cfe2ff; border-color: var(--wft-accent); }

  .wft-table-note { background: #2a2a2a; border-color: #444; }
  .wft-table-note p { color: #aaa; }
  .wft-cmd-input { background: #1f1f1f; color: #eee; border-color: #555; }
  .wft-cmd-input:disabled { background: #2a2a2a; color: #777; }
  .wft-history { background: #242424; border-color: #444; }
  .wft-history-item { color: #ddd; border-color: #3a3a3a; }
  .wft-history-item:hover { background: #34415a; }
  .wft-history-empty { color: #999; }

  .wft-doc-title { color: #e8e8e8; }
  .wft-steps > li, .wft-trouble > li { color: #cfcfcf; border-color: #3a3a3a; }
  .wft-steps strong, .wft-trouble strong { color: #f0f0f0; }
  .wft-doc code, .wft-browser-note code { background: #333; color: #eee; }
}

/* ---- ameba-claw post-flash config panel (AT+CLAW, §2–§6) ------------------ */
.wft-claw-intro { margin: 0; font-size: 14px; color: #555; line-height: 1.55; }

/* Status bar: connection state on the left, action buttons pushed right. */
.wft-claw-statusbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--wft-bg-soft);
  border: 1px solid var(--wft-border);
  border-radius: 6px;
}
.wft-claw-statusbar .wft-status { margin-right: auto; }

/* Stepper header: numbered chips, one per step; wraps on narrow screens. */
.wft-claw-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; }
.wft-claw-stepchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--wft-border);
  border-radius: 999px;
  background: #fff;
  color: #555;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.wft-claw-stepchip:hover { border-color: var(--wft-accent); }
.wft-claw-stepnum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e8e8e8; color: #555;
  font-size: 12px; font-weight: 700;
}
.wft-claw-stepchip.current { border-color: var(--wft-accent); background: var(--wft-accent); color: #fff; }
.wft-claw-stepchip.current .wft-claw-stepnum { background: rgba(255, 255, 255, .3); color: #fff; }
.wft-claw-stepchip.done .wft-claw-stepnum { background: var(--wft-ok); color: #fff; }

/* Step stage: exactly one panel visible at a time. */
.wft-claw-stage { margin-top: 4px; }
.wft-claw-steppanel {
  border: 1px solid var(--wft-border);
  border-radius: var(--wft-radius);
  padding: 16px;
  background: #fff;
  display: flex; flex-direction: column; gap: 12px;
}
.wft-claw-steppanel[hidden] { display: none; }
.wft-claw-step-head { display: flex; align-items: center; gap: 10px; }
.wft-claw-step-title { margin: 0; font-size: 16px; font-weight: 600; color: #333; }

/* Guidance paragraph, skip/hint line, chooser prompt. */
.wft-claw-guide { margin: 0; font-size: 13.5px; line-height: 1.55; color: #555; }
.wft-claw-hint { font-size: 13px; line-height: 1.5; color: var(--wft-accent); font-weight: 500; }
.wft-claw-hint[hidden] { display: none; }
.wft-claw-choose-label { font-size: 13.5px; font-weight: 600; color: #444; }

/* "Device current values" readout — shows what the device reported (req 1). */
.wft-claw-readout {
  padding: 10px 12px;
  background: var(--wft-bg-soft);
  border: 1px solid var(--wft-border);
  border-radius: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.wft-claw-readout-title { font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .03em; }

/* Back / Skip / Next footer. */
.wft-claw-nav { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid #eee; }
.wft-claw-nav-spacer { flex: 1 1 auto; }

.wft-badge {
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.wft-badge-instant { background: #e6f4ea; color: var(--wft-ok); }
.wft-badge-reboot  { background: #fff3e0; color: var(--wft-warn); }

/* Reusable single-line text input (claw config fields, outside the layout table). */
.wft-input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--wft-border);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}
.wft-input:disabled { background: #f0f0f0; color: #999; cursor: not-allowed; }

/* A field row: label+input grow, the action button hugs the end of the line. */
.wft-claw-field { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.wft-claw-field .wft-field { flex: 1 1 220px; }

/* Configure step: two fields per row (label-on-top, box-below). minmax(0,1fr)
   lets long values scroll inside the box instead of stretching the column;
   align-items:end keeps the boxes level even if one label wraps. Collapses to a
   single column when the panel is too narrow for two usable inputs. */
.wft-claw-cfg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: end;
}
@media (max-width: 560px) {
  .wft-claw-cfg-grid { grid-template-columns: 1fr; }
}

.wft-claw-msg { font-size: 13px; line-height: 1.5; }
.wft-claw-msg:empty { display: none; }
.wft-claw-msg-ok   { color: var(--wft-ok); }
.wft-claw-msg-err  { color: var(--wft-err); }
.wft-claw-msg-info { color: #666; }

/* Chat-channel chooser: selectable tiles (WeChat / Telegram / Feishu / QQ). */
.wft-claw-platforms { display: flex; gap: 8px; flex-wrap: wrap; }
.wft-claw-platform {
  flex: 1 1 120px;
  padding: 12px;
  border: 1px solid var(--wft-border);
  border-radius: 8px;
  background: #fff;
  color: #444;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.wft-claw-platform:hover { border-color: var(--wft-accent); }
.wft-claw-platform.selected {
  border-color: var(--wft-accent);
  background: #eef5fc;
  box-shadow: inset 0 0 0 1px var(--wft-accent);
  color: var(--wft-accent);
}
.wft-claw-platpanel { display: flex; flex-direction: column; gap: 12px; }
.wft-claw-platpanel[hidden] { display: none; }

/* Success banner — WeChat scanned / bot ready (req 4). */
.wft-claw-done {
  padding: 10px 12px;
  background: #e6f4ea;
  border: 1px solid #b7dfc2;
  border-radius: 6px;
  color: var(--wft-ok);
  font-size: 14px; font-weight: 600;
}
.wft-claw-done[hidden] { display: none; }

/* Sub-section header inside the Configure step (LLM / Web search / IM channel). */
.wft-claw-section-title {
  margin-top: 6px;
  font-size: 14px; font-weight: 700; color: #333;
  border-bottom: 1px solid #eee; padding-bottom: 4px;
}

/* Manual-reset fallback box (shown when auto DTR/RTS reset gets no response). */
.wft-claw-manual {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
  border: 1px solid var(--wft-warn); border-radius: 6px;
  background: #fff8ec;
}
.wft-claw-manual[hidden] { display: none; }
.wft-claw-manual .wft-claw-guide { color: #8a5a00; }

/* Apply-step live checklist — the whole process is shown as it runs (req 5). */
.wft-claw-applylog {
  margin: 0; padding: 10px 12px;
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--wft-bg-soft, #f7f7f7);
  border: 1px solid var(--wft-border); border-radius: 6px;
  max-height: 240px; overflow-y: auto;
}
.wft-claw-applylog:empty { display: none; }
.wft-claw-applyitem { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.5; }
.wft-claw-applyicon { flex: 0 0 auto; }

/* WeChat QR login. The QR stays on a white plate for scan contrast in dark mode. */
.wft-claw-finish-wechat, .wft-claw-finish-bot { display: flex; flex-direction: column; gap: 12px; }
.wft-claw-finish-wechat[hidden], .wft-claw-finish-bot[hidden] { display: none; }
.wft-claw-qr-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wft-claw-qr {
  width: 200px; height: 200px;
  object-fit: contain;
  border: 1px solid var(--wft-border);
  border-radius: 6px;
  background: #fff;
}
.wft-claw-qr[hidden] { display: none; }
/* Locally-encoded QR (device returns a deep-link payload, not an image). */
.wft-claw-qrcanvas {
  width: 200px; height: 200px;
  border: 1px solid var(--wft-border);
  border-radius: 6px;
  background: #fff;
  image-rendering: pixelated;
}
.wft-claw-qrcanvas[hidden] { display: none; }
.wft-claw-wechat-state { font-size: 14px; font-weight: 600; }

/* Collapsible raw serial output (debug visibility while the console yields). */
.wft-claw-raw { border: 1px solid var(--wft-border); border-radius: 6px; }
.wft-claw-raw > summary {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px; font-weight: 600; color: #555;
  user-select: none;
}
.wft-claw-raw .wft-console { height: 220px; border-radius: 0 0 6px 6px; }

@media (prefers-color-scheme: dark) {
  .wft-claw-intro { color: #bbb; }
  .wft-claw-statusbar { background: #242424; border-color: #444; }
  .wft-claw-stepchip { background: #2b2b2b; color: #bbb; border-color: #444; }
  .wft-claw-stepnum { background: #3a3a3a; color: #bbb; }
  .wft-claw-steppanel { background: #2b2b2b; border-color: #444; }
  .wft-claw-step-title { color: #eee; }
  .wft-claw-guide { color: #bbb; }
  .wft-claw-choose-label { color: #ddd; }
  .wft-claw-readout { background: #242424; border-color: #444; }
  .wft-claw-nav { border-color: #3a3a3a; }
  .wft-input { background: #1f1f1f; color: #eee; border-color: #555; }
  .wft-input:disabled { background: #2a2a2a; color: #777; }
  .wft-badge-instant { background: #1e3a24; }
  .wft-badge-reboot { background: #3a2e18; }
  .wft-claw-platform { background: #2b2b2b; color: #ccc; border-color: #444; }
  .wft-claw-platform.selected { background: #1f2a3a; color: #fff; }
  .wft-claw-done { background: #1e3a24; border-color: #2d5738; color: #7fd69a; }
  .wft-claw-section-title { color: #eee; border-color: #3a3a3a; }
  .wft-claw-manual { background: #33270f; border-color: #6a5216; }
  .wft-claw-manual .wft-claw-guide { color: #e0b060; }
  .wft-claw-applylog { background: #242424; border-color: #444; }
  .wft-claw-qrcanvas { border-color: #444; }
  .wft-claw-raw { border-color: #444; }
  .wft-claw-raw > summary { color: #bbb; }
}
