:root{--bg:#0e0f13;--surface:#181a21;--border:#2a2d38;--text:#e7e8ec;--muted:#9a9daa;--accent:#2dd4bf;--warn:#fbbf24;--danger:#f87171;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.45}*{box-sizing:border-box}html,body,#root{background:var(--bg);height:100%;margin:0}button{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);cursor:pointer;border-radius:10px;min-height:44px;padding:10px 14px}button:hover{border-color:var(--muted)}button.primary{background:var(--accent);border-color:var(--accent);color:#062925;font-weight:600}.app{max-width:1100px;min-height:100%;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom);flex-direction:column;margin:0 auto;display:flex}.topbar{flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px 0;display:flex}@media (width<=520px){.topbar h1{width:100%}}.topbar h1{white-space:nowrap;margin:0;font-size:1.05rem}.badges{gap:6px;display:flex}.badge{font-variant-numeric:tabular-nums;border:1px solid var(--border);background:var(--surface);border-radius:999px;padding:3px 8px;font-size:.8rem}.badge.warn{color:var(--warn);border-color:var(--warn)}.stage-wrap{flex:none;height:clamp(240px,58vh,720px);display:flex}.stage{border:1px solid var(--border);background:#000;border-radius:14px;flex:1;position:relative;overflow:hidden}.stage video,.stage canvas{object-fit:contain;width:100%;height:100%;position:absolute;inset:0}.stage video{opacity:0}.stage.is-live video{opacity:1}.mirror{transform:scaleX(-1)}.guide{pointer-events:none;border:2px dashed #ffffff59;border-radius:18px;justify-content:center;align-items:flex-end;display:flex;position:absolute;inset:8% 10%}.guide span{color:#ffffffb3;background:#00000073;border-radius:6px;margin-bottom:6px;padding:2px 8px;font-size:.75rem}.intro{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:8px;max-width:520px;margin:0 auto;padding:24px;display:flex;position:absolute;inset:0}.intro-actions{flex-wrap:wrap;justify-content:center;gap:10px;margin:8px 0;display:flex}.muted{color:var(--muted)}.small{font-size:.82rem}.error{color:var(--danger)}.hint{color:var(--warn);margin:4px 0;font-size:.9rem}.panel{padding:12px 0 16px}.hands{grid-template-columns:1fr 1fr;gap:10px;display:grid}.hand{background:var(--surface);border:1px solid var(--border);font-variant-numeric:tabular-nums;border-radius:10px;align-items:flex-start;gap:10px;padding:10px 12px;display:flex}.dot{border-radius:50%;flex:none;width:12px;height:12px;margin-top:5px}.panel>.small{margin:6px 0}.controls{flex-wrap:wrap;gap:8px;margin-top:8px;display:flex}@media (width<=520px){.hands{grid-template-columns:1fr}}@media (orientation:landscape) and (height<=520px){.app{flex-flow:wrap;max-width:none}.topbar{width:100%;padding:6px 0}.app{height:100%}.stage-wrap{flex:1;height:calc(100% - 48px)}.panel{width:300px;height:calc(100% - 48px);padding:0 0 0 12px;overflow-y:auto}.hands{grid-template-columns:1fr}}[hidden]{display:none!important}.tabular{font-variant-numeric:tabular-nums}button.selected{border-color:var(--accent);color:var(--accent)}button.danger{color:var(--danger)}button:disabled{opacity:.5;cursor:default}.tabs{gap:6px;margin-right:auto;display:flex}.tabs button{min-height:36px;padding:6px 12px;font-size:.9rem}.record-row{align-items:center;gap:12px;margin-bottom:10px;display:flex}.record{align-items:center;gap:8px;padding:12px 18px;font-weight:600;display:inline-flex}.record.is-recording{background:var(--danger);border-color:var(--danger);color:#2a0707}.rec-dot{background:var(--danger);border-radius:50%;width:10px;height:10px;display:inline-block}.saved-note{color:var(--accent);font-size:.9rem}.countdown{color:#fff;text-shadow:0 4px 24px #0009;pointer-events:none;justify-content:center;align-items:center;font-size:clamp(4rem,18vw,9rem);font-weight:700;display:flex;position:absolute;inset:0}.rec-indicator{font-variant-numeric:tabular-nums;background:#0009;border-radius:8px;align-items:center;gap:8px;padding:4px 10px;font-size:.85rem;font-weight:600;display:flex;position:absolute;top:10px;left:10px}.rec-indicator .rec-dot{animation:1s steps(2,start) infinite blink}@keyframes blink{to{visibility:hidden}}.sheet-backdrop{z-index:10;background:#000000a6;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);border:1px solid var(--border);width:100%;max-width:560px;max-height:100%;padding:16px 16px calc(16px + env(safe-area-inset-bottom));border-radius:16px 16px 0 0;overflow-y:auto}@media (width>=640px){.sheet-backdrop{align-items:center}.sheet{border-radius:16px}}.sheet h2{margin:0 0 10px;font-size:1.1rem}.field{color:var(--muted);flex-direction:column;flex:1;gap:4px;margin:10px 0;font-size:.85rem;display:flex}.field select,.field input{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:10px;min-height:44px;padding:10px;font-size:1rem}.field-row{gap:10px;display:flex}.check{align-items:center;gap:8px;margin:8px 0;font-size:.9rem;display:flex}.check input{width:18px;height:18px;font-size:16px}input,select,textarea{font-size:max(16px,1em)}.sheet-actions{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}.replay-stage{border:1px solid var(--border);background:#000;border-radius:12px;width:100%;max-height:50vh;margin:0 auto;position:relative;overflow:hidden}.replay-stage video,.replay-stage canvas{object-fit:contain;width:100%;height:100%;position:absolute;inset:0}.replay-stage video{opacity:.55}.replay-controls{flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;display:flex}.replay-controls input[type=range]{min-width:120px;accent-color:var(--accent);flex:1}.speed{gap:4px;display:flex}.speed button{min-height:36px;padding:4px 8px;font-size:.85rem}.library-wrap{flex:1;padding-bottom:24px;overflow-y:auto}.library-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.move-group h3{margin:18px 0 8px;font-size:1rem}.move-group ul{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.move-group li{background:var(--surface);border:1px solid var(--border);border-radius:10px}.rec-row{text-align:left;background:0 0;border:0;flex-wrap:wrap;align-items:center;gap:10px;width:100%;display:flex}.rec-row .small{flex:1}.quality{font-variant-numeric:tabular-nums;color:var(--accent);font-size:.8rem}.quality.low{color:var(--warn)}.rec-detail{padding:0 12px 12px}.empty{text-align:center;max-width:420px;margin:0 auto;padding:40px 16px}.record-row{flex-wrap:wrap}.hand-chips{flex-wrap:wrap;gap:8px;display:flex}.hand-chip{color:var(--muted);align-items:center;gap:8px;display:inline-flex}.hand-chip.selected{color:var(--text)}.hand-chip .dot{width:10px;height:10px;margin-top:0}.hand-chip:not(.selected) .dot{opacity:.35}.sheet-actions{flex-wrap:wrap}.pill{border:1px solid var(--border);color:var(--muted);border-radius:999px;padding:1px 7px;font-size:.72rem}.pill.accent{color:var(--accent);border-color:var(--accent)}.turnstile{min-height:0;margin:10px 0}.share-on-save .check{margin-bottom:2px}.share-on-save p{margin:0 0 0 26px}.share-on-save input.nick{width:12em;padding:2px 6px}.move-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.move-list li{background:var(--surface);border:1px solid var(--border);border-radius:10px}.mode-switch{border:1px solid var(--border);border-radius:10px;margin-bottom:10px;display:inline-flex;overflow:hidden}.mode-switch button{border:0;border-radius:0;min-height:38px}.mode-switch button.selected{background:var(--accent);color:#062925}.identify{margin-bottom:10px}.guess{flex-direction:column;justify-content:center;gap:2px;min-height:56px;display:flex}.guess strong{color:var(--accent);font-size:1.6rem}.scores{flex-direction:column;gap:6px;margin:6px 0;padding:0;list-style:none;display:flex}.scores li{grid-template-columns:minmax(90px,160px) 1fr 44px;align-items:center;gap:10px;display:grid}.score-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.bar{background:var(--border);border-radius:4px;height:8px;overflow:hidden}.bar span{background:var(--accent);height:100%;transition:width .25s;display:block}.slider input{min-height:0;accent-color:var(--accent);background:0 0;border:0;padding:0}.self-test{background:var(--surface);border:1px solid var(--border);border-radius:10px;margin:10px 0;padding:10px 12px}.self-test ul{margin:6px 0 0;padding-left:18px}.record-setup{border:1px solid var(--border);border-radius:12px;min-width:0;margin:0 0 10px;padding:4px 12px}.record-setup:disabled{opacity:.6}.move-picker{position:relative}.move-picker input{width:100%}.suggestions{z-index:5;background:var(--surface);border:1px solid var(--border);border-radius:10px;max-height:280px;margin:0;padding:4px;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto;box-shadow:0 8px 24px #0006}.suggestions button{text-align:left;width:100%;color:var(--text);background:0 0;border:0;justify-content:space-between;align-items:center;gap:10px;display:flex}.suggestions button:hover,.suggestions button:focus-visible{background:var(--border)}.sheet-title{justify-content:space-between;align-items:baseline;gap:10px;display:flex}.sheet-title .field{width:100%}button.link{color:var(--accent);background:0 0;border:0;min-height:0;padding:4px 0}.rename{align-items:flex-start;gap:8px;margin-bottom:8px;display:flex}.rename .move-picker{flex:1}.move-picker input{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:10px;min-height:44px;padding:10px;font-size:1rem}.motion-meter{grid-template-columns:auto 1fr 52px;align-items:center;gap:10px;margin:4px 0 10px;display:grid}.motion-meter .bar{position:relative;overflow:visible}.motion-meter .bar span{background:var(--muted);border-radius:4px;transition:width .12s}.motion-meter .bar.active span{background:var(--accent)}.motion-meter .bar i{background:var(--text);opacity:.6;width:2px;position:absolute;top:-3px;bottom:-3px}.pill.warn{color:var(--warn);border-color:var(--warn)}.trim{margin-top:10px}.trim-head{align-items:center;gap:8px;margin-bottom:6px;display:flex}.trim-head .link{margin-left:auto}.trim-track{background:var(--border);border-radius:6px;height:32px;position:relative}.trim-kept{background:color-mix(in srgb, var(--accent) 35%, transparent);border:2px solid var(--accent);box-sizing:border-box;border-radius:6px;position:absolute;top:0;bottom:0}.trim-track input[type=range]{pointer-events:none;appearance:none;background:0 0;width:100%;height:100%;margin:0;position:absolute;inset:0}.trim-track input[type=range]::-webkit-slider-runnable-track{background:0 0;height:100%}.trim-track input[type=range]::-moz-range-track{background:0 0}.trim-track input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;background:var(--accent);cursor:ew-resize;border-radius:4px;width:22px;height:32px}.trim-track input[type=range]::-moz-range-thumb{pointer-events:auto;background:var(--accent);cursor:ew-resize;border:none;border-radius:4px;width:22px;height:32px}.guess-hands{flex-wrap:wrap;gap:8px 24px;display:flex}.guess-hands>div{flex-direction:column;display:flex}.score-group+.score-group{margin-top:8px}.app.app-camera{height:100svh;min-height:0;overflow:hidden}body:has(.app-camera){overscroll-behavior:none;overflow:hidden}@media (width<=520px){.app-camera .topbar h1{display:none}.app-camera .topbar{padding:8px 0}}.camera{flex:1;grid-template:"top""stage"minmax(0,1fr)"bottom"/minmax(0,1fr);gap:8px;min-height:0;padding-bottom:8px;display:grid}.camera-top{z-index:6;grid-area:top;align-items:center;min-width:0;min-height:58px;display:flex;position:relative}.camera-top:empty{display:none}.camera .stage{touch-action:pan-y;-webkit-user-select:none;user-select:none;grid-area:stage;min-height:0}.what{border:0;width:100%;margin:0;padding:0}.what .field{margin:0}.what:disabled{opacity:.7}.guess{width:100%;min-height:58px}.guess-hands{flex-direction:row;align-items:center}.guess-empty{align-items:center;gap:12px;width:100%;display:flex}.camera-bottom{flex-direction:column;grid-area:bottom;align-items:center;gap:6px;display:flex}.mode-carousel{gap:4px;display:flex}.mode-carousel button{letter-spacing:.06em;text-transform:uppercase;min-height:32px;color:var(--muted);background:0 0;border:0;padding:4px 12px;font-size:.8rem;font-weight:600}.mode-carousel button.selected{color:var(--warn)}.shutter-row{grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;width:100%;max-width:360px;display:grid}.shutter-row .round:first-child{justify-self:end}.shutter-row .round:last-child{justify-self:start}button.round{border-radius:50%;width:48px;height:48px;min-height:0;padding:0;font-size:1.3rem;line-height:1}.shutter{background:0 0;border:4px solid #fff;border-radius:50%;place-items:center;width:72px;height:72px;min-height:0;padding:0;display:grid}.shutter span{background:var(--danger);border-radius:50%;width:56px;height:56px;transition:width .15s,height .15s,border-radius .15s}.shutter.is-recording span{border-radius:6px;width:28px;height:28px}.shutter.is-waiting span{animation:1s ease-in-out infinite alternate pulse}@keyframes pulse{to{opacity:.35}}.shutter:disabled{opacity:.4}.shutter-placeholder{text-align:center;place-items:center;width:72px;height:72px;display:grid}.shutter-hint{text-align:center;min-height:1.4em;margin:0}.camera-bottom>.shutter-hint{-webkit-line-clamp:2;-webkit-box-orient:vertical;height:2.9em;line-height:1.45;display:-webkit-box;overflow:hidden}.camera-bottom>.shutter-hint[hidden]{display:none}.toast{max-width:calc(100% - 24px);color:var(--accent);pointer-events:none;text-align:center;background:#000000b3;border-radius:8px;padding:4px 12px;font-size:.85rem;position:absolute;bottom:16px;left:50%;transform:translate(-50%)}.toast.warn{color:var(--warn);top:44px;bottom:auto}.motion-strip{pointer-events:none;background:#ffffff1f;height:4px;position:absolute;bottom:0;left:0;right:0}.motion-strip span{background:var(--muted);height:100%;transition:width .12s;display:block}.motion-strip.active span{background:var(--accent)}.motion-strip i{opacity:.7;background:#fff;width:2px;position:absolute;top:-2px;bottom:0}.scores-overlay{pointer-events:none;background:#0009;border-radius:10px;padding:6px 10px;position:absolute;bottom:12px;left:8px;right:8px}.scores-overlay .scores{gap:3px;margin:2px 0}.scores-overlay .scores li{grid-template-columns:minmax(80px,140px) 1fr 40px}.settings h3{margin:12px 0 6px}.settings .hands{margin:8px 0}@media (orientation:landscape) and (height<=520px){.app.app-camera{flex-flow:column}.camera{grid-template:"stage top""stage bottom"minmax(0,1fr)/minmax(0,1fr) 240px;column-gap:12px}.camera-bottom{justify-content:center}}.identify-status{align-items:center;gap:8px;width:100%;min-width:0;margin:0;display:flex}.identify-status-text{white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}.live-dot{background:var(--muted);border-radius:50%;flex:none;width:8px;height:8px}.live-dot.on{background:var(--accent);box-shadow:0 0 8px var(--accent)}.hand-boxes{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;display:grid}.hand-box{border:1px solid var(--border);background:var(--surface);border-radius:10px;flex-direction:column;gap:3px;min-width:0;padding:8px 10px;transition:border-color .2s,box-shadow .2s;display:flex}.hand-box.both{border-style:dashed}.hand-box.confident{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}.hand-box-label{color:var(--muted);text-transform:uppercase;letter-spacing:.05em;font-size:.72rem}.hand-box-move{white-space:nowrap;text-overflow:ellipsis;font-size:1rem;overflow:hidden}.hand-box.confident .hand-box-move{color:var(--accent)}.hand-box-bar{background:var(--border);border-radius:2px;height:4px;overflow:hidden}.hand-box-bar span{background:var(--accent);height:100%;transition:width .2s;display:block}.hand-box-meta{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;height:1.45em;font-size:.72rem;line-height:1.45;overflow:hidden}.shutter-row.slim .round{width:40px;height:40px;font-size:1.1rem}.shutter-row.slim .shutter-hint{margin:0}.stage canvas.hud{pointer-events:none}.layer-toggles{z-index:2;gap:6px;display:flex;position:absolute;top:8px;right:8px}.layer-toggles button,.deck-chip{min-height:0;color:var(--muted);background:#0000008c;border:1px solid #ffffff26;border-radius:999px;padding:4px 10px;font-size:.75rem}.layer-toggles button.on{color:#fff;border-color:#fff9}.deck-chip{z-index:2;color:#fff;position:absolute;top:8px;left:8px}.deck-cal{z-index:3;position:absolute;inset:0}.deck-cal-text{text-align:center;background:#000000b3;border-radius:12px;flex-direction:column;align-items:center;gap:4px;width:min(92%,420px);padding:10px 14px;display:flex;position:absolute;bottom:12px;left:50%;transform:translate(-50%)}.deck-cal-text strong{font-size:1.05rem}.deck-cal-text .primary{min-width:140px;margin-top:6px}.deck-cal-actions{gap:18px;display:flex}.admin-head{justify-content:space-between;align-items:baseline;gap:10px;display:flex}.admin.is-busy{opacity:.7;pointer-events:none}.admin-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.admin-row{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:8px 12px}.admin-row-main{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}.admin-row-main .small{overflow-wrap:anywhere;flex-basis:100%}.admin-actions{gap:4px 14px;margin-top:4px}.admin-merge{flex-wrap:wrap;align-items:center;gap:8px;display:inline-flex}.admin-merge select{min-height:32px}button.danger-link{color:var(--danger)}.admin-login .field{width:100%}
