/*! supertwentyplus licence: (c) 2026 Supertwentyplus Pte. Ltd. All rights reserved. Proprietary, not open source.
   Use only as provided on supertwentyplus.com (free or by subscription, under its Terms). Copying, reuse or hosting elsewhere,
   in whole or in part, needs a written licence: supertwentyplus@gmail.com. See LICENSE.txt at the site root. */
/* Shape-oids */
.so-app { gap: 18px; }
.so-stage {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  margin: calc(clamp(18px, 3vw, 28px) * -1) calc(clamp(18px, 3vw, 28px) * -1) 0;
  padding: clamp(12px, 3vw, 24px);
  border-radius: var(--widget-radius) var(--widget-radius) 22px 22px;
  background:
    radial-gradient(110% 70% at 100% 0%, rgba(255, 176, 59, .32), transparent 60%),
    radial-gradient(120% 70% at 0% 100%, rgba(61, 255, 154, .22), transparent 60%),
    linear-gradient(160deg, #0f2a5c, #10153a 55%, #24104f);
  color: #fff; overflow: hidden; -webkit-tap-highlight-color: transparent;
}
.so-stage:fullscreen { margin: 0; border-radius: 0; justify-content: center; padding: 14px; }
.so-stage.so-fs { position: fixed; inset: 0; z-index: 1000; margin: 0; border-radius: 0; justify-content: center; }

.so-hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.so-title { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.05; min-width: 0; }
.so-title strong { font: 400 clamp(20px, 5.6vw, 30px) / 1.05 'Bungee', var(--font-display); letter-spacing: .01em; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.so-stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.so-stat strong { font: 400 clamp(22px, 6vw, 32px) / 1 'Bungee', var(--font-display); font-variant-numeric: tabular-nums; }
.so-k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.so-pill {
  justify-self: start; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; font: 700 14px var(--font-display);
  color: #10153a; border: 0; background: linear-gradient(180deg, #fff36b, #ffb03b); box-shadow: 0 3px 0 #c2611a;
}
.so-pill:active { transform: translateY(2px); box-shadow: 0 1px 0 #c2611a; }
.so-msg { margin: 0; min-height: 1.3em; text-align: center; font-size: 15px; opacity: .9; }
.so-msg.so-pop { animation: so-pop .4s ease-out; }
@keyframes so-pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: .9; } }

.so-wrap { position: relative; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.so-stage.so-fs .so-wrap, .so-stage:fullscreen .so-wrap { flex: 1 1 auto; min-height: 0; display: flex; }
.so-board { display: block; width: 100%; height: auto; max-height: max(320px, calc(100vh - 290px)); touch-action: none; user-select: none; -webkit-user-select: none; overflow: visible; }
.so-stage.so-fs .so-board, .so-stage:fullscreen .so-board { height: 100%; max-height: none; }

.so-sil polygon { fill: #33296e; stroke: #33296e; stroke-width: .06; stroke-linejoin: round; }
.so-done .so-sil polygon { fill: #fff; stroke: #fff; transition: fill .6s, stroke .6s; }
.so-lines polygon { fill: none; stroke: none; }
.so-easy .so-lines polygon { stroke: rgba(255, 255, 255, .5); stroke-width: .05; stroke-dasharray: .16 .12; }
.so-pc { cursor: grab; outline: none; }
.so-pc polygon { stroke: rgba(16, 21, 58, .55); stroke-width: .05; stroke-linejoin: round; transition: filter .15s; }
.so-pc.so-drag { cursor: grabbing; }
.so-pc.so-drag polygon { filter: brightness(1.12); stroke: #fff; stroke-width: .07; }
.so-pc.so-sel polygon { stroke: #fff; stroke-width: .09; }
.so-pc:focus-visible polygon { stroke: #fff; stroke-width: .1; stroke-dasharray: .2 .1; }
.so-pc.so-fit polygon { filter: saturate(1.25) brightness(1.08); }
.so-pc.so-flipped polygon { animation: so-flash .35s ease-out; }
@keyframes so-flash { 0% { opacity: .2; } 100% { opacity: 1; } }
.so-done .so-pc polygon { animation: so-glow 1s ease-out; stroke: rgba(255, 255, 255, .7); }
@keyframes so-glow { 0%, 100% { filter: none; } 30% { filter: brightness(1.6) saturate(1.4); } }

.so-over {
  position: absolute; inset: 0; z-index: 5; display: flex; padding: clamp(12px, 3vw, 24px); overflow: auto; scrollbar-width: none;
  background: rgba(16, 21, 58, .72); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); border-radius: inherit;
}
.so-over::-webkit-scrollbar, .so-tabs::-webkit-scrollbar { display: none; }
.so-over[hidden], .so-card[hidden], .so-picker[hidden] { display: none; }
.so-card { margin: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 400px; }
.so-big {
  margin: 0; font: 400 clamp(34px, 10vw, 60px) / 1.05 'Bungee', var(--font-display);
  background: linear-gradient(90deg, #ff4d6d, #ffb03b, #ffe14d, #3dff9a, #3dc9ff, #9a6bff);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35));
}
.so-sub { margin: 0; font-size: 17px; line-height: 1.4; opacity: .92; }
.so-stars { margin: 0; font-size: 40px; line-height: 1; letter-spacing: .08em; color: #ffe14d; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.so-score { display: flex; gap: 26px; font-size: 14px; }
.so-score strong { display: block; font: 400 28px / 1.1 'Bungee', var(--font-display); }
.so-new { margin: 0; color: #3dff9a; font-weight: 700; }
.so-tip { margin: 0; font-size: 14px; opacity: .8; }
.so-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.so-go {
  min-height: 56px; padding: 0 36px; border: 0; border-radius: 999px; cursor: pointer;
  font: 400 22px / 1 'Bungee', var(--font-display); color: #10153a;
  background: linear-gradient(180deg, #fff36b, #ffb03b); box-shadow: 0 6px 0 #c2611a, 0 10px 24px rgba(0, 0, 0, .35);
}
.so-go:active { transform: translateY(4px); box-shadow: 0 2px 0 #c2611a; }
.so-btn2, .so-tool, .so-icon {
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; font: 700 15px var(--font-display);
  background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .28);
}
.so-btn2:hover, .so-tool:hover, .so-icon:hover { background: rgba(255, 255, 255, .2); }
.so-go:focus-visible, .so-btn2:focus-visible, .so-tool:focus-visible, .so-icon:focus-visible, .so-pill:focus-visible, .so-thumb:focus-visible, .so-tabs button:focus-visible, .so-daily:focus-visible, .so-x:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.so-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.so-tool { min-width: 0; flex: 1 1 72px; max-width: 150px; padding: 0 10px; white-space: nowrap; }
.so-tool span { font-size: 18px; margin-right: 2px; }
.so-tools .so-icon { flex: 0 0 auto; min-height: 40px; font-size: 14px; }
.so-icon#so-sound[aria-pressed="false"] { opacity: .7; }

.so-picker { margin: 0 auto auto; min-width: 0; width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.so-pk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.so-pk-title { margin: 0; font: 400 clamp(20px, 5vw, 28px) / 1.1 'Bungee', var(--font-display); }
.so-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.so-daily {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border: 0; border-radius: 16px; cursor: pointer;
  font: 400 17px 'Bungee', var(--font-display); color: #10153a; background: linear-gradient(90deg, #3dff9a, #3dc9ff);
}
.so-daily span:last-child { font: 700 14px var(--font-display); }
.so-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.so-tabs button {
  flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: 700 14px var(--font-display);
  color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
}
.so-tabs button[aria-selected="true"] { background: #fff; color: #10153a; }
.so-tabs small { opacity: .7; font-weight: 600; }
.so-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .so-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } }
.so-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.so-pager button[disabled] { opacity: .35; cursor: default; }
.so-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font: 600 13px var(--font-display);
}
.so-thumb:hover { background: rgba(255, 255, 255, .15); }
.so-thumb svg { width: 100%; height: 56px; }
.so-thumb.so-solved { border-color: rgba(255, 225, 77, .55); }
.so-tn { line-height: 1.15; }
.so-ts { color: #ffe14d; font-size: 12px; min-height: 1em; letter-spacing: .05em; }

.so-burst { position: absolute; width: 12px; height: 12px; border-radius: 3px; pointer-events: none; z-index: 4; animation: so-fly 1.05s ease-out forwards; }
.so-burst.so-tri { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 14px; }
@keyframes so-fly { to { transform: translate(var(--dx), var(--dy)) rotate(560deg); opacity: 0; } }

.so-opts { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.so-opt { display: flex; flex-direction: column; gap: 6px; }
.so-lab { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.so-opts .seg button { padding: 0 15px; }
.so-hint { flex-basis: 100%; margin: 0; color: var(--ink-2); font-size: 15px; }

.so-more { border-top: 1px solid var(--line); padding-top: 12px; }
.so-more summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.so-table { display: grid; grid-template-columns: auto auto auto; gap: 6px 18px; margin: 12px 0; font-size: 15px; max-width: 420px; }
.so-table b { color: var(--ink-2); font-size: 13px; }
.so-small { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }
.so-link { border: 0; background: none; padding: 6px 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }

@media (max-height: 520px) {
  .so-msg { display: none; }
  .so-wrap { min-height: 0; }
  .so-stage.so-fs, .so-stage:fullscreen { padding: 8px 14px; gap: 6px; }
}
@media (max-width: 420px) {
  .so-tool { font-size: 14px; padding: 0 8px; }
  .so-hud { gap: 4px; }
  .so-pill { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .so-msg.so-pop, .so-pc.so-flipped polygon, .so-done .so-pc polygon, .so-burst { animation: none; }
}
