:root{color:#1d1d1f;background:#eef3f6;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Hiragino Sans,Yu Gothic UI,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;--page-background: #eef3f6;--content-background: #f7fafb;--glass: rgba(255, 255, 255, .66);--glass-strong: rgba(255, 255, 255, .84);--glass-border: rgba(255, 255, 255, .82);--label: #1d1d1f;--secondary-label: #6e6e73;--tertiary-label: #8e8e93;--separator: rgba(60, 60, 67, .18);--system-blue: #007aff;--system-blue-pressed: #0062cc;--system-green: #34c759;--system-orange: #ff9f0a;--system-red: #ff3b30;--shadow-soft: 0 12px 36px rgba(48, 64, 80, .12);--shadow-control: 0 5px 18px rgba(48, 64, 80, .12)}*{box-sizing:border-box}html{min-width:320px;background:var(--page-background)}body{min-width:320px;min-height:100vh;min-height:100dvh;margin:0;background:var(--page-background);color:var(--label);letter-spacing:0;-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{min-height:44px;padding:0 15px;border:1px solid var(--glass-border);border-radius:12px;background:var(--glass-strong);color:var(--label);box-shadow:0 1px #ffffffb3 inset;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .12s ease}button:hover{border-color:#007aff47;background:#fffffff5}button:active{transform:scale(.97)}button:focus-visible,input:focus-visible{outline:3px solid rgba(0,122,255,.3);outline-offset:2px}button:disabled{cursor:default;opacity:.36;transform:none}.lucide{width:20px;height:20px;flex:0 0 auto}.shell{min-height:100vh;min-height:100dvh}#app.game-view{width:100%;height:100dvh;overflow:hidden}.topbar{position:sticky;top:0;z-index:20;display:flex;min-height:54px;align-items:center;justify-content:space-between;padding:max(5px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 5px max(16px,env(safe-area-inset-left));border-bottom:1px solid var(--separator);background:#f4f8fab8;box-shadow:0 1px #ffffffb8 inset;-webkit-backdrop-filter:saturate(180%) blur(22px);backdrop-filter:saturate(180%) blur(22px)}h1{margin:0;font-size:17px;font-weight:650;line-height:1.2;letter-spacing:0}.menu-wrap{position:relative}.menu-button{display:grid;width:44px;min-height:44px;padding:0;place-items:center;border-radius:50%;background:var(--glass);-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px)}.menu-button .lucide{width:22px;height:22px}.app-menu{position:absolute;top:calc(100% + 9px);right:0;z-index:30;display:grid;width:236px;overflow:hidden;padding:6px;border:1px solid var(--glass-border);border-radius:18px;background:#f7fafcd1;box-shadow:0 18px 48px #2b384833,0 1px #ffffffd6 inset;-webkit-backdrop-filter:saturate(180%) blur(24px);backdrop-filter:saturate(180%) blur(24px)}.app-menu[hidden]{display:none}.app-menu button{display:flex;min-height:48px;align-items:center;gap:12px;padding:0 12px;border:0;border-radius:11px;background:transparent;box-shadow:none;font-size:15px;font-weight:550;text-align:left}.app-menu button:hover,.app-menu button.active{background:#007aff1a;color:var(--system-blue)}.app-menu button.destructive{margin-top:5px;border-top:1px solid var(--separator);border-radius:0 0 11px 11px;color:var(--system-red)}.app-menu button.destructive:hover{background:#ff3b301a}.view{display:none}.view.active{display:block}#view-game.active{display:grid;min-height:calc(100dvh - 55px);padding:5px 6px max(5px,env(safe-area-inset-bottom));place-items:start center;overflow:hidden}.game-screen{--play-width: min( calc(100vw - 12px) , 430px);display:grid;width:100%;justify-items:center}.stage{position:relative;width:var(--play-width);aspect-ratio:390 / 680;overflow:hidden;border:1px solid rgba(255,255,255,.9);border-radius:20px;background:var(--content-background);box-shadow:var(--shadow-soft),0 0 0 1px #3c3c4314}canvas{position:absolute;inset:0;display:block;width:100%!important;height:100%!important}.game-hud{position:absolute;top:11px;right:11px;left:11px;z-index:3;display:grid;grid-template-columns:1fr 1.32fr 1fr;align-items:stretch;padding:5px;border:1px solid var(--glass-border);border-radius:16px;background:var(--glass);box-shadow:var(--shadow-control),0 1px #ffffffb8 inset;pointer-events:none;-webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px)}.hud-stat,.hud-timer{display:grid;min-width:0;min-height:49px;align-content:center;gap:2px;padding:3px 8px}.hud-stat:first-child,.hud-timer{border-right:1px solid var(--separator)}.hud-stat:last-child{text-align:right}.hud-stat span,.hud-timer span{color:var(--secondary-label);font-size:11px;font-weight:550;line-height:1.1}.hud-stat strong{overflow:hidden;font-size:15px;font-weight:650;line-height:1.2;text-overflow:ellipsis}.hud-timer{text-align:center}.hud-timer strong{font-size:24px;font-weight:650;line-height:1;font-variant-numeric:tabular-nums}.hud-timer small{display:block;overflow:hidden;max-width:118px;color:var(--secondary-label);font-size:11px;font-weight:550;text-overflow:ellipsis;white-space:nowrap}.start-overlay{position:absolute;inset:0;z-index:5;display:grid;align-content:center;justify-items:center;gap:13px;padding:24px 24px 92px;background:#f7fafb24}.start-overlay[hidden]{display:none}.start-overlay p{max-width:280px;margin:0;padding:7px 12px;border:1px solid var(--glass-border);border-radius:999px;background:var(--glass);color:var(--label);font-size:14px;font-weight:650;text-align:center;-webkit-backdrop-filter:saturate(180%) blur(14px);backdrop-filter:saturate(180%) blur(14px)}.start-button{display:flex;min-width:174px;min-height:56px;align-items:center;justify-content:center;gap:9px;border-color:#007aff99;border-radius:16px;background:var(--system-blue);color:#fff;font-size:17px;font-weight:700;box-shadow:0 10px 26px #007aff47,0 1px #ffffff4d inset}.start-button:hover{border-color:var(--system-blue-pressed);background:var(--system-blue-pressed)}.controls{position:absolute;right:9px;bottom:max(9px,env(safe-area-inset-bottom));left:9px;z-index:7;display:grid;grid-template-columns:1fr 1fr 1.2fr 1fr 1fr;gap:4px;padding:6px;border:1px solid var(--glass-border);border-radius:18px;background:var(--glass);box-shadow:var(--shadow-control),0 1px #ffffffb8 inset;-webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px)}.controls button{display:grid;min-width:0;min-height:52px;padding:0;place-items:center;border:0;border-radius:12px;background:transparent;box-shadow:none;color:var(--label);touch-action:manipulation;-webkit-user-select:none;user-select:none}.controls button:hover{background:#ffffff9e}.controls button .lucide{width:23px;height:23px}.controls .drop-control{display:flex;flex-direction:column;gap:1px;border-radius:14px;background:var(--system-blue);color:#fff;font-size:11px;font-weight:700}.controls .drop-control:hover{background:var(--system-blue-pressed)}.controls .drop-control .lucide{width:20px;height:20px}#view-capture.active,#view-characters.active{min-height:calc(100dvh - 55px)}.capture-grid{display:grid;width:min(100%,860px);grid-template-columns:minmax(280px,380px) minmax(280px,360px);align-items:start;justify-content:center;gap:38px;margin:0 auto;padding:26px 22px 38px}.camera-box{position:relative;overflow:hidden;width:min(100%,360px);aspect-ratio:9 / 16;justify-self:center;padding:4px;border:1px solid var(--glass-border);border-radius:24px;background:var(--glass-strong);box-shadow:var(--shadow-soft),0 1px #ffffffd1 inset}video{display:block;width:100%;height:100%;aspect-ratio:9 / 16;border-radius:19px;background:#111318;object-fit:contain}.camera-switch-button{position:absolute;top:12px;right:12px;z-index:3;display:grid;width:46px;height:46px;padding:0;place-items:center;border:1px solid rgba(255,255,255,.42);border-radius:50%;background:#1d1d1f80;color:#fff;box-shadow:0 8px 20px #0003,0 1px #ffffff38 inset;-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px)}.camera-switch-button:hover{background:#1d1d1fad}.camera-switch-button:disabled{opacity:.58}.camera-switch-button .lucide{width:22px;height:22px}.capture-form{display:flex;flex-direction:column;gap:15px;padding-top:12px}.capture-form label{display:grid;gap:8px;color:var(--secondary-label);font-size:13px;font-weight:600}input{width:100%;min-height:50px;padding:0 14px;border:1px solid var(--glass-border);border-radius:12px;background:var(--glass-strong);color:var(--label);box-shadow:0 1px #ffffffb8 inset,var(--shadow-control)}input::placeholder{color:var(--tertiary-label)}.camera-actions{position:absolute;right:12px;bottom:12px;left:12px;z-index:2;display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:6px;border:1px solid rgba(255,255,255,.52);border-radius:18px;background:#eef4f894;box-shadow:0 8px 24px #0003,0 1px #ffffffa3 inset;-webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px)}.camera-actions button{display:flex;min-width:0;min-height:50px;align-items:center;justify-content:center;gap:7px;padding:0 8px;border-color:#ffffff6b;background:#ffffffb3;font-size:13px;font-weight:650}.camera-actions .primary-action{border-color:#007aff94;background:#007affdb;color:#fff;box-shadow:0 8px 22px #007aff38,0 1px #ffffff47 inset}.camera-actions .primary-action:hover{background:var(--system-blue-pressed)}.capture-status{margin:0;padding:13px 14px;border:1px solid var(--glass-border);border-radius:12px;background:var(--glass);color:var(--secondary-label);font-size:13px;font-weight:500;line-height:1.55;box-shadow:var(--shadow-control);-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px)}.capture-status.processing{border-color:#ff9f0a4d;background:#fff8e7c7;color:#714a00}.capture-status.success{border-color:#34c7594d;background:#ebfaefcc;color:#176d2d}.capture-status.error{border-color:#ff3b304d;background:#ffefeed1;color:#9e241d}.roster{display:grid;width:min(100%,1040px);grid-template-columns:repeat(auto-fill,minmax(280px,320px));justify-content:center;gap:14px;margin:0 auto;padding:24px 22px 38px}.character-card{display:grid;min-height:112px;grid-template-columns:84px 1fr;align-items:center;gap:14px;padding:13px;border:1px solid var(--glass-border);border-radius:16px;background:var(--glass);box-shadow:var(--shadow-control),0 1px #ffffffc7 inset;-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px)}.character-card.disabled{opacity:.56}.character-card img{width:84px;height:84px;padding:5px;border:1px solid rgba(255,255,255,.72);border-radius:14px;background:#fff6;object-fit:contain}.character-details{display:grid;min-width:0;gap:4px}.character-details strong{font-size:15px;font-weight:650}.character-card span{color:var(--secondary-label);font-size:13px}.character-toggle{display:flex;width:fit-content;align-items:center;gap:8px;margin-top:7px;font-size:13px;font-weight:650;cursor:pointer}.character-toggle input{appearance:none;width:48px;min-height:28px;margin:0;padding:2px;border:0;border-radius:14px;background:#c7c7cc;box-shadow:0 0 0 1px #3c3c431a inset;cursor:pointer;transition:background-color .16s ease}.character-toggle input:before{display:block;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 2px 5px #0003;content:"";transition:transform .18s ease}.character-toggle input:checked{background:var(--system-green)}.character-toggle input:checked:before{transform:translate(20px)}.character-card strong,.character-card span{overflow-wrap:anywhere}.toast{position:fixed;right:16px;bottom:max(16px,env(safe-area-inset-bottom));z-index:40;max-width:min(360px,calc(100vw - 32px));padding:13px 15px;border:1px solid rgba(255,255,255,.2);border-radius:14px;background:#1d1d1fc7;color:#fff;box-shadow:0 14px 34px #0003;font-size:14px;font-weight:550;opacity:0;pointer-events:none;transform:translateY(8px) scale(.98);transition:opacity .18s ease,transform .18s ease;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.toast.show{opacity:1;transform:translateY(0) scale(1)}@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){.topbar,.app-menu,.game-hud,.controls,.capture-status,.character-card{background:#fffffff0}}@media(max-width:680px){.capture-grid{grid-template-columns:1fr;gap:18px;padding:14px 14px 30px}.camera-box{width:min(100%,360px,calc((100dvh - 76px)*.5625))}.capture-form{width:min(100%,360px);justify-self:center;padding-top:0}.roster{grid-template-columns:1fr;padding:14px 14px 30px}.character-card{width:100%}}@media(max-width:350px){.camera-actions{right:9px;bottom:9px;left:9px;gap:5px;padding:5px}.camera-actions button{gap:5px;padding-inline:5px;font-size:12px}.camera-actions button .lucide{width:18px;height:18px}}@media(max-height:700px)and (max-width:680px){.game-screen{--play-width: min( calc(100vw - 12px) , 348px)}}@media(max-height:640px)and (max-width:680px){.game-screen{--play-width: min( calc(100vw - 12px) , 334px)}.controls button{min-height:48px}}@media(max-height:580px)and (max-width:680px){.topbar{min-height:48px;padding-block:2px}#view-game.active{min-height:calc(100dvh - 49px);padding-top:3px}.game-screen{--play-width: min( calc(100vw - 12px) , 296px)}.controls{padding:4px}.controls button{min-height:44px}}@media(prefers-contrast:more){:root{--glass: rgba(255, 255, 255, .9);--glass-strong: #ffffff;--glass-border: rgba(29, 29, 31, .34);--separator: rgba(29, 29, 31, .38)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
