.auth-page{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:1rem;background:var(--app-bg)}.auth-card{width:100%;max-width:400px;background:var(--app-surface);border:1px solid var(--app-border);border-radius:8px;padding:2rem}.auth-title{font-size:1.25rem;font-weight:600;margin:0 0 .25rem;text-align:center;color:var(--app-text)}.auth-subtitle{font-size:1rem;font-weight:400;margin:0 0 1.5rem;text-align:center;color:var(--app-text-secondary)}.auth-form{display:flex;flex-direction:column;gap:1rem}.auth-label{display:flex;flex-direction:column;gap:.25rem;font-size:.875rem;font-weight:500;color:var(--app-text-secondary)}.auth-input{padding:.5rem .75rem;font-size:.9375rem;border:1px solid var(--app-input-border);border-radius:4px;background:var(--app-input-bg);color:var(--app-text);font-family:inherit;line-height:1.5}.auth-input:focus{outline:2px solid var(--app-accent);outline-offset:-1px;border-color:var(--app-accent)}.auth-input:disabled{opacity:.6;cursor:not-allowed}.auth-button{margin-top:.5rem;padding:.625rem 1rem;font-size:.9375rem;font-weight:500;font-family:inherit;border:none;border-radius:4px;background:var(--app-accent);color:var(--app-accent-text);cursor:pointer;line-height:1.5}.auth-button:hover:not(:disabled){opacity:.9}.auth-button:disabled{opacity:.6;cursor:not-allowed}.auth-error{padding:.625rem .75rem;margin-bottom:.5rem;font-size:.875rem;border-radius:4px;background:var(--app-error-bg);border:1px solid var(--app-error-border);color:var(--app-error-text)}.auth-success{padding:.625rem .75rem;margin-bottom:.5rem;font-size:.875rem;border-radius:4px;background:var(--app-success-bg);border:1px solid var(--app-success-border);color:var(--app-success-text)}.auth-footer{margin:1.25rem 0 0;text-align:center;font-size:.875rem;color:var(--app-text-secondary)}.auth-footer a{color:var(--app-accent);text-decoration:none}.auth-footer a:hover{text-decoration:underline}.auth-loading{display:flex;align-items:center;justify-content:center;min-height:100vh;color:var(--app-text-secondary);font-size:.9375rem}.toast-container{position:fixed;bottom:1rem;right:1rem;z-index:9999;display:flex;flex-direction:column;gap:.5rem;max-width:400px;pointer-events:none}.toast{display:flex;align-items:center;gap:.5rem;padding:.6rem .75rem;border-radius:6px;font-size:.85rem;line-height:1.4;box-shadow:0 4px 16px #00000026;pointer-events:auto;animation:toast-slide-in .25s ease-out}@keyframes toast-slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.toast--success{background:var(--app-success-bg, #e6f4ea);border:1px solid var(--app-success-chip-border, #34a853);color:var(--app-success-text, #1e7e34)}.toast--error{background:var(--app-error-bg, #fde8e8);border:1px solid var(--app-error-border, #e53e3e);color:var(--app-error-text, #c53030)}.toast--info{background:var(--app-info-bg, #e8f0fe);border:1px solid var(--app-info-border, #4285f4);color:var(--app-info-text, #1a73e8)}[data-theme=dark] .toast--success{background:#1a3a2a;border-color:#2e7d32;color:#81c784}[data-theme=dark] .toast--error{background:#3a1a1a;border-color:#c53030;color:#ef9a9a}[data-theme=dark] .toast--info{background:#1a2a3a;border-color:#1565c0;color:#90caf9}.toast-icon{font-weight:700;font-size:.95rem;flex-shrink:0}.toast-message{flex:1;word-break:break-word}.toast-dismiss{flex-shrink:0;border:none;background:none;font-size:1.1rem;line-height:1;cursor:pointer;padding:0 .15rem;color:inherit;opacity:.6}.toast-dismiss:hover{opacity:1}.top-nav{display:flex;align-items:center;height:48px;padding:0 1rem;border-bottom:1px solid var(--app-border);background:var(--app-surface);box-shadow:0 1px 3px #0000000a;gap:1rem;z-index:50}.top-nav-left{flex-shrink:0}.top-nav-logo{font-size:1.05rem;font-weight:700;color:var(--app-text);text-decoration:none;letter-spacing:-.01em}.top-nav-logo:hover{color:var(--app-accent)}.top-nav-center{flex:1}.top-nav-right{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.top-nav-link{font-size:.85rem;font-weight:500;color:var(--app-text-secondary);text-decoration:none;padding:.3rem .6rem;border-radius:6px;transition:color .15s,background .15s}.top-nav-link:hover{color:var(--app-text);background:var(--app-nav-active)}.top-nav-link.active{color:var(--app-accent);background:var(--app-nav-active)}.top-nav-menu{position:relative}.top-nav-menu-btn{font-size:.85rem;font-weight:500;font-family:inherit;padding:.3rem .6rem;border:1px solid var(--app-border);border-radius:6px;background:var(--app-surface);color:var(--app-text-secondary);cursor:pointer;transition:color .15s,background .15s,border-color .15s}.top-nav-menu-btn:hover{background:var(--app-nav-active);color:var(--app-text);border-color:var(--app-text-muted)}.top-nav-dropdown{position:absolute;top:calc(100% + 6px);right:0;min-width:170px;background:var(--app-surface);border:1px solid var(--app-border);border-radius:8px;box-shadow:0 6px 20px #0000001f;z-index:100;padding:4px 0;animation:dropdown-fade-in .12s ease-out}@keyframes dropdown-fade-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}[data-theme=dark] .top-nav-dropdown{box-shadow:0 6px 24px #00000059}.top-nav-dropdown-item{display:block;width:100%;padding:.5rem .75rem;font-size:.85rem;font-family:inherit;text-align:left;border:none;background:none;color:var(--app-text);cursor:pointer;transition:background .1s}.top-nav-dropdown-item:hover:not(:disabled){background:var(--app-nav-active)}.top-nav-dropdown-item:disabled{color:var(--app-text-muted);cursor:not-allowed}.top-nav-dropdown-danger{color:var(--app-error-text)}.top-nav-dropdown-danger:hover{background:var(--app-error-bg)}.authenticated-layout{min-height:100vh;display:flex;flex-direction:column}.authenticated-content{flex:1;max-width:1040px;width:100%;margin:0 auto;padding:1rem}.authenticated-content:has(.builder-page),.authenticated-content:has(.editor-shell){max-width:none;padding:0}.home-page{padding-bottom:2rem}.home-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem}.home-heading{margin:0;font-size:1.25rem}.home-new-btn{padding:.5rem 1rem;font-size:.9rem;font-weight:600;font-family:inherit;color:var(--app-accent-text);background:var(--app-accent);border:none;border-radius:6px;cursor:pointer}.home-new-btn:hover{opacity:.9}.skeleton-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:.75rem}.skeleton-card{height:160px;border-radius:8px;background:var(--app-surface);border:1px solid var(--app-border);animation:skeleton-pulse 1.5s ease-in-out infinite}@keyframes skeleton-pulse{0%,to{opacity:.6}50%{opacity:.3}}.home-error{text-align:center;padding:2rem;color:var(--app-error-text);background:var(--app-error-bg);border:1px solid var(--app-error-border);border-radius:8px}.home-error p{margin:0 0 .75rem}.home-retry-btn{padding:.4rem 1rem;font-size:.85rem;font-weight:600;font-family:inherit;color:var(--app-accent-text);background:var(--app-accent);border:none;border-radius:4px;cursor:pointer}.home-empty{text-align:center;padding:4rem 2rem;border:2px dashed var(--app-border);border-radius:12px;background:var(--app-surface)}.home-empty-icon{font-size:2.5rem;margin-bottom:.75rem;opacity:.6}.home-empty-title{margin:0 0 .5rem;font-size:1.1rem;color:var(--app-text)}.home-empty-desc{margin:0 0 1.25rem;color:var(--app-text-muted);font-size:.9rem}.home-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:.75rem}.project-card{position:relative;display:flex;flex-direction:column;background:var(--app-surface);border:1px solid var(--app-border);border-radius:8px;overflow:hidden;cursor:pointer;transition:border-color .15s,box-shadow .15s}.project-card:hover{border-color:var(--app-accent);box-shadow:0 2px 8px #00000014}.project-card-thumb{height:80px;display:flex;align-items:center;justify-content:center}.project-card-thumb-text{font-size:1.35rem;font-weight:700;color:#ffffffbf;letter-spacing:.05em;text-shadow:0 1px 2px rgba(0,0,0,.15)}.project-card-body{padding:.75rem;flex:1}.project-card-name{font-weight:600;font-size:.9rem;margin-bottom:.25rem;color:var(--app-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-card-meta{font-size:.78rem;color:var(--app-text-secondary);margin-bottom:.15rem}.project-card-time{font-size:.75rem;color:var(--app-text-muted)}.project-card-rename-input{width:100%;padding:.25rem .4rem;font-size:.9rem;font-family:inherit;border:1px solid var(--app-accent);border-radius:3px;background:var(--app-input-bg);color:var(--app-text);outline:none;margin-bottom:.25rem}.project-card-menu{position:absolute;top:.4rem;right:.4rem}.project-card-menu-btn{width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:1.1rem;font-family:inherit;line-height:1;border:none;border-radius:4px;background:#00000040;color:#fffc;cursor:pointer}.project-card-menu-btn:hover{background:#00000073}.project-card-dropdown{position:absolute;top:calc(100% + 2px);right:0;min-width:130px;background:var(--app-surface);border:1px solid var(--app-border);border-radius:6px;box-shadow:0 4px 12px #0000001f;z-index:50;padding:4px 0}.project-card-dropdown-item{display:block;width:100%;padding:.4rem .75rem;font-size:.82rem;font-family:inherit;text-align:left;border:none;background:none;color:var(--app-text);cursor:pointer}.project-card-dropdown-item:hover{background:var(--app-nav-active)}.project-card-dropdown-danger{color:var(--app-error-text)}.project-card-dropdown-danger:hover{background:var(--app-error-bg)}.modal-backdrop{position:fixed;inset:0;z-index:200;background:#00000080;display:flex;align-items:center;justify-content:center;padding:1rem}.modal-card{width:100%;max-width:520px;max-height:80vh;overflow-y:auto;background:var(--app-surface);border:1px solid var(--app-border);border-radius:10px;box-shadow:0 8px 32px #0003}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem .5rem}.modal-title{margin:0;font-size:1.1rem}.modal-close{font-size:1.5rem;line-height:1;border:none;background:none;color:var(--app-text-muted);cursor:pointer;padding:0 .25rem}.modal-close:hover{color:var(--app-text)}.modal-error{margin:.5rem 1.25rem;padding:.5rem .75rem;font-size:.85rem;border-radius:4px;background:var(--app-error-bg);border:1px solid var(--app-error-border);color:var(--app-error-text)}.modal-body{padding:.75rem 1.25rem 1.25rem}.modal-hint{margin:0 0 .75rem;font-size:.85rem;color:var(--app-text-secondary)}.modal-label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;font-weight:500;color:var(--app-text-secondary);margin-bottom:1rem}.modal-input{padding:.5rem .75rem;font-size:.9rem;font-family:inherit;border:1px solid var(--app-input-border);border-radius:4px;background:var(--app-input-bg);color:var(--app-text)}.modal-input:focus{outline:2px solid var(--app-accent);outline-offset:-1px}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem}.modal-btn-primary{padding:.5rem 1rem;font-size:.9rem;font-weight:600;font-family:inherit;color:var(--app-accent-text);background:var(--app-accent);border:none;border-radius:4px;cursor:pointer}.modal-btn-primary:hover:not(:disabled){opacity:.9}.modal-btn-primary:disabled{opacity:.5;cursor:not-allowed}.modal-btn-secondary{padding:.5rem 1rem;font-size:.9rem;font-weight:500;font-family:inherit;color:var(--app-text-secondary);background:transparent;border:1px solid var(--app-border);border-radius:4px;cursor:pointer}.modal-btn-secondary:hover:not(:disabled){background:var(--app-nav-active)}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.5rem}.template-option{display:flex;flex-direction:column;padding:0;border:1px solid var(--app-border);border-radius:6px;background:var(--app-bg);cursor:pointer;text-align:left;overflow:hidden;font-family:inherit;transition:border-color .15s}.template-option:hover{border-color:var(--app-accent)}.template-option-swatch{height:40px;background:var(--app-accent);display:flex;align-items:center;justify-content:center}.template-option-initials{font-size:.9rem;font-weight:700;color:#ffffffbf;letter-spacing:.05em;text-shadow:0 1px 2px rgba(0,0,0,.15)}.template-option-swatch-custom{background:#478570}.template-option-name{padding:.5rem .6rem .15rem;font-weight:600;font-size:.85rem;color:var(--app-text)}.template-option-desc{padding:0 .6rem .5rem;font-size:.75rem;color:var(--app-text-muted)}.home-loading{animation:fade-in .2s ease}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.project-card--busy{opacity:.5;pointer-events:none}.editor-shell{display:flex;flex-direction:column;height:calc(100vh - 48px);overflow:hidden}.editor-shell-header{display:flex;align-items:center;gap:.75rem;padding:.5rem .75rem;border-bottom:1px solid var(--app-border);background:var(--app-surface);flex-shrink:0;min-height:48px}.editor-shell-body{display:flex;flex:1;min-height:0;overflow:hidden}.editor-shell-left{display:flex;flex-direction:column;flex-shrink:0;min-width:300px;border-right:1px solid var(--app-border);background:var(--app-surface);overflow:hidden}.editor-shell-tabs{display:flex;gap:0;border-bottom:1px solid var(--app-border);background:var(--app-surface-alt, var(--app-bg));flex-shrink:0;overflow-x:auto}.editor-shell-tab{position:relative;padding:.5rem .85rem;font-size:.82rem;font-weight:500;font-family:inherit;color:var(--app-text-muted);background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap;transition:color .15s,border-color .15s}.editor-shell-tab:hover{color:var(--app-text)}.editor-shell-tab--active{color:var(--app-accent);border-bottom-color:var(--app-accent)}.editor-tab-badge{display:inline-flex;align-items:center;justify-content:center;margin-left:.3rem;vertical-align:middle}.editor-tab-badge--dot{width:7px;height:7px;border-radius:50%;background:var(--app-error-text, #e53e3e)}.editor-tab-badge--count{min-width:16px;height:16px;padding:0 4px;font-size:.65rem;font-weight:700;color:#fff;background:var(--app-error-text, #e53e3e);border-radius:8px;line-height:16px}.editor-shell-tab-content{flex:1;overflow-y:auto;padding:.75rem}.editor-shell-handle{width:8px;cursor:col-resize;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--app-bg);transition:background .15s}.editor-shell-handle:hover{background:var(--app-border)}.editor-shell-handle-bar{width:2px;height:32px;border-radius:1px;background:var(--app-border);transition:background .15s}.editor-shell-handle:hover .editor-shell-handle-bar{background:var(--app-accent)}.editor-shell-preview{flex:1;position:relative;min-width:400px;background:#fff;overflow:hidden}[data-theme=dark] .editor-shell-preview{background:var(--app-bg)}.editor-shell-iframe{width:100%;height:100%;border:none}.editor-shell-preview-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--app-text-muted);text-align:center;padding:2rem}.editor-shell-preview-empty-icon{font-size:2.5rem;margin-bottom:.75rem;opacity:.5}.editor-shell-preview-empty p{margin:0 0 .25rem;font-size:.9rem}.editor-shell-preview-empty-hint{font-size:.8rem;color:var(--app-text-muted)}.editor-shell-preview-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000014;z-index:10}[data-theme=dark] .editor-shell-preview-loading{background:#00000040}.editor-shell-preview-spinner{width:24px;height:24px;border:2px solid var(--app-border);border-top-color:var(--app-accent);border-radius:50%;animation:editor-spin .6s linear infinite}@keyframes editor-spin{to{transform:rotate(360deg)}}.editor-header-back{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:6px;background:none;color:var(--app-text-secondary);font-size:1.1rem;cursor:pointer;flex-shrink:0;text-decoration:none}.editor-header-back:hover{background:var(--app-nav-active);color:var(--app-text)}.editor-header-name{font-size:.95rem;font-weight:600;color:var(--app-text);border:1px solid transparent;border-radius:4px;padding:.2rem .4rem;background:none;font-family:inherit;min-width:120px;cursor:text}.editor-header-name:hover{border-color:var(--app-border)}.editor-header-name:focus{outline:none;border-color:var(--app-accent);background:var(--app-input-bg)}.editor-header-secondary{font-size:.78rem;color:var(--app-text-muted);margin-left:.25rem}.editor-header-spacer{flex:1}.editor-header-btn{padding:.35rem .75rem;font-size:.82rem;font-weight:600;font-family:inherit;border-radius:4px;cursor:pointer;border:none;white-space:nowrap}.editor-header-btn--primary{color:var(--app-accent-text);background:var(--app-accent)}.editor-header-btn--primary:hover:not(:disabled){opacity:.9}.editor-header-btn--primary:disabled{opacity:.5;cursor:not-allowed}.editor-header-btn--secondary{color:var(--app-text-secondary);background:transparent;border:1px solid var(--app-border)}.editor-header-btn--secondary:hover:not(:disabled){background:var(--app-nav-active)}.editor-header-btn--secondary:disabled{opacity:.5;cursor:not-allowed}.editor-header-dirty-dot{width:8px;height:8px;border-radius:50%;background:var(--app-accent);flex-shrink:0}.editor-header-save-msg{font-size:.78rem;color:var(--app-success-text)}:root{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;--app-bg: #ffffff;--app-surface: #f8fafc;--app-surface-alt: #fafafa;--app-text: #213547;--app-text-secondary: #475569;--app-text-muted: #94a3b8;--app-border: #e2e8f0;--app-border-light: #f1f5f9;--app-accent: #1a365d;--app-accent-text: #ffffff;--app-nav-active: #e0e0e0;--app-input-bg: #ffffff;--app-input-border: #cbd5e0;--app-code-bg: #f1f5f9;--app-error-bg: #fef2f2;--app-error-border: #fca5a5;--app-error-text: #991b1b;--app-error-text-alt: #7f1d1d;--app-success-bg: #f0fdf4;--app-success-border: #bbf7d0;--app-success-text: #166534;--app-success-chip-bg: #dcfce7;--app-success-chip-border: #86efac;--app-warning-bg: #fffbeb;--app-warning-bg-alt: #fef3c7;--app-warning-border: #fcd34d;--app-warning-text: #92400e;--app-warning-text-alt: #78350f;--app-info-bg: #eff6ff;--app-info-border: #93c5fd;--app-guidance-bg: #fff7ed;--app-guidance-border: #fed7aa;--app-guidance-text: #9a3412;color:var(--app-text);background-color:var(--app-bg)}[data-theme=dark]{--app-bg: #0f1115;--app-surface: #1a1d24;--app-surface-alt: #15181e;--app-text: #e0e0e0;--app-text-secondary: #a0aec0;--app-text-muted: #718096;--app-border: #2d3748;--app-border-light: #232a36;--app-accent: #4299e1;--app-accent-text: #ffffff;--app-nav-active: #2d3748;--app-input-bg: #1a1d24;--app-input-border: #4a5568;--app-code-bg: #2d3748;--app-error-bg: #2d1b1b;--app-error-border: #7f2d2d;--app-error-text: #fca5a5;--app-error-text-alt: #fca5a5;--app-success-bg: #152415;--app-success-border: #2f6b2f;--app-success-text: #86efac;--app-success-chip-bg: #1a2e1a;--app-success-chip-border: #2f6b2f;--app-warning-bg: #2d2815;--app-warning-bg-alt: #2d2815;--app-warning-border: #8b7a2b;--app-warning-text: #fcd34d;--app-warning-text-alt: #fcd34d;--app-info-bg: #1a2030;--app-info-border: #2d4a7c;--app-guidance-bg: #2a2018;--app-guidance-border: #6b4f2d;--app-guidance-text: #f6ad55}body{margin:0;min-width:320px}
