/* Noos Splitter */
.sp-body { margin: 0; background: #0b1020; font-family: 'Quicksand', system-ui, sans-serif; color: #fff; overflow-x: hidden; }
.sp-wrap { --sz: 400px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 6px 10px; box-sizing: border-box; }
.sp-main { display: flex; justify-content: center; width: 100%; }
.sp-stage { position: relative; width: 400px; height: 560px; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.08); background: #1e1b4b; user-select: none; -webkit-user-select: none; }
#sp-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
[hidden] { display: none !important; }

/* HUD */
.sp-hud { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; padding: calc(var(--sz) * .022) calc(var(--sz) * .03); pointer-events: none; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.sp-hud-l { font-size: calc(var(--sz) * .052); color: #fb7185; letter-spacing: 2px; font-weight: 800; }
.sp-hud-l.low { animation: sp-pulse .8s infinite; }
.sp-hud-c { text-align: center; }
.sp-score { font-size: calc(var(--sz) * .075); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-wave { font-size: calc(var(--sz) * .033); font-weight: 700; opacity: .85; letter-spacing: 2px; margin-top: 2px; }
.sp-hud-r { text-align: right; }
.sp-mult { font-size: calc(var(--sz) * .05); font-weight: 800; color: #fde047; min-height: 1.1em; opacity: .55; }
.sp-mult.on { opacity: 1; }
.sp-multtrack { height: 5px; width: calc(var(--sz) * .16); margin-left: auto; background: rgba(255,255,255,.18); border-radius: 3px; overflow: hidden; }
.sp-multtrack i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #fde047, #fb923c); }
.sp-pus { position: absolute; top: calc(var(--sz) * .16); left: calc(var(--sz) * .03); display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.sp-pu { background: rgba(15,23,42,.72); border: 1.5px solid var(--c); border-radius: 12px; padding: 2px 8px; font-size: calc(var(--sz) * .034); font-weight: 800; width: fit-content; }
@keyframes sp-pulse { 50% { opacity: .45; } }

.sp-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--sz) * .3); font-weight: 800; text-shadow: 0 4px 20px rgba(0,0,0,.6); background: rgba(8,10,28,.45); pointer-events: none; }
.sp-toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(15,23,42,.92); padding: 8px 16px; border-radius: 20px; font-weight: 700; font-size: 14px; z-index: 6; }

/* overlays: OPAQUE where text-heavy, flex-start + auto margins so scrolling never clips */
.sp-ov { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow-y: auto; padding: 14px; box-sizing: border-box; background: linear-gradient(180deg, rgba(30,27,75,.94), rgba(11,16,32,.97)); backdrop-filter: blur(3px); }
.sp-ov > :first-child { margin-top: auto; }
.sp-ov > :last-child { margin-bottom: auto; }
.sp-opts { background: #0f1430; }
.sp-card { width: min(100%, 320px); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.sp-card.wide { width: min(100%, 360px); }
.sp-card h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: 3px; }
.sp-logo { font-size: calc(var(--sz) * .15); font-weight: 800; letter-spacing: 3px; line-height: 1; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.sp-logo span { color: #fb7185; }
.sp-tag { margin: -4px 0 6px; opacity: .8; font-weight: 600; }
.sp-mode { background: linear-gradient(135deg, #fb7185, #f97316); border: 0; border-radius: 16px; padding: 12px 14px; color: #fff; cursor: pointer; font-family: inherit; box-shadow: 0 5px 0 rgba(0,0,0,.28); transition: transform .08s; }
.sp-mode.rush { background: linear-gradient(135deg, #8b5cf6, #3b82f6); }
.sp-mode.daily { background: linear-gradient(135deg, #10b981, #06b6d4); }
.sp-mode:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.28); }
.sp-mode b { display: block; font-size: 20px; letter-spacing: 3px; }
.sp-mode small { display: block; opacity: .92; font-weight: 700; font-size: 13px; margin-top: 1px; }
.sp-row2 { display: flex; gap: 8px; }
.sp-row2 .sp-btn { flex: 1; }
.sp-btn { background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.25); color: #fff; font-family: inherit; font-weight: 800; letter-spacing: 2px; font-size: 14px; padding: 12px 10px; border-radius: 14px; cursor: pointer; white-space: nowrap; }
.sp-btn.pri { background: #fb7185; border-color: #fb7185; }
.sp-btn.ghost { background: transparent; opacity: .8; }
.sp-btn:active { transform: scale(.98); }
.sp-big { font-size: 48px; font-weight: 800; }
.sp-opt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.07); border-radius: 12px; padding: 8px 12px; font-weight: 700; text-align: left; }
.sp-chips { display: flex; gap: 6px; margin-left: auto; }
.sp-chip { background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; font-family: inherit; font-weight: 800; font-size: 12px; letter-spacing: 1px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.sp-hint { font-size: 11px; opacity: .65; margin: -4px 4px 0; text-align: left; }
#trophy-list { max-height: 240px; overflow-y: auto; text-align: left; background: rgba(0,0,0,.25); border-radius: 12px; padding: 6px; }

/* bottom bar */
.sp-bar { display: flex; gap: 8px; justify-content: center; width: var(--sz); max-width: 100%; }
.sp-bbtn { flex: 1; background: rgba(255,255,255,.1); border: 1.5px solid rgba(255,255,255,.2); color: #fff; font-family: inherit; font-weight: 800; letter-spacing: 1.5px; font-size: 13px; padding: 10px 6px; border-radius: 14px; cursor: pointer; white-space: nowrap; }
.sp-bbtn:disabled { opacity: .35; cursor: default; }

/* tight (narrow) / compact (short) */
.sp-wrap.tight .sp-bbtn span { display: none; }
.sp-wrap.tight .sp-logo { font-size: calc(var(--sz) * .125); letter-spacing: 1px; }
.sp-wrap.tight .sp-btn { font-size: 11px; letter-spacing: 1px; padding: 9px 4px; }
.sp-wrap.tight .sp-mode b { font-size: 16px; letter-spacing: 2px; }
.sp-wrap.compact .sp-card { gap: 6px; }
.sp-wrap.compact .sp-mode { padding: 7px 12px; }
.sp-wrap.compact .sp-mode small { display: none; }
.sp-wrap.compact .sp-tag { display: none; }
.sp-wrap.compact .sp-btn { padding: 8px; }

/* landscape phones: board left, controls column right */
.sp-wrap.land { flex-direction: row; justify-content: center; align-items: center; gap: 10px; padding: 4px; }
.sp-wrap.land .sp-bar { flex-direction: column; width: 130px; }
.sp-wrap.land .sp-bbtn span { display: inline; }
.sp-wrap.land .sp-stage { border-radius: 12px; }

@media (prefers-reduced-motion: reduce) { .sp-hud-l.low { animation: none; } }