*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;overflow:hidden}:root{--bg: #0a0a0a;--surface: #111;--border: #1e1e1e;--border-hover: #333;--text: #c8c8c8;--text-muted: #555;--accent: #b8944a;--font-ui: "Bricolage Grotesque", system-ui, sans-serif;--bar-h: 38px}body{background:var(--bg);color:var(--text);font-family:var(--font-ui)}#app{height:100vh;width:100vw}#workspace{display:flex;height:100%}#topbar{display:flex;align-items:center;height:var(--bar-h);padding:0 14px;border-bottom:1px solid var(--border);background:var(--surface);gap:8px;flex-shrink:0;user-select:none;-webkit-user-select:none;position:relative}.toolbar-title{display:flex;align-items:center;font-size:.65rem;font-weight:500;letter-spacing:.1em;color:var(--text-muted)}.dot{width:6px;height:6px;background:var(--accent);border-radius:50%;margin-right:8px;flex-shrink:0}.toolbar-spacer{flex:1}#topbar button{font-family:var(--font-ui);font-size:.6rem;font-weight:500;letter-spacing:.05em;text-transform:lowercase;color:var(--text-muted);background:transparent;border:none;padding:4px 10px;cursor:pointer;transition:color .15s;white-space:nowrap}#topbar button:hover{color:var(--text)}.templates-dropdown{position:absolute;top:100%;z-index:20;min-width:160px;background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:4px 0;display:flex;flex-direction:column;box-shadow:0 8px 24px #0006}.templates-dropdown button{font-family:var(--font-ui);font-size:.6rem;font-weight:500;letter-spacing:.03em;text-transform:lowercase;color:var(--text-muted);background:transparent;border:none;padding:6px 14px;cursor:pointer;text-align:left;transition:color .15s,background .15s;white-space:nowrap}.templates-dropdown button:hover{color:var(--text);background:#ffffff0a}#save-status{font-size:.55rem;font-weight:500;letter-spacing:.05em;text-transform:lowercase;color:var(--accent);opacity:0;transition:opacity .3s ease;pointer-events:none}#save-status.visible{opacity:1}#editor-pane{display:flex;flex-direction:column;width:var(--split, 45%);flex-shrink:0;min-width:240px;background:var(--surface);overflow:hidden;transition:width .3s cubic-bezier(.4,0,.2,1),min-width .3s cubic-bezier(.4,0,.2,1)}#editor-pane.no-transition{transition:none}#editor-pane.collapsed{width:0!important;min-width:0!important}#editor-mount{flex:1;overflow:hidden;min-height:0}#divider{width:1px;background:var(--border);flex-shrink:0;cursor:col-resize;position:relative;z-index:2;transition:background .15s,width .2s,opacity .2s}#divider:before{content:"";position:absolute;top:0;right:-5px;bottom:0;left:-5px}#divider:hover,#divider.active{background:var(--accent)}#divider.hidden{opacity:0;pointer-events:none;width:0}#expand-btn{position:fixed;top:12px;left:12px;z-index:10;display:flex;align-items:center;gap:6px;font-family:var(--font-ui);font-size:.6rem;font-weight:500;letter-spacing:.08em;text-transform:lowercase;color:var(--text-muted);background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:5px 12px;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .25s ease,color .15s,border-color .15s}#expand-btn.visible{opacity:1;pointer-events:auto}#expand-btn:hover{color:var(--text);border-color:var(--border-hover)}#expand-btn .dot{margin-right:0}#preview-pane{flex:1;display:flex;flex-direction:column;min-width:200px;background:var(--bg)}#preview{flex:1;width:100%;border:none;background:#fff}#console-panel{display:flex;flex-direction:column;flex-shrink:0;height:180px;background:var(--surface);border-top:1px solid var(--border);overflow:hidden;transition:height .2s cubic-bezier(.4,0,.2,1)}#console-panel.collapsed{height:30px}#console-bar{display:flex;align-items:center;height:30px;padding:0 14px;gap:8px;flex-shrink:0;user-select:none;-webkit-user-select:none;cursor:pointer;transition:background .15s}#console-bar:hover{background:#ffffff05}.console-title{display:flex;align-items:center;font-size:.6rem;font-weight:500;letter-spacing:.1em;color:var(--text-muted)}.console-dot{width:5px;height:5px;background:#6a9955;border-radius:50%;margin-right:7px;flex-shrink:0;transition:background .3s}#console-panel.has-errors .console-dot{background:#e06c75}#console-badge{font-size:.5rem;font-weight:600;letter-spacing:.04em;color:var(--bg);background:var(--text-muted);border-radius:8px;padding:1px 5px;min-width:14px;text-align:center;opacity:0;transition:opacity .2s,background .3s}#console-badge.visible{opacity:1}#console-badge.has-errors{background:#e06c75}@keyframes console-pulse{0%{transform:scale(1)}50%{transform:scale(1.25)}to{transform:scale(1)}}#console-badge.pulse{animation:console-pulse .3s ease}#console-bar button{font-family:var(--font-ui);font-size:.55rem;font-weight:500;letter-spacing:.05em;text-transform:lowercase;color:var(--text-muted);background:transparent;border:none;padding:3px 8px;cursor:pointer;transition:color .15s;white-space:nowrap}#console-bar button:hover{color:var(--text)}#console-output{flex:1;overflow-y:auto;padding:4px 0;font-family:Consolas,Courier New,monospace;font-size:.68rem;line-height:1.55;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.07) transparent}#console-output::-webkit-scrollbar{width:5px}#console-output::-webkit-scrollbar-track{background:transparent}#console-output::-webkit-scrollbar-thumb{background:#ffffff12;border-radius:3px}.console-entry{display:flex;align-items:baseline;gap:8px;padding:1px 14px;border-bottom:1px solid rgba(255,255,255,.02)}.console-entry:hover{background:#ffffff04}.console-label{flex-shrink:0;width:12px;text-align:center;font-size:.6rem}.console-msg{white-space:pre-wrap;word-break:break-all;min-width:0}.console-log{color:var(--text)}.console-log .console-label{color:var(--text-muted)}.console-info{color:#7cacf8}.console-info .console-label{color:#5a8ad8}.console-warn{color:#d4a855;background:#d4a8550a}.console-warn .console-label{color:#c49a3c}.console-error{color:#e06c75;background:#e06c750d}.console-error .console-label{color:#d45d68}#console-input-row{display:flex;align-items:center;gap:6px;padding:0 14px;height:28px;flex-shrink:0;border-top:1px solid var(--border);background:#ffffff03}.console-input-chevron{color:var(--text-muted);font-family:Consolas,Courier New,monospace;font-size:.7rem;flex-shrink:0}#console-input{flex:1;background:transparent;border:none;outline:none;color:var(--text);font-family:Consolas,Courier New,monospace;font-size:.68rem;line-height:28px}#console-input::placeholder{color:var(--text-muted);opacity:.5}#editor-mount .cm-editor{height:100%}#editor-mount .cm-editor,#editor-mount .cm-scroller{background:transparent!important}#editor-mount .cm-gutters{background:var(--surface)!important;border-right:1px solid var(--border)}#editor-mount .cm-activeLine{background-color:#ffffff06!important}#editor-mount .cm-activeLineGutter{background-color:#ffffff09!important}#editor-mount .cm-selectionBackground,#editor-mount .cm-editor.cm-focused .cm-selectionBackground{background:#b8944a2e!important}#editor-mount .cm-cursor{border-left-color:var(--accent)!important}#editor-mount ::-webkit-scrollbar{width:5px;height:5px}#editor-mount ::-webkit-scrollbar-track{background:transparent}#editor-mount ::-webkit-scrollbar-thumb{background:#ffffff12;border-radius:3px}#editor-mount ::-webkit-scrollbar-thumb:hover{background:#ffffff24}#editor-mount ::-webkit-scrollbar-corner{background:transparent}#editor-mount .cm-scroller{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.07) transparent}#share-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;align-items:center;justify-content:center;background:#0009}.share-modal-card{width:min(440px,90vw);background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:1.25rem;display:flex;flex-direction:column;gap:.75rem}.share-modal-header{display:flex;align-items:center;justify-content:space-between;font-family:var(--font-ui);font-size:.7rem;font-weight:500;letter-spacing:.05em;text-transform:lowercase;color:var(--text-muted)}.share-modal-close{background:none;border:none;color:var(--text-muted);font-size:1.1rem;cursor:pointer;padding:0 4px;line-height:1;transition:color .15s}.share-modal-close:hover{color:var(--text)}.share-modal-input{width:100%;padding:.45rem .6rem;font:400 .7rem Consolas,Courier New,monospace;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:4px;outline:none;transition:border-color .15s}.share-modal-input:focus{border-color:var(--border-hover)}.share-modal-copy{align-self:flex-end;padding:.35rem .9rem;font-family:var(--font-ui);font-size:.6rem;font-weight:500;letter-spacing:.05em;text-transform:lowercase;color:var(--text);background:transparent;border:1px solid var(--border);border-radius:4px;cursor:pointer;transition:border-color .15s,color .15s}.share-modal-copy:hover{border-color:var(--border-hover)}#mobile-tabs{display:none;position:fixed;bottom:0;left:0;right:0;z-index:50;height:48px;background:var(--surface);border-top:1px solid var(--border);padding:0}.mobile-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;font-family:var(--font-ui);font-size:.65rem;font-weight:500;letter-spacing:.08em;text-transform:lowercase;color:var(--text-muted);background:none;border:none;cursor:pointer;position:relative;transition:color .2s;-webkit-tap-highlight-color:transparent}.mobile-tab.active{color:var(--accent)}.mobile-tab.active:after{content:"";position:absolute;top:0;left:20%;right:20%;height:2px;background:var(--accent);border-radius:0 0 2px 2px}.mobile-tab-icon{font-size:.85rem;line-height:1}@media (max-width: 768px){#mobile-tabs{display:flex}#workspace{flex-direction:column;padding-bottom:48px}#editor-pane{width:100%!important;min-width:0!important;flex-shrink:1;flex:1;transition:none}#editor-pane.collapsed,#divider{display:none}#preview-pane{min-width:0;flex:1}#preview-pane.mobile-hidden{display:none}#expand-btn{display:none!important}#workspace.mobile-show-preview #editor-pane{display:none}#workspace.mobile-show-preview #preview-pane{display:flex}#workspace:not(.mobile-show-preview):not(.mobile-show-console) #preview-pane{display:none}#workspace:not(.mobile-show-preview):not(.mobile-show-console) #editor-pane{display:flex}#workspace:not(.mobile-show-console) #console-panel{display:none}#workspace.mobile-show-console #editor-pane{display:flex}#workspace.mobile-show-console #preview-pane,#workspace.mobile-show-console #topbar,#workspace.mobile-show-console #editor-mount{display:none}#workspace.mobile-show-console #console-panel{display:flex;height:auto!important;flex:1;flex-shrink:1;border-top:none}.templates-dropdown{left:4px;right:4px;min-width:auto}#topbar{padding:0 10px;gap:4px;min-height:var(--bar-h);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}#topbar::-webkit-scrollbar{display:none}#topbar button{padding:4px 8px;font-size:.55rem}#code-toggle{display:none!important}}
