@charset "UTF-8";
/*
 * FrameUI Studio
 * Copyright (C) 2026 Berke Akçen
 * SPDX-License-Identifier: GPL-3.0-only
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3.
 * This program is distributed WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the LICENSE file or <https://www.gnu.org/licenses/> for details.
 */
[hidden]{display:none!important}
@font-face{font-family:Studio;src:local("Inter"),local("Segoe UI Variable"),local("Segoe UI");font-display:swap}
:root{color-scheme:dark;--bg:#0b1019;--panel:#101722;--raised:#151f2d;--border:#243040;--text:#eef3f9;--muted:#a0afc1;--subtle:#8c9db3;--accent:#75e8dc;--accent-dark:#163d3b;--danger:#ffa28f;font-family:Studio,"Segoe UI",sans-serif;font-size:16px}
*{box-sizing:border-box}
body{line-height:1.45;margin:0;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.35}
a{color:inherit;text-decoration:none}
button{color:inherit}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
h1,h2,h3,p{margin:0}
.svg-defs{width:0;height:0;position:absolute}
.app-header{height:84px;padding:0 26px;display:flex;align-items:center;border-bottom:1px solid var(--border);gap:32px}
.brand{display:flex;align-items:center;gap:12px;font-size:21px;font-weight:700;letter-spacing:-.6px;white-space:nowrap}
.brand b{font-weight:400;color:#b5c5d5}
.brand-mark{display:block;flex-shrink:0;border-radius:11px;width:43px;height:43px}
.status-dot{height:6px;width:6px;border-radius:50%;background:#7ee2b2;display:inline-block;flex-shrink:0}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:9px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 14px;border:1px solid var(--border);border-radius:7px;font-size:14px;font-weight:650;background:var(--raised)}
.button:hover{background:#223044}
.button-primary{color:#082725;background:var(--accent);border-color:var(--accent)}
.button-primary:hover{background:#5fd2c7;border-color:#5fd2c7}
.button-quiet{background:transparent;color:#b6c5d6}
.icon-button{display:grid;place-items:center;width:36px;height:36px;background:transparent;border:0;border-radius:5px;color:var(--muted);font-size:23px}
.icon-button:hover{background:var(--raised);color:var(--text)}
.redo svg{transform:scaleX(-1)}
.header-divider{height:20px;border-left:1px solid var(--border);margin:0 4px}
.workspace{display:grid;grid-template-columns:280px minmax(0,1fr) 368px;min-height:calc(100dvh - 84px);max-width:2000px;margin:0 auto}
.catalog-panel,.inspector-panel{background:var(--panel);min-width:0;display:flex;flex-direction:column}
.catalog-panel{border-right:1px solid var(--border);height:calc(100dvh - 84px);position:sticky;top:0}
.panel-heading{padding:27px 20px 22px}
h1{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:20px;letter-spacing:-.4px;font-weight:600}
.search-field{display:flex;align-items:center;margin:0 17px 12px;gap:8px;border:1px solid var(--border);background:#0d141f;border-radius:6px;padding:9px 10px;color:var(--subtle)}
.search-field svg{width:15px;height:15px}
.search-field input{width:100%;background:none;border:0;outline:none;padding:0;color:var(--text);font-size:14px;min-width:0}
.search-field input::placeholder{color:var(--subtle)}
kbd{font-family:inherit;font-size:14px;background:#1b2431;padding:1px 4px;border-radius:3px}
.category-field{display:flex;align-items:center;justify-content:space-between;margin:0 20px 14px;font-size:13px;color:var(--subtle)}
.category-field select{background:transparent;border:0;font-size:14px;color:#b8c6d6;max-width:165px;padding:4px;outline-offset:0}
.template-list{padding:0 10px 10px;flex:1;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#29394e transparent}
.template-card{width:100%;border:1px solid transparent;border-radius:7px;padding:10px 8px;display:flex;align-items:center;gap:10px;background:transparent;text-align:left;margin-bottom:3px;position:relative;transition:background .1s}
.template-card:hover{background:#1a2533}
.template-card.active{background:#193030;border-color:#315b57}
.template-thumb{width:58px;height:42px;object-fit:cover;border-radius:4px;background:linear-gradient(150deg,#142d47,#40306c);border:1px solid #ffffff0b;flex-shrink:0}
.template-copy{flex:1;min-width:0}
.template-copy b{display:block;font-size:14px;font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.template-copy small{display:block;color:var(--subtle);font-size:12px;margin-top:5px}
.template-card.active .template-copy small{color:#a3d6cd}
.template-card svg{width:12px;height:12px;color:var(--accent);display:none}
.template-card.active svg{display:block}
.empty-state{padding:25px 12px;color:var(--muted);line-height:1.7;font-size:14px}
.catalog-footer{padding:17px 20px 18px;border-top:1px solid var(--border);font-size:12px;color:var(--subtle);display:flex;flex-wrap:wrap;align-items:center;gap:5px}
.text-button{background:none;border:0;color:#a6b7ca;font-size:14px;font-weight:550;padding:0;display:inline-flex;align-items:center;gap:5px;text-align:left}
.text-button:hover{color:var(--accent)}
.catalog-footer .text-button{display:flex;justify-content:space-between;flex-basis:100%;font-size:14px}
.catalog-footer .text-button span{font-size:16px}
.preview-panel{padding:30px clamp(22px,3vw,46px);min-width:0;align-self:start}
.preview-heading{display:block;margin-bottom:25px;gap:15px}
h2{font-size:25px;font-weight:600;letter-spacing:-.8px}
.preview-heading p{font-size:16px;line-height:1.6;color:var(--muted);margin-top:8px}

.stage-wrap{padding:7px;background:#141e2b;border:1px solid #2b394c;border-radius:12px;box-shadow:0 15px 50px #02071135}
.stage{aspect-ratio:16/9;position:relative;overflow:hidden;background:#030811;border-radius:6px;isolation:isolate}
.stage canvas,.world-scene{position:absolute;inset:0;width:100%;height:100%}
.world-scene{object-fit:cover}
.stage canvas{z-index:1}
.caption-preview{z-index:2;position:absolute;inset:45% 5% auto;text-align:center;pointer-events:none;text-shadow:none}
.caption-preview>div:first-child{font-size:clamp(14px,1.6vw,24px);font-weight:500}
.caption-preview>div:nth-child(2){color:#b8c5d2;font-size:clamp(9px,.9vw,13px);margin-top:7px}
.caption-preview>div:nth-child(3){color:#8c9daf;font-size:clamp(7px,.7vw,10px);margin-top:11px}
.stage-bottom{position:absolute;left:15px;right:15px;display:flex;justify-content:flex-end;z-index:4;pointer-events:none}
.stage-bottom{bottom:15px}
.stage-chip{font-size:10px;letter-spacing:1px;font-weight:650;color:#d5e1ef;background:#080e19b8;border:1px solid #72809850;padding:5px 6px;border-radius:3px}
.game-hud,.game-hands{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none}
.game-hud img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
.game-crosshair{mix-blend-mode:difference}
.playback-bar{display:flex;align-items:center;gap:10px;margin:20px 1px 19px}
.round-button{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--accent);border:1px solid #8bf1e5;color:#102b29;flex-shrink:0}
.round-button svg{width:18px;height:18px}
.round-button:hover{background:#a1f5eb;border-color:#b7fff6}
.playback-bar>.icon-button{width:32px}
.playback-bar>.icon-button svg{width:14px;height:14px}
.timeline-control{flex:1;margin:0 10px;min-width:0}
.timeline-labels{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;margin-bottom:6px}
.timeline-control input{width:100%;display:block;height:3px;accent-color:var(--accent);margin:0;cursor:pointer}
.loop-toggle{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--muted)}
.loop-toggle input{accent-color:var(--accent);width:12px;height:12px}
.timing-strip{display:flex;border:1px solid var(--border);border-radius:8px;background:#111924;padding:16px 0}
.timing-strip>div{flex:1;padding:0 17px;border-left:1px solid var(--border)}
.timing-strip>div:first-child{border:0}
.timing-strip span{display:block;font-size:10px;letter-spacing:1.2px;color:var(--subtle);font-weight:650}
.timing-strip b{display:block;font-size:17px;font-weight:500;margin-top:8px}
.preview-note{display:flex;align-items:flex-start;gap:9px;color:var(--subtle);margin-top:18px;font-size:13px;line-height:1.7}
.preview-note>svg{width:16px;height:16px;flex:0 0 16px;margin-top:3px}
.preview-note p{flex:1;min-width:0}
.preview-note .text-button{font-size:13px;white-space:nowrap;color:#8395ac}
.preview-note .text-button svg{width:13px;height:13px}
code{font-family:"Cascadia Code",Consolas,monospace;color:#9bb1c9;font-size:.95em}
.site-footer{background:#0c131e;border-top:1px solid #ffffff18;color:#bdcad8;font-size:14px}
.footer-container{width:min(1200px,calc(100% - 48px));margin:0 auto}
.footer-top{display:flex;align-items:stretch;justify-content:space-between;gap:28px;padding:28px 0 18px}
.site-footer .brand{gap:9px;font-size:16px;font-weight:600;letter-spacing:-.025em}
.site-footer .brand-mark{width:30px;height:30px;border-radius:8px}
.footer-identity{min-width:0;display:flex;flex-direction:column;align-items:flex-start}
.footer-identity>p{margin:8px 0 0;font-size:14px;line-height:1.5;color:#a0afc1}
.footer-links{display:grid;grid-template-columns:repeat(3,minmax(110px,max-content));align-items:start;gap:80px;font-size:14px}
.cookie-settings{display:inline-block;margin-top:auto;padding:24px 0 0;line-height:1.5;border:0;background:none;color:var(--text);font:inherit;font-size:14px;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.cookie-settings:hover{color:var(--accent)}
.cookie-banner{position:fixed;inset:auto 24px 24px;z-index:20;display:flex;align-items:center;gap:32px;max-width:1100px;margin:auto;padding:22px 26px;border:1px solid var(--border);border-radius:12px;background:#111a27;box-shadow:0 12px 50px #0009}
.cookie-banner[hidden]{display:none}
.cookie-banner h2{font-size:17px;margin:0 0 8px}
.cookie-banner p,.cookie-category p{font-size:14px;line-height:1.65;color:var(--muted);margin:0}
.cookie-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;flex-shrink:0}
.cookie-category{display:flex;align-items:center;gap:24px;padding:22px 0;border-bottom:1px solid var(--border)}
.cookie-category h3{font-size:15px;margin:0 0 7px}
.cookie-category>div{flex:1}
.cookie-required{font-size:12px;color:var(--accent);white-space:nowrap}
#cookie-dialog .cookie-actions{margin-top:24px}
@media(max-width:1100px){.footer-links{gap:56px}.cookie-banner{align-items:stretch;flex-direction:column;gap:18px}}
@media(max-width:600px){.cookie-banner{inset:auto 12px 12px;padding:18px}.cookie-actions{justify-content:flex-start}.cookie-category{gap:16px}}
.footer-link-group h2{font-size:14px;font-weight:650;line-height:1.5;letter-spacing:.09em;text-transform:uppercase;color:var(--text);margin:0 0 12px}
.footer-link-group{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.footer-links a,.footer-links button{display:inline-flex;align-items:center;gap:9px;min-height:32px;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;line-height:1.5}
.footer-links a:hover,.footer-links button:hover{color:var(--accent)}
.footer-links .community-icon{width:20px;height:20px;object-fit:contain;flex-shrink:0}
.footer-links .github-icon{fill:currentColor;stroke:none}
.footer-bottom{border-top:1px solid #ffffff0e;padding:16px 0;font-size:13px;line-height:1.6;color:#a0afc1;text-align:center}
.footer-bottom>p{margin:0}
.inspector-panel{border-left:1px solid var(--border);height:calc(100dvh - 84px);position:sticky;top:0}
.inspector-heading{padding:27px 23px 21px}
.inspector-heading h2{font-size:20px;display:flex;align-items:center;justify-content:space-between;letter-spacing:-.4px}
.inspector-tabs{display:flex;border-bottom:1px solid var(--border);padding:0 17px;gap:4px}
.inspector-tabs button{flex:1;padding:12px 0;font-size:14px;color:var(--subtle);border:0;border-bottom:2px solid transparent;background:none;cursor:pointer}
.inspector-tabs button.active{color:var(--accent);border-bottom-color:var(--accent)}
.inspector-scroll{padding:0 22px;overflow:auto;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:#29394e transparent}
.settings-pane{padding:20px 0}
.section-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 16px}
.section-heading h3{font-size:15px;font-weight:650;letter-spacing:.1px}
.section-heading>span{color:var(--subtle);font-size:11px;letter-spacing:.7px}
.settings-section+.settings-section{margin-top:21px;border-top:1px solid var(--border);padding-top:20px}
.field{display:block;min-width:0;margin-bottom:16px}
.field-label{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#adbed1;margin-bottom:7px}
.field-label output{color:#c0d1de;font-size:12px;font-variant-numeric:tabular-nums}
.field input:not([type=checkbox]):not([type=range]):not([type=color]),.field select,.field textarea{width:100%;min-height:42px;padding:10px 11px;border:1px solid #344359;background:#0d141f;border-radius:5px;color:#c7d3e2;font-size:14px;outline-offset:0}
.field input[type=number]{appearance:textfield;-moz-appearance:textfield}
.field input[type=number]::-webkit-inner-spin-button{opacity:.4}
.field input[type=range]{width:100%;margin:0;height:24px;accent-color:var(--accent)}
.field input::placeholder,.field textarea::placeholder{color:#8c9db3}
.field textarea{min-height:52px;resize:vertical;line-height:1.5}
.field select{padding-right:6px}
.field-row{display:flex;gap:9px}
.field-row>.field{flex:1;min-width:0}
.field-note{font-size:12px;overflow-wrap:anywhere;color:var(--subtle);line-height:1.75;margin:0 0 12px}
.colors-row{display:flex;gap:9px}
.color-field{flex:1;min-width:0}
.color-field .field-label{font-size:12px}
.color-well{flex-direction:column;align-items:stretch;border:1px solid #2d3d4e;border-radius:6px;background:#0d141f;display:flex;gap:7px;padding:8px}
.color-well input[type=color]{width:100%;height:27px;padding:0;border:0;background:transparent;cursor:pointer}
.color-well input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.color-well input[type=color]::-webkit-color-swatch{border:0;border-radius:3px}
.color-well input[type=text]{width:100%;border:0;padding:0;background:transparent;font:12px Consolas,monospace;color:var(--muted);min-width:0;text-align:center}
.switch-field{display:flex;align-items:center;justify-content:space-between;margin:12px 0;gap:8px}
.switch-copy{font-size:14px;color:#b2c1d4}
.switch-copy small{display:block;color:var(--subtle);font-size:12px;margin-top:4px;line-height:1.5}
.switch{position:relative;display:inline-block;width:36px;height:21px;flex-shrink:0}
.switch input{position:absolute;opacity:0;inset:0;margin:0;width:100%;height:100%;cursor:pointer;z-index:1}
.switch>span{position:absolute;inset:0;border:1px solid #34465b;background:#1c2939;border-radius:10px;pointer-events:none}
.switch>span:before{content:"";position:absolute;left:3px;top:3px;width:13px;height:13px;border-radius:50%;background:#8ba0b5}
.switch input:checked+span{background:#22534d;border-color:#3a8177}
.switch input:checked+span:before{left:18px;background:var(--accent)}
.switch input:focus-visible+span{outline:2px solid var(--accent);outline-offset:3px}
.image-upload{line-height:1.6;width:100%;margin-bottom:16px;background:#0d141f;border:1px dashed #344459;border-radius:7px;padding:18px 9px;display:flex;flex-direction:column;align-items:center;gap:7px;font-size:13px;color:#8fa4ba}
.image-upload svg{width:20px;height:20px;color:#7187a0}
.image-upload strong{font-size:13px;font-weight:500;color:#c1cfdf}
.image-upload small{font-size:11px;color:var(--subtle)}
.image-upload:hover{border-color:#6fc8bd}
.image-info{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid var(--border);background:#0d141f;border-radius:6px;margin:0 0 13px}
.image-info img{width:37px;height:29px;object-fit:cover;border-radius:3px}
.image-info>span{flex:1;min-width:0;font-size:12px;color:#b0c0d0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.image-info small{display:block;font-size:11px;color:var(--subtle);margin-top:4px}
.image-info button{color:var(--muted);font-size:20px}
.segmented{display:flex;border:1px solid var(--border);border-radius:5px;padding:3px;background:#0d141f;margin:0 0 13px}
.segmented button{min-height:34px;flex:1;border:0;border-radius:3px;background:none;padding:6px;color:var(--subtle);font-size:12px}
.segmented button.active{background:#233334;color:#b8e5df}
.check-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:9px 0 13px}
.check-grid label{display:flex;align-items:center;gap:6px;font-size:12px;color:#9caec1}
.check-grid input{accent-color:var(--accent);margin:0;width:12px;height:12px}
.advanced-details{border-top:1px solid var(--border);margin:0;padding:0}
.advanced-details summary{cursor:pointer;font-size:14px;color:#becbdb;margin:0;padding:16px 0;display:flex;align-items:center;gap:7px;list-style:none;border-bottom:1px solid transparent;transition:border-color .2s ease}
.advanced-details summary::-webkit-details-marker{display:none}
.details-chevron{width:14px;height:14px;flex:0 0 14px;color:var(--subtle);transition:transform .2s ease}
.advanced-details[open]>summary .details-chevron{transform:rotate(180deg)}
.advanced-details[open]>summary{border-bottom-color:var(--border);margin-bottom:12px}
@media(prefers-reduced-motion:reduce){.details-chevron,.advanced-details summary{transition:none}}
.addon-state{margin:1px 0 0 auto;color:var(--subtle);font-size:11px;font-weight:400;letter-spacing:.2px}
.addon-state.active{color:var(--accent)}
.chip-note{font-size:11px;letter-spacing:.3px;color:var(--subtle)}
.full-width{width:100%}
.settings-pane[hidden]{display:none}
.inspector-footer{border-top:1px solid var(--border);padding:15px 22px;display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}
.inspector-footer .text-button{margin-left:auto;font-size:12px}
.invalid .status-dot{background:var(--danger)}
.invalid #validation-status{color:var(--danger)}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);max-width:min(500px,calc(100vw - 32px));background:#1e3434;border:1px solid #477e76;color:#d6f1ed;padding:13px 19px;border-radius:9px;font-size:14px;z-index:15;box-shadow:0 8px 30px #0008;line-height:1.5}
.toast.error{background:#382526;border-color:#925554;color:#ffd1c6}
.renderer-error{position:absolute;inset:0;z-index:6;display:grid;place-items:center;text-align:center;padding:40px;background:#0b1220e8;line-height:1.7;color:var(--muted);font-size:14px}
.renderer-error[hidden]{display:none}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
dialog{width:min(540px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere;border:1px solid #30465b;border-radius:15px;background:#111a27;color:var(--text);padding:29px;box-shadow:0 20px 100px #0008}
dialog::backdrop{background:#030711aa;backdrop-filter:blur(4px)}
.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px}
.dialog-heading h2{margin:0;line-height:1.3}
.dialog-heading .icon-button{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;border-radius:8px}
dialog h2{font-size:27px}
dialog>p{font-size:14px;color:var(--muted);line-height:1.8;margin-top:13px}
dialog ol{counter-reset:steps;padding:0;list-style:none;margin:26px 0}
dialog li{counter-increment:steps;position:relative;padding-left:38px;margin:21px 0}
dialog li:before{content:counter(steps);position:absolute;left:0;top:0;width:24px;height:24px;border:1px solid #3c655f;border-radius:50%;display:grid;place-items:center;color:var(--accent);font-size:14px}
dialog li b{display:block;font-size:14px;font-weight:600}
dialog li span{display:block;font-size:14px;color:var(--muted);line-height:1.7;margin-top:4px}
dialog .dialog-note{font-size:13px;border-top:1px solid var(--border);padding-top:17px;margin-bottom:20px}

@media(min-width:1600px){
    .workspace{grid-template-columns:300px minmax(0,1fr) 384px}
    .template-thumb{width:64px;height:46px}
    .preview-panel{padding-top:36px}
    .preview-heading h2{font-size:32px}
}
@media(max-width:1240px){
    .center-scroll{display:contents}
    .workspace{grid-template-columns:260px minmax(0,1fr)}
    .catalog-panel{grid-row:1/span 2}
    .inspector-panel{grid-column:2;grid-row:2;height:auto;position:static;border-top:1px solid var(--border);border-left:0}
    .preview-panel{grid-column:2;grid-row:1;padding:28px}
    .inspector-scroll{overflow:visible;padding:0 24px}
    .inspector-heading{padding:24px 24px 18px}
    .settings-pane{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
    .settings-section{min-width:0}
    .settings-section+.settings-section{margin:0;border:0;padding:0}
    .inspector-tabs{padding:0 24px}
}
@media(max-width:960px){
    .footer-top{flex-direction:column;position:relative;padding-bottom:57px}
    .cookie-settings{position:absolute;bottom:18px;inset-inline-start:0;padding:0}
    .footer-links{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}
    .workspace{grid-template-columns:240px minmax(0,1fr)}
    .app-header{padding:0 20px;gap:20px}
    .brand{flex:1}
    .preview-panel{padding:24px}
    .preview-heading{align-items:flex-start}
    .preview-heading h2{font-size:26px}
    .settings-pane{grid-template-columns:minmax(0,1fr);gap:24px}
    .settings-section+.settings-section{border-top:1px solid var(--border);padding-top:24px}
    .timing-strip>div{padding:0 10px}
}
@media(max-width:700px){
    .app-header{height:auto;min-height:80px;padding:16px;gap:14px;flex-wrap:wrap}
    .brand{font-size:20px;gap:10px}
    .brand-mark{width:36px;height:36px;border-radius:8px}
    .header-actions{margin-left:auto;gap:8px}
    .header-actions .icon-button,.header-divider{display:none}
    .button{font-size:13px;min-height:42px;padding:0 12px;gap:7px}
    .button svg{width:16px;height:16px}
    .workspace{display:flex;flex-direction:column;min-height:calc(100dvh - 80px)}
    .catalog-panel{order:2;height:auto;position:static;border-right:0;border-top:1px solid var(--border);padding:22px 16px}
    .panel-heading{padding:0 0 18px}
    .search-field{margin:0 0 12px}
    .category-field{margin:0 0 12px}
    .template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:340px;padding:0;gap:6px;flex:auto}
    .template-card{margin:0;padding:9px 6px;gap:8px}
    .template-thumb{width:38px;height:32px}
    .template-card.active svg{position:absolute;top:6px;right:6px;width:10px;height:10px}
    .template-copy b{font-size:13px}
    .template-copy small{font-size:12px;margin-top:4px}
    .catalog-footer{border:0;padding:16px 0 0;row-gap:12px}
    .catalog-footer .text-button{margin-top:0}
    .preview-panel{order:1;padding:24px 16px}
    .preview-heading{margin-bottom:20px}
    .preview-heading h2{font-size:26px}
            .stage-wrap{padding:5px;border-radius:9px}
    .stage-bottom{left:10px;right:10px}
    .stage-bottom{bottom:10px}
    .stage-chip{font-size:9px;padding:3px 4px;letter-spacing:.6px}
    .caption-preview>div:first-child{font-size:17px}
    .caption-preview>div:nth-child(2){font-size:12px}
    .caption-preview>div:nth-child(3){font-size:10px}
    .timing-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 0}
    .timing-strip>div{padding:0 16px}
    .timing-strip>div:nth-child(3){border-left:0}
    .timing-strip span{font-size:11px}
    .preview-note .text-button{margin-left:20px}
    .site-footer{width:100%}
    .footer-container{width:calc(100% - 32px)}
    .footer-top{flex-direction:column;gap:18px;padding:24px 0 57px}
    .footer-links{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}
    .inspector-panel{order:3}
    .inspector-heading{padding:24px 20px 18px}
    .inspector-scroll{padding:0 20px}
    .field input:not([type=checkbox]):not([type=range]):not([type=color]),.field select,.field textarea{font-size:16px}
    .inspector-tabs{padding:0 20px}
    .inspector-footer{padding:16px 20px}
}
@media(max-width:380px){
    .template-list{grid-template-columns:minmax(0,1fr)}
    .template-thumb{width:54px;height:38px}
    .preview-heading{grid-template-columns:minmax(0,1fr);gap:8px}
    }
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* The editor retains its full height; the footer follows it in normal page flow. */
@media(min-width:1241px){
    body{height:auto;display:block;overflow:auto}
    .app-header{position:relative;z-index:10;flex-shrink:0;background:var(--bg)}
    .workspace{width:100%;height:calc(100dvh - 84px);min-height:0;overflow:hidden;padding:20px;gap:20px}
    .catalog-panel,.inspector-panel{position:static;align-self:start;height:100%;min-height:0;border:1px solid var(--border);border-radius:12px;overflow:hidden}
    .center-scroll{height:100%;min-height:0;min-width:0;overflow:auto;overscroll-behavior:auto;scrollbar-width:thin;scrollbar-color:#29394e transparent}
    .center-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
    .preview-panel{min-height:100%;padding:20px 24px 32px}
    .panel-heading,.catalog-footer,.inspector-heading,.inspector-tabs,.inspector-footer{flex-shrink:0}
}
.custom-select{position:relative;min-width:0;width:100%}
.select-trigger{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #344359;border-radius:7px;padding:10px 12px;background:#0d141f;color:#d2deec;font-size:14px;text-align:left}
.select-trigger:hover{border-color:#52697f;background:#121d2b}
.select-trigger[aria-expanded=true]{border-color:#75e8dc;background:#142329;box-shadow:0 0 0 2px #75e8dc13}
.select-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.select-trigger svg{width:16px;height:16px;color:#9bafc2;transition:transform .15s}
.select-trigger[aria-expanded=true] svg{transform:rotate(180deg);color:var(--accent)}
.category-field{gap:8px}
.category-field .custom-select{width:auto;max-width:174px}
.category-field .select-trigger{min-height:36px;padding:7px 8px;border-color:transparent;background:transparent;gap:8px;font-size:13px}
.category-field .select-trigger:hover,.category-field .select-trigger[aria-expanded=true]{border-color:var(--border);background:#172333}
.select-menu{position:fixed;z-index:50;overflow:auto;padding:6px;border:1px solid #385064;border-radius:9px;background:#111c2b;box-shadow:0 14px 40px #02060c99;scrollbar-width:thin;scrollbar-color:#3b5268 transparent;font-size:14px}
.select-option{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:42px;padding:10px 12px;border-radius:5px;color:#b7c8db;cursor:pointer;line-height:1.5}
.select-option.highlighted{background:#223447;color:#f1f7ff}
.select-option[aria-selected=true]{color:var(--accent);background:#193535}
.select-option[aria-selected=true].highlighted{background:#244744}
.select-option[aria-disabled=true]{opacity:.4;cursor:default}
.select-check{visibility:hidden;color:var(--accent);font-size:16px}
.select-option[aria-selected=true] .select-check{visibility:visible}
@media(max-width:700px){.select-trigger{font-size:16px}.select-menu{font-size:15px}.select-option{min-height:46px}}

@media(min-width:1241px){
    .site-footer{position:static;margin-top:16px}
}
@media(max-width:600px){
    .footer-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
}

.caption-preview>div:empty{display:none}

.canvas-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:0 0 12px;padding:0 2px}
.canvas-toolbar button{border:1px solid #283746;background:#131d28;color:#b7c7d4;padding:7px 10px;border-radius:7px;font:inherit;font-size:11px;cursor:pointer}
.canvas-toolbar button[aria-pressed="true"]{color:#91e3d7;border-color:#4f9a92;background:#193c3b}
.canvas-toolbar button:disabled{opacity:.35;cursor:default}
.canvas-editor{position:absolute;inset:0;z-index:5;pointer-events:none}
.canvas-object{position:absolute;box-sizing:border-box;border:1px solid transparent;pointer-events:auto;cursor:move;touch-action:none;outline:0}
.canvas-object[data-canvas-object="image"]{z-index:1}
.canvas-object[data-canvas-object="text"]{z-index:2}
.canvas-object[data-canvas-object="progress"]{z-index:3}
.canvas-object:hover{border-color:#80d4c980;background:#80d4c906}
.canvas-object.selected,.canvas-object:focus-visible{border-color:#8bdace;box-shadow:0 0 0 1px #06191599}
.canvas-handle{display:none;position:absolute;width:12px;height:12px;padding:0;border:2px solid #163c37;border-radius:3px;background:#bbfff1;z-index:10;touch-action:none}
.canvas-object.selected>.canvas-handle,.canvas-object:focus-within>.canvas-handle{display:block}
.canvas-handle-nw{left:-6px;top:-6px;cursor:nwse-resize}.canvas-handle-ne{right:-6px;top:-6px;cursor:nesw-resize}
.canvas-handle-sw{left:-6px;bottom:-6px;cursor:nesw-resize}.canvas-handle-se{right:-6px;bottom:-6px;cursor:nwse-resize}
.canvas-transforming .canvas-object{transition:none!important}.canvas-transforming{user-select:none}
@media(max-width:900px){.canvas-toolbar button{font-size:10px;padding:6px 8px}}

.category-readonly{color:#a8b8c9;font-size:12px;margin:0}
.library-filter{margin:4px 18px 12px;padding-bottom:16px;border-bottom:1px solid var(--border);display:grid;gap:8px}
.library-filter>label{font-size:12px;color:var(--subtle)}
.library-filter .custom-select{width:100%}
.template-copy small{white-space:nowrap}
.template-row{position:relative;margin-bottom:3px;border:1px solid transparent;border-radius:7px;transition:background .1s,border-color .1s}
.template-row:hover{background:#1a2533}
.template-row:has(.template-card.active){background:#193030;border-color:#315b57}
.template-row .template-card{margin-bottom:0;padding-right:44px;border:0;background:transparent}
.template-row .effect-delete{position:absolute;right:7px;top:50%;transform:translateY(-50%)}
.template-row .template-copy b{white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.effect-delete{width:30px;height:34px;padding:6px;color:var(--subtle)}
.effect-delete:hover{color:var(--danger);background:#ffa28f12}
.effect-delete svg{width:17px;height:17px}
.button-danger{color:var(--danger);border-color:#9b554c66;background:#58261f33}
.button-danger:hover{background:#793a3044;border-color:#b5685b}
.purge-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}

.server-connection{margin:0 0 16px;padding:10px 13px;border:1px solid #315d57;border-radius:7px;background:#14302c;color:#a9ded5;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.server-connection.connection-error{border-color:#925554;background:#382526;color:#ffd1c6}
@media(max-width:760px){.header-actions{flex-wrap:wrap;justify-content:flex-end;gap:6px}.app-header{height:auto;min-height:84px;padding-top:12px;padding-bottom:12px}.header-actions .button{min-height:36px;padding:0 9px;font-size:12px}}

.server-effect-badge{display:block;margin-top:4px;color:#92d9ce;font-size:10px;font-weight:600;letter-spacing:.04em;line-height:1.4}

/* Task-oriented settings with readable labels and generous interaction targets. */
.inspector-heading{padding-bottom:16px}
.inspector-tabs{padding-left:12px;padding-right:12px;gap:2px}
.inspector-tabs button{min-width:0;white-space:nowrap;min-height:44px}
.inspector-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:-4px;border-radius:4px}

.inspector-panel .section-heading h3{font-size:16px;line-height:1.5}
.inspector-panel .field-label{font-size:14px;color:#c5d2e1;line-height:1.5}
.inspector-panel .field-label output{font-size:13px}
.inspector-panel .field input:not([type=checkbox]):not([type=range]):not([type=color]),.inspector-panel .dropdown-trigger{font-size:15px}
.inspector-panel .field-note{font-size:13px;line-height:1.65;color:#a7b7ca}
.inspector-panel .advanced-details summary{font-size:15px;line-height:1.6}
.inspector-panel .check-grid label{font-size:14px;line-height:1.5;gap:8px;min-height:32px}
.inspector-panel .segmented button{font-size:14px;min-height:40px}
.inspector-panel .addon-state,.inspector-panel .chip-note,.inspector-panel .section-heading>span{font-size:12px}
.inspector-panel .image-info>span,.inspector-panel .image-upload strong{font-size:14px}
.inspector-panel .image-info small,.inspector-panel .image-upload small{font-size:12px}
.inspector-footer,.inspector-footer .text-button{font-size:13px}
.switch-field{padding:13px 14px;min-height:64px;background:#15202e;border:1px solid #2b3a4e;border-radius:8px;gap:14px;transition:background-color .18s ease,border-color .18s ease}
.switch-field:hover{background:#192737;border-color:#40546c}
.switch-field:has(input:checked){background:#142c2d;border-color:#345c59}
.switch-field:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.switch-copy{font-size:15px;line-height:1.5;color:#d3dfed}
.switch-copy small{font-size:13px;color:#a7b7ca;line-height:1.55}
.switch{width:42px;height:24px}
.switch>span{border-radius:14px;transition:background-color .2s ease,border-color .2s ease}
.switch>span:before{width:16px;height:16px;left:3px;top:3px;transition:transform .2s ease,background-color .2s ease}
.switch input:checked+span:before{left:3px;transform:translateX(18px)}
.timing-field .field-note{margin:7px 0 0}
@media(prefers-reduced-motion:reduce){.switch-field,.switch>span,.switch>span:before{transition:none}}

.settings-section:has(> .advanced-details:last-child:not([open]))+.settings-section{margin-top:0}

.field-heading,.switch-heading{display:flex;align-items:center;gap:8px;min-width:0}
.field-heading{margin-bottom:7px}
.field-heading .field-label{display:block;margin:0;flex:0 1 auto;min-width:0}
.switch-heading>label{cursor:pointer}
.field-info{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:18px;height:20px;padding:0;border:0;background:transparent;color:#8c9db3;cursor:default}
.field-info svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round}
.field-info .info-dot{fill:currentColor;stroke:none}
.field-info:hover,.field-info[aria-expanded=true]{color:#c5d2e1}
.field-info:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:3px}
.field-help-popup{position:fixed;z-index:100;width:max-content;max-width:min(310px,calc(100vw - 24px));padding:10px 12px;border:1px solid #3c4b5e;border-radius:6px;background:#1b2635;box-shadow:0 5px 15px #0005;color:#d7e4ef;font-size:13px;line-height:1.6;pointer-events:none;overflow-wrap:anywhere}

.field-heading>output{margin-left:auto;color:#c0d1de;font-size:13px;font-variant-numeric:tabular-nums}

.field-label-tail{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;vertical-align:bottom}
.field-heading{align-items:flex-end}

.field.is-disabled .field-label,.field.is-disabled output{color:#7e8b9d}
.field.is-disabled input,.field.is-disabled .select-trigger,.segmented.is-disabled button{opacity:.4;pointer-events:none}
.field.is-disabled .field-info{color:#7e8b9d}
.field.is-disabled,.segmented.is-disabled{cursor:default}
.field.is-disabled:focus-visible,.segmented.is-disabled:focus-visible{outline:1px solid #75899f;outline-offset:4px;border-radius:4px}

.canvas-handle-n{left:calc(50% - 6px);top:-6px;cursor:ns-resize}
.canvas-handle-s{left:calc(50% - 6px);bottom:-6px;cursor:ns-resize}
.canvas-handle-e{right:-6px;top:calc(50% - 6px);cursor:ew-resize}
.canvas-handle-w{left:-6px;top:calc(50% - 6px);cursor:ew-resize}

.canvas-guide{position:absolute;z-index:30;pointer-events:none;background:#6ee7d3;box-shadow:0 0 4px #6ee7d380}
.canvas-guide-x{left:50%;top:0;bottom:0;width:1px;transform:translateX(-.5px)}
.canvas-guide-y{top:50%;left:0;right:0;height:1px;transform:translateY(-.5px)}
.canvas-guide[hidden]{display:none}

.canvas-object::before{content:"";position:absolute;inset:calc(-1 * var(--hit-padding,0px)) 0;pointer-events:auto}
.canvas-object[data-canvas-object="title"],.canvas-object[data-canvas-object="subtitle"],.canvas-object[data-canvas-object="detail"]{z-index:2}
.canvas-object.selected{z-index:4}
.canvas-toolbar{flex-wrap:wrap}
.canvas-guide-x,.canvas-guide-y{right:auto;bottom:auto}

.inspector-tabs[hidden],.component-back[hidden]{display:none}
.component-back{margin-bottom:12px;color:var(--accent);font-size:13px}
.component-entry{display:flex;align-items:center;justify-content:space-between;width:100%;padding:12px 14px;margin-top:8px;background:#151f2b;border:1px solid var(--border);border-radius:8px;text-align:left;color:#d5deeb;font-size:14px}
.component-entry:hover{border-color:#68bfb1;background:#192b32}
.component-entry span{font-size:20px;color:#95afa9}

/* Keep resize handles outside the content and spaced apart even for a single letter. */
.canvas-object::before{inset:calc(-1 * var(--hit-padding,0px)) calc(-1 * var(--hit-padding-x,0px))}
.canvas-object.selected,.canvas-object:focus-visible{border-color:transparent;box-shadow:none}
.canvas-object::after{content:"";position:absolute;inset:calc(-1 * var(--handle-pad-y,8px)) calc(-1 * var(--handle-pad-x,8px));border:1px solid transparent;pointer-events:none}
.canvas-object.selected::after,.canvas-object:focus-visible::after{border-color:#8bdace;box-shadow:0 0 0 1px #06191599}
.canvas-handle-nw,.canvas-handle-sw,.canvas-handle-w{left:calc(-1 * var(--handle-pad-x,8px) - 6px)}
.canvas-handle-ne,.canvas-handle-se,.canvas-handle-e{right:calc(-1 * var(--handle-pad-x,8px) - 6px)}
.canvas-handle-nw,.canvas-handle-ne,.canvas-handle-n{top:calc(-1 * var(--handle-pad-y,8px) - 6px)}
.canvas-handle-sw,.canvas-handle-se,.canvas-handle-s{bottom:calc(-1 * var(--handle-pad-y,8px) - 6px)}
.inspector-heading.component-heading{border-bottom:1px solid var(--border);padding-bottom:22px}
.component-back{display:inline-flex;align-items:center;gap:7px;min-height:36px;margin:-4px 0 12px -6px;padding:5px 6px;font-size:15px;line-height:1.5}
.component-back svg{width:22px;height:22px;flex-shrink:0}
.component-back:hover{color:#bafff2}
[data-caption-entry]{cursor:text}
.caption-content{padding-top:20px}

.inspector-heading.component-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.component-heading h2{margin:0;min-width:0}
.component-heading .component-back{flex-shrink:0;margin:0 -6px 0 0}

.caption-color .color-well{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:12px;padding:6px}
#settings-component .caption-color input[type=color]{width:36px;height:36px}
#settings-component .caption-color input[type=text]{height:36px;padding:0;border:0;border-radius:0;font:14px Consolas,monospace;text-align:left}

.canvas-toolbar{gap:8px;margin-bottom:14px}
.canvas-toolbar button{min-height:42px;padding:9px 12px;font-size:14px;font-weight:500;line-height:20px}
[data-caption-entry]:disabled{cursor:default}

.connection-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.connection-heading h2{margin:0;font-size:23px;line-height:1.3}
.connection-heading .icon-button{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;border-radius:8px}
.connection-heading svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
#connect-dialog .connection-steps{margin:0 0 24px;padding:0;font-size:15px;line-height:1.7}
#connect-dialog .connection-steps li{padding-left:38px;margin:16px 0}
#connect-dialog .connection-steps li b{display:inline;font-size:inherit}
#connect-dialog{padding:28px;max-width:520px}
#connect-dialog .dialog-note{margin:0;padding-top:20px;border-top:1px solid var(--border);font-size:14px;line-height:1.65}
@media(min-width:1241px){.center-scroll{height:calc(100% + 20px)}.preview-panel{padding-bottom:0}}

.switch-copy .field-heading{margin-bottom:0;align-items:center}
.switch-copy .field-heading .field-label{font-size:15px;color:inherit}
.section-heading h3:has(.field-info){display:inline-flex;align-items:center;gap:6px}

/* Translated labels may be longer; canvas coordinates always stay left-to-right. */
.language-control{min-width:130px;max-width:180px}
.language-control{min-width:0;max-width:none;flex:0 0 auto}
.language-picker .select-trigger{width:auto;min-width:70px;gap:8px;padding:10px 12px;justify-content:center;border:0;border-radius:6px;background:transparent;box-shadow:none}
.language-picker .select-trigger>svg{width:19px;height:19px;stroke-width:1.6;color:inherit}
.language-picker .select-value{flex:0 0 auto;font-size:13px;font-weight:650;letter-spacing:.3px}
.language-picker .select-trigger[aria-expanded=true]{box-shadow:none}
.language-menu{padding:0;background:#0d111a;border-color:#2a3040;border-radius:10px;box-shadow:0 12px 32px #0008;overscroll-behavior:contain}
.language-menu .select-option{min-height:46px;padding:12px 15px;gap:12px;border-bottom:1px solid #242a36;font-size:14px;font-weight:550}
.language-menu .select-option:last-child{border-bottom:0}
.language-menu .select-option[aria-selected=true]{background:#282039;color:#eee9ff}
.language-menu .select-option.highlighted{background:#242237}
.language-menu .select-option>span:first-of-type{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
.language-flag{width:20px;height:15px;object-fit:cover;border-radius:1px;flex:none;box-shadow:0 0 0 1px #ffffff12}
.language-control .select-trigger{min-height:42px;font-size:14px}
.app-header{height:auto;min-height:84px;padding-block:14px;flex-wrap:wrap;gap:16px}
.header-actions{flex-wrap:wrap;justify-content:flex-end}
.inspector-tabs button{min-width:0;overflow-wrap:anywhere;white-space:normal;line-height:1.45;padding:12px 4px}
.stage,.timeline-control,.color-well,code,[data-path="id"]{direction:ltr}
.template-card,.text-button{text-align:start}
.timing-strip{flex-wrap:wrap;row-gap:12px}
.timing-strip>div{min-width:95px}
.field-label,.section-heading h3,.switch-copy,.button{overflow-wrap:anywhere}
[dir=rtl] .header-actions{margin-left:0;margin-right:auto}
[dir=rtl] .catalog-panel{border-right:0;border-left:1px solid var(--border)}
[dir=rtl] .inspector-panel{border-left:0;border-right:1px solid var(--border)}
[dir=rtl] .select-menu{text-align:right}
[dir=rtl] .component-back svg{transform:scaleX(-1)}
@media(max-width:760px){.app-header{padding-inline:14px}.header-actions{width:100%;justify-content:flex-start;gap:7px}.header-actions .button{flex:1;min-width:120px;padding:8px}.language-control{max-width:none;flex:1;min-width:130px}.header-divider{display:none}}
@media(max-width:760px){.header-actions .language-control{min-width:0;flex:0 0 auto}}

/* Narrow screens keep dialog text readable and all actions reachable. */
@media(max-width:480px){
    .colors-row{display:grid;grid-template-columns:minmax(0,1fr)}
    .timing-strip>div{min-width:0;overflow-wrap:anywhere}
    .timing-strip b{white-space:normal}
    dialog,#connect-dialog{padding:20px}
    .dialog-heading,.connection-heading{gap:12px;margin-bottom:18px}
    dialog h2,.connection-heading h2{font-size:23px;min-width:0}
    dialog code{overflow-wrap:anywhere;white-space:normal}
    dialog li{padding-left:32px}
    .cookie-category{align-items:flex-start;flex-direction:column;gap:10px;padding:18px 0}
    .cookie-actions{width:100%;min-width:0}
    .cookie-actions .button{width:100%;height:auto;min-height:44px;padding:10px 12px;white-space:normal;text-align:center;justify-content:center}
    .cookie-banner{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
    .footer-link-group{min-width:0;overflow-wrap:anywhere}
    .footer-links a,.footer-links button{max-width:100%}
    .footer-links a span{min-width:0}
}
