.world-settings {
 --panel:#10212bf5; --muted:#9eb7c1; --line:#ffffff20; --accent:#9ce4d5;
 color:#e7f0f1; font:12px system-ui;
 & * { box-sizing:border-box; }
 & button, & input, & select, & textarea { font:inherit; color:inherit; margin:0; }
 & button { cursor:pointer; background:#203940; border:1px solid #ffffff25; border-radius:7px; padding:9px 12px; }
 & button:focus-visible, & input:focus-visible, & select:focus-visible, & summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
 & .settings-toolbar { position:fixed; top:20px; left:20px; z-index:25; display:flex; gap:8px; }
 & .settings-toolbar button { background:var(--panel); white-space:nowrap; }
 & #controls { position:fixed; left:20px; right:auto; top:66px; bottom:auto; width:min(340px,calc(100vw - 40px)); max-width:none; max-height:calc(100dvh - 90px); padding:0; z-index:19; display:flex; flex-direction:column; overflow:hidden; background:var(--panel); border:1px solid var(--line); border-radius:14px; }
 & .panel-heading { padding:16px; border-bottom:1px solid var(--line); flex-shrink:0; }
 & .panel-heading h2 { margin:0; font-size:15px; }
 & .panel-heading .eyebrow, & .version { display:none; }
 & .panel-scroll { overflow-y:auto; padding:0 16px; min-height:0; }
 & details { padding:0; margin:0; border-top:1px solid var(--line); }
 & summary { cursor:pointer; padding:13px 0; margin:0; list-style:none; font-size:12px; }
 & summary:after { content:'+'; float:right; }
 & details[open] > summary:after { content:'−'; }
 & .control { margin:12px 0 20px; }
 & label { display:flex; justify-content:space-between; gap:12px; margin:10px 0; font-size:11px; color:#afc2ca; }
 & output { color:#c5e6df; font-size:10px; white-space:nowrap; }
 & input[type=range] { display:block; width:100%; height:3px; padding:0; accent-color:var(--accent); margin:14px 0; }
 & #regional-water-controls input[type=number] { width:96px; flex:0 0 96px; min-width:0; background:#0b1a23; border:1px solid var(--line); border-radius:6px; padding:7px; color:#e7f0f1; }
 & input[type=color] { width:24px; height:24px; padding:0; border:0; }
 & input[type=checkbox] { width:16px; height:16px; accent-color:var(--accent); }
 & select { width:100%; background:#0b1a23; border:1px solid var(--line); padding:10px; border-radius:6px; }
 & p { font-size:11px; line-height:1.6; color:var(--muted); }
 & a { color:var(--accent); }
 & .color-row { display:flex; gap:14px; }
 & .panel-footer { display:flex; gap:10px; padding:12px 16px; flex-shrink:0; border-top:1px solid var(--line); }
 & #settings { flex:1; background:#c5e8df; color:#17353c; }
 & #toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); opacity:0; pointer-events:none; background:var(--panel); padding:12px; z-index:30; }
 & #toast.visible { opacity:1; }
 & dialog { width:min(610px,calc(100vw - 32px)); background:#11232d; color:#dcebea; border:1px solid var(--line); border-radius:14px; padding:24px; }
 & dialog::backdrop { background:#06141d88; }
 & .dialog-top, & .dialog-actions { display:flex; justify-content:space-between; gap:8px; align-items:center; }
 & textarea { width:100%; height:280px; background:#081920; padding:12px; border:1px solid var(--line); }
 & #settings-error { color:#ffa892; }
 & [hidden] { display:none !important; }
}
.collapsed .world-settings #controls { display:none; }

.example-settings-panel { top:66px !important; max-height:calc(100dvh - 90px) !important; overflow:auto; z-index:19; box-sizing:border-box; width:min(330px,calc(100vw - 40px)); }
.example-settings-panel[hidden] { display:none !important; }
body:has(.settings-toolbar) .brand { top:76px; }
@media (max-width:1000px) { :root { --frame-top:70px; } }
.world-settings .settings-toolbar #panel-toggle { position:static; display:block; margin:0; }
.world-settings .settings-toolbar #panel-toggle span { margin-left:0; }
body:has(.settings-toolbar) .character-heading { top:76px; }
@media (max-width:1000px) {
 body:has(#example-settings:not([hidden])) #frame-metrics,
 body:has(.world-settings):not(.collapsed) #frame-metrics { visibility:hidden; }
}
