:root {
    --stb-ink: #17233f;
    --stb-ink-soft: #526079;
    --stb-paper: #ffffff;
    --stb-canvas: #eef4ff;
    --stb-line: #d9e2f1;
    --stb-violet: #7257d8;
    --stb-violet-soft: #ece8ff;
    --stb-rose: #d64f78;
    --stb-rose-soft: #ffe9f0;
    --stb-coral: #ec6d61;
    --stb-coral-soft: #fff0ed;
    --stb-sky: #347ed9;
    --stb-sky-soft: #e7f3ff;
    --stb-amber: #b87308;
    --stb-amber-soft: #fff3d6;
    --stb-green: #21966f;
    --stb-green-soft: #e2f7ee;
    --stb-orange: #d9652b;
    --stb-orange-soft: #fff0e6;
    --stb-yellow: #f4bd43;
    --stb-radius-xl: 32px;
    --stb-radius-lg: 24px;
    --stb-radius-md: 16px;
    --stb-shadow: 0 18px 50px rgba(44, 62, 102, 0.13);
    --stb-shadow-soft: 0 8px 24px rgba(44, 62, 102, 0.09);
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--stb-canvas);
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 0%, rgba(127, 102, 230, 0.15), transparent 28rem),
        radial-gradient(circle at 94% 18%, rgba(76, 174, 229, 0.15), transparent 25rem),
        linear-gradient(150deg, #f8fbff 0%, #edf3ff 48%, #f7f4ff 100%);
    color: var(--stb-ink);
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.stb-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.stb-skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    transform: translateY(-160%);
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--stb-ink);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.stb-skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 4px solid rgba(48, 114, 224, 0.4);
    outline-offset: 3px;
}

.stb-ambient {
    position: fixed;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.stb-ambient-shape {
    position: absolute;
    display: block;
    border: 1px solid rgba(87, 107, 155, 0.12);
    border-radius: 45% 55% 58% 42%;
}

.stb-ambient-shape--one {
    width: 230px;
    height: 230px;
    top: 14%;
    left: -150px;
    transform: rotate(28deg);
}

.stb-ambient-shape--two {
    width: 330px;
    height: 330px;
    right: -210px;
    bottom: 8%;
    transform: rotate(-18deg);
}

.stb-ambient-shape--three {
    width: 72px;
    height: 72px;
    right: 8%;
    top: 42%;
    border-radius: 24px;
    transform: rotate(17deg);
}

.stb-topbar {
    position: relative;
    z-index: 20;
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 0 12px;
}

.stb-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--stb-ink);
    text-decoration: none;
}

.stb-brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 8px;
    border: 2px solid rgba(41, 63, 105, 0.1);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(57, 76, 119, 0.12);
}

.stb-brand-mark span {
    border-radius: 4px;
    background: var(--stb-violet);
}

.stb-brand-mark span:nth-child(2) {
    background: var(--stb-coral);
}

.stb-brand-mark span:nth-child(3) {
    background: var(--stb-sky);
}

.stb-brand-mark span:nth-child(4) {
    background: var(--stb-green);
}

.stb-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stb-brand-copy strong {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.stb-brand-copy small {
    color: #74819a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.17em;
}

.stb-local-badge,
.stb-device-only-note {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(31, 144, 105, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #257f62;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.stb-local-badge svg,
.stb-privacy-note__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.stb-top-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.stb-top-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid rgba(65, 83, 124, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--stb-ink);
    box-shadow: 0 5px 14px rgba(50, 66, 102, 0.06);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.stb-top-button:hover {
    background: #fff;
    transform: translateY(-1px);
}

.stb-top-button--site-home {
    border-color: rgba(52, 126, 217, 0.2);
    color: var(--stb-sky);
}

.stb-top-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.stb-main {
    position: relative;
    z-index: 2;
    width: 100%;
    outline: none;
}

.stb-home,
.stb-tool-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0 max(32px, env(safe-area-inset-bottom));
}

.stb-home-hero {
    position: relative;
    display: grid;
    min-height: 330px;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    align-items: center;
    gap: 26px;
    overflow: hidden;
    padding: 42px 54px;
    border: 1px solid rgba(82, 94, 130, 0.13);
    border-radius: 38px;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.98), rgba(249, 246, 255, 0.9)),
        #fff;
    box-shadow: var(--stb-shadow);
}

.stb-home-hero::before {
    position: absolute;
    width: 220px;
    height: 220px;
    top: -90px;
    left: 46%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243, 188, 67, 0.17), transparent 70%);
    content: "";
}

.stb-home-copy {
    position: relative;
    z-index: 2;
}

.stb-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--stb-violet);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.stb-kicker span {
    color: var(--stb-yellow);
    font-size: 11px;
}

.stb-home h1 {
    margin: 0;
    color: var(--stb-ink);
    font-size: clamp(42px, 5vw, 68px);
    font-weight: 950;
    letter-spacing: -0.07em;
    line-height: 1.06;
    word-break: keep-all;
}

.stb-home h1 em {
    color: var(--stb-violet);
    font-style: normal;
}

.stb-home h1 em span {
    white-space: nowrap;
}

.stb-home-lead {
    margin: 24px 0 0;
    color: var(--stb-ink-soft);
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.65;
}

.stb-hero-visual {
    position: relative;
    width: min(340px, 100%);
    aspect-ratio: 1;
    justify-self: center;
}

.stb-hero-orbit {
    position: absolute;
    border: 1px dashed rgba(89, 83, 155, 0.23);
    border-radius: 50%;
}

.stb-hero-orbit--outer {
    inset: 4%;
}

.stb-hero-orbit--inner {
    inset: 21%;
}

.stb-hero-tool {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #fff;
    box-shadow: 0 16px 38px rgba(53, 63, 104, 0.18);
}

.stb-hero-tool--dice {
    display: grid;
    width: 112px;
    height: 112px;
    top: 4%;
    left: 5%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 21px;
    border-radius: 31px;
    background: var(--stb-violet);
    transform: rotate(-11deg);
}

.stb-hero-tool--dice span {
    width: 12px;
    height: 12px;
    align-self: center;
    justify-self: center;
    border-radius: 50%;
    background: #fff;
}

.stb-hero-tool--dice span:nth-child(1) { grid-area: 1 / 1; }
.stb-hero-tool--dice span:nth-child(2) { grid-area: 1 / 3; }
.stb-hero-tool--dice span:nth-child(3) { grid-area: 2 / 2; }
.stb-hero-tool--dice span:nth-child(4) { grid-area: 3 / 1; }
.stb-hero-tool--dice span:nth-child(5) { grid-area: 3 / 3; }

.stb-hero-tool--timer {
    width: 118px;
    height: 118px;
    right: 1%;
    bottom: 6%;
    flex-direction: column;
    border-radius: 50%;
    background: var(--stb-green-soft);
    color: var(--stb-green);
    transform: rotate(7deg);
}

.stb-hero-tool--timer span {
    font-size: 49px;
    font-weight: 950;
    letter-spacing: -0.08em;
    line-height: 0.9;
}

.stb-hero-tool--timer small {
    margin-top: 5px;
    font-size: 16px;
    font-weight: 900;
}

.stb-hero-tool--answer {
    width: 100px;
    height: 100px;
    top: 29%;
    right: 25%;
    border-radius: 30px;
    background: var(--stb-coral);
    color: #fff;
    font-size: 57px;
    font-weight: 950;
    transform: rotate(12deg);
}

.stb-hero-paint {
    position: absolute;
    width: 132px;
    height: 92px;
    bottom: 8%;
    left: 0;
    filter: drop-shadow(0 12px 18px rgba(53, 63, 104, 0.16));
    transform: rotate(-8deg);
}

.stb-hero-paint span {
    position: absolute;
    width: 70px;
    height: 70px;
    border: 5px solid #fff;
    border-radius: 48% 52% 58% 42%;
}

.stb-hero-paint span:nth-child(1) {
    top: 0;
    left: 0;
    background: #e34b48;
}

.stb-hero-paint span:nth-child(2) {
    top: 0;
    right: 0;
    background: #f2c84b;
}

.stb-hero-paint span:nth-child(3) {
    right: 31px;
    bottom: 0;
    background: #ef842f;
}

.stb-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.stb-tool-section {
    margin-top: 26px;
}

.stb-tool-section--shared {
    padding: 24px;
    border: 1px solid rgba(217, 101, 43, 0.16);
    border-radius: 32px;
    background: rgba(255, 248, 243, 0.74);
}

.stb-tool-section__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 0 4px;
}

.stb-tool-section__heading p {
    margin: 0 0 5px;
    color: var(--stb-ink-soft);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.01em;
}

.stb-tool-section__heading h2 {
    margin: 0;
    color: var(--stb-ink);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    letter-spacing: -0.055em;
}

.stb-tool-section__heading > span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid rgba(83, 96, 127, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #69758b;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.stb-tool-section .stb-tool-grid {
    margin-top: 14px;
}

.stb-tool-card {
    --card-accent: var(--stb-violet);
    --card-soft: var(--stb-violet-soft);
    position: relative;
    display: grid;
    min-height: 190px;
    grid-template-columns: 104px minmax(0, 1fr) 50px;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    padding: 28px 27px;
    border: 1px solid rgba(78, 93, 127, 0.12);
    border-radius: 29px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--stb-shadow-soft);
    color: var(--stb-ink);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.stb-tool-card::before {
    position: absolute;
    width: 190px;
    height: 190px;
    right: -82px;
    bottom: -115px;
    border-radius: 50%;
    background: var(--card-soft);
    content: "";
    opacity: 0.8;
}

.stb-tool-card:hover {
    border-color: color-mix(in srgb, var(--card-accent) 30%, transparent);
    box-shadow: 0 18px 42px rgba(44, 62, 102, 0.15);
    transform: translateY(-3px);
}

.stb-tool-card:active {
    transform: translateY(0) scale(0.99);
}

.stb-tool-card--coral { --card-accent: var(--stb-coral); --card-soft: var(--stb-coral-soft); }
.stb-tool-card--rose { --card-accent: var(--stb-rose); --card-soft: var(--stb-rose-soft); }
.stb-tool-card--sky { --card-accent: var(--stb-sky); --card-soft: var(--stb-sky-soft); }
.stb-tool-card--amber { --card-accent: var(--stb-amber); --card-soft: var(--stb-amber-soft); }
.stb-tool-card--green { --card-accent: var(--stb-green); --card-soft: var(--stb-green-soft); }
.stb-tool-card--orange { --card-accent: var(--stb-orange); --card-soft: var(--stb-orange-soft); }

.stb-tool-grid > .stb-tool-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.stb-tool-card__number {
    position: absolute;
    top: 17px;
    right: 21px;
    color: color-mix(in srgb, var(--card-accent) 28%, #fff);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.12em;
}

.stb-tool-card__icon {
    display: flex;
    width: 104px;
    height: 104px;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background: var(--card-soft);
    color: var(--card-accent);
}

.stb-tool-card__icon svg {
    width: 62px;
    height: 62px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.stb-tool-card__icon svg circle {
    fill: currentColor;
    stroke: none;
}

.stb-tool-card__copy {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.stb-tool-card__meta {
    display: flex;
    min-height: 22px;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 6px;
}

.stb-tool-card__copy small {
    margin-bottom: 0;
    color: var(--card-accent);
    font-size: 12px;
    font-weight: 900;
}

.stb-tool-card__badge {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--card-soft);
    color: var(--card-accent);
    font-size: 10px;
    font-weight: 900;
}

.stb-tool-card__copy strong {
    font-size: clamp(21px, 2.3vw, 28px);
    font-weight: 950;
    letter-spacing: -0.055em;
}

.stb-tool-card__copy > span {
    margin-top: 9px;
    color: var(--stb-ink-soft);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.5;
}

.stb-tool-card__arrow {
    position: relative;
    z-index: 2;
    display: flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    justify-self: end;
    border-radius: 50%;
    background: var(--card-accent);
    color: #fff;
}

.stb-tool-card__arrow svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.3;
}

.stb-privacy-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    margin-top: 20px;
    padding: 17px 20px;
    border: 1px solid rgba(34, 142, 105, 0.17);
    border-radius: 20px;
    background: rgba(246, 255, 251, 0.86);
    color: #49665c;
    font-size: 13px;
    line-height: 1.55;
}

