:root[data-theme="dasvor"]{--fb-bg:#081725;--fb-panel:#102a40;--fb-raised:#183550;--fb-edge:#31536b;--fb-ink:#e8edf5;--fb-dim:#a9bfd3;--fb-accent:#00a6ff;--fb-accent-ink:#061522;--fb-nav:#0c2033;--accent:var(--fb-accent);--accent-soft:#12496d;--focus:#54c4ff}
/* Fieldbook v6.4 themes: override legacy fixed colors consistently */
:root{--fb-bg:#0c1420;--fb-panel:#172438;--fb-raised:#1d2d43;--fb-edge:#304258;--fb-ink:#ecf2fb;--fb-dim:#a7b9ce;--fb-accent:#65bfd1;--fb-accent-ink:#092330;--fb-nav:#111e30;--fb-shade:rgba(8,14,25,.72);color-scheme:dark}
:root[data-theme="ocean"]{--fb-bg:#0b1b29;--fb-panel:#122b40;--fb-raised:#1a3850;--fb-edge:#31516a;--fb-ink:#eaf6ff;--fb-dim:#acc7d8;--fb-accent:#64c8df;--fb-accent-ink:#062432;--fb-nav:#102436;--accent:var(--fb-accent);--accent-soft:#235468;--focus:#8ce7ee}
:root[data-theme="midnight"]{--fb-bg:#0c1120;--fb-panel:#18243b;--fb-raised:#223553;--fb-edge:#334669;--fb-ink:#ecf1ff;--fb-dim:#b0bfdc;--fb-accent:#84a0ff;--fb-accent-ink:#101a35;--fb-nav:#111b31;--accent:var(--fb-accent);--accent-soft:#384970;--focus:#b0bcff}
:root[data-theme="forest"]{--fb-bg:#0b1b17;--fb-panel:#172e26;--fb-raised:#204035;--fb-edge:#355849;--fb-ink:#e7f6ed;--fb-dim:#afc9b9;--fb-accent:#69d3a4;--fb-accent-ink:#0b291d;--fb-nav:#10251e;--accent:var(--fb-accent);--accent-soft:#245b43;--focus:#a1f3c9}
:root[data-theme="violet"]{--fb-bg:#171125;--fb-panel:#271d3e;--fb-raised:#35284e;--fb-edge:#55436d;--fb-ink:#f2eafa;--fb-dim:#c2b5d5;--fb-accent:#c1a1ff;--fb-accent-ink:#241238;--fb-nav:#211830;--accent:var(--fb-accent);--accent-soft:#524072;--focus:#d2b9ff}
:root[data-theme="sunset"]{--fb-bg:#251711;--fb-panel:#3b251b;--fb-raised:#503127;--fb-edge:#73513e;--fb-ink:#fff0df;--fb-dim:#ddbea9;--fb-accent:#f6b477;--fb-accent-ink:#3b1a0c;--fb-nav:#2d1b17;--accent:var(--fb-accent);--accent-soft:#6c4330;--focus:#ffd7a8}
:root[data-theme="slate"]{--fb-bg:#111820;--fb-panel:#1d2935;--fb-raised:#293947;--fb-edge:#3d5263;--fb-ink:#edf3f7;--fb-dim:#b0c0cc;--fb-accent:#9bbdd2;--fb-accent-ink:#122534;--fb-nav:#17222d;--accent:var(--fb-accent);--accent-soft:#405364;--focus:#bbd1e7}
:root[data-theme="carbon"]{--fb-bg:#131815;--fb-panel:#232c26;--fb-raised:#303d33;--fb-edge:#475949;--fb-ink:#f1f8ef;--fb-dim:#b9c9b9;--fb-accent:#d5e77c;--fb-accent-ink:#25300d;--fb-nav:#1b231d;--accent:var(--fb-accent);--accent-soft:#485a35;--focus:#e0eea0}
:root[data-theme="light"]{--fb-bg:#eff3f9;--fb-panel:#ffffff;--fb-raised:#e8eef8;--fb-edge:#c4d1e2;--fb-ink:#182943;--fb-dim:#4c6178;--fb-accent:#3769d3;--fb-accent-ink:#fff;--fb-nav:#e2eaf5;--fb-shade:rgba(30,46,66,.35);--accent:var(--fb-accent);--accent-soft:#d2e0fa;--focus:#3769d3;color-scheme:light}
:root[data-theme="rain"]{--fb-bg:#06100d;--fb-panel:#10241d;--fb-raised:#17352a;--fb-edge:#285e45;--fb-ink:#e0f9e7;--fb-dim:#9ec9ac;--fb-accent:#64ed9b;--fb-accent-ink:#061c0e;--fb-nav:#0d1e17;--accent:var(--fb-accent);--accent-soft:#1f5a38;--focus:#a3ffd0}
:root[data-theme="aurora"]{--fb-bg:#09141e;--fb-panel:#132737;--fb-raised:#1b3547;--fb-edge:#385b67;--fb-ink:#e8f7f8;--fb-dim:#b0cdd0;--fb-accent:#81dfca;--fb-accent-ink:#062f31;--fb-nav:#10202c;--accent:var(--fb-accent);--accent-soft:#275963;--focus:#a5f7ea}
:root[data-theme="pulse"]{--fb-bg:#130f20;--fb-panel:#211b36;--fb-raised:#302744;--fb-edge:#504369;--fb-ink:#f4edff;--fb-dim:#c5b7db;--fb-accent:#c99aff;--fb-accent-ink:#280e37;--fb-nav:#1b172d;--accent:var(--fb-accent);--accent-soft:#553778;--focus:#e2bbff}
:root[data-theme="prismrain"]{--fb-bg:#0c0c1c;--fb-panel:#1b1b34;--fb-raised:#292946;--fb-edge:#454363;--fb-ink:#f4f2ff;--fb-dim:#bdbbd9;--fb-accent:#b5a6ff;--fb-accent-ink:#130d30;--fb-nav:#15152c;--accent:var(--fb-accent);--accent-soft:#393461;--focus:#cfbfff}
:root[data-theme="icerain"]{--fb-bg:#071522;--fb-panel:#122c43;--fb-raised:#1b3c56;--fb-edge:#34617b;--fb-ink:#e8f8ff;--fb-dim:#a4cddd;--fb-accent:#7fddff;--fb-accent-ink:#092636;--fb-nav:#0d2234;--accent:var(--fb-accent);--accent-soft:#245773;--focus:#a9edff}
:root[data-theme="synthwave"]{--fb-bg:#180d29;--fb-panel:#2c1945;--fb-raised:#40225e;--fb-edge:#654778;--fb-ink:#fff0fc;--fb-dim:#d7b7dd;--fb-accent:#ff88cb;--fb-accent-ink:#300b29;--fb-nav:#211334;--accent:var(--fb-accent);--accent-soft:#633457;--focus:#ffc5ea}
:root[data-theme="ember"]{--fb-bg:#1e130f;--fb-panel:#36251b;--fb-raised:#483126;--fb-edge:#79533d;--fb-ink:#fff3e7;--fb-dim:#dbc0ad;--fb-accent:#f4b57c;--fb-accent-ink:#3c1f10;--fb-nav:#2a1a14;--accent:var(--fb-accent);--accent-soft:#67422b;--focus:#ffe0b1}
/* Unified backgrounds, borders and readable typography */
html{background:var(--fb-bg)!important;color:var(--fb-ink)!important;--v6-bg:var(--fb-bg);--v6-panel:var(--fb-panel);--v6-border:var(--fb-edge);--v6-text:var(--fb-ink);--v6-muted:var(--fb-dim);--v6-cyan:var(--fb-accent)}
body,.app,.v6-workspace,.v6-home,.v6-settings,.v6-more{color:var(--fb-ink)!important;background-color:transparent!important}
body{background:var(--fb-bg)!important}
.v6-rail,.v6-nav,.sectionnav{background:var(--fb-nav)!important;border-color:var(--fb-edge)!important}
.panel,.widget,.note,.stat,.modal,.recordmodal,.settingsmodal,.commandpanel,.v6-home .widget,.v6-workspace .panel,.v6-settings .panel,.v6-shortcuts button,.v6-toolgrid button,.v6-settinggrid button,.rich-editor,.review-box,.v6-home .stat{background:var(--fb-panel)!important;color:var(--fb-ink)!important;border-color:var(--fb-edge)!important}
button:not(.primary):not(.v6-capture),input,textarea,select,.v6-headtools button{background-color:var(--fb-raised);color:var(--fb-ink);border-color:var(--fb-edge)}
.v6-rail button,.v6-nav button{background:transparent!important;color:var(--fb-dim)!important}
.v6-rail button.v6-current,.v6-nav button.v6-current,.sectionnav button.selected{background:var(--accent-soft)!important;color:var(--fb-ink)!important}
.primary,.v6-capture{background:var(--fb-accent)!important;color:var(--fb-accent-ink)!important;border-color:var(--fb-accent)!important}
.v6-logo{background:var(--accent-soft)!important;color:var(--fb-accent)!important}
.v6-capture span,.v6-capture strong{color:var(--fb-accent-ink)!important}
.muted,.subtitle,.v6-sub,.v6-hero p,.v6-footer,.v6-herotext,.field label,.note p,.stat span{color:var(--fb-dim)!important}
.v6-hero h1,.v6-workspace-head h1,.v6-name,.v6-more h1,.v6-settings h2,.v6-toolgrid b,.v6-shortcuts b{color:var(--fb-ink)!important}
.modalbg,.commandbg{background:var(--fb-shade)!important}
.v6-rail,.v6-nav,.panel,.widget,.note,.stat,.modal,.v6-headtools button{transition:background-color .23s ease,color .23s ease,border-color .23s ease}
#fb64-atmosphere{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:0;overflow:hidden}
body:has(#fb64-atmosphere) .app{position:relative;z-index:1}
body:has(#fb64-atmosphere) .v6-rail,body:has(#fb64-atmosphere) .v6-nav{z-index:5}
:root[data-theme="rain"] #fb64-atmosphere,:root[data-theme="prismrain"] #fb64-atmosphere,:root[data-theme="icerain"] #fb64-atmosphere,:root[data-theme="synthwave"] #fb64-atmosphere,:root[data-theme="ember"] #fb64-atmosphere,:root[data-theme="aurora"] #fb64-atmosphere,:root[data-theme="pulse"] #fb64-atmosphere{opacity:1}
#fb64-atmosphere canvas{width:100%;height:100%;display:block;opacity:var(--fb-rain-opacity,.20)}
:root[data-theme="aurora"] #fb64-atmosphere{background:radial-gradient(ellipse at 15% 20%,rgba(30,205,160,.20),transparent 55%),radial-gradient(ellipse at 85% 75%,rgba(61,102,220,.2),transparent 52%);animation:fb64-aurora 18s ease-in-out infinite alternate}
:root[data-theme="pulse"] #fb64-atmosphere{background:radial-gradient(circle at 50% 45%,rgba(170,75,242,.13),transparent 62%);animation:fb64-pulse 9s ease-in-out infinite alternate}
@keyframes fb64-aurora{from{transform:translate(-2%,0) scale(1)}to{transform:translate(2%,2%) scale(1.09)}}
@keyframes fb64-pulse{from{opacity:.35}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#fb64-atmosphere{animation:none!important}*{scroll-behavior:auto!important;transition-duration:.01ms!important}}
.fb64-themes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:52vh;overflow-y:auto;padding:4px;margin:10px 0}.fb64-option{padding:12px;text-align:left;display:flex;gap:9px;align-items:center;min-height:66px;border:2px solid var(--fb-edge);border-radius:13px;background:var(--fb-panel);color:var(--fb-ink)}.fb64-option[aria-pressed="true"]{border-color:var(--fb-accent);box-shadow:0 0 0 1px var(--fb-accent)}.fb64-swatch{height:38px;width:43px;border-radius:8px;flex:none;border:1px solid #9fa5b255}.fb64-option b{font-size:13px}.fb64-option small{display:block;font-size:11px;opacity:.82;margin-top:2px}.fb64-config{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fb64-dialog{max-width:630px!important}.fb64-dialog h2{margin-top:0}.fb64-config label{font-size:13px}.fb64-config select{width:100%;margin-top:6px}.fb64-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:15px}.fb64-actions button{min-height:44px}
@media(max-width:450px){.fb64-themes{gap:7px}.fb64-option{padding:8px}.fb64-swatch{width:28px;height:34px}.fb64-config{grid-template-columns:1fr}}

:root[data-motion="off"] #fb64-atmosphere{animation:none!important;opacity:0!important}

:root[data-theme="synthwave"] #fb64-atmosphere{background:radial-gradient(ellipse at 20% 10%,rgba(247,52,183,.17),transparent 60%),radial-gradient(ellipse at 85% 75%,rgba(64,116,255,.18),transparent 60%);animation:fb64-aurora 24s ease-in-out infinite alternate}
:root[data-theme="ember"] #fb64-atmosphere{background:radial-gradient(ellipse at 60% 80%,rgba(250,125,43,.12),transparent 65%);animation:fb64-pulse 13s ease-in-out infinite alternate}
.fb64-config input[type="range"]{width:100%;margin-top:12px;accent-color:var(--fb-accent)}
@media(max-width:450px){.fb64-config{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Restored Theme Studio layout from original polished release */
.fb67-backdrop{position:fixed!important;inset:0;z-index:3000!important;display:flex!important;align-items:center;justify-content:center;padding:12px;background:rgba(0,0,0,.75)!important}
.fb67-studio{width:min(900px,100%);max-width:900px!important;max-height:92dvh;overflow:auto;background:var(--fb-panel)!important;color:var(--fb-ink)!important;border:1px solid var(--fb-edge);padding:18px;border-radius:16px}
.fb67-heading,.fb67-actions{display:flex;justify-content:space-between;align-items:center;gap:10px}.fb67-heading h2{margin:0}.fb67-heading p{margin:5px 0 10px}
.fb67-workspace{display:grid;grid-template-columns:minmax(145px,210px) minmax(0,1fr);gap:16px}.fb67-presets{display:flex;flex-direction:column;gap:6px;max-height:62dvh;overflow:auto}.fb67-presets b{margin:10px 0 3px}.fb67-presets button{text-align:left;border:1px solid var(--fb-edge);border-radius:9px;min-height:38px;padding:8px;background:var(--fb-raised);color:var(--fb-ink)}.fb67-form{max-height:62dvh;overflow-y:auto;padding:3px 5px}.fb67-form h3{margin:14px 0 5px}.fb67-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fb67-field{display:flex;flex-direction:column;gap:5px;font-size:13px;margin:8px 0}.fb67-field input:not([type="checkbox"]),.fb67-field select{width:100%;min-height:40px;background:var(--fb-raised);color:var(--fb-ink);border:1px solid var(--fb-edge);border-radius:8px;padding:5px 8px}.fb67-field input[type="color"]{padding:3px}.fb67-field input[type="range"]{padding:0}.fb67-savedrow{display:flex;gap:4px}.fb67-savedrow button:first-child{flex:1;min-width:0}.fb67-savedrow button:last-child{font-size:11px}.fb67-actions{justify-content:flex-end;margin-top:14px;flex-wrap:wrap}.fb67-actions button{min-height:42px}.fb67-current{font-size:13px;color:var(--fb-dim)}.fb67-current strong{color:var(--fb-ink)}
@media(max-width:650px){.fb67-workspace{grid-template-columns:1fr}.fb67-presets{max-height:150px;display:block;overflow-x:auto;white-space:nowrap}.fb67-presets button{display:inline-block;margin:3px;min-height:42px}.fb67-presets b{display:block}.fb67-savedrow{display:inline-flex}.fb67-form{max-height:none}.fb67-studio{max-height:94dvh}.fb67-actions button{flex:1}}
@media(prefers-reduced-motion:reduce){:root[data-theme="customstudio"] #fb64-atmosphere{animation:none!important}}

/* v7.5.1 compatible palette and control refinements */
.fb67-studio,.fb67-studio *{box-sizing:border-box}
.fb67-studio{width:min(920px,100%);overscroll-behavior:contain}
.fb67-workspace{align-items:start}
.fb67-heading button{flex:none}
.fb67-presets{white-space:normal}
.fb67-presets [id="fb67-builtins"] details{margin-bottom:6px}
.fb67-presets [id="fb67-builtins"] summary{cursor:pointer;padding:7px 3px}
.fb67-presets [id="fb67-builtins"] button{min-height:34px;margin:2px 3px 2px 0}
.fb67-form .fb67-field>span{display:block;color:var(--fb-dim);font-size:13px}
.fb67-field input[type="checkbox"]{width:19px;height:19px;accent-color:var(--fb-accent);vertical-align:middle}
.fb67-grid .fb67-field{min-width:0}
.fb67-grid .fb67-field input[type="range"]{width:100%;max-width:100%;accent-color:var(--fb-accent);min-height:30px}
.fb67-grid .fb67-field input[type="color"]{height:42px;min-width:65px}
.fb674-palette{margin-top:12px;padding:12px;border:1px solid var(--fb-edge);border-radius:13px;background:var(--fb-panel)}
.fb674-palette-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:9px}
.fb674-raincolors{display:grid;gap:7px}
.fb674-colorrow{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.fb674-colorpicker{width:43px;height:36px;min-width:43px;padding:3px;border:1px solid var(--fb-edge);border-radius:8px;background:var(--fb-raised)}
.fb674-colorrow button{width:34px;height:34px;min-width:34px;min-height:34px;padding:3px;border:1px solid var(--fb-edge);border-radius:8px;background:var(--fb-raised);color:var(--fb-ink)}
.fb674-addcolor{min-height:36px;padding:6px 12px;margin-top:10px}
.fb674-help{font-size:12px;line-height:1.45}
.fb67-savedrow{flex-wrap:wrap;white-space:normal;margin:5px 0}
.fb67-actions button.primary{background:var(--fb-accent)!important;color:var(--fb-accent-ink)!important}
/* The v7.5 layout should always inherit live theme values, not gray defaults. */
:root[data-theme="customstudio"] .fb73 .v6-nav,
:root[data-theme="customstudio"] .fb73 .v6-rail{background:var(--fb-nav)!important}
:root[data-theme="customstudio"] .fb73 .panel,
:root[data-theme="customstudio"] .fb73 .widget,
:root[data-theme="customstudio"] .fb73 .note,
:root[data-theme="customstudio"] .fb73 .v6-toolgrid button,
:root[data-theme="customstudio"] .fb73 .v6-settinggrid button{background:var(--fb-panel)!important;color:var(--fb-ink)!important;border-color:var(--fb-edge)!important}
:root[data-theme="customstudio"] .fb73 button.primary{background:var(--fb-accent)!important;color:var(--fb-accent-ink)!important}
@media(max-width:650px){
 .fb67-backdrop{padding:8px}
 .fb67-studio{max-height:calc(100dvh - 16px);padding:14px;border-radius:16px}
 .fb67-heading{align-items:flex-start}
 .fb67-heading button{min-width:38px;min-height:38px}
 .fb67-presets{white-space:normal;max-height:220px;overflow:auto}
 .fb67-presets button{margin:2px;min-height:36px}
 .fb67-savedrow{display:flex;align-items:center}
 .fb67-workspace{gap:12px}
 .fb67-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .fb67-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
 .fb67-actions button{min-width:0;min-height:40px;padding:7px}
 .fb67-actions button.primary{grid-column:1/-1}
}

/* v7.5.2: custom saved themes are animated themes too. */
:root[data-theme="customstudio"][data-studio-kind="rain"][data-motion="on"] #fb64-atmosphere,
:root[data-theme="customstudio"][data-studio-kind="glow"][data-motion="on"] #fb64-atmosphere {opacity:1 !important}
:root[data-theme="customstudio"][data-studio-kind="rain"][data-motion="on"] #fb64-atmosphere canvas {opacity:1 !important}
:root[data-theme="customstudio"][data-studio-kind="glow"][data-motion="on"] #fb64-atmosphere {
 background:radial-gradient(ellipse at 15% 20%,var(--fb-glow-1),transparent 55%),radial-gradient(ellipse at 85% 75%,var(--fb-glow-2),transparent 55%);
 animation:fb64-aurora 18s ease-in-out infinite alternate
}
:root[data-motion="off"] #fb64-atmosphere{opacity:0 !important;animation:none !important}
/* Display the three native swatches supplied by each starting-theme preset. */
.fb672-themegrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:8px 0 12px}
.fb672-theme-card{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;min-height:54px;padding:9px !important;text-align:left;border-radius:10px;background:var(--fb-raised) !important;border:1px solid var(--fb-edge) !important;color:var(--fb-ink) !important}
.fb672-swatches{display:flex;gap:3px;width:100%;height:14px}
.fb672-swatches>span{display:block;flex:1;min-width:0;border-radius:3px;border:1px solid #80808033}
.fb672-theme-card>span:last-child{font-size:12px}
.fb672-group summary{cursor:pointer}
/* Consistent theme controls across every screen, not only in the Site Walk overlay. */
:root[data-theme="customstudio"] .v6-nav,
:root[data-theme="customstudio"] .v6-rail {background:var(--fb-nav) !important;border-color:var(--fb-edge) !important}
:root[data-theme="customstudio"] .fb73 .fb73-shortcut,
:root[data-theme="customstudio"] .fb75-quick,
:root[data-theme="customstudio"] .fb-project-card,
:root[data-theme="customstudio"] .fb-project-result {background:var(--fb-panel) !important;color:var(--fb-ink) !important;border-color:var(--fb-edge) !important}
