body { font-family: 'Quicksand', sans-serif; }
[hidden] { display: none !important; }

.st-wrap { --acc: #2dd4bf; --ink: #eaf2ff; display: flex; justify-content: center; padding: 8px 10px 20px; }
.st-card { width: 100%; max-width: 640px; margin: 0 auto; color: var(--ink); }
.st-stage { position: relative; margin: 0 auto; overflow: hidden; border-radius: 18px; background: #0b1220; box-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); touch-action: none; user-select: none; -webkit-user-select: none; }
.st-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; }

/* HUD */
.st-hud { z-index: 3; position: absolute; left: 0; right: 0; top: 0; padding: 12px 14px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.st-hud > * { pointer-events: none; }
.st-score { font-weight: 700; font-size: calc(var(--sz, 400px) * 0.115); line-height: 1; letter-spacing: -.01em; }
.st-sub { font-size: calc(var(--sz, 400px) * 0.033); font-weight: 700; letter-spacing: .12em; opacity: .85; margin-top: 4px; }
.st-dot { margin: 0 .5em; opacity: .6; }
.st-hud-r { display: flex; gap: 6px; align-items: center; pointer-events: auto; }
.st-chip { font-size: calc(var(--sz, 400px) * 0.03); font-weight: 700; letter-spacing: .14em; padding: 5px 10px; border-radius: 999px; background: rgba(8,14,30,.55); border: 1px solid rgba(255,255,255,.2); }
.st-time { color: #fde68a; }
.st-ib { pointer-events: auto; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.22); background: rgba(8,14,30,.55); color: #fff; font-size: 14px; cursor: pointer; font-family: inherit; }
.st-ib:hover, .st-ib:focus-visible { background: rgba(45,212,191,.35); outline: none; }
.st-streak { position: absolute; left: 14px; top: calc(var(--sz, 400px) * 0.2); font-weight: 700; font-size: calc(var(--sz, 400px) * 0.04); color: #fde68a; }
.st-timebar { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: rgba(255,255,255,.12); }
.st-timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #f59e0b, #fde68a); transition: width .12s linear; }

.st-ready { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 22%; pointer-events: none; }
.st-ready span { font-weight: 700; letter-spacing: .18em; font-size: calc(var(--sz, 400px) * 0.05); padding: 12px 22px; border-radius: 999px; background: rgba(8,14,30,.7); border: 1px solid rgba(255,255,255,.3); animation: stPulse 1.2s ease-in-out infinite; }
@keyframes stPulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }
.st-toast { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); background: rgba(8,14,30,.88); border: 1px solid rgba(255,255,255,.2); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 6; white-space: nowrap; }

/* Overlays */
.st-ov { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 16px 18px; text-align: center; gap: 10px; overflow-y: auto; }
.st-ov > :first-child { margin-top: auto; }
.st-ov > :last-child { margin-bottom: auto; }
.st-ov-start { background: linear-gradient(180deg, rgba(10,16,40,.78), rgba(10,16,40,.93)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.st-ov-solid { background: #0b1220; }
.st-ov-count { background: rgba(8,14,30,.55); justify-content: center; }
.st-ov-count > * { margin: 0; }
.st-count { font-size: calc(var(--sz, 400px) * 0.3); font-weight: 700; animation: stPulse 1s ease-in-out infinite; }
.st-brand { font-size: calc(var(--sz, 400px) * 0.034); letter-spacing: .32em; font-weight: 700; color: var(--acc); }
.st-title { margin: 0; font-size: calc(var(--sz, 400px) * 0.125); line-height: 1; font-weight: 700; letter-spacing: .03em; background: linear-gradient(180deg, #fff, #9be7dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-tag { margin: 0; font-size: calc(var(--sz, 400px) * 0.04); opacity: .85; font-weight: 600; }
.st-h2 { margin: 0; letter-spacing: .2em; font-size: 20px; }
.st-modes { display: flex; gap: 8px; width: 100%; max-width: 360px; justify-content: center; margin-top: 6px; }
.st-modes button { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: center; padding: 10px 6px; border-radius: 14px; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; font-family: inherit; transition: transform .12s, border-color .12s, background .12s; }
.st-modes button b { font-size: 15px; }
.st-modes button small { font-size: 11px; opacity: .75; white-space: nowrap; }
.st-modes button:hover { transform: translateY(-1px); }
.st-modes button[aria-checked="true"] { border-color: var(--acc); background: rgba(45,212,191,.2); box-shadow: 0 0 0 3px rgba(45,212,191,.18); }
.st-modes button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.st-modes-sm { max-width: none; margin: 0; }
.st-modes-sm button { padding: 8px 6px; font-size: 13px; font-weight: 700; flex-direction: row; justify-content: center; white-space: nowrap; }
.st-blurb { margin: 2px 0 0; font-size: 14px; max-width: 320px; opacity: .92; min-height: 2.6em; }
.st-best { margin: 0; font-size: 13px; font-weight: 700; color: #fde68a; }
.st-play { margin-top: 6px; min-width: 190px; padding: 14px 30px; border: none; border-radius: 999px; background: linear-gradient(180deg, #5eead4, #14b8a6); color: #042f2a; font-weight: 700; font-size: 18px; letter-spacing: .16em; cursor: pointer; font-family: inherit; box-shadow: 0 6px 0 #0d7a6e, 0 10px 24px rgba(0,0,0,.35); }
.st-play:active { transform: translateY(3px); box-shadow: 0 3px 0 #0d7a6e; }
.st-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.st-btn { padding: 9px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .1em; cursor: pointer; font-family: inherit; }
.st-btn:hover { background: rgba(255,255,255,.16); }
.st-link { background: none; border: none; color: #cfe4ff; text-decoration: underline; font-size: 13px; cursor: pointer; font-family: inherit; }

/* Options */
.st-opts { align-items: stretch; text-align: left; }
.st-opts .st-h2 { text-align: center; }
.st-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 700; font-size: 14px; }
.st-tog { min-width: 78px; padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .08em; cursor: pointer; font-family: inherit; white-space: nowrap; }
.st-hint { font-size: 12px; opacity: .7; margin-top: -4px; }
.st-back { align-self: center; }
#trophy-list { max-height: 240px; overflow-y: auto; text-align: left; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 6px; }

/* Bottom bar */
.st-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px auto 0; max-width: 640px; flex-wrap: nowrap; }
.st-keys { font-size: 12px; opacity: .65; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-share { white-space: nowrap; }

/* Responsive */
.tight .st-modes button b { font-size: 13px; }
.tight .st-modes button small { font-size: 10px; }
.tight .st-play { min-width: 160px; padding: 12px 24px; }
.compact .st-blurb { min-height: 0; font-size: 12.5px; }
.compact .st-ov { gap: 6px; padding: 10px 14px; }
.land .st-bar { display: none; }
.land .st-ov { gap: 4px; padding: 6px 12px; }
.land .st-brand, .land .st-tag { display: none; }
.land .st-title { font-size: 28px; }
.land .st-modes button { padding: 6px 4px; }
.land .st-modes button small { display: none; }
.land .st-ib { width: 30px; height: 30px; }
.land .st-streak { display: none; }
.land .st-row { padding: 4px 2px; }
.land .st-blurb { min-height: 0; }
.land .st-play { padding: 8px 22px; font-size: 15px; min-width: 150px; margin-top: 2px; }
@media (max-height: 560px) { .st-wrap { padding-top: 2px; } }
@media (prefers-reduced-motion: reduce) { .st-ready span, .st-count { animation: none; } }