.stb-privacy-note__icon {
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--stb-green-soft);
    color: var(--stb-green);
}

.stb-privacy-note strong {
    color: #23795c;
}

.stb-privacy-note > a {
    padding: 8px 11px;
    color: #53617a;
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Tool shell */
.stb-tool-page {
    padding-top: 8px;
}

.stb-tool-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 0 4px;
}

.stb-tool-heading h1 {
    margin: 0;
    font-size: clamp(31px, 4vw, 46px);
    font-weight: 950;
    letter-spacing: -0.065em;
    line-height: 1.08;
}

.stb-tool-heading > div > p:last-child {
    margin: 8px 0 0;
    color: var(--stb-ink-soft);
    font-size: 15px;
    font-weight: 650;
}

.stb-device-only-note {
    min-height: auto;
    flex: 0 0 auto;
    padding: 9px 13px;
    border-color: rgba(80, 100, 143, 0.14);
    color: #64718a;
}

.stb-workspace {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(77, 92, 127, 0.13);
    border-radius: var(--stb-radius-xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--stb-shadow);
}

.stb-segmented {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 16px;
    padding: 7px;
    border: 1px solid rgba(85, 100, 137, 0.11);
    border-radius: 21px;
    background: #f2f5fa;
}

.stb-segmented--compact {
    width: min(460px, calc(100% - 32px));
    grid-template-columns: 1fr 1fr;
}

.stb-segmented button {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: #68748a;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.stb-segmented button > span {
    display: inline-flex;
    min-width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(108, 84, 210, 0.09);
    color: var(--stb-violet);
    font-size: 16px;
    font-weight: 950;
}

.stb-segmented button.is-active {
    background: #fff;
    color: var(--stb-ink);
    box-shadow: 0 5px 15px rgba(51, 67, 105, 0.11);
}

.stb-segmented button.is-active > span {
    background: var(--stb-violet);
    color: #fff;
}

.stb-primary-action,
.stb-secondary-action {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 17px;
    font-weight: 900;
    cursor: pointer;
}

.stb-primary-action {
    min-width: 230px;
    padding: 15px 26px;
    border: 0;
    background: var(--stb-violet);
    color: #fff;
    box-shadow: 0 9px 0 #543aa9, 0 14px 25px rgba(93, 70, 184, 0.22);
    font-size: 18px;
    text-decoration: none;
}

.stb-primary-action:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.stb-primary-action:active {
    box-shadow: 0 3px 0 #543aa9, 0 8px 16px rgba(93, 70, 184, 0.18);
    transform: translateY(6px);
}

.stb-secondary-action {
    min-width: 110px;
    padding: 12px 18px;
    border: 1px solid #d5deed;
    background: #fff;
    color: #43516c;
    box-shadow: 0 5px 12px rgba(49, 65, 101, 0.06);
    font-size: 14px;
}

.stb-secondary-action:disabled,
.stb-primary-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
    transform: none;
}

.stb-control-label {
    display: block;
    margin-bottom: 9px;
    color: #5d6981;
    font-size: 12px;
    font-weight: 900;
}

/* Random tools */
.stb-random-panel {
    min-height: 570px;
    padding: 15px 34px 35px;
    text-align: center;
}

.stb-random-controls {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
}

