body{margin:0;padding:0}*{box-sizing:border-box;margin:0;padding:0}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.app{min-height:100vh;padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0);padding-bottom:calc(56px + env(safe-area-inset-bottom,0));flex-direction:column;display:flex}button{cursor:pointer;border:none;outline:none;font-family:inherit;transition:all .2s}button:disabled{opacity:.5;cursor:not-allowed}.btn-primary{color:#fff;background-color:#007bff;border-radius:8px;min-height:48px;padding:14px 28px;font-size:16px;font-weight:600}.btn-primary:hover:not(:disabled){background-color:#0056b3}.btn-secondary{color:#fff;background-color:#6c757d;border-radius:8px;min-height:48px;padding:14px 28px;font-size:16px;font-weight:600}.btn-secondary:hover:not(:disabled){background-color:#545b62}.btn-back{color:#007bff;background:0 0;min-width:48px;min-height:48px;padding:8px;font-size:16px}.capture-screen,.review-screen,.solve-screen{flex-direction:column;flex:1;width:100%;max-width:800px;margin:0 auto;padding:16px;display:flex}.capture-header,.review-header,.solve-header{text-align:center;margin-bottom:24px}.review-header,.solve-header{align-items:center;gap:16px;display:flex}h1{margin-bottom:8px;font-size:24px}h3{margin-bottom:12px;font-size:16px}.camera-setup{z-index:2;background:#0000008c;flex-direction:column;justify-content:center;align-items:center;gap:16px;padding:24px 16px;display:flex;position:absolute;inset:0}.camera-hint{color:#f3f4f6;text-align:center;max-width:280px;font-size:13px}.error{color:#fecaca;text-align:center;background:#7f1d1dd9;border:1px solid #f87171;border-radius:8px;max-width:320px;padding:10px 12px;font-size:14px}.video-container{aspect-ratio:4/3;background:#000;border-radius:12px;width:100%;position:relative;overflow:hidden}.video-container.idle .video-feed{opacity:.35}.video-feed{object-fit:cover;background:#111;width:100%;height:100%}.scan-overlay{justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.scan-grid{aspect-ratio:1;background:repeating-linear-gradient(#0000 65%,#ffffff4d 66% 67%,#0000 68%,#0000),repeating-linear-gradient(90deg,#0000,#0000 32%,#ffffff4d 33% 34%,#0000 35%);border:3px solid #fffc;border-radius:8px;width:60%}.progress-container{flex-direction:column;align-items:center;gap:16px;margin-top:24px;display:flex}.face-chips{flex-wrap:wrap;justify-content:center;gap:12px;display:flex}.face-chip{color:#333;border:2px solid #ccc;border-radius:8px;justify-content:center;align-items:center;width:48px;height:48px;font-size:14px;font-weight:600;transition:all .3s;display:flex}.face-chip.detected{color:#fff;text-shadow:0 1px 2px #0000004d;border-color:#28a745;box-shadow:0 0 8px #28a74580}.timer{color:#666;font-size:14px}.cube-net{grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px;display:grid}.cube-face{background:#fff;border-radius:8px;padding:12px;box-shadow:0 2px 4px #0000001a}.sticker-grid{grid-template-columns:repeat(3,1fr);gap:4px;display:grid}.sticker{aspect-ratio:1;border:2px solid #ccc;border-radius:4px;min-width:32px;min-height:32px;transition:all .2s}.sticker:not(.center):hover{cursor:pointer;border-color:#007bff;transform:scale(1.1)}.sticker.selected{border-width:3px;border-color:#007bff;transform:scale(1.1)}.sticker.center{opacity:.7;cursor:not-allowed}.color-picker{background:#fff;border-radius:8px;margin-bottom:24px;padding:16px;box-shadow:0 2px 8px #00000026}.color-options{flex-wrap:wrap;justify-content:center;gap:12px;margin-top:12px;display:flex}.color-option{border:2px solid #ccc;border-radius:8px;width:56px;min-width:48px;height:56px;min-height:48px}.color-option:hover{border-color:#007bff;transform:scale(1.1)}.validation-panel{background:#fff;border-radius:8px;margin-bottom:24px;padding:16px;box-shadow:0 2px 4px #0000001a}.color-counts{flex-wrap:wrap;gap:16px;margin-top:12px;display:flex}.count-item{align-items:center;gap:8px;display:flex}.color-dot{border:2px solid #ccc;border-radius:50%;width:24px;height:24px}.errors{background:#fff3cd;border-radius:4px;margin-top:12px;padding:12px}.solve-screen.loading,.solve-screen.error{text-align:center;justify-content:center;align-items:center;gap:24px}.setup-instructions{text-align:center;background:#fff;border-radius:8px;margin-bottom:24px;padding:16px;box-shadow:0 2px 4px #0000001a}.setup-instructions p{margin:4px 0}.cube-container{background:#fff;border-radius:12px;flex:1;min-height:300px;margin-bottom:24px;overflow:hidden;box-shadow:0 2px 8px #0000001a}.cube-visualization{width:100%;height:100%}.move-info{text-align:center;background:#fff;border-radius:8px;margin-bottom:24px;padding:16px;box-shadow:0 2px 4px #0000001a}.move-counter{color:#666;margin-bottom:12px;font-size:14px}.current-move{flex-direction:column;gap:8px;display:flex}.move-notation{color:#007bff;font-size:32px;font-weight:700}.move-description{color:#333;font-size:16px}.controls{justify-content:space-between;gap:12px;display:flex}.controls button{flex:1}.solved-actions{flex:1;gap:12px;display:flex}@media (width>=768px){.capture-screen,.review-screen,.solve-screen{padding:32px}h1{font-size:32px}.cube-net{grid-template-columns:repeat(3,1fr);gap:24px}.sticker{min-width:48px;min-height:48px}.cube-container{min-height:400px}}.debug-console{z-index:1000;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;position:fixed;bottom:0;left:0;right:0}.debug-console-handle{color:#f9fafb;width:100%;min-height:48px;padding-bottom:env(safe-area-inset-bottom,0);background:#111827;border-radius:12px 12px 0 0;font-size:14px;font-weight:600}.debug-console.open .debug-console-handle{border-radius:0}.debug-console-panel{color:#e5e7eb;max-height:40vh;padding-bottom:env(safe-area-inset-bottom,0);background:#0b1220;border-top:1px solid #374151;flex-direction:column;display:flex}.debug-console-toolbar{gap:8px;padding:8px;display:flex}.debug-action{flex:1;min-height:44px;padding:10px 12px;font-size:14px}.debug-console-entries{max-height:calc(40vh - 60px);padding:0 8px 12px;overflow:auto}.debug-empty{color:#9ca3af;padding:8px}.debug-entry{border-bottom:1px solid #1f2937;grid-template-columns:72px 48px 1fr;gap:8px;padding:4px 0;font-size:11px;line-height:1.35;display:grid}.debug-time{color:#9ca3af}.debug-level{text-transform:uppercase;font-weight:700}.debug-message{word-break:break-word;white-space:pre-wrap}.link-button{color:#007bff;background:0 0;min-height:44px;padding:8px 12px;font-size:15px;text-decoration:underline}.fix-banner{background:#fff3cd;border:1px solid #f0d78c;border-radius:8px;margin-bottom:16px;padding:12px}.fix-banner-title{margin-bottom:6px;font-weight:700}.fix-error-list{color:#7a5b00;margin:8px 0 12px 18px}.rescan-face-row{flex-wrap:wrap;gap:8px;display:flex}.rescan-face-btn{flex:40%;min-height:44px;padding:10px 12px;font-size:14px}.cube-face.face-suspicious{outline-offset:2px;outline:2px solid #dc3545}
