:root{--bg:#fafaf9;--surface:#fff;--surface-2:#f3f4f6;--surface-3:#e9ebef;--line:#e5e7eb;--text:#111827;--muted:#6b7280;--accent:#2563eb;--accent-press:#1d4ed8;--accent-soft:#e8efff;--radius:16px;--font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--ease-out:cubic-bezier(.22,1,.36,1)}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;margin:0;line-height:1.5}h1,h2,p{margin:0}.app{padding:max(20px,env(safe-area-inset-top))16px max(32px,env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "names" "wheel" "winners";gap:12px;max-width:1040px;margin:0 auto}.top{grid-area:top;padding:4px 4px 8px}.top h1{letter-spacing:-.02em;font-size:28px;font-weight:800;line-height:1.2}.top p{color:var(--muted);margin-top:4px;font-size:15px}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);min-width:0;padding:16px}.names{grid-area:names}.wheel-card{grid-area:wheel}.winners{grid-area:winners}.card-head{display:flex;justify-content:space-between;align-items: center;gap:12px;min-height:44px;margin-bottom:12px}.card-head h2{font-size:17px;font-weight:700}.count{color:var(--muted);background:var(--surface-2);border-radius:999px;flex-shrink:0;padding:4px 12px;font-size:14px;font-weight:600}textarea{display:block;resize:vertical;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:12px;width:100%;min-height:140px;padding:12px 14px;transition:border-color .16s,background-color .16s;font-size:16px;line-height:1.6}textarea::placeholder{color:#9ca3af}textarea:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-color:#0000}textarea[readonly]{background:var(--surface-2);color:var(--muted)}.names-foot{display:flex;justify-content:space-between;align-items: center;gap:12px;margin-top:8px}.hint{color:var(--muted);min-width:0;font-size:13px}.btn{appearance:none;font:inherit;cursor:pointer;touch-action:manipulation;white-space:nowrap;border:0;border-radius:12px;flex-shrink:0;min-height:44px;padding:0 16px;transition:background-color .16s,color .16s,transform .12s,opacity .16s;font-weight:700}.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn:active:not(:disabled){transform:scale(.97)}.btn:disabled{cursor:not-allowed;opacity:.45}.btn.primary{background:var(--accent);color:#fff}.btn.primary:hover:not(:disabled){background:var(--accent-press)}.btn.ghost{background:var(--surface-2);color:var(--text);font-size:14px}.btn.ghost:hover:not(:disabled){background:var(--surface-3)}.stage{position:relative;width:min(100%,440px);margin:0 auto;padding-top:22px}.pointer{position:absolute;transform-origin:50% 6px;fill:var(--text);z-index:1;will-change:transform;width:28px;height:36px;top:0;left:50%;transform:translate(-50%)}.wheel-box{position:relative;aspect-ratio:1;width:100%}canvas{display:block;cursor:pointer;touch-action:manipulation;width:100%;height:100%}.spin{display:block;width:100%;max-width:440px;min-height:52px;margin:16px auto 0;font-size:17px}.status{text-align:center;color:var(--muted);min-height:21px;margin-top:8px;font-size:14px}.status.error{color:#b42318}.winner-list{list-style:none;display:grid;gap:8px;margin:0;padding:0}.winner-list li{display:flex;background:var(--surface-2);border-radius:12px;align-items: center;gap:12px;min-width:0;min-height:52px;padding:8px 12px}.rank{display:grid;background:var(--surface);color:var(--muted);border-radius:999px;flex-shrink:0;place-items: center;width:32px;height:32px;transition:background-color .3s,color .3s;font-size:14px;font-weight:800}.winner-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);min-width:0;font-weight:600}.winner-list li.filled{background:var(--accent-soft);animation:slot-in .52s var(--ease-out)both}.winner-list li.filled .rank{background:var(--accent);color:#fff}.winner-list li.filled .winner-name{color:var(--text);font-weight:700}@keyframes slot-in{to{opacity:1;transform:none}}.sheet-root{position:fixed;z-index:10;display:flex;justify-content:center;align-items: flex-end;inset:0}.sheet-root[hidden]{display:none}.scrim{position:absolute;opacity:0;background:#11182766;transition:opacity .32s;inset:0}.sheet{position:relative;background:var(--surface);padding:28px 20px max(20px,env(safe-area-inset-bottom));text-align:center;transition:transform .46s var(--ease-out);border-radius:24px 24px 0 0;width:100%;transform:translateY(100%)}.sheet-root.open .scrim{opacity:1}.sheet-root.open .sheet{transform:none}.sheet-rank{color:var(--muted);font-size:16px;font-weight:600}.sheet-name{letter-spacing:-.02em;overflow-wrap:anywhere;opacity:0;transition:opacity .36s ease .18s,transform .52s var(--ease-out).18s;margin:8px 0 24px;font-size:clamp(30px,9vw,44px);font-weight:800;line-height:1.15;transform:scale(.9)}.sheet-root.open .sheet-name{opacity:1;transform:none}.sheet .btn{width:100%;min-height:52px;font-size:17px}@media (min-width:640px){.sheet-root{align-items: center;padding:24px}.sheet{opacity:0;transition:transform .42s var(--ease-out),opacity .24s ease;border-radius:24px;max-width:420px;padding:32px 24px 24px;transform:translateY(16px)scale(.96)}.sheet-root.open .sheet{opacity:1}}@media (min-width:900px){.app{grid-template-columns:340px minmax(0,1fr);grid-template-rows:auto auto 1fr;grid-template-areas:"top top" "names wheel" "winners wheel";align-items: start;gap:16px;padding-top:40px}.wheel-card{position:sticky;padding:24px;top:24px}}@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:1ms!important;transition-duration:1ms!important}}
