/* 响应式测试工具 · 设备墙（rst-）· 浅灰 / 靛蓝 / 薄荷 */
.rst-page, .rst-modal, .rst-toast {
    --rst-bg: #f0f3f7; --rst-panel: #ffffff; --rst-panel2: #f6f8fc;
    --rst-ink: #1c2540; --rst-sub: #63708d; --rst-line: #dde4ef; --rst-line2: #c4cfdf;
    --rst-indigo: #3a4caf; --rst-indigo-soft: #e8ecfb; --rst-mint: #0d8f6c; --rst-mint-soft: #e0f4ec;
    --rst-warn: #a5671a; --rst-shadow: 0 12px 32px rgba(30, 50, 100, .12); --rst-shadow-sm: 0 3px 10px rgba(30, 50, 100, .08);
    --rst-radius: 12px;
    --rst-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --rst-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.rst-page { background: var(--rst-bg); color: var(--rst-ink); padding: 0 0 60px; min-height: 60vh; font-family: var(--rst-font); font-size: 14px; line-height: 1.75; }
.rst-wrap { max-width: 1180px; margin: 0 auto; padding: 18px 18px 0; }
.rst-page .detail-breadcrumb { font-size: 12.5px; color: var(--rst-sub); margin: 8px 0 20px; }
.rst-page .detail-breadcrumb a { color: var(--rst-sub); text-decoration: none; }
.rst-page .detail-breadcrumb a:hover { color: var(--rst-indigo); }
.rst-page .detail-breadcrumb .current { color: var(--rst-indigo); font-weight: 700; }

.rst-hero { display: grid; grid-template-columns: 1.14fr .86fr; gap: 24px; align-items: stretch; margin-bottom: 18px; }
.rst-kicker { font: 700 11px var(--rst-mono); letter-spacing: 2px; color: var(--rst-indigo); margin-bottom: 14px; }
.rst-kicker i { display: inline-block; width: 42px; height: 1px; background: var(--rst-mint); vertical-align: middle; margin: 0 10px; }
.rst-page h1 { font-size: 38px; line-height: 1.18; font-weight: 800; margin: 0 0 14px; letter-spacing: -.4px; }
.rst-sub { font-size: 15.5px; line-height: 1.9; color: var(--rst-sub); margin: 0 0 18px; max-width: 620px; }
.rst-sub b { color: var(--rst-ink); font-weight: 700; background: var(--rst-indigo-soft); padding: 0 3px; border-radius: 3px; }
.rst-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.rst-fact { background: var(--rst-panel); border: 1px solid var(--rst-line); border-radius: 10px; padding: 9px 17px; min-width: 110px; border-top: 3px solid var(--rst-indigo); box-shadow: var(--rst-shadow-sm); }
.rst-fact b { display: block; font: 800 21px/1.2 var(--rst-mono); }
.rst-fact span { font-size: 11.5px; color: var(--rst-sub); }
.rst-fact.hot { border-top-color: var(--rst-mint); }
.rst-fact.hot b { color: var(--rst-mint); }
.rst-url-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rst-url-row input { flex: 1; min-width: 200px; border: 1px solid var(--rst-line2); background: var(--rst-panel); color: var(--rst-ink); border-radius: 8px; padding: 11px 12px; font: 13px var(--rst-mono); }
.rst-url-note { font-size: 12px; color: var(--rst-sub); margin: 10px 0 0; line-height: 1.8; }
.rst-hero-devices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: var(--rst-panel); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); padding: 16px; box-shadow: var(--rst-shadow-sm); align-content: center; }
.rst-dev-chip { border: 1.5px solid var(--rst-line2); background: var(--rst-panel2); color: var(--rst-sub); border-radius: 9px; padding: 10px 6px; text-align: center; cursor: pointer; font-size: 11.5px; }
.rst-dev-chip i { display: block; margin: 0 auto 6px; width: 18px; height: 28px; border: 2px solid currentColor; border-radius: 3px; }
.rst-dev-chip b { display: block; font: 700 12px var(--rst-mono); color: var(--rst-ink); }
.rst-dev-chip.is-on { border-color: var(--rst-indigo); background: var(--rst-indigo-soft); }
.rst-dev-chip.is-on i { border-color: var(--rst-indigo); }

