*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#1a1a2e;color:#e0e0e0;min-height:100vh}#app{max-width:800px;margin:0 auto;padding:1rem}.header{text-align:center;padding:.5rem 0}.header h1{font-size:1.5rem;color:#fff;font-weight:600}.main{display:flex;flex-direction:column;gap:.75rem}.display-container{position:relative;width:640px;max-width:100%;margin:0 auto;background:#000;border:2px solid #333;border-radius:4px;outline:none;aspect-ratio:4 / 3}.display-container:focus{border-color:#4a9eff;box-shadow:0 0 0 2px #4a9eff4d}#display{display:block;width:100%;height:100%;image-rendering:pixelated}.loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:10;transition:opacity .5s ease}.loading-overlay.fade-out{opacity:0;pointer-events:none}.loading-overlay.hidden{display:none}.loading-content{text-align:center;padding:2rem;max-width:400px}.loading-spinner{width:40px;height:40px;border:3px solid #333;border-top-color:#4a9eff;border-radius:50%;animation:spin 1s linear infinite;margin:0 auto 1rem}@keyframes spin{to{transform:rotate(360deg)}}.loading-status{color:#ccc;font-size:.9rem;margin-bottom:1rem}.progress-bar{width:100%;height:6px;background:#333;border-radius:3px;overflow:hidden}.progress-bar.hidden{display:none}.progress-fill{height:100%;background:#4a9eff;border-radius:3px;width:0%;transition:width .3s ease}.progress-fill.indeterminate{width:100%!important;animation:indeterminate 1.5s ease-in-out infinite;background:linear-gradient(90deg,#4a9eff,#7bb8ff,#4a9eff);background-size:200% 100%}@keyframes indeterminate{0%{background-position:200% 0}to{background-position:-200% 0}}.error-container{margin-top:1rem;padding:1rem;background:#dc26261a;border:1px solid rgba(220,38,38,.3);border-radius:8px}.error-container.hidden{display:none}.error-icon{font-size:2rem;margin-bottom:.5rem}.error-message{color:#fca5a5;font-size:.9rem;font-weight:600;margin-bottom:.5rem}.error-remediation{color:#d1d5db;font-size:.8rem;line-height:1.4}.controls{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}.disk-status{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.55rem .8rem;border:1px solid #333a4a;border-radius:999px;background:#111827e6;color:#cbd5e1;font-size:.82rem;width:fit-content;max-width:100%;margin:0 auto}.disk-status.is-dirty{border-color:#d97706;color:#fde68a}.disk-status.is-saved{border-color:#1d4ed8;color:#bfdbfe}.disk-status-dot{width:.55rem;height:.55rem;border-radius:999px;background:#22c55e;box-shadow:0 0 #22c55e73}.disk-status.is-dirty .disk-status-dot{background:#f59e0b;animation:disk-pulse 1.6s ease-in-out infinite}.disk-status.is-saved .disk-status-dot{background:#60a5fa}@keyframes disk-pulse{0%{box-shadow:0 0 #f59e0b73}70%{box-shadow:0 0 0 8px #f59e0b00}to{box-shadow:0 0 #f59e0b00}}.btn{padding:.5rem 1rem;border:1px solid #444;border-radius:4px;font-size:.85rem;cursor:pointer;transition:all .15s ease;font-family:inherit}.btn:disabled{opacity:.4;cursor:not-allowed}.btn-primary{background:#2563eb;color:#fff;border-color:#3b82f6}.btn-primary:hover:not(:disabled){background:#3b82f6}.btn-secondary{background:#374151;color:#e5e7eb;border-color:#4b5563}.btn-secondary:hover:not(:disabled){background:#4b5563}.btn-danger{background:#7f1d1d;color:#fca5a5;border-color:#991b1b}.btn-danger:hover:not(:disabled){background:#991b1b}.btn-small{padding:.25rem .5rem;font-size:.75rem;background:#374151;color:#e5e7eb;border-color:#4b5563}.btn-small:hover{background:#4b5563}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.debug-panel{border:1px solid #333;border-radius:4px;overflow:hidden}.debug-panel.hidden{display:none}.debug-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem .75rem;background:#1f2937;border-bottom:1px solid #333;font-size:.8rem;color:#9ca3af}.debug-log{max-height:200px;overflow-y:auto;padding:.5rem;background:#111827;font-family:Courier New,Courier,monospace;font-size:.75rem;line-height:1.4;color:#9ca3af}.debug-log .log-entry{padding:1px 0}.debug-log .log-entry .timestamp{color:#6b7280}.debug-log .log-entry.error{color:#fca5a5}.debug-log .log-entry.warn{color:#fcd34d}.resume-dialog{display:flex;justify-content:center;padding:.75rem 0}.resume-dialog.hidden{display:none}.resume-dialog-content{background:#1f2937;border:1px solid #374151;border-radius:8px;padding:1.25rem 1.5rem;max-width:500px;width:100%;text-align:center}.resume-dialog-title{font-size:1.1rem;color:#fff;margin-bottom:.5rem;font-weight:600}.resume-dialog-text{font-size:.85rem;color:#9ca3af;margin-bottom:1rem;line-height:1.4}.resume-dialog-buttons{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.btn-resume,.btn-fresh{min-width:180px}.btn-exit-fullscreen{position:absolute;top:10px;right:10px;z-index:20;background:#000000b3;color:#fff;border:1px solid rgba(255,255,255,.3);border-radius:4px;padding:.4rem .8rem;font-size:.8rem;cursor:pointer;transition:opacity .3s ease,background .15s ease}.btn-exit-fullscreen:hover{background:#fff3}.btn-exit-fullscreen.hidden{display:none}.display-container:fullscreen{display:flex;align-items:center;justify-content:center;background:#000;border:none;border-radius:0;width:100vw;height:100vh;max-width:100vw}.display-container:fullscreen #display{max-width:100vw;max-height:100vh;width:auto;height:100vh;aspect-ratio:4 / 3;object-fit:contain}.display-container:fullscreen .btn-exit-fullscreen{display:block}.display-container:fullscreen .loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0}.multi-tab-warning{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000d9;display:flex;align-items:center;justify-content:center;z-index:100}.multi-tab-warning.hidden{display:none}.multi-tab-warning-content{background:#1f2937;border:2px solid #f59e0b;border-radius:12px;padding:2rem;max-width:480px;text-align:center}.warning-icon{font-size:3rem;margin-bottom:1rem}.warning-title{font-size:1.2rem;color:#f59e0b;margin-bottom:.75rem;font-weight:600}.warning-text{font-size:.9rem;color:#d1d5db;line-height:1.5}.storage-toast{position:fixed;bottom:1.5rem;left:50%;transform:translate(-50%);background:#7f1d1d;color:#fca5a5;border:1px solid #991b1b;border-radius:8px;padding:.75rem 1.25rem;display:flex;align-items:center;gap:.75rem;z-index:90;max-width:500px;box-shadow:0 4px 12px #0006;animation:toast-slide-up .3s ease}.storage-toast.hidden{display:none}@keyframes toast-slide-up{0%{opacity:0;transform:translate(-50%) translateY(1rem)}to{opacity:1;transform:translate(-50%) translateY(0)}}.storage-toast-message{font-size:.85rem;line-height:1.4}.storage-toast-close{background:none;border:none;color:#fca5a5;font-size:1.2rem;cursor:pointer;padding:0 .25rem;line-height:1;opacity:.7;flex-shrink:0}.storage-toast-close:hover{opacity:1}
