body { font-family: 'Quicksand', sans-serif; }
[hidden] { display: none !important; }
:root { --sw-accent: #ff7a59; --sw-accent2: #ffb199; --sw-ink: #e8fbff; --sw-deep: #06202e; --sw-panel: #0a2a3d; --sw-line: rgba(255,255,255,.14); --nach-top: 64px; }
html, body { margin: 0; background: var(--sw-deep); color: var(--sw-ink); }
body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: contain; }
#beta-report-trigger { display: none !important; }

.sw-wrap { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6px 8px 10px; box-sizing: border-box; min-height: 100dvh; background: radial-gradient(120% 70% at 50% 0%, #0f4a63 0%, var(--sw-deep) 70%); }
.sw-stage { position: relative; width: 400px; height: 640px; border-radius: 22px; overflow: hidden; background: #0a3b5a; border: 1px solid var(--sw-line); box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 40px -14px var(--sw-accent); touch-action: none; user-select: none; -webkit-user-select: none; }
#swCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }

.sw-hud { position: absolute; left: 0; right: 0; top: 0; padding: 10px 12px 0; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; z-index: 3; }
.sw-score b { display: block; font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0,0,0,.55), 0 0 18px rgba(255,122,89,.45); }
.sw-score small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; opacity: .8; font-variant-numeric: tabular-nums; }
.sw-btns { display: flex; gap: 8px; pointer-events: auto; }
.sw-btns button, .sw-bar button { font: inherit; cursor: pointer; border: 1px solid var(--sw-line); background: rgba(6,32,46,.62); color: var(--sw-ink); border-radius: 14px; min-width: 44px; height: 44px; font-size: 18px; font-weight: 800; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sw-btns button:active, .sw-bar button:active { transform: scale(.95); }

.sw-chips { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; z-index: 3; }
.sw-chip { white-space: nowrap; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .5px; background: rgba(6,32,46,.66); border: 1px solid var(--sw-line); }
.sw-chip.mult { background: var(--sw-accent); border-color: transparent; color: #2b0d05; }
.sw-chip.pw { color: #bff6ff; }
.sw-chip.gold { color: #ffe08a; }

.sw-hint { position: absolute; left: 0; right: 0; bottom: 74px; text-align: center; font-weight: 800; font-size: 15px; letter-spacing: .5px; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; z-index: 2; animation: swBob 1.6s ease-in-out infinite; }
.sw-hint small { display: block; font-weight: 700; font-size: 12px; opacity: .8; margin-top: 3px; }
.sw-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96px; font-weight: 800; text-shadow: 0 4px 24px rgba(0,0,0,.6); pointer-events: none; z-index: 5; }
@keyframes swBob { 50% { transform: translateY(-5px); } }

.sw-ov { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 18px 16px; box-sizing: border-box; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sw-ov > * { flex-shrink: 0; }
.sw-ov > :first-child { margin-top: auto; }
.sw-ov > :last-child { margin-bottom: auto; }
.sw-start { background: radial-gradient(90% 60% at 50% 18%, rgba(255,122,89,.20), transparent 70%), linear-gradient(180deg, rgba(6,32,46,.78), rgba(6,32,46,.93)); text-align: center; }
.sw-pause { background: rgba(6,32,46,.9); text-align: center; }
.sw-opts { background: #082637; /* opaque so nothing ghosts through */ }

.sw-logo { font-size: 54px; font-weight: 800; letter-spacing: 6px; line-height: 1; color: var(--sw-accent); text-shadow: 0 0 28px rgba(255,122,89,.55); }
.sw-tag { margin: 8px auto 16px; max-width: 290px; font-size: 14px; font-weight: 700; opacity: .85; line-height: 1.4; }
.sw-modes { display: flex; gap: 8px; justify-content: center; margin: 4px 0 10px; }
.sw-mode { flex: 1; max-width: 120px; font: inherit; cursor: pointer; padding: 10px 6px; border-radius: 16px; border: 2px solid var(--sw-line); background: rgba(255,255,255,.06); color: var(--sw-ink); font-weight: 800; font-size: 14px; letter-spacing: 1px; }
.sw-mode small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; opacity: .7; margin-top: 2px; }
.sw-mode[aria-checked="true"] { border-color: var(--sw-accent); background: rgba(255,122,89,.18); box-shadow: 0 0 18px -4px var(--sw-accent); }
.sw-mdesc { min-height: 38px; font-size: 13px; font-weight: 700; opacity: .88; line-height: 1.4; padding: 0 8px; }
.sw-mbest { margin: 6px 0 14px; font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #ffe08a; }
.sw-play { font: inherit; cursor: pointer; border: 0; border-radius: 18px; padding: 15px 20px; font-size: 18px; font-weight: 800; letter-spacing: 3px; color: #2b0d05; background: var(--sw-accent); box-shadow: 0 8px 24px -6px var(--sw-accent); }
.sw-play:active { transform: scale(.97); }
.sw-ghost { font: inherit; cursor: pointer; border: 1px solid var(--sw-line); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,.07); color: var(--sw-ink); font-weight: 800; letter-spacing: 1.5px; font-size: 13px; }
.sw-note { margin-top: 12px; font-size: 11.5px; font-weight: 700; opacity: .6; }

.sw-h { font-size: 20px; font-weight: 800; letter-spacing: 3px; margin: 0 0 12px; color: var(--sw-accent); text-align: center; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; margin-bottom: 8px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--sw-line); font-weight: 800; font-size: 14px; }
.sw-row small { display: block; font-size: 11px; font-weight: 700; opacity: .65; letter-spacing: .3px; }
.sw-row button { font: inherit; cursor: pointer; border: 1px solid var(--sw-line); background: rgba(255,255,255,.1); color: var(--sw-ink); border-radius: 10px; padding: 7px 12px; font-weight: 800; font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.sw-row button[aria-pressed="true"] { background: var(--sw-accent); color: #2b0d05; border-color: transparent; }
.sw-opts .sw-modes { margin-top: 0; }
#trophy-list { text-align: left; max-height: 260px; overflow-y: auto; margin-bottom: 8px; padding: 2px; border-radius: 12px; }
.sw-btnrow { display: flex; gap: 10px; margin-top: 6px; }
.sw-btnrow > button { flex: 1; }

.sw-bar { display: flex; gap: 8px; margin-top: 8px; width: 400px; max-width: 100%; justify-content: center; }
.sw-bar button { flex: 1; min-width: 0; font-size: 12px; letter-spacing: 1.5px; white-space: nowrap; }

/* compact / tight / landscape variants (set by fit()) */
.sw-wrap.compact .sw-logo { font-size: 42px; }
.sw-wrap.compact .sw-tag { margin: 6px auto 10px; font-size: 13px; }
.sw-wrap.tight .sw-mode { font-size: 12px; padding: 8px 4px; letter-spacing: .5px; }
.sw-wrap.tight .sw-mode small { display: none; }
.sw-wrap.land { flex-direction: row; justify-content: center; align-items: flex-start; gap: 10px; }
.sw-wrap.land .sw-bar { flex-direction: column; width: 150px; margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .sw-hint { animation: none; } }

.sw-wrap.land .sw-tag { display: none; }
.sw-wrap.land .sw-logo { font-size: 30px; letter-spacing: 4px; }
.sw-wrap.land .sw-ov { padding: 10px 10px; }
.sw-wrap.land .sw-mdesc { min-height: 0; font-size: 11px; }
.sw-wrap.land .sw-mbest { margin: 2px 0 8px; font-size: 11px; }
.sw-wrap.land .sw-play { padding: 10px 14px; font-size: 15px; }
.sw-wrap.land .sw-note { margin-top: 6px; }
.sw-wrap.land .sw-mode { padding: 6px 2px; font-size: 11px; }
.sw-wrap.land .sw-mode small { display: none; }
.sw-wrap.land .sw-score b { font-size: 22px; }
.sw-wrap.land .sw-btns button { min-width: 36px; height: 36px; font-size: 15px; }