.stb-choice-pills,
.stb-time-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stb-choice-pills button,
.stb-time-presets button {
    min-width: 64px;
    min-height: 43px;
    padding: 8px 14px;
    border: 1px solid #dbe2ef;
    border-radius: 13px;
    background: #fff;
    color: #59657b;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.stb-choice-pills button.is-active,
.stb-time-presets button.is-active {
    border-color: var(--stb-violet);
    background: var(--stb-violet-soft);
    color: #5b42bd;
}

.stb-history {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    padding: 7px 10px 7px 13px;
    border-radius: 14px;
    background: #f4f6fa;
}

.stb-history > span {
    color: #6c768a;
    font-size: 11px;
    font-weight: 850;
}

.stb-history ol {
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.stb-history li {
    display: flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 9px;
    background: #fff;
    color: #47536a;
    font-size: 11px;
    font-weight: 850;
}

.stb-random-stage {
    display: flex;
    min-height: 365px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 22px;
}

.stb-dice-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(15px, 2.4vw, 28px);
}

.stb-die {
    display: grid;
    width: clamp(112px, 16vw, 162px);
    aspect-ratio: 1;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: clamp(20px, 3vw, 31px);
    border: 2px solid rgba(80, 59, 160, 0.16);
    border-radius: clamp(25px, 3.4vw, 39px);
    background: linear-gradient(145deg, #8067df, #674acb);
    box-shadow: 0 13px 0 #4f359e, 0 23px 34px rgba(74, 52, 146, 0.25), inset 0 2px 2px rgba(255, 255, 255, 0.25);
}

.stb-die.is-rolling {
    animation: stb-die-roll 420ms ease;
}

@keyframes stb-die-roll {
    0% { transform: rotate(0) scale(1); }
    35% { transform: rotate(-9deg) scale(0.93); }
    70% { transform: rotate(7deg) scale(1.05); }
    100% { transform: rotate(0) scale(1); }
}

.stb-die-pip {
    width: clamp(13px, 2vw, 21px);
    aspect-ratio: 1;
    align-self: center;
    justify-self: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 2px 2px rgba(41, 30, 82, 0.22);
}

.stb-die-pip--1 { grid-area: 1 / 1; }
.stb-die-pip--2 { grid-area: 1 / 2; }
.stb-die-pip--3 { grid-area: 1 / 3; }
.stb-die-pip--4 { grid-area: 2 / 1; }
.stb-die-pip--5 { grid-area: 2 / 2; }
.stb-die-pip--6 { grid-area: 2 / 3; }
.stb-die-pip--7 { grid-area: 3 / 1; }
.stb-die-pip--8 { grid-area: 3 / 2; }
.stb-die-pip--9 { grid-area: 3 / 3; }

.stb-random-result {
    min-height: 30px;
    margin: 0;
    color: #4f5c74;
    font-size: 18px;
    font-weight: 900;
}

.stb-coin-stage {
    min-height: 420px;
}

.stb-coin {
    display: flex;
    width: clamp(190px, 29vw, 280px);
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    border: clamp(15px, 2vw, 22px) solid #f0b83b;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #ffeaaa, #f8cb58 48%, #e3a62e 100%);
    box-shadow: 0 15px 0 #bc7b1e, 0 28px 42px rgba(158, 103, 24, 0.25), inset 0 0 0 4px rgba(255, 255, 255, 0.42);
    color: #9b641b;
    transform-style: preserve-3d;
}

.stb-coin span {
    display: flex;
    width: 67%;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(161, 105, 22, 0.28);
    border-radius: 50%;
    font-size: clamp(53px, 9vw, 86px);
    font-weight: 950;
    letter-spacing: -0.09em;
}

.stb-coin.is-flipping {
    animation: stb-coin-flip 650ms cubic-bezier(0.3, 0.7, 0.2, 1);
}

@keyframes stb-coin-flip {
    0% { transform: rotateY(0) translateY(0); }
    45% { transform: rotateY(540deg) translateY(-28px) scale(0.94); }
    100% { transform: rotateY(1080deg) translateY(0); }
}

.stb-number-settings {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.stb-number-settings label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #5e6b82;
    font-size: 12px;
    font-weight: 850;
    text-align: left;
}

.stb-number-settings input,
.stb-custom-time input {
    width: 140px;
    height: 56px;
    border: 2px solid #d8e0ed;
    border-radius: 16px;
    background: #fff;
    color: var(--stb-ink);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.stb-number-settings input:focus,
.stb-custom-time input:focus,
.stb-spinner-settings textarea:focus {
    border-color: var(--stb-violet);
    outline: 4px solid rgba(114, 87, 216, 0.16);
}

.stb-range-divider {
    padding-bottom: 16px;
    color: #758198;
    font-size: 13px;
    font-weight: 800;
}

.stb-input-help {
    margin: 11px 0 0;
    color: #788399;
    font-size: 12px;
    font-weight: 650;
}

.stb-number-stage {
    min-height: 330px;
    gap: 10px;
}

.stb-number-stage strong {
    display: flex;
    min-width: 260px;
    min-height: 210px;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border: 3px solid #dcd5ff;
    border-radius: 50px;
    background: linear-gradient(150deg, #f8f6ff, #e9e4ff);
    color: var(--stb-violet);
    box-shadow: 0 12px 0 #cfc6f3, 0 24px 34px rgba(85, 66, 163, 0.13);
    font-size: clamp(80px, 14vw, 140px);
    font-weight: 950;
    letter-spacing: -0.08em;
    line-height: 1;
}

.stb-number-stage strong.is-picking {
    animation: stb-number-pop 420ms ease;
}

@keyframes stb-number-pop {
    0% { transform: scale(0.88); opacity: 0.45; }
    70% { transform: scale(1.04); }
    100% { transform: scale(1); opacity: 1; }
}

.stb-number-stage p {
    margin: 10px 0 0;
    color: #657188;
    font-weight: 850;
}

.stb-spinner-panel {
    padding-top: 5px;
}

.stb-spinner-layout {
    display: grid;
    min-height: 450px;
    grid-template-columns: 250px minmax(330px, 1fr);
    align-items: center;
    gap: 34px;
    text-align: left;
}

.stb-spinner-settings {
    padding: 22px;
    border: 1px solid #e0e5ef;
    border-radius: 22px;
    background: #f7f9fc;
}

.stb-spinner-settings label {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    font-weight: 900;
}

.stb-spinner-settings textarea {
    width: 100%;
    resize: vertical;
    min-height: 170px;
    padding: 13px;
    border: 2px solid #d8e0ed;
    border-radius: 14px;
    background: #fff;
    color: var(--stb-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.55;
}

.stb-spinner-settings p {
    margin: 9px 0 15px;
    color: #778298;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.5;
}

.stb-spinner-settings .stb-secondary-action {
    width: 100%;
}

.stb-spinner-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.stb-spinner-stage canvas {
    width: min(370px, 100%);
    height: auto;
    aspect-ratio: 1;
    border: 9px solid #fff;
    border-radius: 50%;
    box-shadow: 0 12px 0 #d8deea, 0 24px 38px rgba(46, 61, 98, 0.18);
    transition: transform 2.7s cubic-bezier(0.12, 0.74, 0.12, 1);
}

.stb-spinner-pointer {
    position: absolute;
    z-index: 3;
    top: 3px;
    left: 50%;
    width: 0;
    height: 0;
    border-right: 18px solid transparent;
    border-left: 18px solid transparent;
    border-top: 40px solid var(--stb-ink);
    filter: drop-shadow(0 4px 3px rgba(42, 54, 81, 0.25));
    transform: translateX(-50%);
}

.stb-spinner-stage .stb-random-result {
    margin-top: 25px;
}

/* Teacher rock-paper-scissors */
.stb-rps {
    min-height: 650px;
}

.stb-rps-panel {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 648px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 34px;
    text-align: center;
    word-break: keep-all;
}

.stb-rps-panel.is-active {
    animation: stb-rps-panel-in 260ms ease;
}

@keyframes stb-rps-panel-in {
    from { opacity: 0; transform: translateY(10px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.stb-rps-intro {
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.98), rgba(255, 239, 245, 0.88) 58%, rgba(241, 235, 255, 0.9));
}

.stb-rps-round {
    margin: 0 0 16px;
    padding: 8px 13px;
    border: 1px solid rgba(84, 62, 151, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #675486;
    font-size: 12px;
    font-weight: 900;
}

.stb-rps-cover-hands {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.stb-rps-cover-hands span {
    display: flex;
    width: 118px;
    height: 118px;
    align-items: center;
    justify-content: center;
    margin: 0 -8px;
    border: 7px solid #fff;
    border-radius: 36px;
    background: var(--stb-violet-soft);
    box-shadow: 0 16px 30px rgba(53, 58, 100, 0.15);
    font-size: 66px;
    transform: rotate(-8deg);
}

.stb-rps-cover-hands span:nth-child(2) {
    z-index: 2;
    background: var(--stb-rose-soft);
    transform: translateY(-12px) rotate(2deg);
}

.stb-rps-cover-hands span:nth-child(3) {
    background: var(--stb-green-soft);
    transform: rotate(8deg);
}

.stb-rps-intro h2 {
    margin: 0;
    color: var(--stb-ink);
    font-size: clamp(43px, 7vw, 72px);
    font-weight: 950;
    letter-spacing: -0.07em;
    line-height: 1.05;
}

.stb-rps-intro > p:not(.stb-rps-round) {
    margin: 17px 0 28px;
    color: #59667f;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 750;
    line-height: 1.65;
}

.stb-rps-start {
    width: min(330px, 100%);
    min-height: 68px;
    font-size: 21px;
}

.stb-rps-step-heading {
    display: flex;
    width: min(840px, 100%);
    align-items: center;
    gap: 14px;
    text-align: left;
}

.stb-rps-step-heading > span {
    display: flex;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: var(--stb-ink);
    color: #fff;
    font-size: 16px;
    font-weight: 950;
}

.stb-rps-step-heading p {
    margin: 0 0 3px;
    color: #7a8497;
    font-size: 12px;
    font-weight: 850;
}

.stb-rps-step-heading p strong {
    color: var(--stb-rose);
}

.stb-rps-step-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3.2vw, 38px);
    font-weight: 950;
    letter-spacing: -0.055em;
}

.stb-rps-instruction {
    width: min(840px, 100%);
    margin: 22px 0 20px;
    color: #68748a;
    font-size: 15px;
    font-weight: 750;
    text-align: left;
}

.stb-rps-hand-grid {
    display: grid;
    width: min(840px, 100%);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stb-rps-hand-grid button {
    display: flex;
    min-width: 0;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    padding: 22px 12px;
    border: 3px solid #e2e6ef;
    border-radius: 28px;
    background: #fff;
    color: var(--stb-ink);
    box-shadow: 0 12px 26px rgba(49, 64, 98, 0.09);
    cursor: pointer;
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.stb-rps-hand-grid button:nth-child(1) { background: #f2efff; }
.stb-rps-hand-grid button:nth-child(2) { background: #fff0f4; }
.stb-rps-hand-grid button:nth-child(3) { background: #eaf9f3; }

.stb-rps-hand-grid button:hover,
.stb-rps-hand-grid button:focus-visible {
    border-color: var(--stb-violet);
    box-shadow: 0 16px 32px rgba(71, 57, 139, 0.16);
    transform: translateY(-4px);
}

.stb-rps-hand-grid button:active {
    transform: scale(0.98);
}

.stb-rps-hand-grid button span {
    font-size: clamp(72px, 11vw, 112px);
    line-height: 1;
}

.stb-rps-hand-grid button strong {
    font-size: clamp(20px, 3vw, 29px);
    font-weight: 950;
}

.stb-rps-locked {
    background: radial-gradient(circle at 50% 48%, #fff, #f2efff 68%, #ece8fa);
}

.stb-rps-locked .stb-rps-step-heading {
    position: absolute;
    top: 30px;
}

.stb-rps-locked-hand {
    display: flex;
    width: 310px;
    height: 310px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 9px solid #fff;
    border-radius: 42% 58% 52% 48%;
    background: var(--stb-violet-soft);
    box-shadow: 0 22px 45px rgba(64, 52, 123, 0.18);
}

.stb-rps-locked-hand span {
    font-size: 145px;
    line-height: 1;
}

.stb-rps-locked-hand strong {
    margin-top: 5px;
    font-size: 28px;
    font-weight: 950;
}

.stb-rps-callout {
    margin: 23px 0 20px;
    color: #554184;
    font-size: 21px;
    font-weight: 950;
}

.stb-rps-result {
    --rps-result: var(--stb-green);
    --rps-result-soft: var(--stb-green-soft);
    background: radial-gradient(circle at 50% 40%, #fff, var(--rps-result-soft) 72%);
}

.stb-rps-result[data-rps-result="draw"] {
    --rps-result: #9a6d12;
    --rps-result-soft: #fff4d6;
}

.stb-rps-result[data-rps-result="lose"] {
    --rps-result: #c44961;
    --rps-result-soft: #ffebef;
}

.stb-rps-result-badge {
    display: flex;
    width: 88px;
    height: 88px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border: 6px solid #fff;
    border-radius: 50%;
    background: var(--rps-result);
    color: #fff;
    box-shadow: 0 12px 26px color-mix(in srgb, var(--rps-result) 25%, transparent);
    font-size: 46px;
    font-weight: 950;
}

.stb-rps-result h2 {
    max-width: 760px;
    margin: 0;
    color: var(--rps-result);
    font-size: clamp(38px, 6.5vw, 68px);
    font-weight: 950;
    letter-spacing: -0.065em;
    line-height: 1.1;
}

.stb-rps-versus {
    display: grid;
    width: min(560px, 100%);
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin: 23px 0 16px;
}

.stb-rps-versus > span {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.stb-rps-versus small {
    color: #7c879a;
    font-size: 11px;
    font-weight: 850;
}

.stb-rps-versus strong {
    font-size: 72px;
    line-height: 1.1;
}

.stb-rps-versus b {
    font-size: 16px;
    font-weight: 950;
}

.stb-rps-versus em {
    color: #929cad;
    font-size: 15px;
    font-style: normal;
    font-weight: 950;
}

.stb-rps-result > p:not(.stb-rps-round, .stb-rps-out-note) {
    margin: 0 0 19px;
    color: #5f6c83;
    font-size: 16px;
    font-weight: 800;
}

.stb-rps-out-note {
    margin: 4px 0 0;
    padding: 13px 18px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.74);
    color: #68748a;
    font-size: 14px;
    font-weight: 850;
}

/* Answer board */
.stb-answer-board {
    min-height: 620px;
    padding: 28px;
}

.stb-answer-picker {
    display: grid;
    grid-template-columns: 1fr 1.18fr;
    gap: 16px;
}

.stb-answer-group {
    padding: 21px;
    border: 1px solid #e0e6f0;
    border-radius: 23px;
    background: #fafbfe;
}

.stb-answer-group:first-child {
    grid-row: span 2;
}

.stb-answer-group__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stb-answer-group__number {
    display: flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--stb-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.stb-answer-group h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.stb-answer-group p {
    margin: 3px 0 0;
    color: #788399;
    font-size: 11px;
    font-weight: 700;
}

.stb-answer-options {
    display: grid;
    gap: 10px;
}

.stb-answer-options--two {
    grid-template-columns: 1fr 1fr;
    height: calc(100% - 58px);
}

.stb-answer-options--four {
    grid-template-columns: repeat(4, 1fr);
}

.stb-answer-options--feelings {
    grid-template-columns: repeat(3, 1fr);
}

.stb-answer-option {
    display: flex;
    min-height: 104px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 2px solid #e0e5ef;
    border-radius: 19px;
    background: #fff;
    color: var(--stb-ink);
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.stb-answer-options--two .stb-answer-option {
    min-height: 310px;
}

.stb-answer-option:hover {
    border-color: var(--stb-violet);
    box-shadow: 0 10px 22px rgba(55, 71, 109, 0.1);
    transform: translateY(-2px);
}

.stb-answer-option:active {
    transform: scale(0.98);
}

.stb-answer-option strong {
    font-size: 36px;
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1;
}

.stb-answer-options--two .stb-answer-option strong {
    font-size: clamp(78px, 11vw, 126px);
}

.stb-answer-option span {
    color: #647189;
    font-size: 13px;
    font-weight: 850;
}

.stb-answer-option--yes {
    border-color: rgba(43, 148, 112, 0.22);
    background: #f1fbf7;
    color: var(--stb-green);
}

.stb-answer-option--no {
    border-color: rgba(226, 82, 82, 0.2);
    background: #fff4f3;
    color: #df5156;
}

.stb-answer-display {
    --answer-color: var(--stb-green);
    --answer-soft: var(--stb-green-soft);
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    min-height: 620px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    background: var(--answer-soft);
    color: var(--answer-color);
}

.stb-answer-display::before,
.stb-answer-display::after {
    position: absolute;
    border: 3px solid color-mix(in srgb, var(--answer-color) 17%, transparent);
    border-radius: 50%;
    content: "";
}

.stb-answer-display::before {
    width: 460px;
    height: 460px;
    top: -260px;
    right: -120px;
}

.stb-answer-display::after {
    width: 320px;
    height: 320px;
    bottom: -190px;
    left: -110px;
}

.stb-answer-display[data-tone="no"] { --answer-color: #df5156; --answer-soft: #fff0ef; }
.stb-answer-display[data-tone="one"] { --answer-color: #5d49be; --answer-soft: #eeeaff; }
.stb-answer-display[data-tone="two"] { --answer-color: #2479c9; --answer-soft: #e7f3ff; }
.stb-answer-display[data-tone="three"] { --answer-color: #d46531; --answer-soft: #fff0e7; }
.stb-answer-display[data-tone="four"] { --answer-color: #218469; --answer-soft: #e4f8f0; }
.stb-answer-display[data-tone="understood"] { --answer-color: #218469; --answer-soft: #e4f8f0; }
.stb-answer-display[data-tone="unsure"] { --answer-color: #a9740a; --answer-soft: #fff6d8; }
.stb-answer-display[data-tone="help"] { --answer-color: #c24e64; --answer-soft: #ffedf1; }

.stb-answer-display > p {
    position: relative;
    z-index: 2;
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 900;
}

.stb-answer-display > strong {
    position: relative;
    z-index: 2;
    max-width: 92%;
    font-size: clamp(120px, 26vw, 280px);
    font-weight: 950;
    letter-spacing: -0.08em;
    line-height: 1;
    text-align: center;
}

.stb-answer-display.is-long > strong {
    font-size: clamp(58px, 11vw, 128px);
    letter-spacing: -0.065em;
    line-height: 1.08;
}

.stb-answer-display > span {
    position: relative;
    z-index: 2;
    margin-top: 10px;
    color: color-mix(in srgb, var(--answer-color) 75%, #26334e);
    font-size: clamp(19px, 3vw, 32px);
    font-weight: 900;
}

.stb-answer-change {
    position: relative;
    z-index: 2;
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 12px 20px;
    border: 2px solid color-mix(in srgb, var(--answer-color) 22%, transparent);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--answer-color);
    font-weight: 900;
    cursor: pointer;
}

.stb-answer-change svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

/* Paint color mixing */
.stb-color-mix {
    display: grid;
    min-height: 650px;
    grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
    gap: 24px;
    padding: 28px;
}

.stb-color-pickers,
.stb-color-result {
    border: 1px solid #e0e6f0;
    border-radius: 25px;
}

.stb-color-pickers {
    padding: 24px;
    background: #f8fafe;
}

.stb-color-mix-intro,
.stb-color-result-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stb-color-mix-step {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--stb-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 950;
}

.stb-color-mix h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.stb-color-mix-intro p,
.stb-color-result-heading p {
    margin: 4px 0 0;
    color: #758198;
    font-size: 12px;
    font-weight: 750;
}

.stb-color-picker-grid {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.stb-color-picker {
    min-width: 0;
    margin: 0;
    padding: 17px;
    border: 1px solid #e0e6ef;
    border-radius: 20px;
    background: #fff;
}

.stb-color-picker legend {
    padding: 0 7px;
    color: #59667d;
    font-size: 12px;
    font-weight: 900;
}

.stb-color-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.stb-color-options button {
    display: flex;
    min-width: 0;
    min-height: 88px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 8px 4px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: #f6f8fc;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.stb-color-options button:hover {
    background: #eef3fb;
    transform: translateY(-2px);
}

.stb-color-options button.is-active {
    border-color: var(--stb-violet);
    background: var(--stb-violet-soft);
    box-shadow: 0 7px 16px rgba(84, 64, 165, 0.12);
}

.stb-color-options button > span {
    display: block;
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50% 45% 52% 48%;
    background: var(--paint-color);
    box-shadow: 0 4px 11px rgba(39, 51, 79, 0.18);
}

.stb-color-options button > span.is-light {
    border-color: #d6d9df;
}

.stb-color-options strong {
    overflow: hidden;
    max-width: 100%;
    color: #4f5b72;
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stb-color-plus {
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    margin: -3px 0;
    border-radius: 50%;
    background: #e9eef7;
    color: #67758e;
    font-size: 22px;
    font-weight: 900;
}

.stb-color-result {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-direction: column;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96), rgba(242, 246, 255, 0.88) 58%, rgba(235, 239, 251, 0.92));
}

.stb-color-result-heading {
    width: 100%;
}

.stb-paint-mix {
    position: relative;
    width: min(310px, 100%);
    height: 255px;
    margin-top: 14px;
}

.stb-paint-drop,
.stb-paint-result-swatch {
    position: absolute;
    display: block;
    border: 6px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 30px rgba(40, 53, 84, 0.18);
}

.stb-paint-drop {
    z-index: 1;
    width: 105px;
    height: 105px;
    top: 14px;
    border-radius: 52% 48% 45% 55%;
    background: var(--drop-color);
}

.stb-paint-drop--first {
    left: 22px;
    transform: rotate(-14deg);
}

.stb-paint-drop--second {
    right: 22px;
    transform: rotate(14deg);
}

.stb-paint-result-swatch {
    z-index: 2;
    width: 174px;
    height: 174px;
    right: 50%;
    bottom: 0;
    border-radius: 48% 52% 55% 45%;
    background: var(--mix-result);
    transform: translateX(50%) rotate(-3deg);
}

.stb-paint-drop--first.is-mixing {
    animation: stb-paint-first 620ms ease;
}

.stb-paint-drop--second.is-mixing {
    animation: stb-paint-second 620ms ease;
}

.stb-paint-result-swatch.is-mixing {
    animation: stb-paint-result 700ms ease;
}

@keyframes stb-paint-first {
    0% { transform: translate(0, 0) rotate(-14deg); }
    55% { transform: translate(45px, 55px) rotate(6deg) scale(0.85); }
    100% { transform: translate(0, 0) rotate(-14deg); }
}

@keyframes stb-paint-second {
    0% { transform: translate(0, 0) rotate(14deg); }
    55% { transform: translate(-45px, 55px) rotate(-6deg) scale(0.85); }
    100% { transform: translate(0, 0) rotate(14deg); }
}

@keyframes stb-paint-result {
    0%, 38% { opacity: 0.3; transform: translateX(50%) rotate(-3deg) scale(0.72); }
    75% { opacity: 1; transform: translateX(50%) rotate(2deg) scale(1.05); }
    100% { transform: translateX(50%) rotate(-3deg) scale(1); }
}

.stb-color-result-copy {
    text-align: center;
}

.stb-color-result-copy small {
    display: block;
    color: #6c7890;
    font-size: 12px;
    font-weight: 850;
}

.stb-color-result-copy strong {
    display: block;
    margin-top: 3px;
    color: var(--stb-ink);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 950;
    letter-spacing: -0.065em;
    line-height: 1.1;
}

.stb-color-result-copy p {
    margin: 8px 0 0;
    color: #57647c;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
}

.stb-color-mix-note {
    margin: auto 0 0;
    padding-top: 16px;
    color: #7c879b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.stb-color-mix-note span {
    margin-right: 5px;
    color: var(--stb-sky);
    font-size: 8px;
}

/* Whiteboard */
.stb-whiteboard {
    display: flex;
    min-height: 650px;
    flex-direction: column;
    padding: 14px;
}

.stb-whiteboard-toolbar {
    display: flex;
    min-height: 66px;
    align-items: center;
    gap: 9px;
    overflow-x: auto;
    padding: 7px 8px 13px;
    scrollbar-width: thin;
}

.stb-pen-colors,
.stb-pen-sizes {
    display: flex;
    align-items: center;
    gap: 7px;
}

.stb-color-button,
.stb-pen-sizes button,
.stb-toolbar-button {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce3ee;
    border-radius: 15px;
    background: #fff;
    cursor: pointer;
}

.stb-color-button::before {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--pen-color);
    content: "";
}

.stb-color-button.is-active,
.stb-pen-sizes button.is-active,
.stb-toolbar-button.is-active {
    border: 3px solid var(--stb-violet);
    background: var(--stb-violet-soft);
}

.stb-size-dot {
    display: block;
    border-radius: 50%;
    background: var(--stb-ink);
}

.stb-size-dot--small { width: 6px; height: 6px; }
.stb-size-dot--medium { width: 11px; height: 11px; }
.stb-size-dot--large { width: 17px; height: 17px; }

.stb-toolbar-divider {
    width: 1px;
    height: 37px;
    flex: 0 0 1px;
    margin: 0 2px;
    background: #dfe5ef;
}

.stb-toolbar-button {
    width: auto;
    min-width: 48px;
    flex: 0 0 auto;
    gap: 6px;
    padding: 0 13px;
    color: #536079;
    font-size: 12px;
    font-weight: 850;
}

.stb-toolbar-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.stb-toolbar-button--danger {
    margin-left: auto;
    color: #c64b58;
}

.stb-toolbar-button:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.stb-whiteboard-canvas-wrap {
    position: relative;
    flex: 1;
    min-height: 510px;
    overflow: hidden;
    border: 2px solid #dbe3ef;
    border-radius: 22px;
    background-color: #fff;
    background-image:
        linear-gradient(rgba(73, 111, 173, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(73, 111, 173, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    box-shadow: inset 0 2px 8px rgba(52, 68, 103, 0.05);
}

.stb-whiteboard-canvas-wrap canvas {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
}

.stb-whiteboard-hint {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #a5afc0;
    font-size: clamp(14px, 2.2vw, 20px);
    font-weight: 800;
    pointer-events: none;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.stb-whiteboard-hint span {
    font-size: 30px;
}

.stb-whiteboard-privacy {
    margin: 10px 3px 0;
    color: #748096;
    font-size: 11px;
    font-weight: 700;
}

.stb-whiteboard-privacy span {
    margin-right: 5px;
    color: var(--stb-green);
    font-size: 8px;
}

/* Timer */
.stb-timer {
    min-height: 630px;
}

.stb-time-panel {
    padding: 4px 34px 36px;
}

.stb-time-layout {
    display: grid;
    min-height: 410px;
    grid-template-columns: minmax(260px, 0.7fr) minmax(380px, 1.3fr);
    align-items: center;
    gap: 35px;
}

.stb-time-settings {
    padding: 24px;
    border: 1px solid #e0e5ef;
    border-radius: 24px;
    background: #f8f9fc;
}

.stb-time-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.stb-time-presets button {
    min-height: 50px;
}

.stb-time-presets button:last-child {
    grid-column: 1 / -1;
}

.stb-custom-time {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid #dfe5ef;
}

.stb-custom-time label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #69758b;
    font-size: 11px;
    font-weight: 850;
}

.stb-custom-time input {
    width: 100%;
    height: 51px;
    font-size: 19px;
}

.stb-custom-time > span {
    padding-bottom: 13px;
    color: #8a95a8;
    font-size: 19px;
    font-weight: 900;
}

.stb-custom-time .stb-secondary-action {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
    margin-top: 3px;
}

.stb-clock {
    --clock-progress: 1;
    position: relative;
    display: flex;
    width: min(390px, 100%);
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    justify-self: center;
    border-radius: 50%;
    background: conic-gradient(var(--stb-violet) calc(var(--clock-progress) * 1turn), #e5e9f1 0);
    box-shadow: 0 18px 45px rgba(54, 67, 105, 0.16);
}

.stb-clock::before {
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(75, 89, 127, 0.09);
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 5px 18px rgba(50, 65, 99, 0.05);
    content: "";
}

.stb-clock__face {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.stb-clock__face > span {
    color: #7b869a;
    font-size: 13px;
    font-weight: 850;
}

.stb-clock__face strong {
    margin: 8px 0 3px;
    color: var(--stb-ink);
    font-size: clamp(56px, 8vw, 88px);
    font-variant-numeric: tabular-nums;
    font-weight: 950;
    letter-spacing: -0.075em;
    line-height: 1;
}

.stb-clock__face small {
    display: inline-flex;
    min-width: 62px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--stb-violet-soft);
    color: var(--stb-violet);
    font-size: 11px;
    font-weight: 900;
}

.stb-clock.is-running {
    animation: stb-clock-breathe 2.2s ease-in-out infinite;
}

.stb-clock.is-finished {
    background: conic-gradient(var(--stb-coral) 1turn, var(--stb-coral) 0);
    animation: stb-clock-finish 650ms ease 2;
}

@keyframes stb-clock-breathe {
    50% { box-shadow: 0 20px 55px rgba(95, 71, 184, 0.23); }
}

@keyframes stb-clock-finish {
    50% { transform: scale(1.035); }
}

.stb-time-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.stb-time-finish-message {
    margin: 20px auto 0;
    color: var(--stb-coral);
    font-size: 22px;
    font-weight: 950;
    text-align: center;
}

.stb-stopwatch-stage {
    display: flex;
    min-height: 410px;
    align-items: center;
    justify-content: center;
}

.stb-clock--stopwatch {
    --clock-progress: 1;
    background: conic-gradient(var(--stb-sky) 1turn, var(--stb-sky) 0);
}

.stb-clock--stopwatch .stb-clock__face small {
    background: var(--stb-sky-soft);
    color: var(--stb-sky);
}

.stb-clock--stopwatch .stb-clock__face strong {
    font-size: clamp(48px, 7vw, 76px);
}

.stb-lap-list {
    display: grid;
    width: min(680px, 100%);
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 25px auto 0;
    padding: 0;
    list-style: none;
}

.stb-lap-list li {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid #e0e5ef;
    border-radius: 13px;
    background: #f8fafc;
    color: #59657b;
    font-size: 12px;
    font-weight: 800;
}

.stb-lap-list .stb-lap-empty {
    grid-column: 1 / -1;
    justify-content: center;
    color: #929bac;
}

.stb-toast {
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    max-width: min(460px, calc(100% - 32px));
    padding: 13px 18px;
    border-radius: 15px;
    background: rgba(23, 35, 63, 0.95);
    color: #fff;
    box-shadow: 0 14px 35px rgba(25, 37, 67, 0.28);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    transform: translateX(-50%);
}

/* Shared delight motion */
.stb-fx-burst {
    position: absolute;
    z-index: 90;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.stb-fx-particle {
    position: absolute;
    width: 13px;
    height: 13px;
    top: var(--fx-y);
    left: var(--fx-x);
    border-radius: 4px;
    background: var(--fx-color);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--fx-color) 45%, transparent);
    animation: stb-fx-particle-pop 1.08s cubic-bezier(0.15, 0.75, 0.2, 1) var(--fx-delay) both;
}

.stb-fx-particle--2 {
    width: 10px;
    height: 19px;
    border-radius: 999px;
}

.stb-fx-particle--3 {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

@keyframes stb-fx-particle-pop {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--fx-angle)) translateX(0) scale(0); }
    18% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--fx-angle)) translateX(22px) scale(1.2); }
    72% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--fx-angle)) translateX(var(--fx-distance)) rotate(230deg) scale(0.45); }
}

.stb-fx-pulse {
    animation: stb-fx-pulse 160ms ease;
}

@keyframes stb-fx-pulse {
    50% { filter: brightness(1.12); transform: scale(1.015); }
}

.is-popping {
    animation: stb-control-pop 420ms cubic-bezier(0.17, 0.84, 0.32, 1.35) !important;
}

@keyframes stb-control-pop {
    0% { transform: scale(0.9); }
    55% { transform: scale(1.13) rotate(-3deg); }
    100% { transform: scale(1); }
}

.stb-random-result.is-revealed,
.stb-number-stage p.is-revealed,
.stb-color-result-copy.is-revealed,
.stb-time-finish-message.is-revealed {
    animation: stb-result-reveal 720ms cubic-bezier(0.16, 0.82, 0.25, 1.2);
}

@keyframes stb-result-reveal {
    0% { opacity: 0; transform: translateY(16px) scale(0.82); }
    58% { opacity: 1; transform: translateY(-4px) scale(1.08); }
    100% { transform: translateY(0) scale(1); }
}

/* Toolbox home arrival */
.stb-home.is-ready .stb-home-hero {
    animation: stb-home-hero-arrive 720ms cubic-bezier(0.16, 0.82, 0.25, 1.1) both;
}

.stb-home.is-ready .stb-tool-card {
    animation: stb-tool-card-arrive 620ms cubic-bezier(0.16, 0.82, 0.25, 1.08) both;
}

.stb-home.is-ready .stb-tool-card:nth-child(1) { animation-delay: 80ms; }
.stb-home.is-ready .stb-tool-card:nth-child(2) { animation-delay: 140ms; }
.stb-home.is-ready .stb-tool-card:nth-child(3) { animation-delay: 200ms; }
.stb-home.is-ready .stb-tool-card:nth-child(4) { animation-delay: 260ms; }
.stb-home.is-ready .stb-tool-card:nth-child(5) { animation-delay: 320ms; }
.stb-home.is-ready .stb-tool-card:nth-child(6) { animation-delay: 380ms; }

@keyframes stb-home-hero-arrive {
    0% { opacity: 0; transform: translateY(-18px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes stb-tool-card-arrive {
    0% { opacity: 0; transform: translateY(32px) scale(0.94); }
    72% { opacity: 1; transform: translateY(-4px) scale(1.012); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.stb-home.is-ready .stb-hero-orbit--outer { animation: stb-orbit-spin 18s linear infinite; }
.stb-home.is-ready .stb-hero-orbit--inner { animation: stb-orbit-spin 11s linear infinite reverse; }
.stb-home.is-ready .stb-hero-tool--dice { animation: stb-hero-dice-float 3.2s ease-in-out infinite; }
.stb-home.is-ready .stb-hero-tool--timer { animation: stb-hero-timer-float 3.6s ease-in-out 300ms infinite; }
.stb-home.is-ready .stb-hero-tool--answer { animation: stb-hero-answer-float 2.8s ease-in-out 600ms infinite; }
.stb-home.is-ready .stb-hero-paint { animation: stb-hero-paint-float 3.4s ease-in-out 150ms infinite; }

@keyframes stb-orbit-spin { to { transform: rotate(360deg); } }
@keyframes stb-hero-dice-float {
    0%, 100% { transform: translateY(0) rotate(-11deg); }
    50% { transform: translateY(-12px) rotate(-3deg); }
}
@keyframes stb-hero-timer-float {
    0%, 100% { transform: translateY(0) rotate(7deg); }
    50% { transform: translateY(11px) rotate(1deg) scale(1.04); }
}
@keyframes stb-hero-answer-float {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-9px) rotate(18deg); }
}
@keyframes stb-hero-paint-float {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(10px) rotate(-2deg); }
}

.stb-tool-card:hover .stb-tool-card__icon,
.stb-tool-card:focus-visible .stb-tool-card__icon {
    animation: stb-card-icon-hop 560ms cubic-bezier(0.16, 0.82, 0.25, 1.25);
}

@keyframes stb-card-icon-hop {
    35% { transform: translateY(-9px) rotate(-5deg) scale(1.07); }
    70% { transform: translateY(2px) rotate(3deg); }
}

/* Random tools: visible anticipation before every result */
.stb-random-panel.is-active {
    animation: stb-random-panel-enter 460ms cubic-bezier(0.16, 0.82, 0.25, 1.08);
}

.stb-segmented button.is-active > span {
    animation: stb-mode-icon-pop 420ms cubic-bezier(0.16, 0.82, 0.25, 1.25);
}

@keyframes stb-random-panel-enter {
    0% { opacity: 0; transform: translateY(13px) scale(0.985); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes stb-mode-icon-pop {
    45% { transform: translateY(-4px) rotate(-8deg) scale(1.18); }
}

.stb-dice-row.is-tumbling .stb-die {
    filter: saturate(1.25) drop-shadow(0 20px 15px rgba(64, 48, 136, 0.22));
    animation: stb-die-tumble 330ms linear infinite;
}

.stb-dice-row.is-tumbling .stb-die:nth-child(2) { animation-delay: -110ms; animation-direction: reverse; }
.stb-dice-row.is-tumbling .stb-die:nth-child(3) { animation-delay: -220ms; }

@keyframes stb-die-tumble {
    0% { transform: translateY(0) rotate(0deg) scale(0.96); }
    24% { transform: translateY(-34px) rotate(92deg) scale(1.04); }
    50% { transform: translateY(-8px) rotate(184deg) scale(0.92); }
    76% { transform: translateY(-28px) rotate(276deg) scale(1.03); }
    100% { transform: translateY(0) rotate(360deg) scale(0.96); }
}

.stb-die.is-rolling {
    animation: stb-die-land 720ms cubic-bezier(0.12, 0.72, 0.2, 1.2);
}

.stb-dice-row.is-landed .stb-die:nth-child(2) { animation-delay: 70ms; }
.stb-dice-row.is-landed .stb-die:nth-child(3) { animation-delay: 140ms; }

@keyframes stb-die-land {
    0% { opacity: 0.35; transform: translateY(-75px) rotate(-24deg) scale(0.72); }
    48% { opacity: 1; transform: translateY(9px) rotate(8deg) scale(1.12); }
    72% { transform: translateY(-7px) rotate(-3deg) scale(0.98); }
    100% { transform: translateY(0) rotate(0) scale(1); }
}

.stb-coin-stage {
    position: relative;
}

.stb-coin::before {
    position: absolute;
    width: 30%;
    height: 72%;
    top: 8%;
    left: 16%;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.62), rgba(255,255,255,0));
    content: "";
    filter: blur(2px);
    transform: rotate(24deg);
}

.stb-coin.is-flipping {
    will-change: transform, filter;
    animation: stb-coin-super-flip 1.28s cubic-bezier(0.18, 0.72, 0.22, 1);
}

.stb-coin-stage.is-tossing .stb-random-result {
    animation: stb-waiting-bob 520ms ease-in-out infinite alternate;
}

.stb-coin.is-landed {
    animation: stb-coin-land 720ms cubic-bezier(0.16, 0.82, 0.25, 1.25);
}

@keyframes stb-coin-super-flip {
    0% { filter: brightness(1); transform: perspective(700px) translateY(0) rotateY(0) scale(1); }
    18% { transform: perspective(700px) translateY(-45px) rotateY(360deg) scale(0.94); }
    50% { filter: brightness(1.22); transform: perspective(700px) translateY(-125px) rotateY(1080deg) scale(0.78); }
    82% { transform: perspective(700px) translateY(-38px) rotateY(1680deg) scale(0.94); }
    100% { filter: brightness(1); transform: perspective(700px) translateY(0) rotateY(2160deg) scale(1); }
}

@keyframes stb-coin-land {
    0% { transform: translateY(-22px) scale(0.86); }
    44% { transform: translateY(8px) scale(1.12); box-shadow: 0 5px 0 #bc7b1e, 0 18px 45px rgba(231, 166, 47, 0.42); }
    72% { transform: translateY(-5px) scale(0.98); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes stb-waiting-bob {
    to { opacity: 0.58; transform: translateY(-4px); }
}

.stb-number-stage strong {
    position: relative;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.stb-number-stage strong::after {
    position: absolute;
    width: 38%;
    height: 160%;
    top: -30%;
    left: -55%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.72), transparent);
    content: "";
    transform: rotate(18deg);
}

.stb-number-stage strong.is-shuffling {
    color: #fff;
    background: linear-gradient(135deg, #7257d8, #9a73e7 48%, #347ed9);
    box-shadow: 0 14px 0 #543aa9, 0 28px 48px rgba(91, 65, 180, 0.32);
    animation: stb-number-shuffle 190ms ease-in-out infinite alternate;
}

.stb-number-stage strong.is-shuffling::after {
    animation: stb-number-shine 420ms linear infinite;
}

.stb-number-stage strong.is-picking {
    animation: stb-number-jackpot 820ms cubic-bezier(0.16, 0.82, 0.25, 1.25);
}

@keyframes stb-number-shuffle {
    from { transform: translateX(-3px) rotate(-1deg) scale(0.98); filter: blur(0); }
    to { transform: translateX(3px) rotate(1deg) scale(1.025); filter: blur(0.6px); }
}

@keyframes stb-number-shine { to { left: 125%; } }

@keyframes stb-number-jackpot {
    0% { opacity: 0.3; transform: translateY(-40px) scale(0.65) rotate(-5deg); }
    52% { opacity: 1; transform: translateY(7px) scale(1.15) rotate(2deg); }
    72% { transform: translateY(-5px) scale(0.97); }
    100% { transform: translateY(0) scale(1) rotate(0); }
}

.stb-spinner-stage::before {
    position: absolute;
    z-index: 0;
    width: min(430px, 108%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(114,87,216,0.28), rgba(52,126,217,0.08) 52%, transparent 70%);
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: scale(0.72);
}

.stb-spinner-stage canvas,
.stb-spinner-pointer,
.stb-spinner-stage .stb-random-result {
    z-index: 2;
}

.stb-spinner-stage canvas {
    transition: transform 3.2s cubic-bezier(0.08, 0.68, 0.08, 1), filter 240ms ease, box-shadow 240ms ease;
}

.stb-spinner-stage.is-spinning::before {
    opacity: 1;
    animation: stb-spinner-aura 900ms ease-in-out infinite alternate;
}

.stb-spinner-stage.is-spinning canvas {
    filter: saturate(1.32) brightness(1.05);
    box-shadow: 0 12px 0 #cfd6e6, 0 30px 55px rgba(77, 57, 163, 0.32);
}

.stb-spinner-pointer.is-ticking {
    animation: stb-spinner-tick 118ms ease-in-out infinite;
}

.stb-spinner-stage.is-celebrating canvas,
.stb-spinner-stage.is-refreshed canvas {
    animation: stb-spinner-land 720ms cubic-bezier(0.16, 0.82, 0.25, 1.2);
}

@keyframes stb-spinner-aura {
    to { opacity: 0.5; transform: scale(1.08); }
}

@keyframes stb-spinner-tick {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    45% { transform: translateX(-50%) rotate(17deg); }
}

@keyframes stb-spinner-land {
    42% { filter: saturate(1.4) brightness(1.12); box-shadow: 0 12px 0 #cfd6e6, 0 34px 62px rgba(77, 57, 163, 0.42); }
}

/* Rock-paper-scissors */
.stb-rps-cover-hands span:nth-child(1) { animation: stb-rps-cover-left 2.6s ease-in-out infinite; }
.stb-rps-cover-hands span:nth-child(2) { animation: stb-rps-cover-center 2.3s ease-in-out 180ms infinite; }
.stb-rps-cover-hands span:nth-child(3) { animation: stb-rps-cover-right 2.8s ease-in-out 360ms infinite; }

@keyframes stb-rps-cover-left {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(-9px) rotate(-15deg); }
}
@keyframes stb-rps-cover-center {
    0%, 100% { transform: translateY(-12px) rotate(2deg) scale(1); }
    50% { transform: translateY(-22px) rotate(-3deg) scale(1.06); }
}
@keyframes stb-rps-cover-right {
    0%, 100% { transform: translateY(0) rotate(8deg); }
    50% { transform: translateY(-10px) rotate(16deg); }
}

.stb-rps-hand-grid button.is-chosen {
    z-index: 3;
    border-color: var(--stb-violet);
    animation: stb-rps-hand-chosen 320ms cubic-bezier(0.16, 0.82, 0.25, 1.3) both;
}

@keyframes stb-rps-hand-chosen {
    0% { transform: scale(0.96); }
    62% { transform: translateY(-10px) scale(1.12) rotate(-3deg); box-shadow: 0 24px 42px rgba(83, 61, 175, 0.25); }
    100% { transform: translateY(-5px) scale(1.04); }
}

.stb-rps-locked.is-active .stb-rps-locked-hand {
    animation: stb-rps-lock-slam 720ms cubic-bezier(0.16, 0.82, 0.25, 1.25), stb-rps-lock-glow 1.8s ease-in-out 720ms infinite;
}

@keyframes stb-rps-lock-slam {
    0% { opacity: 0; transform: translateY(-70px) rotate(-12deg) scale(0.62); }
    56% { opacity: 1; transform: translateY(10px) rotate(4deg) scale(1.12); }
    78% { transform: translateY(-5px) rotate(-2deg) scale(0.97); }
    100% { transform: translateY(0) rotate(0) scale(1); }
}

@keyframes stb-rps-lock-glow {
    50% { transform: translateY(-5px) scale(1.025); box-shadow: 0 28px 55px rgba(83, 61, 175, 0.28); }
}

.stb-rps-result.is-revealing::before {
    position: absolute;
    z-index: 0;
    width: 130%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, transparent 0 12deg, color-mix(in srgb, var(--rps-result) 14%, transparent) 12deg 20deg);
    content: "";
    pointer-events: none;
    animation: stb-rps-rays 1.05s ease-out both;
}

.stb-rps-result.is-revealing > * {
    z-index: 1;
}

.stb-rps-result.is-revealing .stb-rps-result-badge { animation: stb-rps-badge-drop 760ms cubic-bezier(0.16, 0.82, 0.25, 1.3) both; }
.stb-rps-result.is-revealing h2 { animation: stb-rps-title-pop 680ms cubic-bezier(0.16, 0.82, 0.25, 1.25) 130ms both; }
.stb-rps-result.is-revealing .stb-rps-versus > span:first-child { animation: stb-rps-hand-left 620ms ease-out 210ms both; }
.stb-rps-result.is-revealing .stb-rps-versus > span:last-child { animation: stb-rps-hand-right 620ms ease-out 210ms both; }
.stb-rps-result.is-revealing .stb-rps-versus em { animation: stb-rps-vs-pop 520ms ease-out 360ms both; }

@keyframes stb-rps-rays {
    0% { opacity: 0; transform: rotate(-18deg) scale(0.25); }
    55% { opacity: 1; }
    100% { opacity: 0.32; transform: rotate(15deg) scale(1); }
}
@keyframes stb-rps-badge-drop {
    0% { opacity: 0; transform: translateY(-80px) rotate(-35deg) scale(0.45); }
    60% { opacity: 1; transform: translateY(8px) rotate(8deg) scale(1.18); }
    100% { transform: translateY(0) rotate(0) scale(1); }
}
@keyframes stb-rps-title-pop {
    0% { opacity: 0; transform: scale(0.65); }
    65% { opacity: 1; transform: scale(1.08); }
    100% { transform: scale(1); }
}
@keyframes stb-rps-hand-left {
    0% { opacity: 0; transform: translateX(-110px) rotate(-22deg) scale(0.7); }
    70% { opacity: 1; transform: translateX(8px) rotate(4deg) scale(1.08); }
    100% { transform: translateX(0) rotate(0) scale(1); }
}
@keyframes stb-rps-hand-right {
    0% { opacity: 0; transform: translateX(110px) rotate(22deg) scale(0.7); }
    70% { opacity: 1; transform: translateX(-8px) rotate(-4deg) scale(1.08); }
    100% { transform: translateX(0) rotate(0) scale(1); }
}
@keyframes stb-rps-vs-pop {
    0% { opacity: 0; transform: scale(2.2) rotate(-12deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* Big answer board */
.stb-answer-option.is-selected {
    animation: stb-answer-choice 230ms cubic-bezier(0.16, 0.82, 0.25, 1.3) both;
}

.stb-answer-picker.is-returning {
    animation: stb-answer-picker-return 520ms cubic-bezier(0.16, 0.82, 0.25, 1.12);
}

.stb-answer-display.is-revealing {
    animation: stb-answer-screen-flash 760ms ease-out both;
}

.stb-answer-display.is-revealing::before { animation: stb-answer-orbit-in 1s ease-out both; }
.stb-answer-display.is-revealing::after { animation: stb-answer-orbit-in 1s ease-out 100ms both reverse; }
.stb-answer-display.is-revealing > strong { animation: stb-answer-value-pop 860ms cubic-bezier(0.14, 0.82, 0.22, 1.28) 80ms both; }
.stb-answer-display.is-revealing > span { animation: stb-result-reveal 620ms ease-out 280ms both; }
.stb-answer-display.is-revealing .stb-answer-change { animation: stb-result-reveal 520ms ease-out 380ms both; }

.stb-answer-display.is-hiding {
    animation: stb-answer-screen-hide 220ms ease-in both;
}

@keyframes stb-answer-choice {
    50% { transform: translateY(-7px) scale(1.1) rotate(-2deg); box-shadow: 0 22px 38px rgba(65, 49, 147, 0.22); }
}
@keyframes stb-answer-picker-return {
    0% { opacity: 0; transform: scale(0.95) translateY(16px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes stb-answer-screen-flash {
    0% { opacity: 0; filter: brightness(1.45); }
    30% { opacity: 1; filter: brightness(1.22); }
    100% { filter: brightness(1); }
}
@keyframes stb-answer-orbit-in {
    0% { opacity: 0; transform: scale(0.2) rotate(-90deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes stb-answer-value-pop {
    0% { opacity: 0; transform: scale(0.2) rotate(-12deg); }
    52% { opacity: 1; transform: scale(1.18) rotate(4deg); }
    74% { transform: scale(0.94) rotate(-2deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes stb-answer-screen-hide {
    to { opacity: 0; transform: scale(1.05); }
}

/* Paint mixing */
.stb-paint-mix.is-bubbling::before,
.stb-paint-mix.is-bubbling::after {
    position: absolute;
    z-index: 5;
    width: 22px;
    height: 22px;
    bottom: 72px;
    border: 4px solid rgba(255,255,255,0.88);
    border-radius: 50%;
    background: color-mix(in srgb, var(--stb-violet) 35%, transparent);
    content: "";
    pointer-events: none;
    animation: stb-paint-bubble 760ms ease-out infinite;
}

.stb-paint-mix.is-bubbling::before { left: 37%; }
.stb-paint-mix.is-bubbling::after { right: 34%; animation-delay: 210ms; transform: scale(0.65); }

.stb-paint-drop--first.is-mixing { animation: stb-paint-first 820ms cubic-bezier(0.16, 0.82, 0.25, 1); }
.stb-paint-drop--second.is-mixing { animation: stb-paint-second 820ms cubic-bezier(0.16, 0.82, 0.25, 1); }
.stb-paint-result-swatch.is-mixing { animation: stb-paint-result 820ms ease both; }
.stb-color-result-copy.is-mixing { opacity: 0.54; animation: stb-waiting-bob 420ms ease-in-out infinite alternate; }

@keyframes stb-paint-first {
    0% { transform: translate(0, 0) rotate(-14deg); }
    42% { transform: translate(58px, 58px) rotate(75deg) scale(0.72); }
    67% { transform: translate(38px, 78px) rotate(155deg) scale(0.64); }
    100% { transform: translate(0, 0) rotate(346deg); }
}
@keyframes stb-paint-second {
    0% { transform: translate(0, 0) rotate(14deg); }
    42% { transform: translate(-58px, 58px) rotate(-75deg) scale(0.72); }
    67% { transform: translate(-38px, 78px) rotate(-155deg) scale(0.64); }
    100% { transform: translate(0, 0) rotate(-346deg); }
}
@keyframes stb-paint-result {
    0%, 38% { opacity: 0.18; filter: blur(5px); transform: translateX(50%) rotate(-26deg) scale(0.52); }
    68% { opacity: 1; filter: blur(0); transform: translateX(50%) rotate(8deg) scale(1.16); }
    84% { transform: translateX(50%) rotate(-7deg) scale(0.95); }
    100% { transform: translateX(50%) rotate(-3deg) scale(1); }
}
@keyframes stb-paint-bubble {
    0% { opacity: 0; transform: translateY(20px) scale(0.35); }
    35% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-95px) translateX(18px) scale(1.2); }
}

/* Whiteboard tools */
.stb-color-button,
.stb-pen-sizes button,
.stb-toolbar-button {
    position: relative;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.stb-color-button.is-active::after {
    position: absolute;
    inset: -6px;
    border: 2px solid color-mix(in srgb, var(--pen-color) 42%, transparent);
    border-radius: 19px;
    content: "";
    animation: stb-tool-ring 1.8s ease-in-out infinite;
}

.stb-toolbar-button.is-wiggling {
    animation: stb-tool-wiggle 480ms ease;
}

.stb-whiteboard-canvas-wrap.is-drawing {
    border-color: color-mix(in srgb, var(--stb-violet) 45%, #dbe3ef);
    box-shadow: inset 0 2px 8px rgba(52, 68, 103, 0.05), 0 0 0 5px rgba(114,87,216,0.08), 0 14px 35px rgba(61,76,117,0.12);
}

.stb-whiteboard-canvas-wrap.is-rewinding canvas {
    animation: stb-board-rewind 420ms ease;
}

.stb-whiteboard-canvas-wrap.is-clearing::after {
    position: absolute;
    z-index: 5;
    width: 52%;
    height: 150%;
    top: -25%;
    left: -60%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.98) 25% 75%, transparent);
    box-shadow: 28px 0 55px rgba(114,87,216,0.14);
    content: "";
    pointer-events: none;
    transform: skewX(-10deg);
    animation: stb-board-clear 720ms ease-in-out both;
}

@keyframes stb-tool-ring {
    50% { opacity: 0.28; transform: scale(1.08); }
}
@keyframes stb-tool-wiggle {
    20% { transform: rotate(-10deg) scale(1.08); }
    45% { transform: rotate(9deg) scale(1.1); }
    70% { transform: rotate(-5deg); }
}
@keyframes stb-board-rewind {
    40% { opacity: 0.45; filter: blur(1px); transform: translateX(-9px); }
}
@keyframes stb-board-clear { to { left: 112%; } }

/* Timer and stopwatch */
.stb-time-panel.is-entering {
    animation: stb-time-panel-enter 520ms cubic-bezier(0.16, 0.82, 0.25, 1.1);
}

.stb-clock::after {
    position: absolute;
    z-index: 1;
    inset: 7px;
    border: 3px dashed rgba(255,255,255,0.68);
    border-radius: 50%;
    content: "";
    opacity: 0;
    pointer-events: none;
}

.stb-clock.is-running::after {
    opacity: 0.8;
    animation: stb-clock-orbit 8s linear infinite;
}

.stb-clock.is-starting { animation: stb-clock-start 620ms cubic-bezier(0.16, 0.82, 0.25, 1.25) !important; }
.stb-clock.is-pausing { animation: stb-clock-pause 420ms ease !important; }
.stb-clock.is-resetting { animation: stb-clock-reset 560ms ease !important; }

.stb-clock.is-urgent {
    background: conic-gradient(#ec6d61 calc(var(--clock-progress) * 1turn), #ffe1dc 0);
    animation: stb-clock-urgent 650ms ease-in-out infinite !important;
}

.stb-clock.is-urgent.is-starting {
    animation: stb-clock-start 620ms cubic-bezier(0.16, 0.82, 0.25, 1.25) !important;
}

.stb-clock__face strong.is-counting-down {
    color: #d94f55;
    animation: stb-countdown-slam 520ms cubic-bezier(0.16, 0.82, 0.25, 1.25);
}

.stb-clock.is-finished {
    background: conic-gradient(#ec6d61 1turn, #ec6d61 0);
    animation: stb-clock-finish-party 1.45s cubic-bezier(0.16, 0.82, 0.25, 1.2);
}

.stb-lap-list li.is-new {
    animation: stb-lap-pop 620ms cubic-bezier(0.16, 0.82, 0.25, 1.15);
}

@keyframes stb-time-panel-enter {
    0% { opacity: 0; transform: translateY(15px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes stb-clock-orbit { to { transform: rotate(360deg); } }
@keyframes stb-clock-start {
    0% { transform: scale(0.84) rotate(-8deg); }
    62% { transform: scale(1.08) rotate(3deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes stb-clock-pause {
    45% { filter: saturate(0.55); transform: scale(0.96); }
}
@keyframes stb-clock-reset {
    0% { transform: rotate(-16deg) scale(0.92); }
    70% { transform: rotate(5deg) scale(1.04); }
}
@keyframes stb-clock-urgent {
    50% { transform: scale(1.035); box-shadow: 0 22px 60px rgba(236,109,97,0.42); }
}
@keyframes stb-countdown-slam {
    0% { transform: translateY(-18px) scale(1.45); opacity: 0.35; }
    65% { transform: translateY(4px) scale(0.94); opacity: 1; }
    100% { transform: translateY(0) scale(1); }
}
@keyframes stb-clock-finish-party {
    0% { transform: scale(0.82) rotate(-8deg); }
    28% { transform: scale(1.1) rotate(5deg); }
    48% { transform: scale(0.96) rotate(-3deg); }
    68% { transform: scale(1.06) rotate(2deg); }
    100% { transform: scale(1) rotate(0); box-shadow: 0 22px 64px rgba(236,109,97,0.38); }
}
@keyframes stb-lap-pop {
    0% { opacity: 0; transform: translateY(-18px) scale(0.84); }
    65% { opacity: 1; transform: translateY(4px) scale(1.04); }
    100% { transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
    .stb-home-hero {
        min-height: 300px;
        grid-template-columns: minmax(0, 1fr) 260px;
        padding: 36px 38px;
    }

    .stb-hero-visual {
        width: 260px;
    }

    .stb-hero-tool--dice {
        width: 90px;
        height: 90px;
        padding: 17px;
        border-radius: 25px;
    }

    .stb-hero-tool--dice span { width: 10px; height: 10px; }
    .stb-hero-tool--answer { width: 82px; height: 82px; font-size: 46px; }
    .stb-hero-tool--timer { width: 95px; height: 95px; }
    .stb-hero-tool--timer span { font-size: 39px; }
    .stb-hero-paint { transform: rotate(-8deg) scale(0.86); transform-origin: left bottom; }

    .stb-tool-card {
        grid-template-columns: 82px minmax(0, 1fr) 42px;
        gap: 15px;
        padding: 23px 20px;
    }

    .stb-tool-card__icon {
        width: 82px;
        height: 82px;
        border-radius: 23px;
    }

    .stb-tool-card__icon svg { width: 49px; height: 49px; }
    .stb-tool-card__arrow { width: 40px; height: 40px; }

    .stb-random-panel { min-height: 540px; }
    .stb-die { width: clamp(103px, 17vw, 132px); }

    .stb-rps { min-height: 600px; }
    .stb-rps-panel { min-height: 598px; padding: 28px; }
    .stb-rps-hand-grid button { min-height: 270px; }
    .stb-rps-locked-hand { width: 280px; height: 280px; }
    .stb-rps-locked-hand span { font-size: 130px; }

    .stb-answer-options--two .stb-answer-option { min-height: 285px; }

    .stb-color-options button > span { width: 38px; height: 38px; }

    .stb-toolbar-button {
        width: 48px;
        flex: 0 0 48px;
        padding: 0;
    }

    .stb-toolbar-button span {
        display: none;
    }

    .stb-time-layout {
        grid-template-columns: minmax(245px, 0.8fr) minmax(330px, 1.2fr);
        gap: 22px;
    }
}

@media (max-width: 720px) {
    .stb-topbar {
        width: min(100% - 24px, 1180px);
        min-height: 68px;
        gap: 10px;
        padding-top: max(10px, env(safe-area-inset-top));
    }

    .stb-brand-mark { width: 39px; height: 39px; flex-basis: 39px; padding: 7px; }
    .stb-brand-copy strong { font-size: 14px; }
    .stb-brand-copy small { font-size: 9px; }
    .stb-local-badge { min-height: 38px; padding: 7px 10px; font-size: 11px; }
    .stb-local-badge svg { width: 17px; height: 17px; }
    .stb-top-button span { display: none; }
    .stb-top-button { width: 45px; padding: 9px; }
    .stb-top-button--site-home {
        width: auto;
        min-height: 38px;
        gap: 5px;
        padding: 7px 10px;
        border-radius: 999px;
        font-size: 11px;
        white-space: nowrap;
    }
    .stb-top-button--site-home span { display: inline; }
    .stb-top-button--site-home svg { width: 17px; height: 17px; }

    .stb-home,
    .stb-tool-page {
        width: min(100% - 24px, 1180px);
        padding-top: 12px;
    }

    .stb-home-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 32px 27px;
        border-radius: 29px;
    }

    .stb-home h1 { font-size: clamp(38px, 12vw, 54px); }
    .stb-home-lead { margin-top: 19px; font-size: 15px; }
    .stb-hero-visual { display: none; }

    .stb-tool-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 14px;
    }

    .stb-tool-section {
        margin-top: 20px;
    }

    .stb-tool-section--shared {
        padding: 17px 12px 12px;
        border-radius: 26px;
    }

    .stb-tool-section__heading {
        align-items: start;
        gap: 10px;
        padding: 0 4px;
    }

    .stb-tool-section__heading h2 {
        font-size: 24px;
    }

    .stb-tool-section__heading > span {
        min-height: 30px;
        padding: 5px 9px;
        font-size: 10px;
    }

    .stb-tool-grid > .stb-tool-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .stb-tool-card {
        min-height: 142px;
        grid-template-columns: 74px minmax(0, 1fr) 38px;
        padding: 18px 16px;
        border-radius: 24px;
    }

    .stb-tool-card__icon { width: 74px; height: 74px; border-radius: 21px; }
    .stb-tool-card__icon svg { width: 43px; height: 43px; }
    .stb-tool-card__meta { min-height: 19px; gap: 5px; margin-bottom: 3px; }
    .stb-tool-card__copy small { font-size: 10px; }
    .stb-tool-card__badge { min-height: 19px; padding: 2px 6px; font-size: 9px; }
    .stb-tool-card__copy strong { font-size: 21px; }
    .stb-tool-card__copy > span { margin-top: 5px; font-size: 12px; }
    .stb-tool-card__arrow { width: 36px; height: 36px; }
    .stb-tool-card__number { top: 10px; right: 15px; }

    .stb-privacy-note {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 14px;
    }

    .stb-privacy-note > a { display: none; }

    .stb-tool-heading {
        align-items: start;
        margin-bottom: 13px;
    }

    .stb-tool-heading h1 { font-size: 32px; }
    .stb-tool-heading > div > p:last-child { font-size: 13px; }
    .stb-device-only-note { display: none; }

    .stb-workspace { border-radius: 25px; }

    .stb-segmented {
        gap: 4px;
        margin: 10px;
        padding: 5px;
        border-radius: 17px;
    }

    .stb-segmented button {
        min-height: 50px;
        flex-direction: column;
        gap: 3px;
        padding: 6px 3px;
        border-radius: 13px;
        font-size: 11px;
    }

    .stb-segmented button > span { min-width: 21px; height: 21px; font-size: 13px; }
    .stb-segmented--compact button { flex-direction: row; gap: 7px; font-size: 13px; }

    .stb-random-panel {
        min-height: 520px;
        padding: 10px 17px 27px;
    }

    .stb-random-controls { flex-direction: column; gap: 12px; }
    .stb-history { width: 100%; overflow-x: auto; }
    .stb-random-stage { min-height: 330px; }
    .stb-dice-row { gap: 10px; }
    .stb-die { width: clamp(84px, 27vw, 117px); padding: 17px; border-radius: 25px; }
    .stb-die-pip { width: 13px; }
    .stb-primary-action { width: min(100%, 310px); min-width: 0; }

    .stb-number-settings { gap: 6px; }
    .stb-number-settings input { width: 108px; height: 52px; font-size: 19px; }
    .stb-range-divider { padding-bottom: 14px; font-size: 11px; }
    .stb-number-stage strong { min-width: 205px; min-height: 170px; border-radius: 40px; }

    .stb-spinner-layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .stb-spinner-settings { padding: 15px; }
    .stb-spinner-settings textarea { min-height: 125px; }
    .stb-spinner-stage canvas { width: min(300px, 88vw); }

    .stb-rps { min-height: 570px; }
    .stb-rps-panel { min-height: 568px; padding: 24px 14px; }
    .stb-rps-round { margin-bottom: 12px; padding: 7px 11px; }
    .stb-rps-cover-hands { margin-bottom: 20px; }
    .stb-rps-cover-hands span {
        width: 88px;
        height: 88px;
        margin-inline: -6px;
        border-width: 5px;
        border-radius: 27px;
        font-size: 49px;
    }
    .stb-rps-intro h2 { font-size: clamp(40px, 12vw, 56px); }
    .stb-rps-intro > p:not(.stb-rps-round) { margin: 14px 0 23px; font-size: 15px; }
    .stb-rps-start { min-height: 62px; font-size: 19px; }
    .stb-rps-step-heading { gap: 11px; }
    .stb-rps-step-heading > span { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
    .stb-rps-step-heading h2 { font-size: clamp(24px, 7vw, 32px); }
    .stb-rps-instruction { margin: 18px 0 16px; font-size: 14px; line-height: 1.55; }
    .stb-rps-hand-grid { gap: 8px; }
    .stb-rps-hand-grid button {
        min-height: 175px;
        gap: 10px;
        padding: 15px 5px;
        border-width: 2px;
        border-radius: 21px;
    }
    .stb-rps-hand-grid button span { font-size: clamp(54px, 18vw, 78px); }
    .stb-rps-hand-grid button strong { font-size: clamp(17px, 5vw, 23px); }
    .stb-rps-locked .stb-rps-step-heading { top: 22px; width: calc(100% - 28px); }
    .stb-rps-locked-hand { width: 235px; height: 235px; border-width: 7px; }
    .stb-rps-locked-hand span { font-size: 108px; }
    .stb-rps-locked-hand strong { font-size: 24px; }
    .stb-rps-callout { margin: 18px 0 16px; font-size: 18px; }
    .stb-rps-result-badge { width: 72px; height: 72px; margin-bottom: 11px; font-size: 38px; }
    .stb-rps-result h2 { max-width: 520px; font-size: clamp(34px, 9.8vw, 51px); }
    .stb-rps-versus { gap: 14px; margin: 18px 0 13px; }
    .stb-rps-versus strong { font-size: 61px; }
    .stb-rps-result > p:not(.stb-rps-round, .stb-rps-out-note) { margin-bottom: 16px; font-size: 14px; }
    .stb-rps-out-note { font-size: 13px; }

    .stb-answer-board { min-height: 560px; padding: 14px; }
    .stb-answer-picker { grid-template-columns: 1fr; }
    .stb-answer-group:first-child { grid-row: auto; }
    .stb-answer-group { padding: 15px; }
    .stb-answer-options--two .stb-answer-option { min-height: 150px; }
    .stb-answer-options--two .stb-answer-option strong { font-size: 74px; }
    .stb-answer-options--four { grid-template-columns: repeat(4, 1fr); }
    .stb-answer-options--feelings { grid-template-columns: repeat(3, 1fr); }
    .stb-answer-option { min-height: 88px; padding: 8px 5px; }
    .stb-answer-option strong { font-size: 29px; }
    .stb-answer-option span { font-size: 11px; }
    .stb-answer-display { min-height: 560px; }

    .stb-color-mix { min-height: 760px; grid-template-columns: 1fr; padding: 14px; }
    .stb-color-pickers,
    .stb-color-result { padding: 18px; }
    .stb-paint-mix { height: 230px; }

    .stb-whiteboard { min-height: 620px; padding: 9px; }
    .stb-whiteboard-toolbar { gap: 6px; padding: 5px 4px 10px; }
    .stb-color-button,
    .stb-pen-sizes button,
    .stb-toolbar-button { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; }
    .stb-toolbar-button { width: 44px; }
    .stb-whiteboard-canvas-wrap { min-height: 490px; }

    .stb-timer { min-height: 590px; }
    .stb-time-panel { padding: 3px 18px 27px; }
    .stb-time-layout { grid-template-columns: 1fr; min-height: auto; gap: 20px; }
    .stb-time-settings { padding: 16px; }
    .stb-clock { width: min(310px, 78vw); }
    .stb-clock::before { inset: 14px; }
    .stb-time-actions { margin-top: 25px; }
    .stb-stopwatch-stage { min-height: 360px; }
    .stb-lap-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
    .stb-rps-panel { padding-inline: 11px; }
    .stb-rps-cover-hands span { width: 80px; height: 80px; font-size: 44px; }
    .stb-rps-hand-grid { gap: 6px; }
    .stb-rps-hand-grid button { min-height: 160px; border-radius: 18px; }
    .stb-rps-hand-grid button span { font-size: clamp(50px, 17vw, 68px); }
    .stb-rps-result h2 { font-size: clamp(31px, 9.5vw, 41px); }
    .stb-rps-versus { gap: 9px; }
    .stb-rps-versus strong { font-size: 55px; }
    .stb-rps-versus b { font-size: 14px; }
    .stb-answer-options--feelings { grid-template-columns: 1fr; }
    .stb-answer-options--feelings .stb-answer-option { min-height: 72px; flex-direction: row; }
    .stb-answer-options--four { gap: 6px; }
    .stb-answer-options--four .stb-answer-option { min-height: 76px; }
    .stb-answer-group h2 { font-size: 15px; }
    .stb-answer-display > strong { font-size: 110px; }
    .stb-number-settings label span { font-size: 10px; }
    .stb-number-settings input { width: 94px; }
    .stb-color-options { gap: 4px; }
    .stb-color-picker { padding: 13px 9px; }
    .stb-color-options button { min-height: 78px; padding-inline: 2px; }
    .stb-color-options button > span { width: 38px; height: 38px; }
    .stb-lap-list { grid-template-columns: 1fr; }
}

@media (orientation: landscape) and (max-height: 650px) {
    .stb-topbar { min-height: 59px; padding-top: max(7px, env(safe-area-inset-top)); }
    .stb-brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
    .stb-brand-copy small { display: none; }
    .stb-tool-heading { margin-bottom: 10px; }
    .stb-tool-heading .stb-kicker,
    .stb-tool-heading > div > p:last-child { display: none; }
    .stb-tool-heading h1 { font-size: 28px; }
    .stb-tool-page { padding-top: 4px; }
    .stb-random-panel { min-height: 440px; }
    .stb-random-stage { min-height: 270px; }
    .stb-random-controls { flex-direction: row; }
    .stb-coin-stage { min-height: 300px; }
    .stb-coin { width: 190px; }
    .stb-rps { min-height: 465px; }
    .stb-rps-panel { min-height: 463px; padding: 15px 22px; }
    .stb-rps-round { margin-bottom: 8px; }
    .stb-rps-cover-hands { margin-bottom: 11px; }
    .stb-rps-cover-hands span { width: 70px; height: 70px; border-radius: 22px; font-size: 39px; }
    .stb-rps-intro h2 { font-size: 39px; }
    .stb-rps-intro > p:not(.stb-rps-round) { margin: 9px 0 15px; font-size: 13px; line-height: 1.45; }
    .stb-rps-start { min-height: 52px; }
    .stb-rps-step-heading h2 { font-size: 25px; }
    .stb-rps-instruction { margin: 11px 0 10px; font-size: 12px; }
    .stb-rps-hand-grid button { min-height: 205px; }
    .stb-rps-hand-grid button span { font-size: 70px; }
    .stb-rps-locked .stb-rps-step-heading { top: 14px; }
    .stb-rps-locked-hand { width: 180px; height: 180px; }
    .stb-rps-locked-hand span { font-size: 78px; }
    .stb-rps-locked-hand strong { font-size: 20px; }
    .stb-rps-callout { margin: 10px 0 9px; font-size: 16px; }
    .stb-rps-result-badge { width: 58px; height: 58px; margin-bottom: 7px; border-width: 4px; font-size: 31px; }
    .stb-rps-result h2 { font-size: 34px; }
    .stb-rps-versus { max-width: 440px; margin: 8px 0 5px; }
    .stb-rps-versus strong { font-size: 48px; }
    .stb-rps-result > p:not(.stb-rps-round, .stb-rps-out-note) { margin-bottom: 9px; font-size: 12px; }
    .stb-rps-out-note { padding: 9px 13px; font-size: 12px; }
    .stb-answer-board,
    .stb-answer-display { min-height: 445px; }
    .stb-answer-options--two .stb-answer-option { min-height: 220px; }
    .stb-color-mix { min-height: 465px; gap: 15px; padding: 16px; }
    .stb-color-pickers,
    .stb-color-result { padding: 15px; }
    .stb-color-picker-grid { margin-top: 13px; gap: 7px; }
    .stb-color-picker { padding-block: 10px; }
    .stb-color-options button { min-height: 70px; }
    .stb-color-options button > span { width: 36px; height: 36px; }
    .stb-paint-mix { height: 185px; margin-top: 0; }
    .stb-paint-drop { width: 80px; height: 80px; }
    .stb-paint-result-swatch { width: 130px; height: 130px; }
    .stb-color-result-copy strong { font-size: 40px; }
    .stb-color-mix-note { display: none; }
    .stb-whiteboard { min-height: 465px; }
    .stb-whiteboard-canvas-wrap { min-height: 345px; }
    .stb-timer { min-height: 465px; }
    .stb-time-layout { min-height: 300px; grid-template-columns: minmax(260px, .8fr) minmax(300px, 1.2fr); }
    .stb-clock { width: min(275px, 48vh); }
    .stb-time-actions { margin-top: 5px; }
    .stb-stopwatch-stage { min-height: 295px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    .stb-tool-card,
    .stb-workspace,
    .stb-rps-hand-grid button,
    .stb-answer-group,
    .stb-color-picker,
    .stb-color-result,
    .stb-time-settings {
        border: 2px solid CanvasText;
    }

    .stb-die-pip,
    .stb-color-button::before,
    .stb-color-options button > span,
    .stb-paint-result-swatch {
        border: 2px solid CanvasText;
    }
}

/* Fixed-link QR sharing */
.stb-rps-result.is-active {
    animation: none;
}

.stb-home-qr-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    padding: 11px 16px;
    border: 1px solid rgba(83, 67, 154, 0.18);
    border-radius: 15px;
    background: var(--stb-violet-soft);
    color: var(--stb-violet);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease;
}

.stb-home-qr-link:hover,
.stb-home-qr-link:focus-visible {
    background: #e7e0ff;
    transform: translateY(-2px);
}

.stb-home-qr-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.stb-static-qr {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(900px, calc(100% - 40px));
    min-height: 680px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 22px auto max(32px, env(safe-area-inset-bottom));
    padding: 44px;
    border: 1px solid rgba(82, 94, 130, 0.13);
    border-radius: 38px;
    background:
        radial-gradient(circle at 50% 44%, rgba(239, 235, 255, 0.82), transparent 26rem),
        rgba(255, 255, 255, 0.94);
    box-shadow: var(--stb-shadow);
    text-align: center;
}

.stb-static-qr__copy h1 {
    margin: 0;
    color: var(--stb-ink);
    font-size: clamp(42px, 6vw, 66px);
    font-weight: 950;
    letter-spacing: -0.065em;
    line-height: 1.08;
}

.stb-static-qr__copy .stb-kicker {
    justify-content: center;
}

.stb-static-qr__copy > p:last-child {
    margin: 17px 0 25px;
    color: var(--stb-ink-soft);
    font-size: 17px;
    font-weight: 720;
    line-height: 1.65;
    word-break: keep-all;
}

.stb-static-qr__card {
    display: flex;
    width: min(430px, 100%);
    align-items: center;
    flex-direction: column;
    padding: 20px;
    border: 1px solid #dfe4ee;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(45, 57, 91, 0.13);
}

.stb-static-qr__card img {
    display: block;
    width: min(350px, 100%);
    height: auto;
    border-radius: 12px;
}

.stb-static-qr__card > a {
    max-width: 100%;
    margin-top: 12px;
    overflow-wrap: anywhere;
    color: var(--stb-violet);
    font-size: 13px;
    font-weight: 850;
}

.stb-static-qr__card > p {
    margin: 16px;
    color: var(--stb-coral);
    font-weight: 800;
    line-height: 1.55;
}

.stb-static-qr__open {
    width: min(330px, 100%);
    margin-top: 23px;
}

@media (max-width: 720px) {
    .stb-home-qr-link {
        min-height: 45px;
        margin-top: 18px;
        font-size: 13px;
    }

    .stb-static-qr {
        width: min(100% - 24px, 900px);
        min-height: 570px;
        margin-top: 12px;
        padding: 29px 18px;
        border-radius: 29px;
    }

    .stb-static-qr__copy h1 {
        font-size: clamp(36px, 11vw, 50px);
    }

    .stb-static-qr__copy > p:last-child {
        margin: 14px 0 20px;
        font-size: 14px;
    }

    .stb-static-qr__card {
        padding: 14px;
        border-radius: 22px;
    }

    .stb-static-qr__card img {
        width: min(310px, 100%);
    }
}

@media print {
    .stb-topbar,
    .stb-ambient,
    .stb-static-qr__open {
        display: none;
    }

    .stb-static-qr {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        border: 0;
        box-shadow: none;
    }
}
