* { box-sizing: border-box; font-family: -apple-system, system-ui, sans-serif; }
body { margin: 0; height: 100vh; display: flex; flex-direction: column; position: relative; }
header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #e0e0e0; }
/* 2.5.2: the header must fit a narrow window: the left side shrinks first, selects shrink, nothing is pushed off */
#header-left { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
#header-right { display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1; }
#header-right select { min-width: 0; flex-shrink: 1; }
#engine-sel { width: 190px; flex-shrink: 0; }   /* fixed: the header must not move when switching */
#target { width: 180px; flex-shrink: 0; }   /* fixed: its option list changes with the engine */
#app-title { font-weight: 600; font-size: 14px; color: #222; white-space: nowrap; }
#detected { color: #888; font-size: 13px; white-space: nowrap; }

/* Tab bar */
#tab-bar {
  display: flex;
  gap: 0;
  padding: 0 12px;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
  position: relative;
}
.tab-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
  outline: none;
}
.tab-btn:hover { color: #222; }
.tab-btn.active { color: #1a1a1a; border-bottom: 2px solid #333; }

/* About sits in the far right corner of the tab bar. */
.tab-btn.tab-right { margin-left: auto; }

/* Reverse-direction (swap) button (70, Damian's red box in img86): in the tab
   bar row, centred on the divider between the two panes (the panes are equal
   halves, so the divider is the bar's centre). Not in the header, not a tab.
   Protected layout: scripts/layout-test.py fails the release if it drifts. */
#swap-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  line-height: 1;
  padding: 3px 14px;
  border: 1px solid #c5d4e8;
  border-radius: 7px;
  background: #eaf1fb;
  color: #2f6fd6;
  cursor: pointer;
  transition: background .12s, transform .08s;
}
#swap-btn:hover:not(:disabled) { background: #dce8fa; }
#swap-btn:active:not(:disabled) { transform: translate(-50%, -50%) scale(0.92); }
#swap-btn:disabled { opacity: .35; cursor: default; }

/* Tab sections */
#tab-text { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#tab-text[hidden], #tab-document[hidden], #tab-picture[hidden] { display: none; }
[id$="-panel"][hidden] { display: none !important; } /* 17/11/2026: a gated tab shows only its Log in / Subscribe card */
#tab-document, #tab-picture { flex: 1; display: flex; flex-direction: column; }

main { flex: 1; display: flex; gap: 1px; background: #e0e0e0; min-height: 0; }
textarea { flex: 1; border: 0; padding: 14px; font-size: 15px; resize: none; outline: none; }
#input-pane, #output-pane { flex: 1; display: flex; flex-direction: column; position: relative; min-width: 0; }
#output-pane textarea { flex: 1; background: #fafafa; }
#banner { padding: 8px 12px; background: #fde2e1; color: #8a1c12; font-size: 13px; }
#banner[hidden] { display: none; }
/* 72: brand orange progress on the app chrome (same as the tab bar), never system blue */
#update-bar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: #fafafa; color: #333; font-size: 13px; border-bottom: 1px solid #e0e0e0; }
#update-bar[hidden], #update-rate[hidden] { display: none; }
#update-msg { flex: 1; }
#update-rate { font-variant-numeric: tabular-nums; color: #666; white-space: nowrap; }
#update-progress { width: 160px; height: 6px; -webkit-appearance: none; appearance: none; border: 0; border-radius: 3px; background: #e6e6e6; overflow: hidden; }
#update-progress::-webkit-progress-bar { background: #e6e6e6; border-radius: 3px; }
#update-progress::-webkit-progress-value { background: #ff9900; border-radius: 3px; }
#update-progress:indeterminate { background: linear-gradient(90deg, #e6e6e6 0, #ff9900 50%, #e6e6e6 100%) 0 0 / 200% 100%; animation: upd-slide 1.2s linear infinite; }
#update-progress:indeterminate::-webkit-progress-bar { background: transparent; }
@keyframes upd-slide { to { background-position: -200% 0; } }
#update-progress[hidden] { display: none; }
body.dark #update-bar { background: #242426; color: #e4e4e6; border-bottom-color: #38383a; }
body.dark #update-rate { color: #a0a0a5; }
body.dark #update-progress, body.dark #update-progress::-webkit-progress-bar { background: #3a3a3c; }
#banner.toast-success { background: #e2f7e8; color: #14632b; }

/* Document tab */
#doc-panel {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#doc-row, #doc-row-langs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.doc-filename {
  font-size: 13px;
  color: #555;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
#doc-pick, #doc-translate {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  white-space: nowrap;
}
#doc-pick:hover, #doc-translate:hover:not(:disabled) { background: #e8e8e8; }
#doc-translate:disabled { opacity: 0.4; cursor: default; }
#doc-row-langs label { font-size: 13px; color: #555; }
#doc-status {
  font-size: 13px;
  color: #444;
  min-height: 20px;
  word-break: break-all;
}
#doc-status.error { color: #8a1c12; }
#doc-status.success { color: #1a7a3e; }

