:root {
  --bg: #0b0c0f; --surface: #15171c; --surface-2: #1c1f26; --border: #2a2d35;
  --text: #f2f2f0; --text-dim: #8b8e98; --accent: #14b8a6;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f4f1; --surface: #ffffff; --surface-2: #ececea; --border: #ddd9d3;
    --text: #14151a; --text-dim: #6b6e78; --accent: #0d9488;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0f; --surface: #15171c; --surface-2: #1c1f26; --border: #2a2d35;
  --text: #f2f2f0; --text-dim: #8b8e98; --accent: #14b8a6;
}
:root[data-theme="light"] {
  --bg: #f5f4f1; --surface: #ffffff; --surface-2: #ececea; --border: #ddd9d3;
  --text: #14151a; --text-dim: #6b6e78; --accent: #0d9488;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Onest', system-ui, sans-serif; min-height: 100vh; padding: 0 16px 24px;
}
.wrap { width: 100%; max-width: 980px; margin: 0 auto; }
h1 { font-weight: 800; font-size: clamp(22px, 5vw, 30px); margin: 0 0 4px; letter-spacing: -0.02em; }
.sub { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; line-height: 1.5; max-width: 720px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 16px; }

.btn-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
button.btn { font-family: inherit; font-weight: 700; font-size: 15px; border-radius: 12px; padding: 13px 16px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; flex: 1 1 140px; }
button.btn:hover { border-color: var(--accent); }
button.btn:active { transform: scale(0.97); }
button.btn:disabled { opacity: .55; cursor: default; }
button.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.url-row { display: flex; gap: 8px; }
.url-row input { flex: 1; min-width: 0; }
.url-row button.btn { flex: 0 0 auto; }
input[type=url], select { width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
.status { font-size: 13px; color: var(--text-dim); margin-top: 12px; min-height: 18px; line-height: 1.45; }
.status.err { color: #f87171; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.fld > span { display: block; font-size: 12px; color: var(--text-dim); margin: 0 0 5px 2px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input { flex: 1; accent-color: var(--accent); }
.range-row b { font-size: 13px; color: var(--accent); width: 44px; text-align: right; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.lp-title { font-weight: 700; font-size: 16px; line-height: 1.35; word-break: break-word; }
.lp-host { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; word-break: break-all; }
.lp-frame-wrap { margin-top: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
#lpFrame { display: block; width: 100%; height: 60vh; min-height: 360px; border: 0; background: #fff; }
.note { font-size: 12px; color: var(--text-dim); margin-top: 14px; line-height: 1.6; }
[hidden] { display: none !important; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin: 16px 0 8px; font-weight: 600; }
.range-row { min-height: 44px; }