.rst-panel { background: var(--rst-panel); border: 1px solid var(--rst-line); border-radius: var(--rst-radius); padding: 18px; box-shadow: var(--rst-shadow-sm); }
.rst-panel-head, .rst-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.rst-panel-head h2, .rst-section-head h2 { font-size: 17px; font-weight: 800; margin: 0; }
.rst-step { font: 800 11px var(--rst-mono); color: #fff; background: var(--rst-indigo); padding: 5px 7px; border-radius: 5px; }
.rst-hint { font-size: 12px; color: var(--rst-sub); margin-left: auto; }
.rst-btn { border: 1px solid var(--rst-line2); background: var(--rst-panel2); color: var(--rst-ink); border-radius: 8px; padding: 9px 14px; font-size: 13px; cursor: pointer; font-family: inherit; }
.rst-btn:hover { border-color: var(--rst-indigo); color: var(--rst-indigo); }
.rst-btn-main { background: var(--rst-indigo); border-color: var(--rst-indigo); color: #fff; font-weight: 700; }
.rst-btn-main:hover { color: #fff; }
.rst-btn-ai { background: var(--rst-mint); border-color: var(--rst-mint); color: #fff; font-weight: 700; }
.rst-btn-ai:hover { color: #fff; }
.rst-code-btns { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.rst-bar { margin-bottom: 18px; }
.rst-bar-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.rst-bar-head span { font-size: 12px; color: var(--rst-sub); }
.rst-ruler { position: relative; height: 46px; border-bottom: 2px solid var(--rst-line2); background: repeating-linear-gradient(90deg, transparent 0 49px, var(--rst-line) 49px 50px); }
.rst-tick { position: absolute; bottom: 0; transform: translateX(-50%); font: 10.5px var(--rst-mono); color: var(--rst-sub); text-align: center; }
.rst-tick::before { content: ""; display: block; width: 1px; height: 12px; background: var(--rst-indigo); margin: 0 auto 2px; }
.rst-tick b { color: var(--rst-indigo); }
.rst-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--rst-sub); }
.rst-scale, .rst-custom { display: flex; align-items: center; gap: 7px; }
.rst-scale input[type=range] { width: 110px; accent-color: var(--rst-indigo); }
.rst-controls input[type=number] { width: 84px; border: 1px solid var(--rst-line2); background: var(--rst-panel2); color: var(--rst-ink); border-radius: 6px; padding: 5px 7px; font: 12px var(--rst-mono); }
.rst-controls b { color: var(--rst-indigo); font: 700 12px var(--rst-mono); }

.rst-wall { margin-bottom: 18px; }
.rst-wall-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.rst-device { background: var(--rst-panel); border: 1px solid var(--rst-line2); border-radius: 14px; padding: 10px; box-shadow: var(--rst-shadow-sm); min-width: 0; }
.rst-device-head { display: flex; align-items: center; gap: 8px; font: 700 11.5px var(--rst-mono); color: var(--rst-ink); margin-bottom: 8px; }
.rst-device-head span { color: var(--rst-sub); font-weight: 400; }
.rst-device-head button { margin-left: auto; border: 0; background: none; color: var(--rst-sub); cursor: pointer; font-size: 15px; }
.rst-device { max-width: 100%; }
.rst-device-viewport { position: relative; overflow: hidden; max-width: 100%; background: #fff; border: 1px solid var(--rst-line2); border-radius: 5px; }
.rst-device-viewport iframe { border: 0; display: block; transform-origin: top left; background: #fff; }
.rst-device-placeholder { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--rst-sub); font-size: 12px; padding: 16px; }
.rst-wall-note { font-size: 12px; color: var(--rst-sub); margin-top: 12px; line-height: 1.8; }

.rst-check { margin-bottom: 18px; }
.rst-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rst-check-item { display: flex; gap: 9px; align-items: flex-start; background: var(--rst-panel2); border: 1px solid var(--rst-line); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; cursor: pointer; }
.rst-check-item input { accent-color: var(--rst-mint); margin-top: 3px; }
.rst-check-item b { display: block; }
.rst-check-item small { color: var(--rst-sub); font-size: 11.5px; }
.rst-report { margin: 14px 0 0; background: #101a33; color: #d8e4fb; border-radius: 8px; padding: 14px; font: 12px/1.85 var(--rst-mono); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }
.rst-report[hidden] { display: none; }
.rst-ai { margin-bottom: 18px; }
.rst-ai-status { font-size: 13px; color: var(--rst-sub); margin: 0 0 12px; }
.rst-ai-box { margin-top: 12px; font-size: 13.5px; line-height: 1.85; }
.rst-ai-box p { margin: 0 0 8px; padding-left: 12px; border-left: 3px solid var(--rst-mint); }

.rst-table-scroll { overflow-x: auto; }
.rst-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 580px; }
.rst-table th, .rst-table td { border-bottom: 1px solid var(--rst-line); padding: 9px 10px; text-align: left; }
.rst-table th { background: var(--rst-panel2); color: var(--rst-sub); }
.rst-table td input { width: 100%; min-width: 120px; box-sizing: border-box; border: 1px solid var(--rst-line2); background: var(--rst-panel2); color: var(--rst-ink); border-radius: 5px; padding: 4px 6px; font: 12px var(--rst-mono); }
.rst-table .rst-del { border: 0; background: none; color: #c34a4a; cursor: pointer; font-size: 16px; }
.rst-table .rst-note-view { font-size: 11px; color: var(--rst-sub); word-break: break-all; }
.rst-empty { color: var(--rst-sub); text-align: center; padding: 16px !important; }

.rst-modal[hidden] { display: none !important; }
.rst-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(20,32,64,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.rst-modal-card { position: relative; background: var(--rst-panel); color: var(--rst-ink); border-radius: var(--rst-radius); padding: 26px; width: min(520px, 100%); box-shadow: var(--rst-shadow); }
.rst-modal-card h2 { font-size: 19px; margin: 0 0 8px; }
.rst-modal-card p { font-size: 13px; color: var(--rst-sub); margin: 0 0 14px; }
.rst-modal-card input { width: 100%; box-sizing: border-box; border: 1px solid var(--rst-line2); border-radius: 7px; padding: 9px 10px; font: 12px var(--rst-mono); background: var(--rst-panel2); color: var(--rst-ink); margin-bottom: 12px; }
.rst-modal-x { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 24px; color: var(--rst-sub); cursor: pointer; line-height: 1; }
.rst-toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px); background: var(--rst-indigo); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none; transition: .22s; z-index: 10000; }
.rst-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

:root[data-theme="dark"] .rst-page, :root[data-theme="dark"] .rst-modal, :root[data-theme="dark"] .rst-toast {
    --rst-bg: #121826; --rst-panel: #1b2336; --rst-panel2: #222c42;
    --rst-ink: #e6ecfb; --rst-sub: #98a6c2; --rst-line: #2e3a52; --rst-line2: #42536f;
    --rst-indigo: #9db0ff; --rst-indigo-soft: #253257; --rst-mint: #58d3a8; --rst-mint-soft: #173a30;
    --rst-warn: #e8b46a; --rst-shadow: 0 12px 32px rgba(0,0,0,.5); --rst-shadow-sm: 0 3px 10px rgba(0,0,0,.4);
}
:root[data-theme="dark"] .rst-btn-main, :root[data-theme="dark"] .rst-btn-ai, :root[data-theme="dark"] .rst-step { color: #121826; }
:root[data-theme="dark"] .rst-dev-chip.is-on { background: var(--rst-indigo-soft); }
:root[data-theme="dark"] .rst-report { background: #0a1020; color: #c9d9f5; }
:root[data-theme="dark"] .rst-toast { background: var(--rst-mint); color: #121826; }

@media (max-width: 920px) { .rst-hero { grid-template-columns: 1fr; } .rst-page h1 { font-size: 30px; } .rst-check-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
    .rst-wrap { padding: 12px 12px 0; } .rst-page h1 { font-size: 26px; }
    .rst-sub { font-size: 14px; line-height: 1.8; } .rst-panel { padding: 14px; }
    .rst-hero-devices { grid-template-columns: repeat(3, 1fr); padding: 10px; gap: 6px; }
    .rst-code-btns { margin-left: 0; } .rst-url-row input { min-width: 100%; }
}
