/* Three layouts; per-button active treatment avoids a two-position thumb. */
.ps-mode-toggle::before { display:none !important; }
.ps-mode-toggle button { min-width:0; }
.ps-mode-toggle button[aria-pressed="true"] { background:linear-gradient(#1877a5,#063450) !important;color:#fff !important;border:1px solid #35bfff !important;border-radius:999px;box-shadow:0 0 8px #35bfff66; }
body:not(.ps-chart-pro) .ps-save-custom { display:none; }
.ps-custom-dock { display:none;position:absolute;bottom:calc(10px + env(safe-area-inset-bottom,0px));left:10px;right:10px;z-index:1100;background:linear-gradient(145deg,#153d5c,#051827);border:1px solid #35bfff;border-radius:16px;padding:10px 12px;color:#f2f6f9;font:13px/1.3 system-ui;box-sizing:border-box; }
body.ps-custom .ps-custom-dock { display:block; }
body.ps-custom.ps-pro-docked:not(.ps-lite) .ps-lite-bg-panel.ps-pro-dock { display:none !important; }
body.ps-custom.ps-mobile-dock-collapsed .ps-custom-dock { display:none; }
body.ps-custom:has(.layer-panel:not(.fully-collapsed)) .ps-custom-dock { display:none; }
.ps-custom-row { display:flex;align-items:center;gap:7px; }
.ps-custom-dock button,.ps-custom-dialog button { background:#123b57;color:#f2f6f9;border:1px solid #4789ab;border-radius:8px;padding:8px 10px;min-height:36px;font:inherit;cursor:pointer; }
.ps-custom-dock .ps-custom-picker { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-weight:700;font-size:15px; }
.ps-custom-description { margin:6px 0 2px; }
.ps-custom-age { display:block;color:#b7cbd8;font-size:11px;margin-bottom:6px; }
.ps-custom-status { margin:4px 0 0;font-size:12px;color:#f7d594; }
.ps-custom-status:empty { display:none; }
.ps-custom-blend { display:grid;grid-template-columns:auto minmax(45px,1fr) 34px;gap:8px;align-items:center;margin:8px 0; }
.ps-custom-blend input { width:100%;min-width:0;accent-color:#35bfff;height:30px; }
.ps-custom-overlays { display:flex;flex-wrap:wrap;gap:6px;margin:6px 0; }
.ps-custom-dock [aria-pressed="true"],.ps-custom-dialog [aria-pressed="true"] { border-color:#35bfff;background:#17638a; }
.ps-custom-dock button:disabled,.ps-custom-dialog button:disabled { opacity:.45;cursor:default; }
.ps-custom-dialog { box-sizing:border-box;width:min(480px,calc(100vw - 24px));max-height:88dvh;overflow:auto;padding:18px;border:1px solid #35bfff;border-radius:16px;background:#0b2032;color:#f2f6f9;font:14px/1.4 system-ui; }
.ps-custom-dialog::backdrop { background:#0009; }
.ps-custom-dialog h2 { margin:0 76px 14px 0;font-size:20px; }
/* Close: same text size, smaller button, centred on the title line so it no
   longer crowds the text below (2026-10-27). */
.ps-custom-dialog .ps-custom-close { position:absolute;right:14px;top:14px;min-height:0;padding:4px 10px;line-height:1.3;border-radius:7px; }
.ps-custom-dialog label { display:block;margin:12px 0; }
/* Gap between a field label and its box (e.g. "View name"). */
.ps-custom-dialog label > input:not([type="checkbox"]) { margin-top:7px; }
.ps-custom-dialog input:not([type="checkbox"]) { box-sizing:border-box;width:100%;font:16px system-ui;color:#f2f6f9;background:#16344c;border:1px solid #59839e;padding:8px;border-radius:6px; }
.ps-custom-dialog input[type="range"] { min-height:36px;accent-color:#35bfff; }
.ps-custom-dialog>button { margin:7px 7px 0 0; }
.ps-custom-view-row { display:flex;gap:8px;margin:8px 0; }
.ps-custom-view-row button:first-child { flex:1;text-align:left;overflow-wrap:anywhere; }
.ps-custom-temperature { padding:8px 12px;border:1px solid #44637a;border-radius:8px; }
.ps-custom-dock [hidden] { display:none !important; }
@media(min-width:621px) { .ps-custom-dock { left:auto;width:370px;right:12px;bottom:20px; } }
@media(max-width:380px) { .ps-mode-toggle button { padding-left:8px !important;padding-right:8px !important;font-size:10px !important; } .ps-custom-dock { padding:8px; } .ps-custom-row { gap:4px; } .ps-custom-dock button { padding:7px; } }

.ps-custom-age { white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.ps-custom-description { white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.ps-custom-row:empty { display:none; }

.ps-custom-temperature input[type="range"] { background:linear-gradient(90deg,#12336e,#25b8db,#73d954,#ffd33d,#cb2922);padding:0;border:0;accent-color:#35bfff; }

.ps-custom-dock :focus-visible,.ps-custom-dialog :focus-visible { outline:2px solid #35bfff;outline-offset:2px; }

/* Custom quick overlays use the same separate right-hand rail as Lite. */
body .ps-custom-overlays { display:none !important; }
body.ps-custom .ps-custom-overlays { display:flex !important;position:absolute;flex-direction:column;flex-wrap:nowrap;gap:8px;margin:0;right:calc(10px + env(safe-area-inset-right,0px)) !important;bottom:var(--ps-mobile-overlay-bottom,calc(var(--ps-pro-dock-lift,180px) + 50px)) !important;top:auto !important;max-height:calc(100dvh - 100px);overflow:visible;pointer-events:auto;background:none !important;box-shadow:none !important;backdrop-filter:none !important; }
body.ps-custom .ps-custom-overlays .ps-lite-ov-btn { flex-shrink:0; }
body.ps-custom:has(.layer-panel:not(.fully-collapsed)) .ps-custom-overlays { display:none !important; }

/* Three labels need content-sized buttons; old Pro/Lite rules fixed all at 50px. */
body .ps-mode-toggle { width:max-content !important; }
body .ps-mode-toggle button { box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex:0 0 auto !important;width:auto !important;min-width:46px;padding:0 10px !important;white-space:nowrap; }
@media(min-width:621px) { body .ps-mode-toggle { left:50% !important;transform:translateX(-50%) !important; } }
@media(max-width:380px) { body .ps-mode-toggle button { min-width:42px;padding:0 7px !important;font-size:10px !important; } }


.ps-custom-dialog select { display:block;box-sizing:border-box;width:100%;min-height:42px;margin-top:5px;padding:8px;background:#16344c;color:#f2f6f9;border:1px solid #59839e;border-radius:6px;font:16px system-ui; }

body .ps-custom-overlays button:disabled { opacity:.45;cursor:default; }

.ps-custom-temperature-hint { margin:6px 0 10px;color:#b7cbd8;font-size:13px;line-height:1.4; }

/* ===== Custom v0.34.0 (2026-10-27 rework): viewing card, editor, views list ===== */
.ps-custom-dock .ps-custom-row { gap:10px; }
.ps-custom-dock .ps-custom-picker { display:flex;align-items:center;gap:6px;background:none !important;border:0 !important;padding:2px 0 !important;min-height:32px;font-size:17px !important;font-weight:750; }
.ps-custom-name-text { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0; }
.ps-custom-caret { color:#35bfff;font-size:13px;flex:none; }
.ps-custom-dock .ps-custom-edit { flex:none;font-weight:650; }
.ps-custom-description { margin:4px 0 0;color:#cfe0ea;font-size:12.5px; }
.ps-custom-age { color:#9fb6c6;font-size:11px;margin:1px 0 0; }
.ps-custom-note { margin:6px 0 0;font-size:12px;color:#f7d594; }
.ps-custom-note:empty { display:none; }
.ps-custom-dock .ps-custom-blend { margin:8px 0 2px; }

/* Primary / ghost / danger buttons shared by dialogs, editor and bar. */
.ps-custom-dialog .ps-custom-primary, .ps-custom-editbar .ps-custom-primary, .ps-custom-editor .ps-custom-primary { background:linear-gradient(#1b86b9,#0b4f78) !important;border-color:#35bfff !important;font-weight:700; }
.ps-custom-editbar .ps-custom-ghost { background:transparent;border-color:transparent;color:#cfe3ef; }
.ps-custom-dialog .ps-custom-danger { color:#ffb3a6;border-color:#a8574c; }

/* Editing bar (top) + editor (bottom sheet on phones, right panel on desktop). */
.ps-custom-editbar, .ps-custom-editor { display:none; }
body.ps-custom.ps-custom-editing .ps-custom-editbar { display:flex;position:absolute;z-index:1300;top:0;left:0;right:0;box-sizing:border-box;min-height:54px;padding:calc(6px + env(safe-area-inset-top,0px)) 12px 6px;align-items:center;justify-content:space-between;gap:10px;background:linear-gradient(#0b2a44,#06192b);border-bottom:1px solid #35bfff;color:#f2f6f9;font:14px/1.3 system-ui; }
.ps-custom-editbar button { background:#123b57;color:#f2f6f9;border:1px solid #4789ab;border-radius:9px;padding:7px 14px;min-height:36px;font:inherit;font-weight:650;cursor:pointer; }
.ps-custom-edittitle { flex:1;min-width:0;text-align:center;line-height:1.15; }
.ps-custom-edittitle small { display:block;color:#35bfff;font-size:10.5px;font-weight:800;letter-spacing:.12em; }
.ps-custom-edittitle b { display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
body.ps-custom.ps-custom-editing .ps-custom-editor { display:block;position:absolute;z-index:1250;left:0;right:0;bottom:0;box-sizing:border-box;height:min(62dvh,560px);overflow-y:auto;overscroll-behavior:contain;padding:6px 16px calc(16px + env(safe-area-inset-bottom,0px));background:linear-gradient(180deg,#0b223b,#04101e);border-top:1px solid #35bfff;border-radius:18px 18px 0 0;box-shadow:0 -8px 30px #0007;color:#f2f6f9;font:14px/1.35 system-ui; }
.ps-custom-grab { width:40px;height:4px;border-radius:2px;background:#4a6a80;margin:2px auto 8px; }
.ps-custom-namefield { display:block;margin:2px 0 4px; }
.ps-custom-namefield span { display:block;font-size:10.5px;letter-spacing:.12em;font-weight:800;color:#7fa9c2;margin-bottom:6px;text-transform:uppercase; }
.ps-custom-editor input[type="text"] { box-sizing:border-box;width:100%;font:16px system-ui;color:#f2f6f9;background:#16344c;border:1px solid #59839e;padding:8px 10px;border-radius:8px; }
.ps-custom-sec { margin-top:12px; }
.ps-custom-sechead { display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:6px;font-size:10.5px;letter-spacing:.12em;font-weight:800;color:#7fa9c2; }
.ps-custom-sechead i { font-style:normal;letter-spacing:0;font-weight:500;color:#8fa6b6;font-size:11.5px; }
.ps-custom-chips { display:flex;flex-wrap:wrap;gap:6px; }
.ps-custom-chip { padding:7px 11px;min-height:34px;border-radius:999px;border:1px solid #3f6a85;background:#0e2a47;font:13px system-ui;color:#d9e6ee;cursor:pointer; }
.ps-custom-chip[aria-pressed="true"] { background:#17638a;border-color:#35bfff;color:#fff;font-weight:650; }
.ps-custom-chip:disabled { opacity:.35;cursor:default; }
.ps-custom-editor .ps-custom-blend { display:grid;grid-template-columns:auto minmax(45px,1fr) 44px;gap:10px;align-items:center;margin:12px 0 0;font-size:13px; }
.ps-custom-editor .ps-custom-blend input { width:100%;min-width:0;accent-color:#35bfff;height:30px; }
.ps-custom-toggle { display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #1d3a52;font-size:14px;cursor:pointer; }
.ps-custom-toggle input { appearance:none;-webkit-appearance:none;flex:none;width:40px;height:23px;border-radius:12px;background:#2a4558;position:relative;cursor:pointer;margin:0; }
.ps-custom-toggle input::after { content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;transition:left .15s; }
.ps-custom-toggle input:checked { background:#1b86b9; }
.ps-custom-toggle input:checked::after { left:20px; }
.ps-custom-editor .ps-custom-temperature { margin-top:8px;padding:4px 10px 8px; }
.ps-custom-warn { color:#f7d594;font-size:12.5px;margin:8px 0 0; }
.ps-custom-warn:empty { display:none; }
.ps-custom-editfoot { display:flex;justify-content:flex-end;margin-top:14px; }
.ps-custom-editfoot:empty { display:none; }
.ps-custom-editfoot button { background:#123b57;color:#f2f6f9;border:1px solid #4789ab;border-radius:9px;padding:8px 12px;min-height:36px;font:inherit;font-weight:600;cursor:pointer; }
.ps-custom-editor :focus-visible, .ps-custom-editbar :focus-visible { outline:2px solid #35bfff;outline-offset:2px; }

/* While editing: only the bar, editor, map and overlay rail are shown. */
body.ps-custom-editing :is(.ps-custom-dock, .ps-mode-toggle, .ps-tools-launcher, .ps-tools-drawer, .leaflet-top.leaflet-right) { display:none !important; }
body.ps-custom.ps-custom-editing .ps-custom-overlays { bottom:calc(min(62dvh,560px) + 12px) !important; }

@media (min-width:621px) {
  body.ps-custom.ps-custom-editing .ps-custom-editor { left:auto;right:12px;top:66px;bottom:16px;width:360px;height:auto;border:1px solid #35bfff;border-radius:16px; }
  body.ps-custom.ps-custom-editing .ps-custom-grab { display:none; }
  body.ps-custom.ps-custom-editing .ps-custom-overlays { right:384px !important;bottom:24px !important; }
}

/* Views list. */
.ps-custom-list .ps-custom-views { display:flex;flex-direction:column;gap:8px;margin:4px 0 12px; }
.ps-custom-view-row { display:flex;align-items:stretch;gap:8px;margin:0;border:1px solid #2c4d66;border-radius:12px;background:#0b2034;padding:4px; }
.ps-custom-view-row.active { border-color:#35bfff;background:#0f3150; }
.ps-custom-dialog .ps-custom-view-open { flex:1;min-width:0;text-align:left;background:none;border:0;padding:6px 8px; }
.ps-custom-view-open b { display:block;font-size:15px;overflow-wrap:anywhere; }
.ps-custom-view-open span { display:block;font-size:12px;color:#9fb6c6;margin-top:2px; }
.ps-custom-view-row.active .ps-custom-view-open b::before { content:"✓ ";color:#35bfff; }
.ps-custom-dialog .ps-custom-more { flex:none;align-self:center;width:38px;min-height:34px;padding:0;font-weight:900; }
.ps-custom-view-actions { display:none;flex-wrap:wrap;gap:6px;padding:8px 4px 2px; }
.ps-custom-view-item.open .ps-custom-view-actions { display:flex; }
.ps-custom-dialog .ps-custom-new { display:block;width:100%;margin:0;padding:11px;font-size:15px; }
.ps-custom-foot { text-align:center;color:#9fb6c6;font-size:12px;margin:10px 0 0; }
@media (max-width:620px) {
  .ps-custom-dialog.ps-custom-list { margin:auto 0 0;width:100vw;max-width:100vw;border-radius:18px 18px 0 0;padding-bottom:calc(18px + env(safe-area-inset-bottom,0px)); }
}

/* Themed sliders and scroll rails (2026-10-27): match the Pro Layer dock slider
   (dark pill handle, coloured rim, filled track) and the Layers panel rail. */
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"] { --ps-range-fill:#1de9b6;--ps-thumb-w:40px;--ps-thumb-h:22px;-webkit-appearance:none;appearance:none;display:block;width:100%;min-width:0;height:var(--ps-thumb-h);margin:0;padding:0;background:transparent !important;border:0;cursor:pointer;accent-color:initial; }
.ps-custom-editor .ps-custom-temperature input[type="range"] { --ps-range-fill:#35bfff;--ps-thumb-w:30px; }
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"]::-webkit-slider-runnable-track { height:6px;border-radius:3px;background:linear-gradient(90deg,var(--ps-range-fill) 0 calc(var(--p,.5)*100%),rgba(170,183,196,.28) calc(var(--p,.5)*100%) 100%); }
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none;appearance:none;width:var(--ps-thumb-w);height:var(--ps-thumb-h);margin-top:calc((6px - var(--ps-thumb-h)) / 2);border-radius:999px;background:linear-gradient(180deg,#13385a 0%,#0a1f33 100%);border:2px solid var(--ps-range-fill);box-shadow:0 2px 6px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.18); }
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"]::-moz-range-track { height:6px;border-radius:3px;border:0;background:rgba(170,183,196,.28); }
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"]::-moz-range-progress { height:6px;border-radius:3px;background:var(--ps-range-fill); }
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"]::-moz-range-thumb { box-sizing:border-box;width:var(--ps-thumb-w);height:var(--ps-thumb-h);border-radius:999px;background:linear-gradient(180deg,#13385a 0%,#0a1f33 100%);border:2px solid var(--ps-range-fill);box-shadow:0 2px 6px rgba(0,0,0,.45); }
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"]:focus-visible { outline:none; }
:is(.ps-custom-dock, .ps-custom-editor) input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow:0 0 0 3px rgba(53,191,255,.45),0 2px 6px rgba(0,0,0,.45); }
:is(.ps-custom-dock, .ps-custom-editor) .ps-custom-blend output { font-variant-numeric:tabular-nums;text-align:right;color:#cfe0ea; }
.ps-custom-editor, .ps-custom-dialog { scrollbar-width:thin;scrollbar-color:#3f9fe0 rgba(53,191,255,.12); }
.ps-custom-editor::-webkit-scrollbar, .ps-custom-dialog::-webkit-scrollbar { width:12px; }
.ps-custom-editor::-webkit-scrollbar-track, .ps-custom-dialog::-webkit-scrollbar-track { background:linear-gradient(90deg,transparent 4px,rgba(53,191,255,.14) 4px 8px,transparent 8px);margin:14px 0; }
.ps-custom-editor::-webkit-scrollbar-thumb, .ps-custom-dialog::-webkit-scrollbar-thumb { border:3px solid transparent;background:linear-gradient(180deg,#5fd0ff 0%,#3977db 100%) padding-box;border-radius:6px;min-height:40px; }
.ps-custom-editor::-webkit-scrollbar-thumb:hover, .ps-custom-dialog::-webkit-scrollbar-thumb:hover { background:linear-gradient(180deg,#8adfff 0%,#4f8cf0 100%) padding-box; }
.ps-custom-editor .ps-custom-temperature .ps-custom-blend { grid-template-columns:76px minmax(45px,1fr) 52px; }