/* Picture tab */
#pic-panel {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pic-hint {
  margin: 0;
  font-size: 13px;
  color: #555;
}
#pic-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#pic-row label { font-size: 13px; color: #555; }
#pic-capture {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  white-space: nowrap;
}
#pic-capture:hover { background: #e8e8e8; }
.pic-shortcut-hint {
  margin: 0;
  font-size: 12px;
  color: #999;
}
select { font-size: 14px; padding: 4px 8px; border-radius: 4px; border: 1px solid #ccc; }
#model { width: 200px; flex-shrink: 0; }
#app-logo { height: 26px; width: auto; vertical-align: middle; }

/* oMLX status dot */
#server-status { font-size: 12px; white-space: nowrap; }
.status-online  { color: #1a7a3e; }
.status-offline { color: #9a1c12; }

/* Output footer: tts engine selector + speak button */
/* The two footers sit at the same height on both sides of the divider, so the
   Audio file button lines up with Speak rather than floating above the panes. */
#input-footer, #output-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid #e0e0e0;
  background: #fafafa;
}
#input-footer { background: #fff; justify-content: space-between; }
#input-footer .audio-status { flex: 1 1 auto; min-width: 0; }
/* 81: live voice waveform while dictating (Voice Memos style), where the status sits. */
#mic-wave { flex: 1 1 auto; min-width: 0; height: 22px; display: block; }
#input-footer button { flex: none; white-space: nowrap; }
#mic-wave[hidden] { display: none; }
.audio-status[hidden] { display: none; }
.audio-status.busy::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: lt-spin .8s linear infinite;
}
@keyframes lt-spin { to { transform: rotate(360deg); } }

/* Dictation is live: the button is the stop affordance, so it says so. */
#mic-btn.recording {
  border-color: #d33;
  color: #d33;
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  50% { box-shadow: 0 0 0 4px rgba(211, 51, 51, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
  #mic-btn.recording { animation: none; }
}

#tts-engine { font-size: 12px; padding: 3px 6px; }
#speak-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  opacity: 0.85;
}
#speak-btn:hover:not(:disabled) { background: #e8e8e8; opacity: 1; }
#speak-btn:disabled { cursor: default; opacity: 0.4; }

/* Load Voice + voice label */
#load-voice-btn {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}
#load-voice-btn:hover { background: #e8e8e8; }
.voice-label { font-size: 11px; color: #666; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.voice-clear {
  font-size: 11px;
  padding: 2px 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f5f5f5;
  cursor: pointer;
  color: #666;
  line-height: 1;
}
.voice-clear:hover { background: #fde2e1; color: #8a1c12; }

/* Settings button in header */
#settings-btn {
  font-size: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  color: #555;
}
#settings-btn:hover { background: #eee; color: #000; }

/* Settings panel */
#settings-panel {
  position: absolute;
  top: 44px;
  right: 12px;
  width: 340px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 6px 14px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 100;
  display: block;
  font-size: 13px;
}
#settings-panel[hidden] { display: none; }
.set-sec { padding: 8px 0; border-top: 1px solid #eee; }
.set-sec:first-child { border-top: none; }
.set-sec h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #888; font-weight: 600; }
.set-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.set-row > span:first-child { flex: 0 0 92px; color: #444; }
.set-row select, .set-row input[type="text"], .set-row input[type="password"] {
  flex: 1 1 auto; min-width: 0; font-size: 12px; padding: 4px 6px;
  border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #222;
}
.set-check { gap: 6px; }
.set-check input { flex: 0 0 auto; margin: 0; }
.set-check span { flex: 1 1 auto; color: #444; }
.set-actions { justify-content: flex-start; }
#omlx-save { font-size: 12px; padding: 4px 10px; border-radius: 4px; border: 1px solid #ccc; background: #f5f5f5; cursor: pointer; }
#omlx-save:hover { background: #e8e8e8; }
#omlx-msg { font-size: 12px; }
#omlx-msg.ok { color: #1a7f37; }
#omlx-msg.err { color: #c0392b; }
.set-hint { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: #777; white-space: normal; }
.set-hint code { font-size: 11px; }
.settings-path { font-size: 12px; color: #444; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tts-dir-btn {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}
#tts-dir-btn:hover { background: #e8e8e8; }

/* Document "Source: auto-detected" note */
.auto-note { font-size: 13px; color: #777; font-style: italic; }

/* ── Dark (night) theme ─────────────────────────────────────────────────── */
body.dark { background: #1c1c1e; color: #e4e4e6; }
body.dark header,
body.dark #tab-bar { background: #242426; border-bottom-color: #38383a; }
body.dark #app-title { color: #f2f2f4; }
body.dark #detected,
body.dark .auto-note { color: #9a9a9e; }
body.dark main { background: #38383a; }
body.dark textarea { background: #1c1c1e; color: #e8e8ea; }
body.dark #output-pane textarea { background: #232325; }
body.dark #output-footer { background: #242426; }
body.dark #input-footer { background: #1c1c1e; border-top-color: #38383a; }
body.dark #banner { background: #4a1f1d; color: #ffb3ad; }
body.dark #banner.toast-success { background: #1f4a2c; color: #b3ffc6; }
body.dark select,
body.dark button { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark .tab-btn { background: none; color: #9a9a9e; }
body.dark #swap-btn { background: #243247; color: #6aa7ff; border-color: #3a4d6b; }
body.dark #swap-btn:hover:not(:disabled) { background: #2c3e58; }
body.dark .tab-btn:hover { color: #f2f2f4; }
body.dark .tab-btn.active { color: #fff; border-bottom-color: #6aa7ff; }
body.dark #settings-panel { background: #2a2a2c; color: #e4e4e6; border-color: #4a4a4e; }
body.dark .set-sec { border-top-color: #3a3a3c; }
body.dark .set-sec h4 { color: #8a8a8e; }
body.dark .set-row > span:first-child, body.dark .set-check span { color: #c8c8cc; }
body.dark .set-row select, body.dark .set-row input[type="text"], body.dark .set-row input[type="password"] {
  background: #1c1c1e; color: #e8e8ea; border-color: #4a4a4e;
}
body.dark #omlx-save { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark #omlx-save:hover { background: #3a3a3c; }
body.dark #omlx-msg.ok { color: #5fd08a; }
body.dark #omlx-msg.err { color: #ff9a92; }
body.dark .set-hint { color: #9a9a9e; }
body.dark #doc-pick, body.dark #doc-translate,
body.dark #pic-capture { background: #2e2e30; }
body.dark #doc-status { color: #cfcfd2; }
body.dark #doc-status.success { color: #5fd08a; }
body.dark #doc-status.error { color: #ff9a92; }
body.dark .doc-filename, body.dark .pic-hint { color: #b0b0b4; }
body.dark .pic-shortcut-hint { color: #7a7a7e; }
body.dark .voice-label { color: #b0b0b4; }

/* Dark theme: output-footer controls (Speak / Load Voice / engine) */
body.dark #output-footer { border-top-color: #38383a; }
body.dark #speak-btn,
body.dark #load-voice-btn,
body.dark #tts-engine { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark #speak-btn:hover:not(:disabled),
body.dark #load-voice-btn:hover { background: #3a3a3c; }
body.dark #voice-clear { background: #2e2e30; color: #d0d0d4; border-color: #4a4a4e; }

/* Browse tab */
#browse-panel { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
#browse-row { display: flex; gap: 10px; align-items: center; }
#browse-url { flex: 1; font-size: 13px; padding: 6px 10px; border: 1px solid #ccc; border-radius: 5px; }
#browse-open { font-size: 13px; padding: 6px 12px; border-radius: 5px; border: 1px solid #ccc; background: #f5f5f5; cursor: pointer; white-space: nowrap; }
#browse-open:hover { background: #e8e8e8; }
#browse-links { display: flex; flex-wrap: wrap; gap: 8px; }
.browse-link { font-size: 12px; padding: 4px 12px; border-radius: 14px; border: 1px solid #ccc; background: #f5f5f5; cursor: pointer; }
.browse-link:hover { background: #e8e8e8; }
body.dark #browse-url, body.dark #browse-open, body.dark .browse-link { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark #browse-open:hover, body.dark .browse-link:hover { background: #3a3a3c; }

/* ── v2.3: cloud badge, experimental flag, About tab, progress ────────────── */

/* Shown only when a translation was made off-device. */
#engine-badge {
  font-size: 11px;
  font-weight: 600;
  color: #8a5a00;
  background: #fff3d6;
  border: 1px solid #f0d79a;
  border-radius: 10px;
  padding: 1px 7px;
  white-space: nowrap;
}

.tab-flag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8a5a00;
  background: #fff3d6;
  border-radius: 8px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: 1px;
}

.warn-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #7a4a00;
  background: #fff6e2;
  border: 1px solid #f0d79a;
  border-radius: 6px;
}

.icon-btn { font-size: 15px; line-height: 1; padding: 3px 8px; }

.inline-check { font-size: 12px; color: #555; display: inline-flex; align-items: center; gap: 4px; }
.inline-check.disabled { opacity: .45; }


#doc-progress, #pic-progress { width: 100%; height: 5px; margin-top: 10px; }
#pic-status { margin-top: 8px; font-size: 12px; word-break: break-all; }
#pic-status.error { color: #8a1c12; }
#pic-status.success { color: #1a7a3e; }

/* About tab */
#about-panel { padding: 18px 20px; overflow-y: auto; }
.about-logo { display: inline-block; margin-bottom: 12px; }
.about-logo img { display: block; height: 40px; width: auto; }
.about-line { margin: 0 0 4px; font-size: 13px; color: #333; }
.about-sub { color: #777; font-size: 12px; line-height: 1.5; max-width: 620px; }
.about-h {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
}
#about-links, #about-links-partner { display: flex; flex-direction: column; gap: 6px; }
.about-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e4e4e6;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.about-link:hover { border-color: #ff9900; background: #fff8ef; }
.about-link b { font-size: 13px; color: #222; white-space: nowrap; }
.about-link span { font-size: 12px; color: #777; }

body.dark #engine-badge,
body.dark .tab-flag { color: #ffcf76; background: #3a2e12; border-color: #5a4720; }
body.dark .warn-note { color: #ffcf76; background: #3a2e12; border-color: #5a4720; }
body.dark .inline-check,
body.dark .about-line { color: #e4e4e6; }
body.dark .about-sub,
body.dark .about-link span,
body.dark .about-h { color: #9a9a9e; }
body.dark .about-link { border-color: #3a3a3c; }
body.dark .about-link b { color: #f2f2f4; }
body.dark .about-link:hover { border-color: #ff9900; background: #2e2620; }

/* ── v2.4: local models, account, compatibility API, audio input ─────────── */

#settings-panel { width: 380px; }
.set-hint-top { margin: 0 0 8px; }

.set-sec button {
  font-size: 12px; padding: 5px 10px; border-radius: 5px;
  border: 1px solid #ccc; background: #f5f5f5; color: #222; cursor: pointer;
}
.set-sec button:hover:not(:disabled) { background: #e8e8e8; }
.set-sec button:disabled { opacity: .5; cursor: default; }
.primary-btn { background: #ff9900 !important; border-color: #ff9900 !important; color: #fff !important; font-weight: 600; }
.primary-btn:hover:not(:disabled) { background: #e88a00 !important; }

#models-progress { width: 100%; height: 5px; margin-top: 8px; }
.model-list { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.model-row { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: #888; }
.model-row b { color: #bbb; font-size: 12px; }
.model-row.ok b { color: #1a7f37; }
.model-row span { color: #444; }
.model-row i { font-style: normal; color: #999; }

.set-details { margin-top: 6px; }
.set-details summary { font-size: 12px; color: #777; cursor: pointer; padding: 3px 0; }
.plan-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  background: #eef4ff; color: #2f6fd6; border-radius: 8px; padding: 1px 6px;
}
#acct-msg { font-size: 12px; margin-top: 6px; min-height: 16px; }
#acct-msg.ok { color: #1a7f37; }
#acct-msg.err { color: #c0392b; }

.audio-status { flex: 1 1 auto; min-width: 0; }
#tts-engine { font-size: 12px; padding: 3px 6px; }
#speak-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  opacity: 0.85;
}
#speak-btn:hover:not(:disabled) { background: #e8e8e8; opacity: 1; }
#speak-btn:disabled { cursor: default; opacity: 0.4; }

/* Load Voice + voice label */
#load-voice-btn {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}
#load-voice-btn:hover { background: #e8e8e8; }
.voice-label { font-size: 11px; color: #666; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.voice-clear {
  font-size: 11px;
  padding: 2px 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f5f5f5;
  cursor: pointer;
  color: #666;
  line-height: 1;
}
.voice-clear:hover { background: #fde2e1; color: #8a1c12; }

/* Settings button in header */
#settings-btn {
  font-size: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  color: #555;
}
#settings-btn:hover { background: #eee; color: #000; }

/* Settings panel */
#settings-panel {
  position: absolute;
  top: 44px;
  right: 12px;
  width: 340px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 6px 14px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 100;
  display: block;
  font-size: 13px;
}
#settings-panel[hidden] { display: none; }
.set-sec { padding: 8px 0; border-top: 1px solid #eee; }
.set-sec:first-child { border-top: none; }
.set-sec h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #888; font-weight: 600; }
.set-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.set-row > span:first-child { flex: 0 0 92px; color: #444; }
.set-row select, .set-row input[type="text"], .set-row input[type="password"] {
  flex: 1 1 auto; min-width: 0; font-size: 12px; padding: 4px 6px;
  border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #222;
}
.set-check { gap: 6px; }
.set-check input { flex: 0 0 auto; margin: 0; }
.set-check span { flex: 1 1 auto; color: #444; }
.set-actions { justify-content: flex-start; }
#omlx-save { font-size: 12px; padding: 4px 10px; border-radius: 4px; border: 1px solid #ccc; background: #f5f5f5; cursor: pointer; }
#omlx-save:hover { background: #e8e8e8; }
#omlx-msg { font-size: 12px; }
#omlx-msg.ok { color: #1a7f37; }
#omlx-msg.err { color: #c0392b; }
.set-hint { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: #777; white-space: normal; }
.set-hint code { font-size: 11px; }
.settings-path { font-size: 12px; color: #444; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tts-dir-btn {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}
#tts-dir-btn:hover { background: #e8e8e8; }

/* Document "Source: auto-detected" note */
.auto-note { font-size: 13px; color: #777; font-style: italic; }

/* ── Dark (night) theme ─────────────────────────────────────────────────── */
body.dark { background: #1c1c1e; color: #e4e4e6; }
body.dark header,
body.dark #tab-bar { background: #242426; border-bottom-color: #38383a; }
body.dark #app-title { color: #f2f2f4; }
body.dark #detected,
body.dark .auto-note { color: #9a9a9e; }
body.dark main { background: #38383a; }
body.dark textarea { background: #1c1c1e; color: #e8e8ea; }
body.dark #output-pane textarea { background: #232325; }
body.dark #output-footer { background: #242426; }
body.dark #banner { background: #4a1f1d; color: #ffb3ad; }
body.dark #banner.toast-success { background: #1f4a2c; color: #b3ffc6; }
body.dark select,
body.dark button { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark .tab-btn { background: none; color: #9a9a9e; }
body.dark #swap-btn { background: #243247; color: #6aa7ff; border-color: #3a4d6b; }
body.dark #swap-btn:hover:not(:disabled) { background: #2c3e58; }
body.dark .tab-btn:hover { color: #f2f2f4; }
body.dark .tab-btn.active { color: #fff; border-bottom-color: #6aa7ff; }
body.dark #settings-panel { background: #2a2a2c; color: #e4e4e6; border-color: #4a4a4e; }
body.dark .set-sec { border-top-color: #3a3a3c; }
body.dark .set-sec h4 { color: #8a8a8e; }
body.dark .set-row > span:first-child, body.dark .set-check span { color: #c8c8cc; }
body.dark .set-row select, body.dark .set-row input[type="text"], body.dark .set-row input[type="password"] {
  background: #1c1c1e; color: #e8e8ea; border-color: #4a4a4e;
}
body.dark #omlx-save { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark #omlx-save:hover { background: #3a3a3c; }
body.dark #omlx-msg.ok { color: #5fd08a; }
body.dark #omlx-msg.err { color: #ff9a92; }
body.dark .set-hint { color: #9a9a9e; }
body.dark #doc-pick, body.dark #doc-translate,
body.dark #pic-capture { background: #2e2e30; }
body.dark #doc-status { color: #cfcfd2; }
body.dark #doc-status.success { color: #5fd08a; }
body.dark #doc-status.error { color: #ff9a92; }
body.dark .doc-filename, body.dark .pic-hint { color: #b0b0b4; }
body.dark .pic-shortcut-hint { color: #7a7a7e; }
body.dark .voice-label { color: #b0b0b4; }

/* Dark theme: output-footer controls (Speak / Load Voice / engine) */
body.dark #output-footer { border-top-color: #38383a; }
body.dark #speak-btn,
body.dark #load-voice-btn,
body.dark #tts-engine { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark #speak-btn:hover:not(:disabled),
body.dark #load-voice-btn:hover { background: #3a3a3c; }
body.dark #voice-clear { background: #2e2e30; color: #d0d0d4; border-color: #4a4a4e; }

/* Browse tab */
#browse-panel { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
#browse-row { display: flex; gap: 10px; align-items: center; }
#browse-url { flex: 1; font-size: 13px; padding: 6px 10px; border: 1px solid #ccc; border-radius: 5px; }
#browse-open { font-size: 13px; padding: 6px 12px; border-radius: 5px; border: 1px solid #ccc; background: #f5f5f5; cursor: pointer; white-space: nowrap; }
#browse-open:hover { background: #e8e8e8; }
#browse-links { display: flex; flex-wrap: wrap; gap: 8px; }
.browse-link { font-size: 12px; padding: 4px 12px; border-radius: 14px; border: 1px solid #ccc; background: #f5f5f5; cursor: pointer; }
.browse-link:hover { background: #e8e8e8; }
body.dark #browse-url, body.dark #browse-open, body.dark .browse-link { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark #browse-open:hover, body.dark .browse-link:hover { background: #3a3a3c; }

/* ── v2.3: cloud badge, experimental flag, About tab, progress ────────────── */

/* Shown only when a translation was made off-device. */
#engine-badge {
  font-size: 11px;
  font-weight: 600;
  color: #8a5a00;
  background: #fff3d6;
  border: 1px solid #f0d79a;
  border-radius: 10px;
  padding: 1px 7px;
  white-space: nowrap;
}

.tab-flag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8a5a00;
  background: #fff3d6;
  border-radius: 8px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: 1px;
}

.warn-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #7a4a00;
  background: #fff6e2;
  border: 1px solid #f0d79a;
  border-radius: 6px;
}

.icon-btn { font-size: 15px; line-height: 1; padding: 3px 8px; }

.inline-check { font-size: 12px; color: #555; display: inline-flex; align-items: center; gap: 4px; }
.inline-check.disabled { opacity: .45; }


#doc-progress, #pic-progress { width: 100%; height: 5px; margin-top: 10px; }
#pic-status { margin-top: 8px; font-size: 12px; word-break: break-all; }
#pic-status.error { color: #8a1c12; }
#pic-status.success { color: #1a7a3e; }

/* About tab */
#about-panel { padding: 18px 20px; overflow-y: auto; }
.about-logo { display: inline-block; margin-bottom: 12px; }
.about-logo img { display: block; height: 40px; width: auto; }
.about-line { margin: 0 0 4px; font-size: 13px; color: #333; }
.about-sub { color: #777; font-size: 12px; line-height: 1.5; max-width: 620px; }
.about-h {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
}
#about-links, #about-links-partner { display: flex; flex-direction: column; gap: 6px; }
.about-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e4e4e6;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.about-link:hover { border-color: #ff9900; background: #fff8ef; }
.about-link b { font-size: 13px; color: #222; white-space: nowrap; }
.about-link span { font-size: 12px; color: #777; }

body.dark #engine-badge,
body.dark .tab-flag { color: #ffcf76; background: #3a2e12; border-color: #5a4720; }
body.dark .warn-note { color: #ffcf76; background: #3a2e12; border-color: #5a4720; }
body.dark .inline-check,
body.dark .about-line { color: #e4e4e6; }
body.dark .about-sub,
body.dark .about-link span,
body.dark .about-h { color: #9a9a9e; }
body.dark .about-link { border-color: #3a3a3c; }
body.dark .about-link b { color: #f2f2f4; }
body.dark .about-link:hover { border-color: #ff9900; background: #2e2620; }

/* ── v2.4: local models, account, compatibility API, audio input ─────────── */

#settings-panel { width: 380px; }
.set-hint-top { margin: 0 0 8px; }

.set-sec button {
  font-size: 12px; padding: 5px 10px; border-radius: 5px;
  border: 1px solid #ccc; background: #f5f5f5; color: #222; cursor: pointer;
}
.set-sec button:hover:not(:disabled) { background: #e8e8e8; }
.set-sec button:disabled { opacity: .5; cursor: default; }
.primary-btn { background: #ff9900 !important; border-color: #ff9900 !important; color: #fff !important; font-weight: 600; }
.primary-btn:hover:not(:disabled) { background: #e88a00 !important; }

#models-progress { width: 100%; height: 5px; margin-top: 8px; }
.model-list { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.model-row { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: #888; }
.model-row b { color: #bbb; font-size: 12px; }
.model-row.ok b { color: #1a7f37; }
.model-row span { color: #444; }
.model-row i { font-style: normal; color: #999; }

.set-details { margin-top: 6px; }
.set-details summary { font-size: 12px; color: #777; cursor: pointer; padding: 3px 0; }
.plan-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  background: #eef4ff; color: #2f6fd6; border-radius: 8px; padding: 1px 6px;
}
#acct-msg { font-size: 12px; margin-top: 6px; min-height: 16px; }
#acct-msg.ok { color: #1a7f37; }
#acct-msg.err { color: #c0392b; }

/* Audio input, in the footer of the input pane */
#audio-pick {
  font-size: 12px; padding: 4px 10px; border-radius: 5px;
  border: 1px solid #ccc; background: #f5f5f5; cursor: pointer;
}
#audio-pick:hover:not(:disabled) { background: #e8e8e8; }
.audio-status { font-size: 12px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-status.working { color: #2f6fd6; }
.audio-status.err { color: #c0392b; }

body.dark .set-sec button { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark .set-sec button:hover:not(:disabled) { background: #3a3a3c; }
body.dark .model-row span { color: #c8c8cc; }
body.dark .model-row i, body.dark .model-row b { color: #7a7a7e; }
body.dark .model-row.ok b { color: #4ade80; }
body.dark .set-details summary { color: #9a9a9e; }
body.dark .plan-pill { background: #243247; color: #6aa7ff; }
body.dark #audio-pick { background: #2e2e30; color: #e4e4e6; border-color: #4a4a4e; }
body.dark .audio-status { color: #9a9a9e; }

/* ── Serve API tab ───────────────────────────────────────────────────────── */
#tab-api { flex: 1; display: flex; flex-direction: column; }
#tab-api[hidden] { display: none; }
#api-panel { padding: 18px 20px; overflow-y: auto; }
#api-panel code { font-size: 11px; word-break: break-all; }
/* Snippets are copy-paste commands: they wrap rather than push the window out. */
.api-snippet {
  margin: 6px 0 0; padding: 8px 10px; border-radius: 6px; border: 1px solid #e4e4e8;
  background: #f6f6f7; color: #333; font-size: 11px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
body.dark .api-snippet { background: #2a2a2c; border-color: #4a4a4e; color: #d8d8dc; }
/* Each snippet carries its own Copy and Test, so the command above it is
   complete as printed — the key and endpoint are filled in at runtime. */
.snippet-actions { display: flex; gap: 6px; margin-top: 6px; }
.snippet-actions .icon-btn { font-size: 11px; }
.snippet-result {
  margin: 6px 0 0; padding: 8px 10px; border-radius: 6px; border: 1px solid #cfe8cf;
  background: #f0f8f0; color: #2c5c2c; font-size: 11px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.snippet-result.err { border-color: #e8cfcf; background: #fbf1f1; color: #7a2c2c; }
body.dark .snippet-result { background: #243024; border-color: #3c5a3c; color: #b8d8b8; }
body.dark .snippet-result.err { background: #302424; border-color: #5a3c3c; color: #d8b8b8; }

/* ── v2.7: Scribe (WhatsApp + Telegram) ─────────────────────────────────── */

#scribe-panel { padding: 18px 20px; overflow-y: auto; }
#scribe-panel code { font-size: 11px; word-break: break-all; }
/* A QR has to be big enough to scan off the screen with a phone. The bitmap is
   generated at >= 300 px and fills this whole box, centred, staying hard-edged
   at any size (a ~35 px code sitting top-left of a big box does not scan at
   arm's length). The img IS the box: it has no sized parent, so the side is
   fixed here rather than in percentages. */
.scribe-qr {
  display: block;
  width: 320px; height: 320px; max-width: 100%;
  margin: 10px auto 2px;
  padding: 8px; box-sizing: border-box;
  border-radius: 8px; background: #fff;
  border: 1px solid #e4e4e8;
  object-fit: contain; image-rendering: pixelated;
}
/* display:block above outranks the browser's own [hidden] rule, so without this
   an empty QR box sits there when nothing has been linked yet. */
.scribe-qr[hidden] { display: none; }
body.dark .scribe-qr { border-color: #4a4a4e; }
#scribe-panel .set-row span[id$="-state"] { color: #666; font-size: 12px; }
body.dark #scribe-panel .set-row span[id$="-state"] { color: #b8b8bc; }

/* Scribe settings: the language picker is a wrapping row of small toggles. The
   rank number is the whole point of the control — the online one numbers them in
   the order you tick them, and that order is what decides the translation target. */
.lang-grid { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 2px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border: 1px solid #d4d4d8; border-radius: 6px;
  background: #fff; color: #444; font-size: 12px; line-height: 1.3;
  cursor: pointer;
}
.lang-btn:hover { background: #f2f2f5; }
.lang-btn .rank {
  display: none; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 3px; background: #ff9900; color: #fff;
  font-size: 10px; font-weight: 700; text-align: center;
}
.lang-btn.on { border-color: #ff9900; background: #fff6ea; color: #6b3f00; }
.lang-btn.on .rank { display: inline-block; }
body.dark .lang-btn { background: #26262a; border-color: #44444a; color: #ccc; }
body.dark .lang-btn:hover { background: #2f2f34; }
body.dark .lang-btn.on { background: #3a2c14; border-color: #ff9900; color: #ffd9a8; }

.cmd-block {
  margin: 8px 0 2px; padding: 8px 10px;
  border: 1px solid #e4e4e8; border-radius: 6px; background: #fafafa;
  font-size: 12px; line-height: 1.9;
}
.cmd-block code {
  font-size: 11px; padding: 1px 5px; margin-right: 3px;
  border: 1px solid #e0e0e4; border-radius: 4px; background: #fff;
}
body.dark .cmd-block { background: #222226; border-color: #3c3c42; }
body.dark .cmd-block code { background: #2c2c31; border-color: #46464c; }

.set-note { color: #a06a00; }
body.dark .set-note { color: #e0b070; }

/* ── v2.7.12: About tab product logos, and the clipped flag in the language menu ── */
/* The flag emoji sat half hidden because `#header-right select { flex-shrink: 1 }`
   (specificity 1,0,1) out-ranked `#target { flex-shrink: 0 }` (1,0,0), so the menu
   really did shrink and macOS clipped the label from the left, taking the flag with
   it. Re-state the fixed widths one specificity higher so they hold. */
#header-right #engine-sel,
#header-right #model,
#header-right #target { flex-shrink: 0; }
#header-right #target { width: 192px; padding-left: 10px; }
#target, #engine-sel, #model { line-height: 1.35; }

.about-mark { height: 22px; width: auto; flex: 0 0 auto; display: block; }
.about-link { gap: 10px; }
.about-link b { flex: 0 0 auto; }
.about-link span { flex: 1 1 auto; min-width: 0; }

/* BIM Exchange ships two marks taken from exchange.bim.finance (favicon + its own
   white lockup). Not redrawn. Swap on theme so the mark stays legible. */
body.dark .about-mark[src="prod-bim-exchange.png"] { content: url("prod-bim-exchange-dark.png"); }

/* Serve API > Use in AI apps: four app tiles, DeepL-style. */

/* 5.1: every button is a macOS push button: rounded, soft, light shadow.
   :where() keeps this base at zero specificity, so every button that already has
   its own colours (primary, tabs, links) keeps them; only the shape is forced. */
:where(button:not(.tab-btn)) {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  padding: 5px 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.18);
  background: linear-gradient(#ffffff, #f7f7f7);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.12);
  color: #1d1d1f;
  cursor: pointer;
}
:where(button:not(.tab-btn)):hover { background: #f0f0f2; }
:where(button:not(.tab-btn)):active { background: #e6e6e9; }
:where(button:not(.tab-btn)):disabled { opacity: 0.45; cursor: default; }
body.dark :where(button:not(.tab-btn)) {
  background: linear-gradient(#4a4a4d, #3d3d40);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f2f2f7;
}
body.dark :where(button:not(.tab-btn)):hover { background: #4f4f53; }
button:not(.tab-btn):not(.browse-link) { border-radius: 8px !important; }
select { border-radius: 7px !important; }

/* 5.6: the header fits the default 900 px window. Selects flex inside a range
   instead of fixed widths that added up past the window; the model menu hides
   when it has nothing to offer; the detected language is a compact chip. */
#header-right #engine-sel { width: auto; flex: 0 1 auto; min-width: 96px; max-width: 150px; }
#header-right #model { width: auto; flex: 0 1 170px; min-width: 80px; }
#header-right #model:empty { display: none; }
#header-right #target { width: 150px; flex: 0 0 150px; }
#theme-btn, #settings-btn { flex-shrink: 0; }
#app-logo, #app-title { flex-shrink: 0; }
#detected { font-size: 12px; padding: 1px 7px; border-radius: 6px; background: #f2f2f4; color: #555; flex-shrink: 0; }
/* 77 (img94): the left side never clips (flag + code shown in full); the right side
   sits flush on the right edge; the model menu shrinks first. Settings = a full-size
   button like the theme one. Protected layout: scripts/layout-test.py. */
#header-left { flex-shrink: 0; overflow: visible; }
#header-right { margin-left: auto; justify-content: flex-end; }
#header-right #model { min-width: 60px; }
#header-right #engine-sel { flex-shrink: 0; }
#header-right #settings-btn { font-size: 17px; line-height: 1; padding: 5px 9px; }
body.dark #detected { background: #3a3a3c; color: #c7c7cc; }

/* 8.3: About rows: name + description centred on the logo (baseline sat them low).
   Scribe's mark sits on a black square: in dark mode use the transparent cut. */
.about-link { align-items: center; }
/* 9.28: light square in light mode, the black original in dark mode. */
body.dark .about-mark[src="prod-scribe-light.png"] { content: url("prod-scribe.png"); }
/* 9.8: official app marks on the AI-apps tiles. */
.ai-logo { width: 16px; height: 16px; flex: none; }

/* 9.27: account rows like the BIM VPN app. */
.acct-rows { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.acct-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px;
  border: 1px solid #e2e2e6; border-radius: 10px; font-size: 13px; }
.acct-row > span:first-child { color: #8a8a8e; }
.acct-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.acct-row .ok { color: #2fae5b; }
.acct-row .warn { color: #c87800; }
.acct-row .plan-gold { color: #d6a300; }
.acct-row .plan-bronze { color: #b06a2c; }
.acct-btn { display: block; width: 100%; margin-top: 8px; padding: 9px 12px; }
.acct-btn--quiet { color: #8a8a8e; }
body.dark .acct-row { border-color: #3a3a3c; }

/* 9.33: brand icons on the Scribe link buttons */
#wa-link::before, #tg-link::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 6px;
  vertical-align: -2px; background: center / contain no-repeat; }
#wa-link::before { background-image: url("ico-whatsapp.svg"); }
#tg-link::before { background-image: url("ico-telegram.svg"); }
.set-link { color: #ff9900; text-decoration: none; font-weight: 600; }
.set-link:hover { text-decoration: underline; }

/* 9.8: one row of client logos; a click shows only that client's snippet */
.ai-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 8px 0 10px; }
.ai-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid #e2e2e6; border-radius: 10px; background: #fafafa; font: inherit; font-size: 11.5px; color: inherit; cursor: pointer; min-width: 0; }
.ai-tile span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ai-tile .ai-logo { width: 22px; height: 22px; }
.ai-tile[aria-selected="true"] { border-color: #ff9900; box-shadow: 0 0 0 1px #ff9900 inset; }
body.dark .ai-tile { background: #2a2a2c; border-color: #4a4a4e; }

/* 9.5: Scribe settings sections start collapsed; the title opens them */
#scribe-panel .set-sec > h4 { cursor: pointer; user-select: none; }
#scribe-panel .set-sec > h4::before { content: "\25B8"; display: inline-block; width: 1em; color: #ff9900; transition: transform .15s; }
#scribe-panel .set-sec:not(.collapsed) > h4::before { transform: rotate(90deg); }
#scribe-panel .set-sec.collapsed > :not(h4) { display: none !important; }
.tab-btn[hidden] { display: none !important; }
.link-btn { background: none; border: none; padding: 0; color: #2f6fd6; cursor: pointer; font: inherit; text-decoration: underline; }
/* 65: Scribe command table + language chips (same content as scribe.html#commands) */
/* 73: same look as the online Scribe (img90): mono chip, orange code, divider under each row */
.cmd-list { list-style: none; margin: 6px 0 14px; padding: 0; font-size: 13px; }
.cmd-list li { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid #e3dfd9; }
.cmd-list li > code, .cmd-list span code { font-family: ui-monospace, Menlo, monospace; color: #9e5e20; background: #f6f5f2; border: 1px solid #e3dfd9; border-radius: 4px; }
.cmd-list li > code { display: block; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-list span code { padding: 1px 5px; }
.cmd-langs { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.cmd-langs li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid #e3dfd9; border-radius: 14px; background: #f6f5f2; }
.cmd-langs code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: #9e5e20; border: 1px solid #ece9e5; border-radius: 4px; padding: 0 4px; }
body.dark .cmd-list li { border-bottom-color: #3a3631; }
body.dark .cmd-list li > code, body.dark .cmd-list span code, body.dark .cmd-langs li { background: #2a2724; border-color: #3a3631; }
body.dark .cmd-list li > code, body.dark .cmd-list span code, body.dark .cmd-langs code { color: #f0a14a; }
body.dark .cmd-langs code { border-color: #45403a; }
.cloud-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.full-url { overflow-wrap: anywhere; user-select: all; font-size: 11.5px; }
.set-row[hidden] { display: none !important; }

/* 2.7.42 translation language packs */
.lp-list { margin-top: 8px; max-height: 220px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 10px; }
.lp-list label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.lp-list label i { color: #1a7f37; font-style: normal; font-size: 11px; }
.lp-btns { display: flex; gap: 8px; margin-top: 8px; }
.lp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 50; }
.lp-overlay[hidden] { display: none; }
.lp-card { background: #fff; border-radius: 10px; padding: 18px 20px; width: min(560px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.lp-card h3 { margin: 0 0 4px; }
body.dark .lp-card { background: #222; color: #eee; }
#banner button { margin-left: 10px; }
