*{box-sizing:border-box}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:#333;font-synthesis:none;text-rendering:optimizelegibility;-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;font-weight:400;line-height:1.5}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}body{min-width:320px;height:100vh;overscroll-behavior:none;height:100dvh;margin:0;overflow:hidden}#root{height:100%}button{font-family:inherit}@media (prefers-color-scheme:dark){:root{color:#f5f5f5;background-color:#1a1a1a}.capture-section p{color:#aaa}.tile-item{border-bottom-color:#333}.tile-confidence{color:#aaa}}.hand-confirmation{flex-direction:column;flex:1;width:100%;max-width:480px;min-height:0;margin:0 auto;display:flex;overflow:hidden}.hand-grid{touch-action:none;flex-shrink:0;grid-template-columns:repeat(7,1fr);gap:6px;padding:.75rem;display:grid}.hand-slot{aspect-ratio:2/3;cursor:pointer;background:#f5f5f5;border:2px solid #ccc;border-radius:6px;justify-content:center;align-items:center;padding:2px;transition:border-color .15s,box-shadow .15s;display:flex}.hand-slot:hover{border-color:#3498db}.hand-slot--selected{border-color:#3498db;box-shadow:0 0 0 2px #3498db66}.hand-slot--empty{color:#bbb;font-size:1.5rem;font-weight:700}.hand-slot[draggable=true]{cursor:grab}.hand-slot--dragging{opacity:.4}.hand-slot--drag-over{border:2px dashed #3498db}.hand-slot img{object-fit:contain;width:100%;height:100%}.tile-picker{flex:1;min-height:0;padding:0 .75rem;overflow-y:auto}.tile-picker-suit{margin-bottom:.75rem}.tile-picker-suit-label{color:#666;margin-bottom:.25rem;padding-left:2px;font-size:.8rem;font-weight:600}.tile-picker-tiles{flex-wrap:wrap;gap:4px;display:flex}.tile-picker-btn{cursor:pointer;background:#fff;border:1px solid #ddd;border-radius:4px;width:40px;height:56px;padding:2px;transition:border-color .15s,background .15s}.tile-picker-btn:hover{background:#3498db0d;border-color:#3498db}.tile-picker-btn:active{background:#3498db26}.tile-picker-btn img{object-fit:contain;width:100%;height:100%}.hand-actions{border-top:1px solid #eee;flex-shrink:0;gap:.75rem;padding:.75rem;display:flex}.hand-actions button{cursor:pointer;border:none;border-radius:8px;flex:1;padding:.75rem;font-size:1rem;transition:background .2s}.retake-btn{color:#fff;background:#95a5a6}.retake-btn:hover{background:#7f8c8d}.clear-btn{color:#fff;background:#e74c3c}.clear-btn:hover{background:#c0392b}.confirm-btn{color:#fff;background:#27ae60}.confirm-btn:hover:not(:disabled){background:#219a52}.confirm-btn:disabled{opacity:.5;cursor:not-allowed}.app{height:100vh;flex-direction:column;height:100dvh;display:flex;overflow:hidden}.app-header{color:#fff;text-align:center;background:#1a1a2e;padding:1rem}.app-header h1{margin:0;font-size:1.5rem}.app-main{flex-direction:column;flex:1;align-items:center;min-height:0;padding:1rem;display:flex;overflow:hidden}.capture-section{text-align:center;flex-direction:column;flex:1;justify-content:center;min-height:0;display:flex}.capture-section p{color:#666;margin-bottom:1.5rem}.camera-container{flex-direction:column;flex:1;width:100%;max-width:640px;min-height:0;display:flex;overflow:hidden}.camera-preview{object-fit:cover;background:#000;border-radius:8px;flex:1;width:100%;min-height:0}.camera-controls{flex-shrink:0;justify-content:center;gap:1rem;padding:1rem 0;display:flex}.camera-error{text-align:center;color:#e74c3c}.start-camera-btn{color:#fff;cursor:pointer;background:#3498db;border:none;border-radius:8px;padding:1rem 2rem;font-size:1.25rem;transition:background .2s}.start-camera-btn:hover:not(:disabled){background:#2980b9}.start-camera-btn:disabled{opacity:.5;cursor:not-allowed}.capture-btn{color:#fff;cursor:pointer;background:#27ae60;border:none;border-radius:8px;padding:1rem 2rem;font-size:1.25rem;transition:background .2s}.capture-btn:hover:not(:disabled){background:#219a52}.capture-btn:disabled{opacity:.5;cursor:not-allowed}.cancel-btn{color:#fff;cursor:pointer;background:#95a5a6;border:none;border-radius:8px;padding:1rem 2rem;font-size:1.25rem;transition:background .2s}.cancel-btn:hover{background:#7f8c8d}.input-divider{color:#999;margin:1rem 0;font-size:.9rem}.drop-zone{width:100%;font:inherit;cursor:pointer;background:0 0;border:2px dashed #ccc;border-radius:8px;padding:2rem;transition:border-color .2s,background .2s;display:block}.drop-zone:hover{background:#3498db0d;border-color:#3498db}.drop-zone--active{background:#3498db1a;border-color:#3498db}.drop-zone--disabled{opacity:.5;cursor:not-allowed}.drop-zone-text{color:#666;margin:0}.detecting{flex-direction:column;align-items:center;margin-top:3rem;display:flex}.spinner{border:4px solid #f3f3f3;border-top-color:#3498db;border-radius:50%;width:50px;height:50px;animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.detection-result{flex-direction:column;flex:1;width:100%;max-width:800px;min-height:0;display:flex;overflow:auto}.result-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem;display:flex}.result-header h2{margin:0}.reset-btn{color:#fff;cursor:pointer;background:#3498db;border:none;border-radius:8px;padding:.75rem 1.5rem;transition:background .2s}.reset-btn:hover{background:#2980b9}.result-canvas-container{background:#000;border-radius:8px;flex-shrink:0;width:100%;overflow:auto}.result-canvas{max-width:100%;height:auto;display:block}.tiles-list{margin-top:1.5rem}.tiles-list h3{margin-bottom:.5rem}.tiles-list ul{margin:0;padding:0;list-style:none}.tile-item{border-bottom:1px solid #eee;align-items:center;gap:.75rem;padding:.5rem;display:flex}.tile-icon{flex-shrink:0;width:2rem;height:auto}.tile-color{border-radius:4px;flex-shrink:0;width:16px;height:16px}.tile-code{min-width:2rem;font-family:monospace;font-weight:700}.tile-name{flex:1}.tile-confidence{color:#666;font-size:.9rem}.error{text-align:center;color:#e74c3c;margin-top:2rem}.error button{color:#fff;cursor:pointer;background:#3498db;border:none;border-radius:8px;margin-top:1rem;padding:.75rem 1.5rem}@media (max-width:480px){.app-header h1{font-size:1.25rem}.result-header{text-align:center;flex-direction:column}.camera-controls{flex-direction:column}}
