.sw-tabs { margin-bottom: 14px; }
.sw-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 22px; align-items: start; }
@media (max-width: 760px) { .sw-grid { grid-template-columns: 1fr; } }
.sw-stage { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.sw-wheel-wrap { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin: 14px auto 0; }
.sw-wheel { display: block; width: 100%; height: auto; border-radius: 50%; cursor: pointer; box-shadow: 0 14px 40px rgba(30, 20, 90, .25); touch-action: manipulation; }
.sw-wheel:focus-visible { outline: 4px solid color-mix(in srgb, var(--c) 50%, transparent); outline-offset: 4px; }
.sw-pointer { position: absolute; top: -14px; left: 50%; width: 34px; height: 44px; margin-left: -17px; transform-origin: 50% 20%; z-index: 2; pointer-events: none;
  background: #1f1b3a; clip-path: polygon(50% 100%, 0 0, 100% 0); filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.sw-pointer::after { content: ""; position: absolute; inset: 4px 6px 10px; background: #fbbf24; clip-path: polygon(50% 100%, 0 0, 100% 0); }
.sw-pointer.flick { animation: swFlick .12s ease-out; }
@keyframes swFlick { 0% { transform: rotate(-14deg); } 100% { transform: rotate(0); } }
.sw-hub { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 5px solid #fff; background: #1f1b3a; color: #fff;
  font: 900 clamp(13px, 3.6vw, 20px)/1 "Jakarta", system-ui, sans-serif; letter-spacing: .04em; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.3); transition: transform .12s; }
.sw-hub:hover { transform: translate(-50%, -50%) scale(1.05); }
.sw-hub:disabled { cursor: default; opacity: .9; }
.sw-result { margin-top: 16px; width: 100%; text-align: center; border-radius: 16px; padding: 14px; background: color-mix(in srgb, var(--win, var(--c)) 14%, var(--card)); border: 2px solid var(--win, var(--c)); animation: swPop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes swPop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sw-result, .sw-pointer.flick { animation: none; } }
.sw-win-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sw-win { font-size: clamp(26px, 6vw, 40px); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; margin: 2px 0 4px; }
.sw-win-acts { justify-content: center; margin-top: 8px; }
.sw-tip { font-size: 13.5px; margin: 10px 0 0; }
.sw-side { min-width: 0; }
.sw-side textarea { min-height: 220px; font-size: 16px; }
.sw-btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-btnrow .btn { padding: 8px 14px; min-height: 44px; }
.sw-btnrow select { flex: 1 1 150px; width: auto; }
.sw-opts { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; }
.sw-opts label { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 36px; flex-wrap: wrap; }
.sw-opts input { flex: none; }
.sw-sel select { width: auto; min-width: 150px; }
.sw-hist { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.sw-hist summary { font-weight: 700; cursor: pointer; }
.sw-hist ol { margin: 8px 0; padding-left: 22px; max-height: 220px; overflow-y: auto; overflow-wrap: anywhere; }
.sw-hist .btn { min-height: 36px; padding: 5px 12px; font-size: 14px; }
.sw-nums { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sw-nums span { background: color-mix(in srgb, var(--c) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); border-radius: 10px; padding: 6px 12px; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.sw-nums.one span { font-size: 56px; padding: 10px 28px; border-radius: 18px; }
.sw-nums .more { background: none; border: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.sw-coinbox, .sw-dicebox { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.sw-coinbox h3, .sw-dicebox h3 { margin: 0; }
.sw-coin { width: 130px; height: 130px; position: relative; transform-style: preserve-3d; margin: 8px 0; }
.sw-face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font: 900 52px/1 "Jakarta", system-ui, sans-serif; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: radial-gradient(circle at 35% 30%, #fff7c2, #fbbf24 45%, #b45309); color: #7c2d12; border: 6px solid #d97706; box-shadow: inset 0 0 0 4px rgba(255,255,255,.35); }
.sw-tails { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #f1f5f9, #94a3b8 45%, #475569); color: #1e293b; border-color: #64748b; }
.sw-coinres, .sw-dicetotal { font-size: 26px; font-weight: 800; min-height: 1.3em; }
.sw-tally { margin: 0; font-size: 14px; }
.sw-dice { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; min-height: 72px; }
.sw-die { width: 64px; height: 64px; background: #fff; border-radius: 14px; border: 2px solid #d1d5db; box-shadow: 0 4px 10px rgba(0,0,0,.12); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 9px; gap: 2px; }
.sw-die i { border-radius: 50%; margin: 2px; }
.sw-die i.on { background: #111827; }
.sw-dice.rolling .sw-die { transform: rotate(8deg); }
.sw-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; display: none; }
