.rs { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 24px; align-items: start; margin-top: 8px; }
.rs-toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.rs-search label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.rs-search-row { display: flex; flex-wrap: wrap; gap: 10px; }
.rs-search-row input { flex: 1 1 220px; min-width: 0; font: inherit; color: var(--c-text); background: #fff; border: 1px solid var(--c-border); border-radius: 10px; padding: 10px 12px; }
.rs-search-row input:focus { outline: 2px solid var(--c-accent-soft); outline-offset: 1px; border-color: var(--c-accent); }
.rs-choices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rs-choices[hidden] { display: none; }
.rs-choices p { flex: 1 0 100%; margin: 0; font-weight: 600; font-size: 0.92rem; }
.rs-choice { font: inherit; font-size: 0.92rem; background: #fff; border: 1px solid var(--c-border); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--c-text); }
.rs-choice:hover { border-color: var(--c-accent); color: var(--c-accent-strong); }
.rs-hint { color: var(--c-muted); font-size: 0.95rem; }
.rs-map { height: 560px; max-height: 72vh; min-height: 340px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface-alt); z-index: 0; }
.rs-privacy { color: var(--c-muted); font-size: 0.88rem; margin: 10px 0 0; }
.rs-result { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.rs-result h2 { font-size: 1.25rem; margin: 0 0 10px; }
.rs-lead { margin: 0 0 6px; }
.rs-lead code, .rs-info code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #e9f1f0; padding: 1px 6px; border-radius: 6px; font-size: 0.94em; }
.rs-level { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-muted); margin: 18px 0 6px; }
.rs-item { border: 1px solid var(--c-border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.rs-item.is-active { border-color: var(--c-accent); box-shadow: inset 3px 0 0 var(--c-accent); }
.rs-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rs-scope { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.98rem; font-weight: 600; color: var(--c-accent-strong); background: #e6f4f2; border: 0; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.rs-scope:hover { background: #d3ece8; }
.rs-name { flex: 1 1 auto; min-width: 0; }
.rs-copy { font: inherit; font-size: 0.82rem; color: var(--c-muted); background: none; border: 1px solid var(--c-border); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.rs-copy:hover { border-color: var(--c-accent); color: var(--c-accent-strong); }
.rs-desc { margin: 6px 0 0; font-size: 0.92rem; color: #2d4848; }
.rs-link { display: inline-block; margin-top: 4px; font-size: 0.88rem; word-break: break-all; }
.rs-empty { color: var(--c-muted); margin: 0; }
.rs-more { margin-top: 18px; }
.rs-more summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.rs-info { max-width: 78ch; margin-top: 40px; }
.rs-info h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.rs-info p { margin: 0 0 12px; color: #2d4848; }
.rs-credit { font-size: 0.85rem; color: var(--c-muted); }
.kb-category a { color: inherit; text-decoration: none; }
.kb-category a:hover { color: var(--c-accent-strong); }
.kb-category-text { color: var(--c-muted); margin: -6px 0 14px; max-width: 70ch; }
@media (max-width: 900px) {
  .rs { grid-template-columns: minmax(0, 1fr); }
  .rs-map { height: 420px; }
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.region-editor { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
.region-editor [hidden] { display: none !important; }
.re-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.re-card h2 { font-size: 1.2rem; margin: 0 0 14px; }
.re-card h3 { font-size: 1.02rem; margin: 18px 0 8px; }
.region-editor-map { height: 600px; max-height: 70vh; min-height: 360px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-surface-alt); z-index: 0; }
.region-editor-list { max-height: 420px; min-height: 200px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: 10px; margin-bottom: 14px; }
.region-editor-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--c-border); background: #fff; color: var(--c-text); font: inherit; cursor: pointer; }
.region-editor-item:last-child { border-bottom: 0; }
.region-editor-item:hover { background: var(--c-surface-alt); }
.region-editor-item.is-active { background: #e6f4f2; box-shadow: inset 3px 0 0 var(--c-accent); }
.region-editor-item code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86rem; font-weight: 600; color: var(--c-accent-strong); }
.region-editor-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-editor-item small { grid-column: 1 / -1; color: var(--c-muted); font-size: 0.8rem; }
.region-editor-list .text-muted { color: var(--c-muted); padding: 10px 12px; margin: 0; }
.region-editor-form { grid-column: 1 / -1; }
.re-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.re-field { margin-bottom: 14px; }
.re-field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.re-field input, .re-field select, .re-field textarea { width: 100%; font: inherit; color: var(--c-text); background: #fff; border: 1px solid var(--c-border); border-radius: 10px; padding: 10px 12px; }
.re-field textarea { resize: vertical; }
.re-field input:focus, .re-field select:focus, .re-field textarea:focus { outline: 2px solid var(--c-accent-soft); outline-offset: 1px; border-color: var(--c-accent); }
.re-field small { display: block; color: var(--c-muted); font-size: 0.85rem; margin-top: 5px; }
.re-hint { color: var(--c-muted); font-size: 0.92rem; margin: 8px 0; }
.re-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.re-error, .re-ok { border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.re-error { background: #fee2e2; color: #991b1b; }
.re-ok { background: #d1fae5; color: #065f46; }
.region-editor-file { position: relative; overflow: hidden; }
.region-editor-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.region-editor-output { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-border); }
.region-editor-code { max-height: 11rem; overflow: auto; margin: 0 0 12px; padding: 12px 14px; background: #0b2424; color: #e6f1f0; border-radius: 10px; font-size: 0.82rem; white-space: pre-wrap; word-break: break-all; }
.region-editor-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.region-editor-steps { margin: 0; padding-left: 1.3rem; }
.region-editor-steps li { margin-bottom: 6px; }
.region-editor-steps code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #e9f1f0; padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
@media (max-width: 900px) {
  .region-editor { grid-template-columns: minmax(0, 1fr); }
  .region-editor-map { height: 440px; }
  .region-editor-list { max-height: 240px; }
}
