/* Shared palette tokens follow studio.css so every surface uses one appearance. */
:root {
 --background:#101225;--foreground:#f1f2ff;--card:#191d34;--primary:#a4a8ff;--primary-foreground:#171a39;
 --secondary:#252a46;--muted:#20253e;--muted-foreground:#aeb5d1;--accent:#2b3055;--border:#353d5d;--stage:#0b0d1b;
 --footer-background:#0c0e1d;--footer-foreground:#f1f2ff;--footer-muted:#aeb5d1;--footer-line:#303650;
 --surface-shadow:0 18px 70px #04051135;--theme-color:#101225;color-scheme:dark;
}
:root[data-theme=light] {
 --background:#f6f7ff;--foreground:#202440;--card:#fff;--primary:#5558cd;--primary-foreground:#fff;
 --secondary:#e9ecfb;--muted:#eef0fb;--muted-foreground:#5e6685;--accent:#e5e7ff;--border:#d8dcef;--stage:#181c37;
 --footer-background:#e9ecfa;--footer-foreground:#202440;--footer-muted:#5e6685;--footer-line:#cfd5eb;
 --surface-shadow:0 18px 70px #35407110;--theme-color:#f6f7ff;color-scheme:light;
}
:root[data-palette=emerald] {
 --background:#0b1b18;--foreground:#edf9f2;--card:#132923;--primary:#65dab2;--primary-foreground:#08291e;
 --secondary:#203d32;--muted:#1a332b;--muted-foreground:#a2c5b5;--accent:#204d3d;--border:#315345;--stage:#07130f;
 --footer-background:#081612;--footer-foreground:#edf9f2;--footer-muted:#a2c5b5;--footer-line:#2b493b;--theme-color:#0b1b18;
}
:root[data-palette=emerald][data-theme=light] {
 --background:#f3faf7;--foreground:#193a2b;--card:#fff;--primary:#147451;--primary-foreground:#fff;
 --secondary:#e4f3eb;--muted:#eaf5ef;--muted-foreground:#527563;--accent:#daf0e4;--border:#cce3d6;--stage:#103a28;
 --footer-background:#e5f2ea;--footer-foreground:#193a2b;--footer-muted:#527563;--footer-line:#c5decf;--theme-color:#f3faf7;
}
:root[data-palette=rose] {
 --background:#201322;--foreground:#fcf0fc;--card:#2d1e31;--primary:#e69be7;--primary-foreground:#331635;
 --secondary:#402a43;--muted:#38253b;--muted-foreground:#c7abc8;--accent:#503152;--border:#5a3e5c;--stage:#140c17;
 --footer-background:#190f1c;--footer-foreground:#fcf0fc;--footer-muted:#c7abc8;--footer-line:#4c334f;--theme-color:#201322;
}
:root[data-palette=rose][data-theme=light] {
 --background:#fcf6fb;--foreground:#402442;--card:#fff;--primary:#9651a0;--primary-foreground:#fff;
 --secondary:#f3e7f3;--muted:#f6edf6;--muted-foreground:#805d84;--accent:#f0def0;--border:#e6d4e7;--stage:#3c2041;
 --footer-background:#f3e8f2;--footer-foreground:#402442;--footer-muted:#805d84;--footer-line:#e2cde3;--theme-color:#fcf6fb;
}
:root[data-palette=orange] {
 --background:#201711;--foreground:#faf3ed;--card:#2b211a;--primary:#f6a56e;--primary-foreground:#301b0e;
 --secondary:#3c2e23;--muted:#35291f;--muted-foreground:#cbb5a5;--accent:#513825;--border:#594332;--stage:#140e0a;
 --footer-background:#19120e;--footer-foreground:#faf3ed;--footer-muted:#cbb5a5;--footer-line:#493728;--theme-color:#201711;
}
:root[data-palette=orange][data-theme=light] {
 --background:#fff8f1;--foreground:#422c1e;--card:#fff;--primary:#ae501d;--primary-foreground:#fff;
 --secondary:#faeddf;--muted:#fcf0e4;--muted-foreground:#86644d;--accent:#f8e4d0;--border:#ecd8c2;--stage:#3c2415;
 --footer-background:#f8ecdf;--footer-foreground:#422c1e;--footer-muted:#86644d;--footer-line:#e7cfb5;--theme-color:#fff8f1;
}
:root .reference-site .site-header{background:color-mix(in srgb,var(--background) 88%,transparent);border-bottom-color:var(--border)}
.brand-mark{background:var(--primary);color:var(--primary-foreground);position:relative;border-radius:8px}
.brand-mark>img{visibility:hidden}
.brand-mark:after{content:'';position:absolute;inset:5px;background:currentColor;mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9v6m4-10v14m4-11v8m4-13v18m4-12v6' stroke='black' stroke-width='2.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E")}
.studio-form{box-shadow:var(--surface-shadow)}
.hero-shell:before{opacity:.1}
.final-cta{background:linear-gradient(120deg,var(--stage),color-mix(in srgb,var(--primary) 18%,var(--stage)));border:1px solid color-mix(in srgb,var(--primary) 20%,transparent)}
.header-actions .appearance-open{border:1px solid var(--border);border-radius:10px}
.header-actions .appearance-open:hover{border-color:var(--primary);background:var(--accent);color:var(--primary)}
.appearance-dialog{width:calc(100% - 32px);max-width:560px;max-height:calc(100dvh - 32px);margin:auto;padding:28px;border:1px solid var(--border);border-radius:28px;background:var(--card);color:var(--foreground);box-shadow:0 36px 120px #0006;overflow:auto;overscroll-behavior:contain}
.appearance-dialog::backdrop{background:#060914a6;backdrop-filter:blur(8px)}
.appearance-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.appearance-symbol{display:grid;place-items:center;width:44px;height:44px;border:1px solid color-mix(in srgb,var(--primary) 28%,transparent);border-radius:14px;background:color-mix(in srgb,var(--primary) 12%,transparent);color:var(--primary)}
.appearance-symbol svg{width:23px;height:23px}
.appearance-close{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:var(--muted-foreground)}
.appearance-close:hover{background:var(--muted);color:var(--foreground)}
.appearance-dialog h2{font-size:25px;line-height:1.3;letter-spacing:-.035em;font-weight:650}
#appearance-intro{font-size:14px;line-height:1.7;color:var(--muted-foreground);margin:10px 0 26px;max-width:440px}
.appearance-dialog fieldset{padding:0;margin:0 0 24px;border:0}
.appearance-dialog legend{margin-bottom:12px;font-size:12px;line-height:1.5;letter-spacing:.035em;color:var(--muted-foreground);font-weight:600}
.appearance-palette-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.appearance-palette{display:block;position:relative;margin:0;padding:9px;border:1px solid var(--border);border-radius:15px;background:var(--background);cursor:pointer;transition:border-color .16s,box-shadow .16s}
.appearance-palette:hover{border-color:color-mix(in srgb,var(--primary) 65%,var(--border))}
.appearance-palette.is-selected{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.appearance-dialog input[type=radio]{position:absolute;width:1px;height:1px;min-height:0;opacity:0;pointer-events:none}
.appearance-palette:has(input:focus-visible),.appearance-mode:has(input:focus-visible){outline:3px solid color-mix(in srgb,var(--primary) 65%,transparent);outline-offset:4px}
.appearance-preview{display:flex;position:relative;align-items:center;gap:9px;height:64px;border-radius:8px;padding:12px;background:color-mix(in srgb,var(--swatch) 12%,#121523);overflow:hidden;border:1px solid color-mix(in srgb,var(--swatch) 12%,transparent)}
.appearance-preview:after{content:'';position:absolute;width:70px;height:70px;right:-14px;top:-30px;border-radius:50%;background:var(--swatch);opacity:.13;filter:blur(12px)}
.appearance-preview>i{display:block;flex:none;width:28px;height:34px;border-radius:7px;background:color-mix(in srgb,var(--swatch) 25%,transparent);border:1px solid color-mix(in srgb,var(--swatch) 25%,transparent)}
.appearance-preview>span{display:flex;flex-direction:column;gap:5px;flex:1}
.appearance-preview b{display:block;width:70%;height:3px;border-radius:3px;background:#edf0ff5c}
.appearance-preview b:first-child{width:85%;background:#edf0ffb3}
.appearance-preview b:last-child{width:48%}
.appearance-preview>em{position:absolute;right:12px;bottom:10px;width:22px;height:8px;border-radius:4px;background:var(--swatch)}
.appearance-palette-name{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px;font-weight:500;line-height:1.5;margin:9px 2px 1px}
.appearance-check{width:15px;height:15px;opacity:0;flex:none;color:var(--primary)}
.is-selected .appearance-check{opacity:1}
.appearance-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:4px;border:1px solid var(--border);border-radius:13px;background:var(--background)}
.appearance-mode{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:43px;margin:0;padding:9px 12px;border:1px solid transparent;border-radius:9px;font-size:13px;color:var(--muted-foreground);cursor:pointer}
.appearance-mode svg{width:17px;height:17px}
.appearance-mode.is-selected{background:var(--accent);color:var(--primary);border-color:color-mix(in srgb,var(--primary) 22%,transparent)}
.appearance-dialog-bottom{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:18px;border-top:1px solid var(--border)}
.appearance-dialog-bottom p{font-size:11px;line-height:1.6;color:var(--muted-foreground);max-width:70%}
.appearance-dialog-bottom button{font-size:12px;flex:none}
@media(max-width:639px){.header-inner{gap:10px}.header-actions{gap:5px}.header-actions .appearance-open{min-width:36px;width:36px;height:36px;padding:9px}.appearance-dialog{padding:22px;border-radius:24px}.appearance-dialog h2{font-size:22px}.appearance-palette-grid{gap:10px}.appearance-palette-name{font-size:11px}.appearance-dialog-bottom{gap:10px}}
@media(prefers-reduced-motion:reduce){.appearance-palette{transition:none}}
