*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top,#2b2d42,#14151f);color:#f1f1f1;font-family:system-ui,sans-serif}.app{--history-h: 150px;--stage: calc(100dvh - var(--history-h) - 190px);--wheel: clamp(160px, min(40vw, var(--stage)), 560px);--preview-w: clamp(180px, min(42vw, calc((var(--stage) + 80px) * 1.33)), 640px);height:100dvh;overflow:hidden;display:flex;flex-direction:column;align-items:center;padding:1rem 1rem .75rem}h1{margin:0 0 .75rem;font-size:1.6rem;letter-spacing:.05em}.layout{flex:1;min-height:0;display:flex;justify-content:center;align-items:center;gap:clamp(1rem,4vw,3rem);width:100%;max-width:1300px}.wheel-col{display:flex;flex-direction:column;align-items:center}.wheel-wrap{position:relative;width:var(--wheel);aspect-ratio:1}.wheel{width:100%;height:100%;border-radius:50%;box-shadow:0 10px 40px #00000080}.label{fill:#fff;font-size:13px;font-weight:800;text-anchor:middle;dominant-baseline:middle;paint-order:stroke;stroke:#0006;stroke-width:3px}.pointer{position:absolute;top:-12px;left:50%;transform:translate(-50%);width:0;height:0;border-left:15px solid transparent;border-right:15px solid transparent;border-top:28px solid #fff;filter:drop-shadow(0 3px 4px rgba(0,0,0,.5));z-index:2}.play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:22%;aspect-ratio:1;border-radius:50%;border:4px solid #fff;background:#14151f;color:#fff;font-size:calc(var(--wheel) * .08);cursor:pointer;box-shadow:0 4px 16px #00000080;transition:transform .15s,background .15s;touch-action:none;user-select:none;-webkit-user-select:none}.play:hover:not(:disabled){transform:translate(-50%,-50%) scale(1.08);background:#22243a}.play:disabled{cursor:default;opacity:.8}.play.charging{transform:translate(-50%,-50%) scale(calc(1 + var(--charge) * .15));background:color-mix(in srgb,#e63946 calc(var(--charge) * 100%),#14151f);transition:none}.power{width:var(--wheel);height:10px;margin-top:.9rem;border-radius:5px;background:#ffffff1f;overflow:hidden}.power-fill{height:100%;background:linear-gradient(90deg,#2a9d8f,#e9c46a,#e63946);background-size:var(--wheel) 100%}.result{margin:.6rem 0 0;font-size:1.15rem;font-weight:600;min-height:1.5em;text-align:center}.result span{font-weight:800}.preview{width:var(--preview-w);display:flex;flex-direction:column;gap:.6rem}.preview-frame{display:block;width:100%;padding:0;cursor:zoom-in;position:relative;aspect-ratio:4 / 3;border-radius:14px;overflow:hidden;border:5px solid var(--seg-color);background:#000;box-shadow:0 10px 40px #00000080}.preview-frame img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover;opacity:0}.preview-frame img.active{opacity:1}.preview.winner .preview-frame{animation:pulse 1s ease-in-out 2}@keyframes pulse{50%{transform:scale(1.03);box-shadow:0 0 40px var(--seg-color)}}.preview-caption{display:flex;align-items:center;gap:.6rem;font-size:1.15rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.swatch{flex:none;display:inline-grid;place-items:center;min-width:2rem;height:2rem;padding:0 .35rem;border-radius:7px;background:var(--seg-color);color:#fff;font-size:.95rem;text-shadow:0 1px 2px rgba(0,0,0,.5)}.history{flex:none;width:100%;max-width:1300px;height:var(--history-h);margin-top:.75rem;padding-top:.6rem;border-top:1px solid rgba(255,255,255,.15);display:flex;flex-direction:column}.history-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.5rem}.history-header h2{margin:0;font-size:1rem}.history-empty{margin:0;opacity:.6}.clear{padding:.3rem .8rem;border-radius:8px;border:1px solid rgba(255,255,255,.3);background:transparent;color:#f1f1f1;cursor:pointer}.clear:hover:not(:disabled){background:#ffffff1a}.clear:disabled{opacity:.4;cursor:default}.history-list{flex:1;min-height:0;list-style:none;margin:0;padding:0 0 4px;display:flex;gap:.6rem;overflow-x:auto;overflow-y:hidden}.history-list li{position:relative;flex:none;height:100%;aspect-ratio:4 / 3.2;border-radius:8px;overflow:hidden;border:3px solid var(--seg-color);background:#000}.history-item{width:100%;height:100%;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:zoom-in;display:flex;flex-direction:column}.history-list img{display:block;flex:1;min-height:0;width:100%;object-fit:cover}.history-order{position:absolute;top:4px;left:4px;min-width:1.4rem;height:1.4rem;padding:0 .25rem;display:grid;place-items:center;border-radius:5px;background:var(--seg-color);font-size:.75rem;font-weight:800;text-shadow:0 1px 2px rgba(0,0,0,.5)}.history-name{flex:none;padding:.2rem .4rem;font-size:.75rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#1c1d2b}.lightbox{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:3.5rem 1rem 1.5rem;background:#08080eeb;cursor:zoom-out;animation:fade-in .2s ease-out}.lightbox img{max-width:100%;max-height:calc(100dvh - 9rem);object-fit:contain;border-radius:12px;border:5px solid var(--seg-color);box-shadow:0 20px 60px #0009;cursor:default}.lightbox-caption{display:flex;align-items:center;gap:.7rem;font-size:1.4rem;font-weight:700;cursor:default}.lightbox-close{position:absolute;top:.8rem;right:.8rem;width:2.8rem;height:2.8rem;border-radius:50%;border:2px solid rgba(255,255,255,.6);background:#ffffff1a;color:#fff;font-size:1.3rem;line-height:1;cursor:pointer}.lightbox-close:hover,.lightbox-close:focus-visible{background:#ffffff40;outline:none}@keyframes fade-in{0%{opacity:0}}@media(orientation:portrait){.app{--history-h: 110px;--wheel: clamp(140px, min(78vw, calc((100dvh - var(--history-h) - 150px) * .5)), 520px);--preview-w: clamp(140px, min(85vw, calc((100dvh - var(--history-h) - 150px) * .42)), 520px)}.layout{flex-direction:column;gap:.6rem}h1{font-size:1.3rem;margin-bottom:.5rem}.result{font-size:1rem;margin-top:.4rem}.power{margin-top:.6rem}.preview-caption{font-size:1rem}.swatch{min-width:1.6rem;height:1.6rem}}
