:root{color-scheme:light;--shell-bg:#f5f5f5;--shell-panel:#ffffff;--shell-text:#18181b;--shell-muted:#62626b;--shell-line:#dedee3;--shell-accent:#995400;--shell-tint:#fff4df;--shell-danger:#b42318;--shell-shadow:0 16px 48px #18181b26}
:root[data-theme="dark"]{color-scheme:dark;--shell-bg:#101012;--shell-panel:#18181b;--shell-text:#fafafa;--shell-muted:#a1a1aa;--shell-line:#34343a;--shell-accent:#fbbf24;--shell-tint:#322719;--shell-danger:#fca5a5;--shell-shadow:0 16px 48px #00000066}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%;margin:0;background:var(--shell-bg);color:var(--shell-text)}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;line-height:1.5;overflow:hidden;-webkit-text-size-adjust:100%}
button,a,input{touch-action:manipulation}
button{font:inherit;color:inherit;cursor:pointer}
button:disabled{cursor:wait;opacity:.65}
a{color:var(--shell-accent)}
button:focus-visible,a:focus-visible{outline:3px solid var(--shell-accent);outline-offset:3px}
svg{width:18px;height:18px;flex-shrink:0}
.workspace-shell{height:100dvh;height:100svh;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
@supports(height:100dvh){.workspace-shell{height:100dvh}}
.workspace-header{--shell-accent:#fbbf24;color-scheme:dark;display:flex;align-items:center;gap:24px;min-height:86px;padding:12px 24px;background:#18181b;color:#fafafa;border-bottom:1px solid #303035;flex-shrink:0;position:relative;z-index:2}
.workspace-brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-size:22px;font-weight:700;letter-spacing:-.6px;color:#fafafa;flex-shrink:0;min-height:54px;border-right:1px solid #303035;padding-right:24px}
.workspace-brand img{object-fit:contain;flex-shrink:0}
.builder-tabs{display:flex;align-items:center;gap:8px;min-width:0}
.builder-tab,.tool-menu-button,.projects-button,.all-apps-button,.desktop-mode-button{border:1px solid transparent;border-radius:12px;background:transparent;display:flex;align-items:center;justify-content:center;gap:9px;min-height:50px;padding:11px 14px;font-size:15px;font-weight:550;white-space:nowrap}
.builder-tab{position:relative;width:56px;height:58px;padding:9px;flex-shrink:0}
.app-logo{display:block;width:34px;height:34px;object-fit:contain;flex-shrink:0}
.builder-tab:hover,.projects-button:hover,.all-apps-button:hover,.desktop-mode-button:hover,.tool-menu-button:hover{background:#252529}
.builder-tab[aria-pressed="true"]{background:#322919;border-color:#766037;box-shadow:inset 0 0 0 1px #fbbf240a}
.builder-tab[aria-pressed="true"]:after{content:"";position:absolute;width:16px;height:3px;background:#fbbf24;border-radius:3px;bottom:4px;left:calc(50% - 8px)}
.header-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}
.projects-button,.all-apps-button{border-color:#343438}
.header-actions>button>svg{width:21px;height:21px}
.desktop-mode-button{border-left:1px solid #343438;border-radius:0;margin-left:6px;padding-left:20px;padding-right:0}
.desktop-mode-button .desktop-arrow{width:15px;height:15px;color:#a1a1aa;margin-left:2px}
.project-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;background:#0e0e10;color:#b4b4be;border-radius:5px;font-size:12px;font-variant-numeric:tabular-nums}
.upgrade-link{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:9px 12px;background:var(--shell-tint);border:1px solid var(--shell-line);border-radius:8px;color:var(--shell-accent);font-size:14px;font-weight:550;text-decoration:none}
.upgrade-link:hover{border-color:var(--shell-accent)}
.build-badge{font-size:12px;color:var(--shell-accent);display:flex;align-items:center;gap:5px}
.build-badge:before,.busy-dot{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--shell-accent);flex-shrink:0}
.builder-tab .build-badge{position:absolute;top:5px;right:5px;font-size:0;gap:0}
.builder-tab .build-badge:before{width:7px;height:7px;box-shadow:0 0 0 2px #18181b}
.tool-menu-button{display:none;border-color:#343438;max-width:210px;min-width:0}
#activeToolName{overflow:hidden;text-overflow:ellipsis}
.icon-button:hover{background:var(--shell-bg)}
.tool-menu-item[aria-pressed="true"]{color:var(--shell-accent);background:var(--shell-tint)}
.demo-notice{display:flex;align-items:center;gap:10px;flex-shrink:0;min-height:39px;padding:8px 22px;border-bottom:1px solid var(--shell-line);background:var(--shell-panel)}
.demo-label{font-size:12px;color:var(--shell-accent);background:var(--shell-tint);border-radius:5px;padding:2px 7px;font-weight:600;flex-shrink:0}
.demo-notice-copy{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;font-size:13px;line-height:1.4;min-width:0;color:var(--shell-muted)}
#demoSummary{color:var(--shell-text);overflow-wrap:anywhere}
.demo-notice[data-urgent="true"]{background:var(--shell-tint)}
.demo-notice[data-expired="true"] #demoSummary{color:var(--shell-danger)}
.builder-workspace{flex:1;min-height:0;position:relative}
.builder-panel{position:absolute;inset:0;background:var(--shell-bg)}
.builder-frame{display:block;width:100%;height:100%;border:0;background:var(--shell-bg)}
.builder-loading{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;padding:30px;text-align:center;background:var(--shell-bg)}
.builder-loading strong{font-size:17px;font-weight:550}
.builder-loading p{font-size:14px;color:var(--shell-muted);max-width:360px;margin:0}
.loading-ring{width:28px;height:28px;border:2px solid var(--shell-line);border-top-color:var(--shell-accent);border-radius:50%;animation:workspace-spin .9s linear infinite;margin-bottom:5px}
.builder-loading[data-error="true"] .loading-ring{display:none}
@keyframes workspace-spin{to{transform:rotate(360deg)}}
.workspace-dialog{color:var(--shell-text);background:var(--shell-panel);border:1px solid var(--shell-line);padding:0;border-radius:14px;box-shadow:var(--shell-shadow);max-width:calc(100% - 28px);max-height:calc(100dvh - 100px);overflow:auto;overscroll-behavior:contain}
.workspace-dialog::backdrop{background:#00000026}
.projects-dialog{width:390px;margin:98px 24px 0 auto}
.tool-dialog{width:380px;margin:98px 24px 0 auto}
.upgrade-dialog{width:410px;margin:auto}
.dialog-content{padding:18px}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dialog-heading h2{font-size:18px;font-weight:600;letter-spacing:-.3px;margin:0}
.icon-button{display:flex;align-items:center;justify-content:center;background:transparent;border:0;border-radius:7px;min-width:44px;min-height:44px}
.projects-description{font-size:14px;color:var(--shell-muted);margin:2px 0 15px}
.projects-list{display:flex;flex-direction:column;gap:5px}
.projects-empty{padding:22px 5px;text-align:center;font-size:14px;color:var(--shell-muted);margin:0}
.project-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:1px solid transparent;border-radius:9px;background:transparent;padding:12px;min-height:66px}
.project-item:hover,.project-item:active{background:var(--shell-bg);border-color:var(--shell-line)}
.project-icon{width:36px;height:36px;background:var(--shell-tint);color:var(--shell-accent);border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.project-copy{flex:1;min-width:0}
.project-name{display:block;font-size:14px;font-weight:550;overflow-wrap:anywhere}
.project-meta{display:block;font-size:12px;color:var(--shell-muted);margin-top:3px}
.project-create-actions{display:flex;gap:8px;border-top:1px solid var(--shell-line);padding-top:16px;margin-top:16px}
.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;min-height:44px;border:1px solid var(--shell-line);border-radius:8px;background:var(--shell-panel);font-size:14px}
.secondary-button:hover,.secondary-button:active{background:var(--shell-bg);border-color:var(--shell-accent)}
.project-create-actions .secondary-button{flex:1}
.tool-menu-list{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.tool-menu-item{display:flex;align-items:center;gap:12px;width:100%;min-height:65px;background:transparent;border:0;border-radius:9px;text-align:left;padding:12px}
.tool-menu-item:hover{background:var(--shell-bg)}
.tool-menu-item>span:first-of-type{flex:1}
.tool-menu-item small{display:block;font-size:13px;color:var(--shell-muted);margin-top:2px}
.tool-lock{color:var(--shell-muted);width:16px;height:16px}
.upgrade-emblem{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;background:var(--shell-tint);color:var(--shell-accent);margin:18px 0}
.upgrade-emblem svg{width:23px;height:23px}
.upgrade-description{font-size:16px;margin:0 0 8px}
.upgrade-detail{font-size:14px;color:var(--shell-muted);margin:0 0 24px}
.upgrade-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.dialog-footer{margin-top:15px;padding-top:15px;border-top:1px solid var(--shell-line)}
.dialog-footer a{display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:14px;text-decoration:none}
.workspace-toast{position:fixed;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:10;background:var(--shell-panel);color:var(--shell-text);border:1px solid var(--shell-line);box-shadow:var(--shell-shadow);border-radius:10px;padding:12px 18px;max-width:min(480px,calc(100% - 28px));font-size:14px;overflow-wrap:anywhere}
.noscript-notice{position:fixed;inset:100px 20px auto;padding:24px;background:var(--shell-panel);z-index:3}
@media(max-width:1250px){.workspace-header{gap:18px;padding:10px 18px;min-height:80px}.workspace-brand{padding-right:18px}.workspace-brand span,.desktop-mode-button .action-label,.desktop-mode-button .desktop-arrow{display:none}.desktop-mode-button{padding:10px 8px 10px 16px;min-width:54px}.builder-tabs{gap:6px}.projects-dialog,.tool-dialog{margin-top:90px}}
@media(max-width:1000px){.workspace-header{gap:12px;padding:10px 14px}.workspace-brand{padding-right:12px}.builder-tabs{gap:4px}.builder-tab{width:48px;height:54px;padding:7px}.header-actions{gap:6px}.all-apps-button,.projects-button{padding:10px;font-size:14px}.desktop-mode-button{margin-left:0;padding-left:12px;min-width:46px}.demo-notice{padding:8px 14px}}
@media(max-width:800px){.workspace-header{padding:8px 12px;gap:10px;min-height:66px}.builder-tabs,.all-apps-button{display:none}.tool-menu-button{display:flex;min-height:44px;padding:9px 12px;font-size:14px}.workspace-brand{border:0;padding:0;min-height:44px}.workspace-brand img{width:32px;height:32px}.header-actions{gap:6px}.projects-button{min-height:44px}.desktop-mode-button{min-height:44px}.project-count{display:none}.demo-notice{padding:7px 12px;gap:8px}.demo-notice-copy{font-size:13px;gap:3px 8px}.workspace-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:75dvh;margin:0;border-radius:16px 16px 0 0;border-bottom:0}.dialog-content{padding:16px 16px calc(16px + env(safe-area-inset-bottom))}.workspace-toast{bottom:calc(18px + env(safe-area-inset-bottom))}}
@media(max-width:480px){.workspace-header{gap:8px;padding:8px}.projects-button .action-label{display:none}.projects-button{width:44px;padding:10px}.desktop-mode-button{border:0;border-radius:12px;padding:10px;width:44px;min-width:44px}.tool-menu-button{padding:9px;font-size:13px;gap:6px;max-width:150px}.header-actions{gap:3px}.demo-notice{padding:7px 8px}}
@media(prefers-reduced-motion:reduce){.loading-ring{animation:none}}
