body {
    background-color: #f0f3fa;
    color: #24324e;
    user-select: none;
    -webkit-user-select: none
}

body.dark {
    background-color: #141c30;
    color: #dce8ff
}

body.dark .bg-white {
    background-color: #1c2740 !important;
    color: #e2e8f0 !important;
    border-color: rgba(32, 166, 83, 0.25) !important
}

body.dark .bg-brand-cream-light, body.dark .bg-brand-cream {
    background-color: #263450 !important;
    color: #fef08a !important
}

body.dark .text-brand-teal {
    color: #b7ccff !important
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px
}

::-webkit-scrollbar-track {
    background: rgba(52, 87, 168, 0.06);
    border-radius: 999px
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 87, 168, 0.28);
    border-radius: 999px
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 87, 168, 0.55)
}

.no-scrollbar::-webkit-scrollbar {
    display: none
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none
}

.tabular-nums {
    font-variant-numeric: tabular-nums
}

.perspective-1000 {
    perspective: 1000px
}

@keyframes pulse-subtle {
    0%, 100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.02)
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 2s infinite ease-in-out
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0)
    }

    20%, 60% {
        transform: translateX(-6px)
    }

    40%, 80% {
        transform: translateX(6px)
    }
}

.animate-shake {
    animation: shake 0.4s ease-in-out
}

.toast-slide-in {
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards
}

@keyframes slideInRight {
    from {
        transform: translateX(110%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

.tk-scope {
    --tk-ink: #24324e;
    --tk-muted: #62718a;
    --tk-accent: #3457a8;
    --tk-accent2: #168A45;
    --tk-on-accent: #fff;
    --tk-soft: #f5f7fc;
    --tk-soft2: #e8edf8;
    --tk-line: rgba(52,87,168,.14);
    --tk-surface: #fff;
    --tk-warn: #D97706;
    --tk-danger: #DC2626;
    --tk-coral: #E0583A;
    --tk-shadow: 0 1px 2px rgba(16,24,40,.05), 0 18px 40px -22px rgba(52,87,168,.35)
}

body.dark .tk-scope {
    --tk-ink: #e5edfc;
    --tk-muted: #a4b4d0;
    --tk-accent: #34D399;
    --tk-accent2: #22C55E;
    --tk-on-accent: #04241E;
    --tk-soft: #202c45;
    --tk-soft2: #2a3854;
    --tk-line: rgba(167,243,208,.16);
    --tk-surface: #1b263d;
    --tk-warn: #FBBF24;
    --tk-danger: #F87171;
    --tk-coral: #FB8C6B;
    --tk-shadow: 0 18px 40px -22px rgba(0,0,0,.6)
}

.tk-scope button {
    -webkit-tap-highlight-color: transparent
}

.tk-scope button:focus-visible, .tk-scope input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--tk-accent) 45%, transparent);
    outline-offset: 2px
}

.tk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px
}

.tk-toolbar-r {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.tk-seg {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    border-radius: 14px;
    background: var(--tk-soft);
    border: 1px solid var(--tk-line)
}

.tk-seg > button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14.5px;
    color: var(--tk-accent);
    transition: background .2s, color .2s, box-shadow .2s;
    white-space: nowrap
}

.tk-seg > button:hover {
    background: color-mix(in srgb, var(--tk-accent) 8%, transparent)
}

.tk-seg > button[aria-pressed="true"] {
    background: var(--tk-accent);
    color: var(--tk-on-accent);
    box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--tk-accent) 70%, transparent)
}

.tk-seg svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0
}

.tk-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border-radius: 11px;
    background: var(--tk-soft);
    border: 1px solid var(--tk-line);
    color: var(--tk-accent);
    font-weight: 700;
    font-size: 13.5px;
    transition: background .2s;
    white-space: nowrap
}

.tk-ghost:hover {
    background: var(--tk-soft2)
}

select.tk-ghost {
    padding-right: 8px;
    outline: none;
    cursor: pointer
}

body.dark select.tk-ghost option {
    background: #1b263d
}

.tk-styles {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none
}

.tk-styles::-webkit-scrollbar {
    display: none
}

.tk-styles-lbl {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tk-muted);
    white-space: nowrap;
    margin-right: 2px
}

.tk-style {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 12px;
    border: 1px solid var(--tk-line);
    background: var(--tk-surface);
    color: var(--tk-ink);
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    transition: border-color .2s, background .2s, transform .15s
}

.tk-style:hover {
    border-color: color-mix(in srgb, var(--tk-accent) 45%, transparent)
}

.tk-style:active {
    transform: scale(.97)
}

.tk-style-ico {
    width: 30px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--tk-soft);
    color: var(--tk-accent)
}

.tk-style-ico svg {
    width: 18px;
    height: 18px
}

.tk-style[aria-pressed="true"] {
    border-color: var(--tk-accent);
    background: color-mix(in srgb, var(--tk-accent) 8%, var(--tk-surface));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-accent) 14%, transparent)
}

.tk-style[aria-pressed="true"] .tk-style-ico {
    background: var(--tk-accent);
    color: var(--tk-on-accent)
}

.tk-stage {
    --tk-c: var(--tk-accent);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 28px;
    padding: 26px 20px 22px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--tk-c) 10%, transparent) 0%, transparent 70%), linear-gradient(180deg, var(--tk-surface) 0%, var(--tk-soft) 100%);
    border: 2px solid color-mix(in srgb, var(--tk-c) 45%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 26px 50px -34px color-mix(in srgb, var(--tk-c) 80%, transparent);
    transition: border-color .45s, box-shadow .45s;
    color: var(--tk-ink)
}

.tk-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .5;
    background-image: radial-gradient(color-mix(in srgb, var(--tk-c) 16%, transparent) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, transparent 30%, #000 100%);
    mask-image: radial-gradient(70% 60% at 50% 45%, transparent 30%, #000 100%)
}

.tk-stage[data-state="warn"] {
    --tk-c: var(--tk-warn)
}

.tk-stage[data-state="danger"], .tk-stage[data-state="done"] {
    --tk-c: var(--tk-danger)
}

.tk-stage[data-state="done"] {
    animation: tkAlarm 1s ease-in-out 4
}

@keyframes tkAlarm {
    50% {
        box-shadow: 0 0 0 10px color-mix(in srgb, var(--tk-danger) 25%, transparent), 0 26px 50px -30px var(--tk-danger)
    }
}

.tk-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--tk-c);
    background: color-mix(in srgb, var(--tk-c) 11%, transparent);
    border: 1px solid color-mix(in srgb, var(--tk-c) 24%, transparent);
    margin-bottom: 14px;
    transition: color .3s, background .3s
}

.tk-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor
}

.tk-badge[data-s="run"]::before {
    animation: tkDot 1.2s ease-in-out infinite
}

.tk-badge[data-s="pause"] {
    color: var(--tk-coral);
    background: color-mix(in srgb, var(--tk-coral) 12%, transparent);
    border-color: color-mix(in srgb, var(--tk-coral) 28%, transparent)
}

.tk-badge[data-s="done"] {
    color: #fff;
    background: var(--tk-danger);
    border-color: var(--tk-danger);
    animation: tkPop .5s ease-out
}

@keyframes tkDot {
    50% {
        opacity: .25;
        transform: scale(.7)
    }
}

@keyframes tkPop {
    0% {
        transform: scale(.7)
    }

    60% {
        transform: scale(1.12)
    }

    100% {
        transform: scale(1)
    }
}

.tk-face {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 4vw, 48px);
    width: 100%
}

.tk-dial {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center
}

.tk-digits {
    position: relative;
    font-family: "Space Grotesk", ui-monospace, monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.035em;
    line-height: .95;
    font-size: clamp(64px, 13vw, 176px);
    color: var(--tk-c);
    white-space: nowrap;
    transition: color .45s
}

.tk-stage[data-run="1"][data-state="danger"] .tk-digits, .tk-stage[data-run="1"][data-state="danger"] .tk-flip {
    animation: tkBeat 1s ease-in-out infinite
}

.tk-stage[data-state="done"] .tk-digits, .tk-stage[data-state="done"] .tk-flip {
    animation: tkBlink .8s steps(2, jump-none) 5
}

@keyframes tkBeat {
    0%, 100% {
        transform: scale(1)
    }

    12% {
        transform: scale(1.045)
    }
}

@keyframes tkBlink {
    50% {
        opacity: .25
    }
}

.tk-sub {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tk-muted);
    display: inline-flex;
    gap: 6px;
    align-items: baseline
}

.tk-sub b {
    font-family: "Space Grotesk", monospace;
    color: var(--tk-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums
}

.tk-bar {
    width: min(640px, 100%);
    height: 10px;
    border-radius: 999px;
    margin-top: 22px;
    overflow: hidden;
    background: color-mix(in srgb, var(--tk-c) 12%, transparent)
}

.tk-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--tk-c) 60%, #fff), var(--tk-c));
    transition: width .25s linear;
    box-shadow: 0 0 12px color-mix(in srgb, var(--tk-c) 50%, transparent)
}

.tk-ring, .tk-flip, .tk-hourglass {
    display: none
}

.tk-stage[data-style="ring"] .tk-dial {
    width: clamp(250px, 42vw, 360px);
    aspect-ratio: 1
}

.tk-stage[data-style="ring"] .tk-ring {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg)
}

.tk-stage[data-style="ring"] .tk-digits {
    font-size: clamp(50px, 8.5vw, 96px)
}

.tk-stage[data-style="ring"] .tk-sub {
    margin-top: 6px
}

.tk-stage[data-long="1"] .tk-digits {
    font-size: clamp(52px, 10vw, 140px)
}

.tk-stage[data-long="1"][data-style="ring"] .tk-digits {
    font-size: clamp(38px, 6vw, 68px)
}

.tk-stage[data-long="1"][data-style="hourglass"] .tk-digits {
    font-size: clamp(44px, 7vw, 96px)
}

.tk-stage[data-long="1"][data-style="led"] .tk-digits {
    font-size: clamp(42px, 8.5vw, 120px)
}

.tk-stage[data-long="1"] .tk-card {
    font-size: clamp(44px, 8.5vw, 116px)
}

.tk-stage:fullscreen[data-long="1"] .tk-digits {
    font-size: min(18vw, 40vh)
}

.tk-stage:fullscreen[data-long="1"][data-style="ring"] .tk-digits {
    font-size: min(10vw, 12vh)
}

.tk-stage:fullscreen[data-long="1"] .tk-card {
    font-size: min(15vw, 34vh)
}

.tk-stage[data-style="ring"] .tk-bar, .tk-stage[data-style="hourglass"] .tk-bar, .tk-stage[data-style="flip"] .tk-bar {
    display: none
}

.tk-ring-track {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 12%, transparent);
    stroke-width: 12
}

.tk-ring-ticks {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 30%, transparent);
    stroke-width: 6;
    stroke-dasharray: 1.2 8.85
}

.tk-ring-prog {
    fill: none;
    stroke: var(--tk-c);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 603.19;
    transition: stroke-dashoffset .3s linear, stroke .45s;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tk-c) 45%, transparent))
}

.tk-stage[data-style="led"] {
    --tk-c: #3CFFA0;
    --tk-ink: #E7FFF4;
    --tk-muted: #7FA79A;
    background: radial-gradient(80% 70% at 50% 40%, #102321 0%, #070D0C 100%);
    border-color: #1E3A35;
    box-shadow: inset 0 0 60px rgba(0,0,0,.65), 0 26px 50px -30px rgba(0,0,0,.7)
}

.tk-stage[data-style="led"][data-state="warn"] {
    --tk-c: #FFC53D
}

.tk-stage[data-style="led"][data-state="danger"], .tk-stage[data-style="led"][data-state="done"] {
    --tk-c: #FF4D5E
}

.tk-stage[data-style="led"]::before {
    opacity: 1;
    background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px);
    background-size: auto;
    -webkit-mask-image: none;
    mask-image: none
}

.tk-stage[data-style="led"] .tk-digits {
    font-family: "Orbitron", "Space Grotesk", monospace;
    font-weight: 800;
    letter-spacing: .02em;
    font-size: clamp(54px, 11.5vw, 160px);
    text-shadow: 0 0 6px color-mix(in srgb, var(--tk-c) 80%, transparent), 0 0 26px color-mix(in srgb, var(--tk-c) 55%, transparent), 0 0 60px color-mix(in srgb, var(--tk-c) 30%, transparent)
}

.tk-stage[data-style="led"] .tk-digits::before {
    content: attr(data-ghost);
    position: absolute;
    inset: 0;
    color: var(--tk-c);
    opacity: .07;
    text-shadow: none
}

.tk-stage[data-style="led"] .tk-bar {
    background: rgba(255,255,255,.06);
    height: 8px
}

.tk-stage[data-style="led"] .tk-bar-fill {
    background: repeating-linear-gradient(90deg, var(--tk-c) 0 14px, transparent 14px 18px)
}

.tk-stage[data-style="led"] .tk-btn-soft, .tk-stage[data-style="led"] .tk-adjust button {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.14);
    color: #E7FFF4
}

.tk-stage[data-style="led"] .tk-btn-soft.tk-reset {
    color: #FF9C86
}

.tk-stage[data-style="led"] .tk-kbd {
    background: rgba(255,255,255,.18)
}

.tk-stage[data-style="flip"] .tk-digits {
    display: none
}

.tk-stage[data-style="flip"] .tk-flip {
    display: flex
}

.tk-flip {
    align-items: flex-start;
    justify-content: center;
    gap: clamp(6px, 1.4vw, 14px);
    perspective: 900px
}

.tk-flip-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px
}

.tk-card {
    position: relative;
    display: block;
    padding: .1em .16em .06em;
    border-radius: .16em;
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
    line-height: 1;
    font-size: clamp(56px, 11vw, 150px);
    color: #F7FBFA;
    background: linear-gradient(180deg, #24312F 0%, #1A2524 49.6%, #121B1A 50.4%, #0E1615 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 18px 30px -16px rgba(0,0,0,.55), 0 4px 0 -1px #0A100F;
    transform-origin: 50% 50%
}

.tk-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: rgba(0,0,0,.55);
    box-shadow: 0 1px 0 rgba(255,255,255,.06)
}

.tk-stage:not([data-state="normal"]):not([data-state="idle"]) .tk-card {
    color: var(--tk-c)
}

.tk-card.tk-flipping {
    animation: tkFlip .42s cubic-bezier(.3,.7,.3,1)
}

@keyframes tkFlip {
    0% {
        transform: rotateX(78deg);
        filter: brightness(1.5)
    }

    100% {
        transform: rotateX(0);
        filter: none
    }
}

.tk-flip-sep {
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    font-size: clamp(44px, 8vw, 110px);
    line-height: 1.12;
    color: var(--tk-c);
    opacity: .85
}

.tk-flip-lbl {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tk-muted)
}

.tk-stage[data-style="hourglass"] .tk-hourglass {
    display: block;
    height: clamp(190px, 30vw, 290px);
    width: auto;
    flex-shrink: 0;
    overflow: visible
}

.tk-stage[data-style="hourglass"] .tk-digits {
    font-size: clamp(56px, 9.5vw, 128px)
}

.tk-hg-frame {
    fill: var(--tk-c);
    transition: fill .45s
}

.tk-hg-glass {
    fill: color-mix(in srgb, var(--tk-c) 6%, transparent);
    stroke: color-mix(in srgb, var(--tk-c) 55%, transparent);
    stroke-width: 2.5;
    transition: stroke .45s
}

.tk-hg-sand {
    fill: #E7B54A;
    transition: y .3s linear, height .3s linear
}

body.dark .tk-hg-sand {
    fill: #F2C76A
}

.tk-hg-stream {
    stroke: #E7B54A;
    stroke-width: 2.6;
    stroke-dasharray: 3 4;
    opacity: 0
}

.tk-stage[data-run="1"] .tk-hg-stream {
    opacity: 1;
    animation: tkStream .4s linear infinite
}

@keyframes tkStream {
    to {
        stroke-dashoffset: -7
    }
}

.tk-stage[data-style="hourglass"][data-state="done"] .tk-hourglass {
    animation: tkWobble .6s ease-in-out 3
}

@keyframes tkWobble {
    25% {
        transform: rotate(-7deg)
    }

    75% {
        transform: rotate(7deg)
    }
}

.tk-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 26px
}

.tk-btn-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 26px 0 22px;
    border-radius: 18px;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .02em;
    background: linear-gradient(180deg, #1DA75A 0%, #128043 100%);
    box-shadow: 0 14px 26px -12px rgba(18,128,67,.65), inset 0 1px 0 rgba(255,255,255,.25);
    transition: transform .12s, box-shadow .2s, filter .2s
}

.tk-btn-main:hover {
    filter: brightness(1.06)
}

.tk-btn-main:active {
    transform: translateY(1px) scale(.98)
}

.tk-stage[data-run="1"] .tk-btn-main {
    background: linear-gradient(180deg, #F59A4A 0%, #E0583A 100%);
    box-shadow: 0 14px 26px -12px rgba(224,88,58,.65), inset 0 1px 0 rgba(255,255,255,.25)
}

.tk-btn-main svg {
    width: 22px;
    height: 22px;
    fill: currentColor
}

.tk-kbd {
    font-family: "Space Grotesk", monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,.22);
    letter-spacing: .04em
}

.tk-btn-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 58px;
    padding: 0 20px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 16px;
    background: var(--tk-surface);
    color: var(--tk-ink);
    border: 1px solid var(--tk-line);
    box-shadow: 0 8px 18px -12px rgba(36,50,78,.35);
    transition: background .2s, transform .12s
}

.tk-btn-soft:hover {
    background: var(--tk-soft)
}

.tk-btn-soft:active {
    transform: scale(.97)
}

.tk-btn-soft svg {
    width: 20px;
    height: 20px
}

.tk-btn-soft.tk-reset {
    color: var(--tk-coral)
}

.tk-adjust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 14px
}

.tk-adjust button {
    height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tk-muted);
    background: color-mix(in srgb, var(--tk-surface) 70%, transparent);
    border: 1px solid var(--tk-line);
    transition: color .2s, background .2s;
    font-variant-numeric: tabular-nums
}

.tk-adjust button:hover {
    color: var(--tk-accent);
    background: var(--tk-surface)
}

.tk-stage[data-mode="stopwatch"] .tk-adjust {
    display: none
}

.tk-setup {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px
}

@media (min-width: 900px) {
    .tk-setup {
        grid-template-columns: 1.55fr 1fr
    }
}

.tk-panel {
    border-radius: 20px;
    border: 1px solid var(--tk-line);
    background: var(--tk-soft);
    padding: 14px 16px 16px
}

.tk-panel-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tk-muted);
    margin-bottom: 10px
}

.tk-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px
}

.tk-preset {
    height: 44px;
    border-radius: 12px;
    background: var(--tk-surface);
    border: 1px solid var(--tk-line);
    color: var(--tk-ink);
    font-weight: 700;
    font-size: 14.5px;
    transition: border-color .2s, background .2s, transform .12s
}

.tk-preset:hover {
    border-color: color-mix(in srgb, var(--tk-accent) 50%, transparent)
}

.tk-preset:active {
    transform: scale(.96)
}

.tk-preset[aria-pressed="true"] {
    background: var(--tk-accent);
    border-color: var(--tk-accent);
    color: var(--tk-on-accent);
    box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--tk-accent) 80%, transparent)
}

.tk-custom {
    display: flex;
    align-items: flex-end;
    gap: 8px
}

.tk-num {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.tk-num span {
    font-size: 12px;
    font-weight: 700;
    color: var(--tk-muted);
    padding-left: 2px
}

.tk-num input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--tk-line);
    background: var(--tk-surface);
    color: var(--tk-ink);
    text-align: center;
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    font-size: 20px;
    outline: none;
    -moz-appearance: textfield
}

.tk-num input::-webkit-outer-spin-button, .tk-num input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0
}

.tk-num input:focus {
    border-color: var(--tk-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-accent) 15%, transparent)
}

.tk-colon {
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    font-size: 22px;
    color: var(--tk-muted);
    padding-bottom: 8px
}

.tk-apply {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--tk-accent);
    color: var(--tk-on-accent);
    font-weight: 800;
    font-size: 14.5px;
    white-space: nowrap;
    transition: filter .2s, transform .12s
}

.tk-apply:hover {
    filter: brightness(1.08)
}

.tk-apply:active {
    transform: scale(.97)
}

.tk-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tk-ink);
    cursor: pointer
}

.tk-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--tk-accent);
    cursor: pointer
}

.tk-laps {
    margin-top: 18px;
    border-radius: 20px;
    border: 1px solid var(--tk-line);
    background: var(--tk-soft);
    padding: 14px 16px;
    max-height: 240px;
    overflow-y: auto
}

.tk-lap {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px dashed var(--tk-line);
    font-size: 14px
}

.tk-lap:last-child {
    border-bottom: 0
}

.tk-lap-n {
    font-weight: 800;
    color: var(--tk-muted);
    font-size: 13px;
    min-width: 64px
}

.tk-lap-split {
    font-family: "Space Grotesk", monospace;
    color: var(--tk-muted);
    font-variant-numeric: tabular-nums;
    text-align: right
}

.tk-lap-total {
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    color: var(--tk-ink);
    font-variant-numeric: tabular-nums;
    min-width: 76px;
    text-align: right
}

.tk-tag {
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    justify-self: start
}

.tk-tag.fast {
    background: rgba(22,138,69,.12);
    color: #168A45
}

.tk-tag.slow {
    background: rgba(224,88,58,.12);
    color: #E0583A
}

.tk-stage:fullscreen {
    border-radius: 0;
    border-width: 0;
    padding: 4vh 4vw;
    min-height: 100vh
}

.tk-stage:fullscreen .tk-digits {
    font-size: min(25vw, 46vh)
}

.tk-stage:fullscreen[data-style="ring"] .tk-dial {
    width: min(72vh, 80vw)
}

.tk-stage:fullscreen[data-style="ring"] .tk-digits {
    font-size: min(15vw, 17vh)
}

.tk-stage:fullscreen[data-style="led"] .tk-digits {
    font-size: min(21vw, 40vh)
}

.tk-stage:fullscreen .tk-card {
    font-size: min(19vw, 40vh)
}

.tk-stage:fullscreen .tk-flip-sep {
    font-size: min(14vw, 30vh)
}

.tk-stage:fullscreen[data-style="hourglass"] .tk-hourglass {
    height: 66vh
}

.tk-stage:fullscreen[data-style="hourglass"] .tk-digits {
    font-size: min(17vw, 30vh)
}

.tk-stage:fullscreen .tk-bar {
    width: min(1100px, 90vw);
    height: 14px
}

.tk-stage:fullscreen .tk-badge {
    font-size: 15px;
    padding: 9px 18px
}

.tk-stage:fullscreen .tk-sub {
    font-size: 17px
}

@media (max-width: 640px) {
    .tk-stage {
        padding: 20px 12px 18px;
        min-height: 320px;
        border-radius: 22px
    }

    .tk-face {
        flex-direction: column;
        gap: 14px
    }

    .tk-stage[data-style="hourglass"] .tk-hourglass {
        height: 160px
    }

    .tk-btn-main, .tk-btn-soft {
        height: 50px;
        font-size: 15px
    }

    .tk-btn-main {
        padding: 0 18px 0 16px
    }

    .tk-presets {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }

    .tk-flip-lbl {
        font-size: 9.5px
    }
}

.tk-styles-sep {
    width: 1px;
    align-self: stretch;
    margin: 4px 2px;
    background: var(--tk-line);
    flex-shrink: 0
}

@media (min-width: 900px) {
    .tk-styles {
        flex-wrap: wrap;
        overflow: visible
    }
}

.tk-scene {
    display: none;
    width: clamp(260px, 40vw, 480px);
    aspect-ratio: 32 / 22;
    flex-shrink: 0
}

.tk-scene svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible
}

.tk-stage:is([data-style="rocket"],[data-style="bomb"],[data-style="candle"],[data-style="pizza"],[data-style="plant"]) .tk-scene {
    display: block
}

.tk-stage:is([data-style="rocket"],[data-style="bomb"],[data-style="candle"],[data-style="pizza"],[data-style="plant"]) .tk-bar {
    display: none
}

.tk-stage:is([data-style="rocket"],[data-style="bomb"],[data-style="candle"],[data-style="pizza"],[data-style="plant"]) .tk-digits {
    font-size: clamp(56px, 8.5vw, 124px)
}

.tk-stage[data-long="1"]:is([data-style="rocket"],[data-style="bomb"],[data-style="candle"],[data-style="pizza"],[data-style="plant"]) .tk-digits {
    font-size: clamp(42px, 6.2vw, 92px)
}

.tk-stage:fullscreen .tk-scene {
    width: min(52vw, 92vh)
}

.tk-stage:fullscreen:is([data-style="rocket"],[data-style="bomb"],[data-style="candle"],[data-style="pizza"],[data-style="plant"]) .tk-digits {
    font-size: min(13vw, 24vh)
}

.tk-scene * {
    transition: fill .45s, stroke .45s, opacity .45s
}

.tks-fill {
    fill: var(--tk-c)
}

.tks-gh {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 24%, transparent);
    stroke-width: 1.5;
    stroke-linecap: round
}

.tks-rl {
    stroke: color-mix(in srgb, var(--tk-c) 35%, transparent);
    stroke-width: 1.5
}

.tks-tk {
    stroke: color-mix(in srgb, var(--tk-c) 45%, transparent);
    stroke-width: 1.5;
    stroke-linecap: round
}

.tks-lb {
    font: 700 9px "Space Grotesk", ui-monospace, monospace;
    fill: var(--tk-muted);
    letter-spacing: .02em
}

.tks-lv {
    stroke: var(--tk-c);
    stroke-width: 1.2;
    stroke-dasharray: 3 3;
    opacity: .7
}

.tks-dot {
    fill: color-mix(in srgb, var(--tk-c) 40%, transparent);
    animation: tksTw 3s ease-in-out infinite
}

@keyframes tksTw {
    50% {
        opacity: .25
    }
}

.tks-spark, .tks-flame, .tks-bomb, .tks-petals, .tks-wave circle, .tks-tgt-r, .tks-halo {
    transform-box: fill-box;
    transform-origin: center
}

.tks-body {
    fill: color-mix(in srgb, var(--tk-c) 12%, transparent);
    stroke: var(--tk-c);
    stroke-width: 2
}

.tks-path {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 35%, transparent);
    stroke-width: 2;
    stroke-dasharray: 1.5 7;
    stroke-linecap: round
}

.tks-trail {
    fill: none;
    stroke: var(--tk-c);
    stroke-width: 3.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--tk-c) 45%, transparent))
}

.tks-tgt-r {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 30%, transparent);
    stroke-width: 1.5;
    stroke-dasharray: 3 5;
    animation: tksSpin 18s linear infinite
}

.tks-tgt {
    fill: color-mix(in srgb, var(--tk-c) 10%, var(--tk-surface));
    stroke: var(--tk-c);
    stroke-width: 2
}

.tks-chk {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0
}

.tk-scene[data-st="done"] .tks-tgt {
    fill: var(--tk-c)
}

.tk-scene[data-st="done"] .tks-chk {
    opacity: 1
}

.tk-scene[data-st="done"] .tks-tgt-r {
    animation: tksPulse .9s ease-in-out 3
}

@keyframes tksPulse {
    50% {
        transform: scale(1.18)
    }
}

.tks-ms {
    fill: var(--tk-surface);
    stroke: color-mix(in srgb, var(--tk-c) 45%, transparent);
    stroke-width: 2
}

.tks-ms.on {
    fill: var(--tk-c);
    stroke: var(--tk-c)
}

.tks-exh {
    stroke: #ffb547;
    stroke-width: 3.5;
    stroke-linecap: round;
    opacity: 0
}

.tk-scene[data-run="1"] .tks-exh {
    opacity: 1;
    animation: tksExh .18s steps(2) infinite
}

@keyframes tksExh {
    50% {
        opacity: .45
    }
}

.tks-fz0 {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 22%, transparent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 2 7
}

.tks-fz {
    fill: none;
    stroke: #b88a57;
    stroke-width: 5;
    stroke-linecap: round
}

.tks-bb {
    fill: #1c2a2e;
    stroke: var(--tk-c);
    stroke-width: 2.5
}

.tks-cap {
    fill: #3a4b50;
    stroke: var(--tk-c);
    stroke-width: 2
}

.tks-hl {
    fill: none;
    stroke: rgba(255,255,255,.2);
    stroke-width: 6;
    stroke-linecap: round
}

.tks-led-r {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 55%, transparent);
    stroke-width: 1.5;
    stroke-dasharray: 2 4
}

.tks-led {
    fill: var(--tk-c);
    filter: drop-shadow(0 0 6px var(--tk-c))
}

.tk-scene[data-run="1"] .tks-led {
    animation: tksLed 1s steps(2) infinite
}

.tk-scene[data-run="1"][data-st="warn"] .tks-led {
    animation-duration: .5s
}

.tk-scene[data-run="1"][data-st="danger"] .tks-led {
    animation-duration: .22s
}

@keyframes tksLed {
    50% {
        opacity: .2
    }
}

.tks-bomb {
    transform-origin: 50% 85%
}

.tk-scene[data-st="danger"] .tks-bomb {
    animation: tksShake .22s linear infinite
}

@keyframes tksShake {
    25% {
        transform: rotate(-2deg)
    }

    75% {
        transform: rotate(2deg)
    }
}

.tks-spark {
    animation: tksSpark .16s steps(2) infinite
}

@keyframes tksSpark {
    50% {
        transform: scale(1.3) rotate(30deg)
    }
}

.tks-wave circle {
    fill: none;
    stroke: var(--tk-c);
    stroke-width: 3;
    opacity: 0
}

.tk-scene[data-st="done"] .tks-wave circle {
    animation: tksWave 1.6s cubic-bezier(.2,.7,.3,1) 2
}

.tk-scene[data-st="done"] .tks-wave circle:nth-child(2) {
    animation-delay: .25s
}

.tk-scene[data-st="done"] .tks-wave circle:nth-child(3) {
    animation-delay: .5s
}

@keyframes tksWave {
    0% {
        opacity: .9;
        transform: scale(.4)
    }

    100% {
        opacity: 0;
        transform: scale(2.6);
        stroke-width: .5
    }
}

.tk-scene[data-st="done"] :is(.tks-bomb, #tksS, #tksFu, #tksFg, .tks-glow) {
    opacity: 0
}

.tks-base {
    fill: color-mix(in srgb, var(--tk-c) 18%, var(--tk-surface));
    stroke: color-mix(in srgb, var(--tk-c) 55%, transparent);
    stroke-width: 1.5
}

.tks-cb {
    fill: color-mix(in srgb, var(--tk-c) 10%, var(--tk-surface));
    stroke: color-mix(in srgb, var(--tk-c) 60%, transparent);
    stroke-width: 1.8
}

.tks-csh {
    fill: color-mix(in srgb, var(--tk-c) 18%, transparent)
}

.tks-ct {
    fill: color-mix(in srgb, var(--tk-c) 22%, var(--tk-surface));
    stroke: color-mix(in srgb, var(--tk-c) 60%, transparent);
    stroke-width: 1.5
}

.tks-wk {
    stroke: var(--tk-ink);
    stroke-width: 2.5;
    stroke-linecap: round
}

.tks-flame {
    transform-origin: 50% 100%;
    animation: tksFlick .8s ease-in-out infinite alternate
}

@keyframes tksFlick {
    0% {
        transform: scale(1, 1) skewX(0)
    }

    45% {
        transform: scale(.94, 1.08) skewX(3deg)
    }

    100% {
        transform: scale(1.04, .95) skewX(-3deg)
    }
}

.tks-glow {
    animation: tksGlow 1.6s ease-in-out infinite alternate
}

@keyframes tksGlow {
    to {
        opacity: .6
    }
}

.tks-smoke circle {
    fill: var(--tk-muted);
    opacity: 0
}

.tk-scene[data-st="done"] .tks-smoke circle {
    animation: tksSmoke 2.4s ease-out infinite
}

.tk-scene[data-st="done"] .tks-smoke circle:nth-child(2) {
    animation-delay: .8s
}

.tk-scene[data-st="done"] .tks-smoke circle:nth-child(3) {
    animation-delay: 1.6s
}

@keyframes tksSmoke {
    0% {
        opacity: .45;
        transform: translate(0, 0) scale(.4)
    }

    100% {
        opacity: 0;
        transform: translate(12px, -60px) scale(1.7)
    }
}

.tks-ghc {
    fill: color-mix(in srgb, var(--tk-c) 5%, transparent);
    stroke: color-mix(in srgb, var(--tk-c) 30%, transparent);
    stroke-width: 1.5;
    stroke-dasharray: 3 5
}

.tks-crust {
    fill: #d6a160
}

.tks-sauce {
    fill: #c4573f
}

.tks-chs {
    fill: #f0c862
}

.tks-pep {
    fill: #a8402f
}

.tks-bas {
    fill: #4f8f5f
}

.tks-cut {
    stroke: var(--tk-surface);
    stroke-width: 3
}

.tks-hand {
    stroke: var(--tk-c);
    stroke-width: 2.5;
    stroke-linecap: round
}

.tks-stem {
    fill: none;
    stroke: #3f9b6e;
    stroke-width: 5;
    stroke-linecap: round
}

.tks-leaf {
    fill: #58b07f
}

.tks-vein {
    stroke: #2f7a52;
    stroke-width: 1.5;
    stroke-linecap: round
}

.tks-pet {
    fill: var(--tk-c);
    opacity: .85
}

.tks-ctr {
    fill: var(--tk-surface);
    stroke: var(--tk-c);
    stroke-width: 2.5
}

.tks-halo {
    fill: none;
    stroke: color-mix(in srgb, var(--tk-c) 35%, transparent);
    stroke-width: 1.5;
    opacity: 0
}

.tk-scene[data-st="done"] .tks-halo {
    opacity: 1;
    animation: tksPulse 1.2s ease-in-out 3
}

.tk-scene[data-st="done"] .tks-petals {
    animation: tksSpin 6s linear infinite
}

.tks-pot {
    fill: color-mix(in srgb, var(--tk-c) 12%, var(--tk-surface));
    stroke: var(--tk-c);
    stroke-width: 2;
    stroke-linejoin: round
}

.tks-rim {
    fill: color-mix(in srgb, var(--tk-c) 22%, var(--tk-surface));
    stroke: var(--tk-c);
    stroke-width: 2
}

.tks-plant {
    transform-origin: 160px 164px;
    animation: tksSway 3.2s ease-in-out infinite alternate
}

@keyframes tksSway {
    from {
        transform: rotate(-1.5deg)
    }

    to {
        transform: rotate(1.5deg)
    }
}

@keyframes tksSpin {
    to {
        transform: rotate(360deg)
    }
}

.tk-giant {
    position: absolute;
    inset: 0;
    z-index: -1;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
    font-size: clamp(180px, 36vw, 560px);
    line-height: 1;
    color: var(--tk-c);
    font-variant-numeric: tabular-nums
}

.tk-giant.go {
    animation: tkGiant 1s ease-out
}

@keyframes tkGiant {
    0% {
        opacity: 0;
        transform: scale(1.5)
    }

    14% {
        opacity: .17;
        transform: scale(1)
    }

    100% {
        opacity: 0;
        transform: scale(.82)
    }
}

.tk-stage:fullscreen .tk-giant {
    font-size: 92vh
}

.tk-confetti {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none
}

.tk-stage.tk-shake {
    animation: tkShake .55s cubic-bezier(.36,.07,.19,.97)
}

@keyframes tkShake {
    10%, 90% {
        transform: translate(-2px, 1px)
    }

    20%, 80% {
        transform: translate(4px, -2px)
    }

    30%, 50%, 70% {
        transform: translate(-7px, 3px)
    }

    40%, 60% {
        transform: translate(7px, -3px)
    }
}

.tk-act-show {
    max-width: 92%;
    margin: -4px 0 10px;
    padding: 6px 18px;
    border-radius: 14px;
    font-weight: 800;
    font-size: clamp(18px, 2.3vw, 30px);
    line-height: 1.25;
    color: var(--tk-ink);
    background: color-mix(in srgb, var(--tk-surface) 75%, transparent);
    border: 1px dashed color-mix(in srgb, var(--tk-c) 40%, transparent);
    overflow-wrap: anywhere
}

.tk-stage[data-style="led"] .tk-act-show {
    background: rgba(255,255,255,.05)
}

.tk-stage:fullscreen .tk-act-show {
    font-size: min(5vw, 7vh)
}

.tk-done-msg {
    margin: 0 0 10px;
    padding: 8px 22px;
    border-radius: 999px;
    font-weight: 900;
    font-size: clamp(20px, 2.8vw, 38px);
    color: #fff;
    letter-spacing: .01em;
    background: linear-gradient(135deg, #f43f5e, #f59e0b);
    box-shadow: 0 14px 30px -14px rgba(244,63,94,.8);
    animation: tkMsg .7s cubic-bezier(.2,1.6,.4,1)
}

@keyframes tkMsg {
    0% {
        transform: scale(.3) rotate(-6deg);
        opacity: 0
    }

    100% {
        transform: none;
        opacity: 1
    }
}

.tk-stage:fullscreen .tk-done-msg {
    font-size: min(5.5vw, 8vh)
}

.tk-next {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    place-content: center;
    gap: 6px;
    text-align: center;
    color: var(--tk-ink);
    background: color-mix(in srgb, var(--tk-surface) 80%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px)
}

.tk-next[hidden] {
    display: none
}

.tk-next small {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--tk-muted)
}

.tk-next b {
    font-size: clamp(26px, 4vw, 54px);
    font-weight: 900
}

.tk-next i {
    font-style: normal;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
    font-size: clamp(70px, 12vw, 180px);
    line-height: 1;
    color: var(--tk-accent)
}

.tk-next i.go {
    animation: tkPop .5s ease-out
}

.tk-route-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    max-width: 100%
}

.tk-route-bar[hidden] {
    display: none
}

.tk-rc {
    --p: 0%;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tk-muted);
    background: color-mix(in srgb, var(--tk-surface) 80%, transparent);
    border: 1px solid var(--tk-line)
}

.tk-rc em {
    font-style: normal;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    background: var(--tk-soft2);
    color: var(--tk-accent)
}

.tk-rc.ok {
    color: var(--tk-accent)
}

.tk-rc.ok em {
    background: var(--tk-accent);
    color: var(--tk-on-accent)
}

.tk-rc.on {
    color: var(--tk-ink);
    border-color: var(--tk-c);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-c) 16%, transparent)
}

.tk-rc.on::before {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--p);
    background: color-mix(in srgb, var(--tk-c) 16%, transparent);
    z-index: -1;
    transition: width .25s linear
}

.tk-rc.on {
    isolation: isolate
}

.tk-rc.on em {
    background: var(--tk-c);
    color: #fff
}

.tk-stage:fullscreen .tk-rc {
    font-size: 16px;
    padding: 7px 16px 7px 8px
}

.tk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 2px
}

.tk-chip {
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--tk-line);
    background: var(--tk-surface);
    color: var(--tk-ink);
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    transition: border-color .2s, background .2s, transform .12s
}

.tk-chip:hover {
    border-color: color-mix(in srgb, var(--tk-accent) 50%, transparent)
}

.tk-chip:active {
    transform: scale(.95)
}

.tk-chip[aria-pressed="true"] {
    background: var(--tk-accent);
    border-color: var(--tk-accent);
    color: var(--tk-on-accent)
}

.tk-act-row {
    display: flex;
    gap: 6px
}

.tk-act-in {
    flex: 1;
    min-width: 0;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--tk-line);
    background: var(--tk-surface);
    color: var(--tk-ink);
    padding: 0 12px;
    font-weight: 600;
    font-size: 15px;
    outline: none
}

.tk-act-in:focus, .tk-route-in:focus {
    border-color: var(--tk-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-accent) 15%, transparent)
}

.tk-mini {
    height: 44px;
    min-width: 44px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid var(--tk-line);
    background: var(--tk-surface);
    color: var(--tk-muted);
    font-weight: 800;
    font-size: 14px
}

.tk-mini:hover {
    color: var(--tk-coral)
}

.tk-mini[hidden] {
    display: none
}

.tk-route-h {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tk-muted)
}

.tk-route-h small {
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
    font-size: 12.5px
}

.tk-route-h b {
    color: var(--tk-ink)
}

.tk-route-in {
    display: block;
    width: 100%;
    margin-top: 6px;
    border-radius: 12px;
    border: 1px solid var(--tk-line);
    background: var(--tk-surface);
    color: var(--tk-ink);
    padding: 8px 12px;
    font: 600 14px/1.55 inherit;
    resize: vertical;
    outline: none
}

.tk-route-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px
}

.tk-snd-h {
    font-size: 13px;
    font-weight: 700;
    color: var(--tk-muted)
}

.tk-panel-fx .tk-check {
    display: flex;
    margin-top: 8px
}

@media (max-width: 640px) {
    .tk-scene {
        width: min(100%, 420px)
    }

    .tk-act-in, .tk-route-in {
        font-size: 16px
    }

    .tk-giant {
        font-size: 62vw
    }
}

@media (prefers-reduced-motion: reduce) {
    .tk-scope *, .tk-scope *::before {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important
    }
}

.tk-tool {
    position: relative;
    border-radius: 24px;
    padding: 18px;
    background: var(--tk-surface);
    border: 1px solid var(--tk-line);
    box-shadow: var(--tk-shadow);
    color: var(--tk-ink);
    overflow: hidden
}

.tk-tool-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px
}

.tk-tool-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 8px 16px -10px currentColor
}

.tk-tool-ico svg {
    width: 22px;
    height: 22px
}

.tk-ico-dice {
    background: linear-gradient(135deg, #0A8A7A, #3457a8)
}

.tk-ico-coin {
    background: linear-gradient(135deg, #F4B740, #D9881A)
}

.tk-ico-num {
    background: linear-gradient(135deg, #F07A55, #D9472B)
}

.tk-tool-title {
    font-weight: 800;
    font-size: 15px;
    line-height: 1.25;
    color: var(--tk-ink)
}

.tk-tool-sub {
    font-size: 13px;
    color: var(--tk-muted);
    margin-top: 2px
}

.tk-tool-head > div:nth-child(2) {
    flex: 1;
    min-width: 0
}

.tk-mini-seg {
    display: inline-flex;
    padding: 3px;
    border-radius: 10px;
    background: var(--tk-soft);
    border: 1px solid var(--tk-line);
    flex-shrink: 0
}

.tk-mini-seg button {
    width: 28px;
    height: 26px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 800;
    color: var(--tk-muted);
    transition: background .2s, color .2s
}

.tk-mini-seg button[aria-pressed="true"] {
    background: var(--tk-accent);
    color: var(--tk-on-accent)
}

.tk-tool-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap
}

.tk-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 14.5px;
    background: linear-gradient(180deg, #0B7D6F, #3457a8);
    box-shadow: 0 10px 20px -12px rgba(52,87,168,.8), inset 0 1px 0 rgba(255,255,255,.2);
    transition: filter .2s, transform .12s
}

.tk-action:hover {
    filter: brightness(1.08)
}

.tk-action:active {
    transform: scale(.96)
}

.tk-action:disabled {
    opacity: .6;
    pointer-events: none
}

.tk-action svg {
    width: 17px;
    height: 17px
}

.tk-action.amber {
    background: linear-gradient(180deg, #F2A93B, #D9881A);
    box-shadow: 0 10px 20px -12px rgba(217,136,26,.85), inset 0 1px 0 rgba(255,255,255,.25)
}

.tk-action.coral {
    background: linear-gradient(180deg, #EE7552, #D9472B);
    box-shadow: 0 10px 20px -12px rgba(217,71,43,.85), inset 0 1px 0 rgba(255,255,255,.25)
}

.tk-result {
    display: flex;
    align-items: baseline;
    gap: 8px
}

.tk-result-lbl {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tk-muted)
}

.tk-result-val {
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    font-size: 26px;
    color: var(--tk-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1
}

.tk-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--tk-muted);
    text-decoration: underline;
    text-underline-offset: 3px
}

.tk-link:hover {
    color: var(--tk-coral)
}

.tk-history {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--tk-line);
    min-height: 20px;
    font-size: 12.5px;
    color: var(--tk-muted);
    font-weight: 600
}

.tk-history:empty {
    display: none
}

.tk-chip {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 24px;
    padding: 0 7px;
    border-radius: 8px;
    background: var(--tk-soft);
    border: 1px solid var(--tk-line);
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--tk-ink)
}

.tk-chip.new {
    background: var(--tk-accent);
    border-color: var(--tk-accent);
    color: var(--tk-on-accent)
}

.tk-dice-tray {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    min-height: 118px;
    padding: 16px;
    border-radius: 18px;
    background: radial-gradient(80% 90% at 50% 30%, #0F7A6C 0%, #075349 100%);
    box-shadow: inset 0 2px 14px rgba(0,0,0,.35);
    perspective: 600px
}

.tk-die {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    padding: 11px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
    background: linear-gradient(145deg, #FFFFFF 0%, #EEF3F2 60%, #D9E3E1 100%);
    box-shadow: 0 12px 18px -8px rgba(0,0,0,.5), inset 0 -4px 0 rgba(0,0,0,.08), inset 0 2px 0 #fff
}

.tk-die i {
    border-radius: 50%;
    place-self: center;
    width: 100%;
    height: 100%;
    max-width: 15px;
    max-height: 15px
}

.tk-die i.on {
    background: radial-gradient(circle at 35% 35%, #3C4B49, #0F1A19);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.25)
}

.tk-die.red i.on {
    background: radial-gradient(circle at 35% 35%, #FF6B6B, #C81E1E)
}

.tk-die.rolling {
    animation: tkRoll .6s cubic-bezier(.3,.6,.4,1)
}

.tk-die.landed {
    animation: tkLand .35s ease-out
}

@keyframes tkRoll {
    0% {
        transform: translateY(0) rotate(0) rotateX(0)
    }

    30% {
        transform: translateY(-26px) rotate(160deg) rotateX(180deg)
    }

    65% {
        transform: translateY(-6px) rotate(300deg) rotateX(320deg)
    }

    100% {
        transform: translateY(0) rotate(360deg) rotateX(360deg)
    }
}

@keyframes tkLand {
    0% {
        transform: scale(1.12)
    }

    100% {
        transform: scale(1)
    }
}

@media (max-width: 400px) {
    .tk-die {
        width: 62px;
        height: 62px;
        padding: 9px;
        border-radius: 15px
    }

    .tk-dice-tray {
        gap: 10px
    }
}

.tk-coin-stage {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: radial-gradient(70% 80% at 50% 35%, color-mix(in srgb, #F4B740 16%, var(--tk-surface)) 0%, var(--tk-soft) 100%);
    perspective: 800px
}

.tk-coin-toss {
    position: relative;
    z-index: 1
}

.tk-coin-toss.go {
    animation: tkToss 1.1s cubic-bezier(.33,.0,.3,1)
}

@keyframes tkToss {
    0% {
        transform: translateY(0)
    }

    45% {
        transform: translateY(-58px)
    }

    80% {
        transform: translateY(4px)
    }

    100% {
        transform: translateY(0)
    }
}

.tk-coin {
    position: relative;
    width: 98px;
    height: 98px;
    transform-style: preserve-3d;
    transition: transform 1.1s cubic-bezier(.25,.8,.3,1)
}

.tk-coin-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: .04em
}

.tk-coin-face::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,.55)
}

.tk-coin-face span {
    position: relative;
    text-shadow: 0 1px 0 rgba(255,255,255,.35)
}

.tk-coin-front {
    background: radial-gradient(circle at 32% 28%, #FFF1B3 0%, #F6CC4E 38%, #D99A1E 100%);
    color: #6B4500;
    box-shadow: inset 0 0 0 4px #E2A92E, inset 0 -6px 12px rgba(120,70,0,.3), 0 10px 18px -8px rgba(120,70,0,.6)
}

.tk-coin-back {
    transform: rotateX(180deg);
    background: radial-gradient(circle at 32% 28%, #FFD2C2 0%, #F08A64 40%, #C9472A 100%);
    color: #fff;
    box-shadow: inset 0 0 0 4px #D9603F, inset 0 -6px 12px rgba(110,30,10,.3), 0 10px 18px -8px rgba(110,30,10,.6)
}

.tk-coin-back span {
    text-shadow: 0 1px 2px rgba(0,0,0,.25)
}

.tk-coin-shadow {
    position: absolute;
    bottom: 18px;
    left: 50%;
    width: 84px;
    height: 12px;
    margin-left: -42px;
    border-radius: 50%;
    background: rgba(0,0,0,.14);
    filter: blur(3px)
}

.tk-tally {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700
}

.tk-tally-item {
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.tk-tally-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%
}

.tk-tally b {
    font-family: "Space Grotesk", monospace;
    font-size: 17px
}

.tk-range {
    display: flex;
    align-items: flex-end;
    gap: 8px
}

.tk-range .tk-num input {
    height: 42px;
    font-size: 18px
}

.tk-range-arrow {
    color: var(--tk-muted);
    margin-bottom: 11px;
    flex-shrink: 0
}

.tk-draw {
    margin-top: 12px;
    height: 112px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(80% 100% at 50% 20%, color-mix(in srgb, #F07A55 14%, var(--tk-surface)) 0%, var(--tk-soft) 100%);
    border: 1px solid var(--tk-line)
}

.tk-draw-num {
    font-family: "Space Grotesk", monospace;
    font-weight: 700;
    font-size: 68px;
    line-height: 1;
    color: #D9472B;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em
}

body.dark .tk-draw-num {
    color: #FF8F6E
}

.tk-draw-num.spinning {
    opacity: .55;
    filter: blur(.6px)
}

.tk-draw-num.final {
    animation: tkPop .45s ease-out
}

.tk-draw-count {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tk-muted)
}

:root {
    --teal: #3457a8;
    --teal-dark: #273b77;
    --green: #168A45;
    --yellow: #F9DF68;
    --coral: #E0583A;
    --ink: #164F55;
    --bg-main: #F1F5F9
}

body.theme-dark {
    --teal: #0d9488;
    --teal-dark: #134e4a;
    --green: #34d399;
    --yellow: #fbbf24;
    --coral: #f87171;
    --ink: #e2e8f0;
    --bg-main: #0f172a
}

body.theme-energy {
    --teal: #7c3aed;
    --teal-dark: #5b21b6;
    --green: #f97316;
    --yellow: #facc15;
    --coral: #ef4444;
    --ink: #1e1b4b;
    --bg-main: #fef3c7
}

#module-games, #gameScreen, #previewModal, #manualModal, #questionModal {
    font-family: 'Nunito', sans-serif;
    color: var(--ink)
}

body.game-running {
    overflow: hidden
}

.mine-cell {
    background: linear-gradient(145deg, #23B55B, #1D964A);
    box-shadow: 0 5px 0 #157D3E, inset 0 2px 4px rgba(255,255,255,0.3);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 12px;
    user-select: none
}

.mine-cell:hover:not(.revealed):not(.claimed) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 0 #157D3E, inset 0 2px 4px rgba(255,255,255,0.3)
}

.mine-cell:active:not(.revealed) {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #157D3E
}

.mine-cell.revealed {
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.3);
    transform: translateY(3px);
    cursor: default
}

.mine-cell.claimed {
    border: 3px solid rgba(255,255,255,0.85);
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.25);
    animation: claimPop 0.35s ease
}

.mine-cell.flagged {
    background: linear-gradient(145deg, #f59e0b, #d97706) !important;
    box-shadow: 0 5px 0 #b45309 !important
}

.mine-cell.flagged::after {
    content: '?';
    position: absolute;
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3)
}

@keyframes claimPop {
    0% {
        transform: scale(0.7)
    }

    60% {
        transform: scale(1.12)
    }

    100% {
        transform: scale(1)
    }
}

.puzzle-piece {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 0 #075985;
    transition: all 0.4s ease
}

.puzzle-piece.revealed {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.6) rotate(10deg)
}

.dice-box {
    perspective: 900px;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center
}

.dice-3d {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.15s linear
}

.dice-3d.rolling {
    animation: dice3dRoll 1.1s cubic-bezier(0.2, 0.6, 0.3, 1) forwards
}

.dice-3d.settle {
    transition: transform 0.55s cubic-bezier(0.22, 1.1, 0.36, 1)
}

@keyframes dice3dRoll {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1)
    }

    15% {
        transform: rotateX(120deg) rotateY(90deg) rotateZ(40deg) scale(1.18)
    }

    30% {
        transform: rotateX(280deg) rotateY(200deg) rotateZ(-30deg) scale(1.05)
    }

    45% {
        transform: rotateX(420deg) rotateY(320deg) rotateZ(80deg) scale(1.2)
    }

    60% {
        transform: rotateX(560deg) rotateY(450deg) rotateZ(-20deg) scale(1.08)
    }

    75% {
        transform: rotateX(700deg) rotateY(580deg) rotateZ(50deg) scale(1.15)
    }

    90% {
        transform: rotateX(820deg) rotateY(700deg) rotateZ(10deg) scale(1.05)
    }

    100% {
        transform: rotateX(900deg) rotateY(810deg) rotateZ(0deg) scale(1)
    }
}

.dice-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 40%, #e2e8f0 100%);
    border: 3px solid #cbd5e1;
    border-radius: 16px;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.85), inset 0 -8px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 12px;
    gap: 2px;
    backface-visibility: hidden
}

.dice-face.front {
    transform: translateZ(50px)
}

.dice-face.back {
    transform: rotateY(180deg) translateZ(50px)
}

.dice-face.right {
    transform: rotateY(90deg) translateZ(50px)
}

.dice-face.left {
    transform: rotateY(-90deg) translateZ(50px)
}

.dice-face.top {
    transform: rotateX(90deg) translateZ(50px)
}

.dice-face.bottom {
    transform: rotateX(-90deg) translateZ(50px)
}

.dice-pip {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #334155, #0f172a 70%);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.25), 0 2px 3px rgba(0,0,0,0.35);
    margin: auto;
    opacity: 0
}

.dice-pip.on {
    opacity: 1
}

.dice-result-badge {
    position: absolute;
    bottom: -14px;
    right: -14px;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #168A45, #15803d);
    color: white;
    font-weight: 900;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 14px rgba(32,166,83,0.45);
    border: 3px solid white;
    z-index: 20;
    animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)
}

@keyframes badgePop {
    0% {
        transform: scale(0)
    }

    60% {
        transform: scale(1.2)
    }

    100% {
        transform: scale(1)
    }
}

.dice-shadow {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 14px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.28) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    transition: width 0.3s, opacity 0.3s
}

.dice-box.rolling .dice-shadow {
    width: 90px;
    opacity: 0.5;
    animation: shadowPulse 0.3s ease-in-out infinite alternate
}

@keyframes shadowPulse {
    from {
        transform: translateX(-50%) scaleX(1)
    }

    to {
        transform: translateX(-50%) scaleX(1.15)
    }
}

.mystery-box-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 820px;
    gap: 10px
}

.mystery-box-grid {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 680px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 3px solid #c4b5fd;
    box-shadow: 0 16px 36px rgba(109, 40, 217, 0.12)
}

.mystery-box-item {
    aspect-ratio: 1;
    border-radius: 18px;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

.mystery-box-item:hover:not(.opened):not(.disabled) {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 14px 26px rgba(109, 40, 217, 0.25)
}

.mystery-box-item:active:not(.opened) {
    transform: translateY(2px) scale(0.98)
}

.mystery-box-item.theme-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 55%, #4c1d95 100%);
    border: 2.5px solid #ddd6fe
}

.mystery-box-item.theme-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 55%, #b45309 100%);
    border: 2.5px solid #fef3c7
}

.mystery-box-item.theme-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 55%, #047857 100%);
    border: 2.5px solid #b7ccff
}

.mystery-box-item.theme-rose {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 55%, #9f1239 100%);
    border: 2.5px solid #fecdd3
}

.mystery-box-item.theme-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 55%, #164e63 100%);
    border: 2.5px solid #cffafe
}

.mystery-ribbon-h {
    position: absolute;
    width: 100%;
    height: 16%;
    background: linear-gradient(180deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1
}

.mystery-ribbon-v {
    position: absolute;
    height: 100%;
    width: 16%;
    background: linear-gradient(90deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.2);
    z-index: 1
}

.mystery-ribbon-bow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 1.6rem;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
    animation: bowShimmer 2.5s ease-in-out infinite
}

@keyframes bowShimmer {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1)
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        filter: drop-shadow(0 0 10px #fde047)
    }
}

.mystery-box-num {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 0.95rem;
    font-weight: 900;
    color: white;
    z-index: 3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7)
}

.mystery-box-item.opened {
    background: #f1f5f9 !important;
    border: 2px solid #cbd5e1 !important;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.12) !important;
    transform: scale(0.96);
    cursor: default
}

.mystery-box-item.opened .mystery-ribbon-h, .mystery-box-item.opened .mystery-ribbon-v, .mystery-box-item.opened .mystery-ribbon-bow, .mystery-box-item.opened .mystery-box-num {
    display: none
}

.mystery-box-item.shaking {
    animation: boxRattle 0.5s ease-in-out infinite;
    z-index: 10
}

@keyframes boxRattle {
    0%, 100% {
        transform: scale(1.08) rotate(0deg)
    }

    20% {
        transform: scale(1.08) rotate(-6deg)
    }

    40% {
        transform: scale(1.08) rotate(6deg)
    }

    60% {
        transform: scale(1.08) rotate(-4deg)
    }

    80% {
        transform: scale(1.08) rotate(4deg)
    }
}

.timer-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: conic-gradient(var(--coral) var(--progress), #E5E7EB 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0
}

.timer-circle::before {
    content: "";
    position: absolute;
    width: 38px;
    height: 38px;
    background-color: white;
    border-radius: 50%;
    z-index: 0
}

.timer-circle #timerText {
    position: relative;
    z-index: 1;
    font-weight: 900;
    font-size: 1rem;
    color: #E0583A;
    line-height: 1
}

.canvas-wrapper {
    overflow: auto;
    max-height: none;
    height: 100%;
    position: relative;
    cursor: grab;
    width: 100%;
    display: block
}

.canvas-wrapper.panning {
    cursor: grabbing
}

#pdfCanvas {
    transition: transform 0.12s;
    transform-origin: 0 0;
    display: block;
    margin: 0
}

#questionModal .modal-header-bar {
    gap: 8px
}

#questionModal .modal-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: nowrap
}

#questionModal .question-modal-panel {
    width: min(98vw, 1400px);
    max-width: 98vw;
    height: min(77vh, 760px);
    max-height: 77vh
}

#questionModal .question-body-area {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.setup-shell {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(52,87,168,0.08);
    background: radial-gradient(circle at 88% 8%, #FFF0A8 0 75px, transparent 76px), radial-gradient(circle at 2% 92%, #FFF0B0 0 100px, transparent 101px), linear-gradient(135deg, #EAF8F5, #F8FCFB 52%, #E4F5F0)
}

body.theme-dark .setup-shell {
    background: linear-gradient(135deg, #0f172a, #1e293b 52%, #0f172a)
}

body.theme-energy .setup-shell {
    background: linear-gradient(135deg, #fef3c7, #ffedd5 52%, #fde68a)
}

.topbar {
    height: 65px;
    background: linear-gradient(110deg, var(--teal), var(--teal-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3%;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 22px rgba(7, 88, 79, 0.15);
    position: sticky;
    top: 0;
    z-index: 30
}

.bipbee-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 1000;
    letter-spacing: -1.2px;
    color: #fff;
    line-height: 1
}

.bipbee-logo .bee-part {
    color: #8FE5BC
}

.bipbee-logo i {
    font-size: 14px;
    color: var(--yellow);
    align-self: flex-start;
    margin-left: 3px
}

.setup-card {
    background: #fff;
    border: 1px solid #E0F0EC;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(21, 93, 81, 0.08);
    margin: 15px auto 40px;
    max-width: 1000px
}

body.theme-dark .setup-card {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0
}

.game-tab-btn {
    border: 2px solid #D1E5E1;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    font-weight: 900;
    transition: all 0.2s;
    cursor: pointer;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px
}

.game-tab-btn:hover {
    border-color: #168A45;
    transform: translateY(-2px)
}

.game-tab-btn.active {
    border-color: #168A45;
    background: #EBFBF3;
    color: #3457a8;
    box-shadow: 0 6px 14px rgba(32, 166, 83, 0.18)
}

body.theme-dark .game-tab-btn {
    background: #0f172a;
    border-color: #334155
}

body.theme-dark .game-tab-btn.active {
    background: #134e4a;
    border-color: #34d399
}

.track-cell {
    min-width: 78px;
    height: 78px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    position: relative;
    box-shadow: 0 5px 10px rgba(0,0,0,0.08);
    border: 2.5px solid #E2E8F0;
    padding: 4px
}

.track-cell .track-num {
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.5px
}

.track-cell .track-label {
    font-size: 0.7625rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    max-width: 100%
}

.track-cell.start {
    background: linear-gradient(145deg, #34d399, #10b981);
    color: white;
    border-color: #059669;
    box-shadow: 0 5px 0 #047857, 0 5px 10px rgba(0,0,0,0.1)
}

.track-cell.finish {
    background: linear-gradient(145deg, #facc15, #eab308);
    color: #78350f;
    border-color: #ca8a04;
    box-shadow: 0 5px 0 #a16207, 0 5px 10px rgba(0,0,0,0.1)
}

.track-cell.lucky {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac
}

.track-cell.trap {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5
}

.track-cell.normal {
    background: #ffffff;
    color: #1e293b
}

.pawn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2.5px solid white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: white;
    transition: all 0.3s ease
}

@media (max-width: 768px) {
    aside#sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: 42vh;
        z-index: 40;
        border-radius: 20px 20px 0 0;
        transform: translateY(calc(100% - 46px));
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)
    }

    aside#sidebar.expanded {
        transform: translateY(0)
    }

    .mobile-score-toggle {
        display: flex !important
    }
}

.mobile-score-toggle {
    display: none
}

.wheel-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px
}

.wheel-frame {
    position: relative;
    width: min(460px, 88vw);
    height: min(460px, 88vw);
    max-height: 58vh;
    display: flex;
    align-items: center;
    justify-content: center
}

.wheel-outer-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #fbbf24, #f59e0b, #fbbf24, #d97706, #fbbf24);
    box-shadow: 0 0 0 6px #78350f, 0 12px 40px rgba(0,0,0,0.35), inset 0 0 20px rgba(255,255,255,0.25);
    z-index: 1;
    pointer-events: none
}

#wheelCanvas {
    position: relative;
    z-index: 2;
    border-radius: 50%;
    max-width: calc(100% - 28px);
    max-height: calc(100% - 28px)
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
    animation: pointerIdle 1.8s ease-in-out infinite
}

.wheel-pointer svg {
    width: 48px;
    height: 56px;
    display: block
}

@keyframes pointerIdle {
    0%, 100% {
        transform: translateX(-50%) translateY(0)
    }

    50% {
        transform: translateX(-50%) translateY(4px)
    }
}

.wheel-pointer.bounce {
    animation: pointerBounce 0.45s ease
}

@keyframes pointerBounce {
    0% {
        transform: translateX(-50%) translateY(0) scale(1)
    }

    30% {
        transform: translateX(-50%) translateY(8px) scale(1.08)
    }

    60% {
        transform: translateX(-50%) translateY(-4px) scale(0.95)
    }

    100% {
        transform: translateX(-50%) translateY(0) scale(1)
    }
}

#spinWheelBtn {
    position: absolute;
    z-index: 25;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0%, #fef9c3 45%, #fde047 100%);
    color: #3457a8;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 0 5px #3457a8, 0 0 0 9px #F9DF68, 0 8px 24px rgba(0,0,0,0.35);
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    line-height: 1.1
}

#spinWheelBtn:hover:not(:disabled) {
    transform: scale(1.08)
}

#spinWheelBtn:active:not(:disabled) {
    transform: scale(0.95)
}

#spinWheelBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed
}

.wheel-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    max-width: 420px;
    width: 100%;
    font-size: 12px;
    font-weight: 800
}

.wheel-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.85);
    border-radius: 10px;
    padding: 5px 10px;
    border: 1px solid #e2e8f0
}

.wheel-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.4)
}

#wheelRewardBanner {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 480px
}

.wheel-rules-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3e8ff;
    color: #6b21a8;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #e9d5ff
}

.tower-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 560px;
    gap: 8px
}

.tower-summit {
    background: linear-gradient(135deg, #fbbf24, #f59e0b 40%, #fff7ed);
    color: #78350f;
    font-weight: 900;
    font-size: 0.9rem;
    padding: 10px 28px;
    border-radius: 50% 50% 8px 8px / 60% 60% 8px 8px;
    box-shadow: 0 6px 0 #b45309, 0 10px 28px rgba(245,158,11,0.4), inset 0 2px 8px rgba(255,255,255,0.5);
    border: 3px solid #fde68a;
    z-index: 5;
    position: relative;
    text-shadow: 0 1px 0 #fef3c7
}

.tower-summit::before {
    content: '❄️';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2))
}

.tower-body {
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 5px;
    padding: 14px 8px 10px;
    background: linear-gradient(180deg, transparent 0%, rgba(30,58,95,0.15) 30%, rgba(15,23,42,0.35) 100%), radial-gradient(ellipse at 50% 100%, #475569 0%, #1e293b 55%, #0f172a 100%);
    border-radius: 24px 24px 16px 16px;
    border: 3px solid #475569;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.35), 0 14px 36px rgba(0,0,0,0.25);
    max-height: 54vh;
    overflow-y: auto;
    position: relative
}

.tower-body::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40 L20 10 L40 40 Z' fill='%23334155' fill-opacity='0.12'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.6
}

.tower-floor {
    position: relative;
    min-height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border: 2px solid rgba(255,255,255,0.15);
    transition: transform 0.25s, box-shadow 0.25s, width 0.3s;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box
}

.tower-floor.base {
    background: linear-gradient(90deg, #78716c, #57534e 50%, #44403c);
    border-color: #a8a29e;
    min-height: 56px;
    border-radius: 12px 12px 4px 4px
}

.tower-floor.normal {
    background: linear-gradient(105deg, #475569, #334155 40%, #1e293b)
}

.tower-floor.bonus {
    background: linear-gradient(105deg, #10b981, #059669 50%, #047857);
    border-color: #6ee7b7;
    box-shadow: 0 0 14px rgba(52,211,153,0.45), inset 0 1px 0 rgba(255,255,255,0.25)
}

.tower-floor.trap {
    background: linear-gradient(105deg, #ef4444, #b91c1c 50%, #7f1d1d);
    border-color: #fca5a5;
    box-shadow: 0 0 10px rgba(248,113,113,0.35)
}

.tower-floor.summit-floor {
    background: linear-gradient(105deg, #fbbf24, #d97706 50%, #b45309);
    border-color: #fde68a;
    box-shadow: 0 0 18px rgba(251,191,36,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
    min-height: 44px
}

.tower-floor.surprise {
    background: linear-gradient(105deg, #a855f7, #7c3aed 50%, #5b21b6);
    border-color: #d8b4fe;
    box-shadow: 0 0 16px rgba(168,85,247,0.5), inset 0 1px 0 rgba(255,255,255,0.25);
    animation: surprisePulse 1.8s ease-in-out infinite
}

@keyframes surprisePulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(168,85,247,0.4)
    }

    50% {
        box-shadow: 0 0 22px rgba(192,132,252,0.7)
    }
}

.tower-floor-num {
    font-weight: 900;
    font-size: 1rem;
    color: rgba(255,255,255,0.95);
    min-width: 28px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4)
}

.tower-floor-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap
}

.tower-climbers {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: flex-end;
    flex: 1;
    min-width: 0
}

.tower-climber {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2.5px solid white;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    color: white;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0
}

.tower-climber.active-climber {
    transform: scale(1.25);
    box-shadow: 0 0 0 3px #F9DF68, 0 4px 12px rgba(0,0,0,0.45);
    z-index: 2
}

.tower-climber.jump {
    animation: climberJump 0.55s ease
}

@keyframes climberJump {
    0% {
        transform: translateY(0) scale(1)
    }

    40% {
        transform: translateY(-20px) scale(1.2)
    }

    100% {
        transform: translateY(0) scale(1)
    }
}

.tower-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.97);
    border: 2px solid #c4b5fd;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(109,40,217,0.12);
    width: 100%;
    max-width: 480px
}

.tower-surprise-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #6b21a8;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid #d8b4fe;
    animation: surprisePulse 2s ease-in-out infinite
}

.bingo-cell {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.15rem;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(145deg, #fff1f2, #fecdd3);
    border: 3px solid #fb7185;
    box-shadow: 0 4px 0 #e11d48, inset 0 2px 4px rgba(255,255,255,0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #9f1239
}

.bingo-cell:hover:not(.claimed):not(.disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 0 #e11d48, inset 0 2px 4px rgba(255,255,255,0.5)
}

.bingo-cell.claimed {
    cursor: default;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.2);
    animation: claimPop 0.35s ease;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-width: 3px
}

.bingo-cell.bingo-line {
    animation: winPulse 0.6s ease infinite alternate;
    box-shadow: 0 0 0 4px #fbbf24, 0 0 20px rgba(251,191,36,0.6) !important
}

.bingo-cell.disabled {
    pointer-events: none;
    opacity: 0.75
}

@media (max-width: 480px) {
    .bingo-cell {
        width: 48px;
        height: 48px;
        font-size: 0.95rem;
        border-radius: 10px
    }
}

.bomb-station {
    width: 100%;
    max-width: 680px;
    background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 100%);
    border: 3px solid #334155;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px
}

.bomb-hud-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #020617;
    border: 2px solid #1e293b;
    border-radius: 16px;
    padding: 10px 16px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8)
}

.bomb-digital-clock {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.8), 0 0 20px rgba(239, 68, 68, 0.5);
    letter-spacing: 2px
}

.bomb-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    color: #38bdf8;
    text-transform: uppercase
}

.bomb-blinker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 12px #ef4444;
    animation: blinkAlarm 0.8s infinite alternate
}

@keyframes blinkAlarm {
    from {
        opacity: 0.3
    }

    to {
        opacity: 1
    }
}

.bomb-wires-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
}

@media (min-width: 640px) {
    .bomb-wires-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }
}

.bomb-wire-item {
    background: #1e293b;
    border: 2px solid #475569;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0,0,0,0.3)
}

.bomb-wire-item:hover:not(.cut):not(.disabled) {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.25);
    border-color: #38bdf8
}

.bomb-wire-cord {
    width: 100%;
    height: 16px;
    border-radius: 8px;
    position: relative;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s
}

.bomb-wire-cord.red {
    background: linear-gradient(180deg, #f87171, #dc2626 60%, #991b1b)
}

.bomb-wire-cord.blue {
    background: linear-gradient(180deg, #60a5fa, #2563eb 60%, #1e40af)
}

.bomb-wire-cord.gold {
    background: linear-gradient(180deg, #fde047, #ca8a04 60%, #854d0e)
}

.bomb-wire-cord.purple {
    background: linear-gradient(180deg, #c084fc, #9333ea 60%, #6b21a8)
}

.bomb-wire-cord.green {
    background: linear-gradient(180deg, #4ade80, #16a34a 60%, #14532d)
}

.bomb-wire-cord.orange {
    background: linear-gradient(180deg, #fb923c, #ea580c 60%, #9a3412)
}

.bomb-wire-cord.cyan {
    background: linear-gradient(180deg, #22d3ee, #0891b2 60%, #155e75)
}

.bomb-wire-cord.silver {
    background: linear-gradient(180deg, #e2e8f0, #94a3b8 60%, #475569)
}

.bomb-wire-item.cut {
    background: #0f172a !important;
    border-color: #334155 !important;
    opacity: 0.6;
    cursor: default;
    transform: scale(0.96)
}

.bomb-wire-item.cut .bomb-wire-cord {
    background: #334155 !important;
    position: relative
}

.bomb-wire-item.cut .bomb-wire-cord::after {
    content: '✂️ ĐÃ CẮT';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    color: #94a3b8
}

.bomb-defused-glow {
    animation: defusedPulse 1.5s infinite alternate
}

@keyframes defusedPulse {
    from {
        box-shadow: 0 0 10px #10b981
    }

    to {
        box-shadow: 0 0 30px #10b981, 0 0 60px rgba(16, 185, 129, 0.4)
    }
}

.duel-arena {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px
}

.duel-vs-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap
}

.duel-fighter {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    padding: 16px 12px;
    border-radius: 18px;
    text-align: center;
    border: 3px solid transparent;
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: all 0.3s
}

.duel-fighter.active-fighter {
    transform: scale(1.06);
    box-shadow: 0 0 0 4px #F9DF68, 0 10px 28px rgba(0,0,0,0.15)
}

.duel-fighter.winner {
    border-color: #22c55e;
    background: linear-gradient(145deg, #f0fdf4, #dcfce7)
}

.duel-fighter.loser {
    opacity: 0.55;
    filter: grayscale(0.4)
}

.duel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25)
}

.duel-vs-badge {
    font-size: 1.6rem;
    font-weight: 900;
    color: #f97316;
    text-shadow: 0 2px 0 #fed7aa;
    animation: vsPulse 1.2s ease-in-out infinite
}

@keyframes vsPulse {
    0%, 100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.15)
    }
}

.caro-cell {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.6rem;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(145deg, #e0f2fe, #bae6fd);
    border: 3px solid #7dd3fc;
    box-shadow: 0 4px 0 #0ea5e9, inset 0 2px 4px rgba(255,255,255,0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #0c4a6e
}

.caro-cell:hover:not(.claimed):not(.disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 0 #0ea5e9, inset 0 2px 4px rgba(255,255,255,0.5);
    background: linear-gradient(145deg, #f0f9ff, #e0f2fe)
}

.caro-cell:active:not(.claimed) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0ea5e9
}

.caro-cell.disabled {
    pointer-events: none;
    opacity: 0.75
}

.caro-cell.claimed {
    cursor: default;
    border-width: 3px;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.2);
    animation: claimPop 0.35s ease;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3)
}

.caro-cell.win-line {
    animation: winPulse 0.6s ease infinite alternate;
    box-shadow: 0 0 0 4px #fbbf24, 0 0 20px rgba(251,191,36,0.6) !important
}

@keyframes winPulse {
    from {
        filter: brightness(1)
    }

    to {
        filter: brightness(1.25)
    }
}

@media (max-width: 480px) {
    .caro-cell {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
        border-radius: 10px
    }
}

#chainProgressBar {
    transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1)
}

.matrix-cell {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(145deg, #e0f2fe, #7dd3fc);
    border: 3px solid #0ea5e9;
    box-shadow: 0 4px 0 #0284c7, inset 0 2px 4px rgba(255,255,255,0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #0c4a6e
}

.matrix-cell:hover:not(.claimed):not(.disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 0 #0284c7, inset 0 2px 4px rgba(255,255,255,0.5)
}

.matrix-cell:active:not(.claimed) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0284c7
}

.matrix-cell.claimed {
    cursor: default;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.2);
    animation: claimPop 0.35s ease;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3)
}

.matrix-cell.disabled {
    pointer-events: none;
    opacity: 0.75
}

.matrix-cell .matrix-pts {
    font-size: 1.25rem;
    line-height: 1
}

.matrix-cell .matrix-tag {
    font-size: 0.55rem;
    opacity: 0.85;
    margin-top: 2px
}

@media (max-width: 480px) {
    .matrix-cell {
        width: 56px;
        height: 56px
    }

    .matrix-cell .matrix-pts {
        font-size: 1rem
    }
}

body {
    background: radial-gradient(900px 520px at 0% 0%, rgba(32, 166, 83, 0.07), transparent 60%), radial-gradient(820px 520px at 100% 100%, rgba(249, 223, 104, 0.14), transparent 60%), #F1F5F9;
    background-attachment: fixed
}

body.dark {
    background: #141c30
}

.app-header {
    background: linear-gradient(100deg, #273b77 0%, #3457a8 48%, #0a7d70 100%);
    box-shadow: 0 10px 30px -18px rgba(39, 59, 119, 0.55)
}

.app-nav-band {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(52, 87, 168, 0.08)
}

body.dark .app-nav-band {
    background: rgba(15, 28, 26, 0.92);
    border-color: rgba(167, 243, 208, 0.10)
}

body.dark .tab-btn:not(.bg-brand-teal) {
    color: rgba(209, 250, 229, 0.75)
}

.nav-arrow {
    background: rgba(52, 87, 168, 0.05);
    color: #3457a8
}

.nav-arrow:hover {
    background: rgba(52, 87, 168, 0.12)
}

.hdr-btn {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14)
}

.hdr-btn:hover {
    background: rgba(255, 255, 255, 0.22)
}

.hdr-chip {
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.10)
}

.bipbee-badge {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 2px 10px 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-family: 'Nunito', 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: -0.4px;
    line-height: 1.4;
    color: #fff
}

.bipbee-badge .bee {
    color: #8FE5BC
}

.bipbee-badge i {
    font-size: 8px;
    color: #F9DF68;
    align-self: flex-start;
    margin: 3px 0 0 2px
}

main .rounded-3xl.border-2 {
    border-width: 1px !important;
    border-color: rgba(52, 87, 168, 0.09) !important
}

body.dark main .rounded-3xl.border-2 {
    border-color: rgba(167, 243, 208, 0.12) !important
}

.setup-shell {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible
}

body.theme-dark .setup-shell {
    background: transparent
}

.setup-card {
    border: 1px solid rgba(52, 87, 168, 0.08);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 44px -16px rgba(52, 87, 168, 0.16);
    margin: 8px auto 32px
}

body.theme-dark #module-games h1 {
    color: #b7ccff
}

body.theme-dark #module-games .from-white {
    background-image: none;
    background-color: #1c2740;
    border-color: rgba(167, 243, 208, 0.12)
}

body.theme-dark #module-games .from-white h3 {
    color: #dce8ff
}

.game-tab-btn {
    border: 1px solid #E3EFEC;
    border-radius: 16px;
    padding: 14px 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03)
}

.game-tab-btn:hover {
    border-color: #168A45;
    box-shadow: 0 10px 22px -12px rgba(52, 87, 168, 0.35)
}

.game-tab-btn.active {
    border-color: #168A45;
    background: linear-gradient(180deg, #F2FCF6, #E4F7EC);
    box-shadow: inset 0 0 0 1px #168A45, 0 10px 22px -10px rgba(32, 166, 83, 0.40)
}

body.theme-dark .game-tab-btn.active {
    background: #134e4a;
    color: #dce8ff
}

:root {
    --t-bg: #F1F5F9;
    --t-surface: #FFFFFF;
    --t-surface-2: #F8FAFC;
    --t-tint: #f0f3fa;
    --t-border: #D9E2EC;
    --t-ink: #0F172A;
    --t-ink-2: #475569;
    --t-primary: #3457a8;
    --t-primary-dark: #273b77;
    --t-action: #168A45;
    --t-accent: #F5B82E;
    --t-radius: 16px;
    --t-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 28px -14px rgba(15,23,42,.18)
}

body {
    background: radial-gradient(900px 480px at 0% 0%, rgba(52,87,168,.06), transparent 60%), radial-gradient(800px 480px at 100% 100%, rgba(245,184,46,.07), transparent 60%), var(--t-bg) !important;
    background-attachment: fixed !important;
    color: var(--t-ink);
    -webkit-font-smoothing: antialiased;
    letter-spacing: .005em
}

body.dark {
    background: #0B1514 !important;
    color: #e5edfc
}

main .bg-white {
    box-shadow: var(--t-shadow)
}

main .rounded-3xl.border-2, main .rounded-2xl.border-2 {
    border-color: var(--t-border) !important
}

main h2, main h3, main h4 {
    letter-spacing: -.01em
}

[class*="text-brand-teal/40"], [class*="text-brand-teal/50"], [class*="text-brand-teal/60"] {
    color: #4A6662 !important
}

[class*="text-brand-teal/70"], [class*="text-brand-teal/80"] {
    color: #2F514C !important
}

main .text-slate-400, main .text-gray-400 {
    color: #64748B !important
}

main .text-slate-500, main .text-gray-500 {
    color: #475569 !important
}

main .bg-white .text-brand-coral, main .bg-brand-cream .text-brand-coral {
    color: #C2410C
}

main .bg-white .text-brand-yellow {
    color: #B45309
}

main .text-amber-500, main .text-yellow-500 {
    color: #B45309
}

.bg-brand-green {
    background-color: #168A45
}

.bg-brand-green:hover, .hover\:bg-brand-green-dark:hover {
    background-color: #0F6B35
}

.bg-brand-teal {
    background-color: #3457a8
}

.tab-btn {
    letter-spacing: .01em
}

.tab-btn.bg-brand-teal {
    box-shadow: 0 6px 14px -6px rgba(52,87,168,.55)
}

.tab-btn:not(.bg-brand-teal) {
    color: #334155 !important
}

.tab-btn:not(.bg-brand-teal):hover {
    background: #E6F1EF !important;
    color: #273b77 !important
}

.app-header {
    background: linear-gradient(100deg, #053F39 0%, #3457a8 55%, #0B7A6C 100%)
}

.app-nav-band {
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--t-border);
    box-shadow: 0 6px 16px -14px rgba(15,23,42,.35)
}

body.dark .app-nav-band {
    background: rgba(11,21,20,.94);
    border-color: rgba(167,243,208,.12)
}

body.dark .tab-btn:not(.bg-brand-teal) {
    color: #CFE8E3 !important
}

body.dark .tab-btn:not(.bg-brand-teal):hover {
    background: rgba(255,255,255,.08) !important;
    color: #fff !important
}

input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
    border-color: #C5D1DC
}

input:focus, select:focus, textarea:focus {
    border-color: var(--t-primary) !important;
    box-shadow: 0 0 0 3px rgba(52,87,168,.18) !important;
    outline: none
}

input::placeholder, textarea::placeholder {
    color: #7B8896;
    opacity: 1
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #F5B82E !important;
    outline-offset: 2px
}

::-webkit-scrollbar-track {
    background: #E8EEF3
}

::-webkit-scrollbar-thumb {
    background: #A8B6C4
}

::-webkit-scrollbar-thumb:hover {
    background: #7C8DA0
}

.setup-card {
    border-color: var(--t-border);
    box-shadow: var(--t-shadow)
}

.game-tab-btn {
    border-color: var(--t-border);
    color: #1E293B;
    background: #fff
}

.game-tab-btn:hover {
    border-color: #168A45
}

.game-tab-btn.active {
    border-color: #168A45;
    background: linear-gradient(180deg,#F3FBF6,#E3F4EA);
    box-shadow: inset 0 0 0 1px #168A45, 0 10px 22px -10px rgba(22,138,69,.4)
}

#module-games {
    color: #0F172A
}

body.theme-dark .game-tab-btn {
    background: #1c2740;
    color: #e5edfc
}

body.theme-dark #module-games {
    color: #e5edfc
}

body.dark .bg-white {
    background-color: #1b263d !important;
    color: #E6F2EF !important;
    border-color: rgba(167,243,208,.16) !important
}

body.dark .bg-brand-cream-light, body.dark .bg-brand-cream {
    background-color: #1B2E2A !important;
    color: #F3E9B5 !important
}

body.dark [class*="text-brand-teal"] {
    color: #b7ccff !important
}

body.dark main .text-slate-400, body.dark main .text-gray-400 {
    color: #94A3B8 !important
}

body.dark main .text-slate-500, body.dark main .text-gray-500 {
    color: #AEBBCB !important
}

input, textarea, select, [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #F9DF68;
    outline-offset: 2px
}

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

.app-nav-band {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #fff !important
}

body.dark .app-nav-band {
    background: #0E1A18 !important
}

.nav-wrap::before, .nav-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 34px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s
}

.nav-wrap::before {
    left: 0;
    background: linear-gradient(90deg, #fff 30%, rgba(255,255,255,0))
}

.nav-wrap::after {
    right: 0;
    background: linear-gradient(270deg, #fff 30%, rgba(255,255,255,0))
}

.nav-wrap.fade-l::before, .nav-wrap.fade-r::after {
    opacity: 1
}

body.dark .nav-wrap::before {
    background: linear-gradient(90deg, #0E1A18 30%, rgba(14,26,24,0))
}

body.dark .nav-wrap::after {
    background: linear-gradient(270deg, #0E1A18 30%, rgba(14,26,24,0))
}

.nav-groups {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding: 0 30px
}

.nav-groups::-webkit-scrollbar {
    display: none
}

.nav-group {
    --g: 8,102,91;
    --gt: 6,78,70;
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0 6px;
    flex: none
}

.nav-group:first-child {
    margin-left: auto;
    padding-left: 0
}

.nav-group:last-child {
    margin-right: auto;
    padding-right: 0
}

.nav-group + .nav-group::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: #CBD5E1
}

.nav-group.g-class {
    --g: 37,99,235;
    --gt: 29,78,216
}

.nav-group.g-teach {
    --g: 13,148,136;
    --gt: 15,118,110
}

.nav-group.g-doc {
    --g: 124,58,237;
    --gt: 109,40,217
}

.nav-group.g-play {
    --g: 234,88,12;
    --gt: 194,65,12
}

.nav-group.g-merit {
    --g: 202,138,4;
    --gt: 161,98,7
}

.nav-group.g-sim {
    --g: 219,39,119;
    --gt: 190,24,93
}

.nav-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 58px;
    height: 60px;
    padding: 5px 6px 8px;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    scroll-snap-align: center;
    transition: background-color .12s ease, box-shadow .12s ease
}

.nav-tile .nt-ic {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 18px;
    line-height: 1;
    background: rgba(var(--g), .12);
    box-shadow: inset 0 0 0 1px rgba(var(--g), .25);
    transition: background-color .12s ease
}

.nav-tile .nt-lb {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    color: #1E293B !important;
    letter-spacing: 0
}

.tab-btn.nav-tile:not(.bg-brand-teal):hover {
    background: #F1F5F9 !important
}

.tab-btn.nav-tile:not(.bg-brand-teal):hover .nt-ic {
    background: rgba(var(--g), .2)
}

.tab-btn.nav-tile:not(.bg-brand-teal):hover .nt-lb {
    color: rgb(var(--gt)) !important
}

.tab-btn.nav-tile.bg-brand-teal {
    background: rgba(var(--g), .08) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--g), .28) !important
}

.tab-btn.nav-tile.bg-brand-teal .nt-ic {
    background: rgb(var(--g));
    box-shadow: none
}

.tab-btn.nav-tile.bg-brand-teal .nt-lb {
    color: rgb(var(--gt)) !important;
    font-weight: 800
}

.tab-btn.nav-tile.bg-brand-teal::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 28px;
    margin-left: -14px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: rgb(var(--g))
}

.tab-btn.nav-tile:focus-visible {
    outline-offset: -2px !important
}

.tab-btn.nav-tile:active {
    transform: none
}

body.dark .nav-group + .nav-group::before {
    background: rgba(255,255,255,.16)
}

body.dark .nav-tile .nt-ic {
    background: rgba(var(--g), .24);
    box-shadow: inset 0 0 0 1px rgba(var(--g), .45)
}

body.dark .nav-tile .nt-lb {
    color: #E2E8F0 !important
}

body.dark .tab-btn.nav-tile:not(.bg-brand-teal):hover {
    background: rgba(255,255,255,.06) !important
}

body.dark .tab-btn.nav-tile:not(.bg-brand-teal):hover .nt-lb {
    color: #fff !important
}

body.dark .tab-btn.nav-tile.bg-brand-teal {
    background: rgba(var(--g), .22) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--g), .55) !important
}

body.dark .tab-btn.nav-tile.bg-brand-teal .nt-lb {
    color: #fff !important
}

@media (max-width: 639px) {
    .nav-group {
        padding: 0 4px;
        gap: 0
    }

    .nav-group + .nav-group::before {
        top: 16px;
        bottom: 16px
    }

    .nav-tile {
        width: 64px;
        min-width: 64px;
        height: 70px;
        padding: 6px 3px 9px;
        gap: 4px;
        white-space: normal;
        justify-content: flex-start
    }

    .nav-tile .nt-ic {
        width: 27px;
        height: 27px;
        font-size: 15px;
        border-radius: 9px
    }

    .nav-tile .nt-lb {
        font-size: 11.5px;
        line-height: 1.15;
        text-align: center;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: normal
    }

    .tab-btn.nav-tile.bg-brand-teal::after {
        width: 22px;
        margin-left: -11px
    }
}

@keyframes tabFadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

main > .tab-content:not(.hidden) {
    animation: tabFadeIn .2s ease-out
}

.tk-fs {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: auto;
    animation: none !important
}

body.tk-fs-open {
    overflow: hidden !important
}

#module-videoan.tk-fs, #module-songco.tk-fs, #module-simnhiet.tk-fs, #module-simkhi.tk-fs, #module-simtu.tk-fs, #module-simhatnhan.tk-fs {
    padding: 0 !important;
    overflow: hidden;
    background: #fff
}

#module-songco.tk-fs {
    background: #e7ecf2
}

#module-simnhiet.tk-fs, #module-simkhi.tk-fs, #module-simtu.tk-fs, #module-simhatnhan.tk-fs {
    background: #f0f3fa
}

body.dark #module-videoan.tk-fs {
    background: #0B1514
}

#module-videoan.tk-fs > iframe, #module-songco.tk-fs > iframe, #module-simnhiet.tk-fs > iframe, #module-simkhi.tk-fs > iframe, #module-simtu.tk-fs > iframe, #module-simhatnhan.tk-fs > iframe {
    height: 100vh !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important
}

section[id^="module-sim"].tk-fs {
    padding: 0 !important;
    overflow: hidden;
    background: #f0f3fa
}

section[id^="module-sim"].tk-fs > iframe {
    height: 100vh !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important
}

.tk-fs > .slb-bar {
    display: none !important
}

#module-simlab {
    --sl: 219,39,119
}

.sl-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(120deg, #fdf2f8 0%, #eef6ff 60%, #ecfdf5 100%);
    border: 1px solid rgba(var(--sl), .14);
    margin-bottom: 14px
}

.sl-hero .sl-logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 6px 18px -8px rgba(var(--sl), .5), inset 0 0 0 1px rgba(var(--sl), .15);
    flex: none
}

.sl-hero h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15
}

.sl-hero p {
    font-size: 14px;
    color: #475569;
    margin-top: 3px
}

.sl-hero .sl-tt {
    flex: 1 1 260px;
    min-width: 0
}

.sl-search {
    flex: 1 1 260px;
    max-width: 380px;
    position: relative
}

.sl-search input {
    width: 100%;
    height: 42px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0 14px 0 40px;
    font-size: 15px;
    color: #0f172a;
    outline: none;
    transition: border-color .15s, box-shadow .15s
}

.sl-search input:focus {
    border-color: rgb(var(--sl));
    box-shadow: 0 0 0 3px rgba(var(--sl), .15)
}

.sl-search svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8
}

.sl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(var(--sl), .05);
    box-shadow: inset 0 0 0 1px rgba(var(--sl), .14);
    margin-bottom: 18px
}

.sl-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 12px 0 5px;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    background: transparent;
    border: 0;
    transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap
}

.sl-chip .ci {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    box-shadow: inset 0 0 0 1px rgba(var(--sl), .2)
}

.sl-chip .cn {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    background: rgba(15,23,42,.06);
    border-radius: 999px;
    padding: 1px 7px
}

.sl-chip:hover {
    background: rgba(var(--sl), .1)
}

.sl-chip.on {
    background: rgb(var(--sl));
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(var(--sl), .9)
}

.sl-chip.on .ci {
    box-shadow: none
}

.sl-chip.on .cn {
    background: rgba(255,255,255,.25);
    color: #fff
}

.sl-group {
    margin-bottom: 26px
}

.sl-gh {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 2px 12px
}

.sl-gh .gi {
    font-size: 22px
}

.sl-gh h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a
}

.sl-gh .gc {
    font-size: 13px;
    color: #64748b;
    font-weight: 600
}

.sl-gh .gl {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--sl), .25), transparent)
}

.sl-gh .go {
    font-size: 13.5px;
    font-weight: 700;
    color: rgb(var(--sl));
    background: rgba(var(--sl), .08);
    border: 0;
    border-radius: 10px;
    padding: 6px 11px;
    cursor: pointer
}

.sl-gh .go:hover {
    background: rgba(var(--sl), .16)
}

.sl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 18px
}

.sl-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s
}

.sl-card:hover, .sl-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -14px rgba(15,23,42,.35);
    border-color: rgba(var(--sl), .45);
    outline: none
}

.sl-th {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #0b1220;
    overflow: hidden
}

.sl-th img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease
}

.sl-card:hover .sl-th img {
    transform: scale(1.05)
}

.sl-th .no {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 9px;
    background: rgba(255,255,255,.94);
    color: #0f172a;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.25)
}

.sl-th .d3 {
    position: absolute;
    right: 56px;
    top: 8px;
    height: 22px;
    padding: 0 7px;
    border-radius: 7px;
    background: #7c3aed;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    letter-spacing: .03em
}

.sl-th .play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,.0);
    transition: background .18s
}

.sl-th .play span {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: rgb(var(--sl));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-left: 4px;
    transform: scale(.6);
    opacity: 0;
    transition: transform .18s, opacity .18s;
    box-shadow: 0 8px 20px rgba(0,0,0,.35)
}

.sl-card:hover .sl-th .play {
    background: rgba(15,23,42,.28)
}

.sl-card:hover .sl-th .play span {
    transform: scale(1);
    opacity: 1
}

.sl-bd {
    padding: 11px 13px 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1
}

.sl-bd .tl {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3
}

.sl-card:hover .sl-bd .tl {
    color: rgb(var(--sl))
}

.sl-bd .sb {
    font-size: 13px;
    color: #64748b;
    line-height: 1.35
}

.sl-bd .tg {
    margin-top: auto;
    padding-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #475569
}

.sl-bd .tg i {
    font-style: normal;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9
}

.sl-empty {
    text-align: center;
    padding: 50px 10px;
    color: #64748b;
    font-size: 15px
}

.slb-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap
}

.slb-bar .bk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px 0 10px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    background: rgb(219,39,119);
    color: #fff;
    font-weight: 700;
    font-size: 14.5px;
    box-shadow: 0 6px 14px -8px rgba(219,39,119,.9)
}

.slb-bar .bk:hover {
    filter: brightness(1.08)
}

.slb-bar .st {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    font-size: 15px;
    color: #0f172a
}

.slb-bar .st small {
    font-weight: 600;
    font-size: 13px;
    color: #64748b
}

.slb-bar .nx {
    margin-left: auto;
    display: flex;
    gap: 6px
}

.slb-bar .nx button {
    height: 32px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    cursor: pointer
}

.slb-bar .nx button:hover {
    border-color: rgb(219,39,119);
    color: rgb(219,39,119)
}

.slb-bar .shr {
    display: flex;
    gap: 6px
}

.slb-bar .shr button {
    height: 32px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    cursor: pointer
}

.slb-bar .shr button:hover {
    border-color: #4565b6;
    color: #4565b6
}

.sl-cw {
    position: relative;
    display: flex
}

.sl-cw > .sl-card {
    flex: 1;
    min-width: 0
}

.sl-fav {
    position: absolute;
    right: 8px;
    top: 6px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: rgba(255,255,255,.94);
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15,23,42,.3);
    transition: transform .15s, color .15s
}

.sl-fav:hover {
    color: #f59e0b;
    transform: scale(1.08)
}

.sl-fav.on {
    color: #f59e0b
}

.sl-fav:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px
}

.sl-cw:hover > .sl-fav {
    margin-top: -4px
}

body.dark .sl-hero {
    background: linear-gradient(120deg, #2a1420 0%, #142033 60%, #10251d 100%);
    border-color: rgba(255,255,255,.08)
}

body.dark .sl-hero h2, body.dark .sl-gh h3, body.dark .sl-bd .tl, body.dark .slb-bar .st {
    color: #f1f5f9
}

body.dark .sl-hero p, body.dark .sl-bd .sb, body.dark .sl-gh .gc {
    color: #94a3b8
}

body.dark .sl-hero .sl-logo, body.dark .sl-chip .ci {
    background: rgba(255,255,255,.08)
}

body.dark .sl-search input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0
}

body.dark .sl-chip {
    color: #e2e8f0
}

body.dark .sl-chip .cn {
    background: rgba(255,255,255,.1);
    color: #cbd5e1
}

body.dark .sl-card {
    background: #111827;
    border-color: #1f2937
}

body.dark .sl-bd .tg i {
    background: #1f2937;
    color: #cbd5e1
}

body.dark .slb-bar .nx button {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1
}

@media (max-width: 639px) {
    .sl-hero {
        padding: 14px
    }

    .sl-hero h2 {
        font-size: 18px
    }

    .sl-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px
    }

    .sl-chip {
        height: 34px;
        font-size: 13.5px
    }

    .sl-chip .ci {
        width: 25px;
        height: 25px;
        font-size: 15px
    }

    .sl-bd .tl {
        font-size: 14.5px
    }

    .slb-bar .nx {
        display: none
    }
}

#upg-offline-banner {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 3000;
    background: #273b77;
    color: #fef08a;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
    display: none;
    max-width: 92vw;
    text-align: center
}

@media print {
    header, #toast-container, #upg-offline-banner {
        display: none !important
    }

    body {
        background: #fff !important
    }
}

:root {
    --k-bg: #EDF3F2;
    --k-card: #fff;
    --k-line: #D8E4E2;
    --k-ink: #141d30;
    --k-mute: #4E6468;
    --k-p: #3c5eab;
    --k-pd: #054A43;
    --k-gold: #F6B93B;
    --k-r1: 12px;
    --k-r2: 18px;
    --k-r3: 26px;
    --k-sh1: 0 1px 2px rgba(10,31,29,.06), 0 1px 1px rgba(10,31,29,.03);
    --k-sh2: 0 2px 4px rgba(10,31,29,.04), 0 14px 34px -14px rgba(10,31,29,.22);
    --k-ease: cubic-bezier(.2,.8,.2,1)
}

html {
    background: var(--k-bg);
    scroll-behavior: smooth
}

body {
    background: radial-gradient(1200px 560px at 6% -10%, rgba(60,94,171,.11), transparent 62%), radial-gradient(900px 520px at 100% -4%, rgba(246,185,59,.12), transparent 60%), var(--k-bg) !important;
    background-attachment: scroll !important;
    color: var(--k-ink)
}

body.dark {
    background: radial-gradient(1000px 500px at 0 -10%, rgba(16,185,160,.10), transparent 60%), #091413 !important
}

body.dark ::selection, ::selection {
    background: rgba(60,94,171,.28)
}

.app-header {
    background: radial-gradient(520px 150px at 88% -50%, rgba(246,185,59,.30), transparent 70%), radial-gradient(420px 120px at 12% 140%, rgba(52,211,153,.18), transparent 70%), linear-gradient(105deg, #032B27 0%, #06594F 50%, #09796A 100%);
    border-bottom: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 12px 28px -20px rgba(3,43,39,.9)
}

.app-header h1 {
    letter-spacing: -.025em;
    text-shadow: 0 1px 0 rgba(0,0,0,.18)
}

#tk-hdr-logo > div:first-child {
    background: linear-gradient(145deg, #FFD97A, #F6B93B);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 6px 14px -6px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.6)
}

.hdr-btn, .hdr-chip {
    border-radius: 12px !important;
    border-color: rgba(255,255,255,.16) !important;
    box-shadow: none !important;
    transition: background .15s, border-color .15s
}

.hdr-btn:hover {
    border-color: rgba(255,255,255,.34) !important
}

.hdr-chip {
    background: rgba(0,0,0,.2)
}

.app-nav-band {
    border-bottom: 1px solid var(--k-line);
    box-shadow: 0 10px 24px -22px rgba(10,31,29,.6)
}

.nav-tile {
    border-radius: 14px
}

.nav-tile .nt-ic {
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(var(--g), .20), rgba(var(--g), .07));
    box-shadow: inset 0 0 0 1px rgba(var(--g), .18)
}

.nav-tile .nt-lb {
    font-weight: 700;
    color: #26383A !important
}

.tab-btn.nav-tile.bg-brand-teal {
    background: linear-gradient(180deg, rgba(var(--g), .10), rgba(var(--g), .04)) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--g), .24) !important
}

.tab-btn.nav-tile.bg-brand-teal .nt-ic {
    background: linear-gradient(145deg, rgb(var(--g)), rgb(var(--gt)));
    box-shadow: 0 6px 12px -6px rgba(var(--g), .85)
}

.tab-btn.nav-tile.bg-brand-teal::after {
    height: 3px;
    width: 24px;
    margin-left: -12px;
    border-radius: 3px 3px 0 0
}

body.dark .nav-tile .nt-lb {
    color: #DCEBE8 !important
}

main .bg-white, .setup-card {
    border-radius: var(--k-r2);
    border: 1px solid var(--k-line);
    box-shadow: var(--k-sh2)
}

main h2, main h3 {
    letter-spacing: -.02em
}

button, .tab-btn {
    -webkit-tap-highlight-color: transparent
}

main button.bg-brand-green, main .bg-brand-green {
    border-radius: 14px;
    box-shadow: 0 8px 18px -10px rgba(22,138,69,.8), inset 0 1px 0 rgba(255,255,255,.22);
    transition: box-shadow .15s, filter .15s
}

main button.bg-brand-green:hover {
    filter: brightness(1.06);
    box-shadow: 0 12px 22px -10px rgba(22,138,69,.85), inset 0 1px 0 rgba(255,255,255,.22)
}

input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
    border-radius: var(--k-r1);
    transition: border-color .15s, box-shadow .15s
}

body.dark main .bg-white {
    border-color: rgba(167,243,208,.14) !important;
    box-shadow: 0 16px 34px -20px rgba(0,0,0,.8)
}

.sl-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--k-r3);
    padding: 22px 24px;
    background: radial-gradient(420px 200px at 100% 0, rgba(var(--sl), .14), transparent 70%), linear-gradient(120deg, #fff 0%, #F3F9F8 55%, #FFF8EA 100%);
    border: 1px solid var(--k-line);
    box-shadow: var(--k-sh2)
}

.sl-hero h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.03em;
    background: linear-gradient(95deg, #141d30 30%, rgb(var(--sl)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.sl-hero .sl-logo {
    border-radius: 18px;
    box-shadow: 0 10px 22px -12px rgba(var(--sl), .75), inset 0 0 0 1px rgba(var(--sl), .14)
}

.sl-hero p {
    color: var(--k-mute)
}

.sl-search input {
    height: 46px;
    border-radius: 16px;
    border: 1px solid var(--k-line);
    box-shadow: var(--k-sh1);
    transition: border-color .15s, box-shadow .15s
}

.sl-chips {
    gap: 6px;
    padding: 8px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--k-sh1), inset 0 0 0 1px var(--k-line)
}

.sl-chip {
    border-radius: 14px;
    transition: background .15s, color .15s, box-shadow .15s
}

.sl-chip .ci {
    background: rgba(var(--sl), .08)
}

.sl-chip:hover {
    background: rgba(var(--sl), .08)
}

.sl-chip.on {
    background: linear-gradient(135deg, rgb(var(--sl)), rgba(var(--sl), .82));
    box-shadow: 0 10px 20px -10px rgba(var(--sl), .95)
}

.sl-chip.on .ci {
    background: rgba(255,255,255,.22)
}

.sl-gh {
    margin-bottom: 14px
}

.sl-gh h3 {
    font-size: 19px;
    letter-spacing: -.02em
}

.sl-gh .gi {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--sl), .09);
    font-size: 19px
}

.sl-gh .gl {
    background: linear-gradient(90deg, rgba(var(--sl), .3), transparent)
}

.sl-gh .go {
    border-radius: 999px;
    padding: 7px 14px
}

.sl-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px
}

.sl-card {
    border-radius: 20px;
    border: 1px solid var(--k-line);
    box-shadow: var(--k-sh1);
    transition: transform .25s var(--k-ease), box-shadow .25s var(--k-ease), border-color .2s
}

.sl-card:hover, .sl-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(var(--sl), .5);
    box-shadow: 0 2px 6px rgba(10,31,29,.05), 0 26px 40px -20px rgba(var(--sl), .55)
}

.sl-th {
    aspect-ratio: 16 / 10
}

.sl-th::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(5,20,25,.5));
    pointer-events: none
}

.sl-th .no {
    background: rgba(255,255,255,.95);
    border-radius: 10px;
    box-shadow: 0 4px 10px -4px rgba(0,0,0,.4);
    z-index: 1
}

.sl-th .play, .sl-th .d3 {
    z-index: 2
}

.sl-bd {
    padding: 13px 15px 15px;
    gap: 7px
}

.sl-bd .tl {
    font-size: 15.5px;
    letter-spacing: -.01em
}

.sl-bd .sb {
    color: var(--k-mute)
}

.sl-bd .tg i {
    background: rgba(var(--sl), .09);
    color: rgb(var(--sl));
    filter: saturate(.9) brightness(.8);
    font-weight: 700
}

.sl-fav {
    background: rgba(255,255,255,.96);
    z-index: 4
}

.slb-bar .bk {
    border-radius: 999px;
    padding: 0 16px 0 12px
}

body.dark .sl-hero {
    background: radial-gradient(420px 200px at 100% 0, rgba(var(--sl), .22), transparent 70%), linear-gradient(120deg, #10201E, #0F1B2A);
    border-color: rgba(255,255,255,.08)
}

body.dark .sl-hero h2 {
    background: linear-gradient(95deg, #F1F5F9 30%, #F9A8D4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

body.dark .sl-chips {
    background: #0F1D1B;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08)
}

body.dark .sl-card {
    background: #0F1B1A;
    border-color: rgba(255,255,255,.08)
}

@media (max-width: 639px) {
    .sl-hero {
        padding: 16px;
        border-radius: 22px
    }

    .sl-hero h2 {
        font-size: 20px
    }

    .sl-grid {
        grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
        gap: 12px
    }

    .sl-card {
        border-radius: 16px
    }

    .sl-bd {
        padding: 10px 11px 12px
    }

    .sl-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        border-radius: 18px;
        padding: 6px;
        scroll-snap-type: x proximity
    }

    .sl-chips::-webkit-scrollbar {
        display: none
    }

    .sl-chip {
        flex: none;
        scroll-snap-align: start
    }

    .sl-hero .sl-logo {
        width: 44px;
        height: 44px;
        border-radius: 14px
    }
}

@media (hover: none) {
    .sl-card:hover {
        transform: none
    }
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%
}

button, a, [role=tab], label, summary {
    touch-action: manipulation
}

#tk-mnav, #tk-msheet {
    display: none
}

@media (max-width: 639px) {
    .app-nav-band {
        display: none !important
    }

    .app-header {
        padding-top: env(safe-area-inset-top)
    }

    body {
        padding-bottom: calc(66px + env(safe-area-inset-bottom))
    }

    #tk-mnav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.98);
        border-top: 1px solid var(--k-line);
        box-shadow: 0 -10px 26px -18px rgba(10,31,29,.45);
        transition: transform .2s var(--k-ease)
    }

    #tk-mnav button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        height: 56px;
        border: 0;
        background: none;
        border-radius: 14px;
        color: #42585B;
        font-size: 11.5px;
        font-weight: 700;
        line-height: 1.15;
        cursor: pointer
    }

    #tk-mnav .i {
        width: 48px;
        height: 30px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 19px;
        line-height: 1;
        transition: background .18s, transform .18s
    }

    #tk-mnav .l {
        max-width: 100%;
        padding: 0 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    #tk-mnav button.on {
        color: var(--k-p);
        font-weight: 800
    }

    #tk-mnav button.on .i {
        background: linear-gradient(145deg, rgba(60,94,171,.18), rgba(60,94,171,.09))
    }

    #tk-mnav button:active .i {
        transform: scale(.92)
    }

    #tk-mnav button[data-t="__all"]:not(.on) .i {
        font-size: 22px;
        color: var(--k-p)
    }

    html.tk-kb #tk-mnav, body.tk-fs-open #tk-mnav, html.tk-msheet-open #tk-mnav {
        transform: translateY(110%)
    }

    #tk-msheet {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 3600
    }

    #tk-msheet[hidden] {
        display: none
    }

    #tk-msheet .bd {
        position: absolute;
        inset: 0;
        background: rgba(3,20,18,.48);
        opacity: 0;
        transition: opacity .2s
    }

    #tk-msheet .pn {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 88vh;
        max-height: 88dvh;
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 26px 26px 0 0;
        box-shadow: 0 -24px 48px -24px rgba(0,0,0,.55);
        transform: translateY(100%);
        transition: transform .26s var(--k-ease);
        padding-bottom: env(safe-area-inset-bottom)
    }

    #tk-msheet.in .bd {
        opacity: 1
    }

    #tk-msheet.in .pn {
        transform: none
    }

    #tk-msheet .gr {
        width: 42px;
        height: 5px;
        border-radius: 3px;
        background: #CBD5E1;
        margin: 9px auto 0;
        flex: none
    }

    #tk-msheet .hd {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 14px 8px 18px;
        flex: none
    }

    #tk-msheet .hd b {
        font-size: 18px;
        font-weight: 800;
        letter-spacing: -.02em;
        color: var(--k-ink)
    }

    #tk-msheet .x {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 0;
        background: #EEF3F2;
        color: #334155;
        font-size: 15px;
        cursor: pointer
    }

    #tk-msheet .bo {
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0 12px 18px
    }

    #tk-msheet section {
        margin-top: 12px
    }

    #tk-msheet h3 {
        font-size: 12.5px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .07em;
        color: rgb(var(--g));
        margin: 0 4px 7px
    }

    #tk-msheet .tl {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px
    }

    #tk-msheet .tl button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        min-height: 84px;
        padding: 10px 3px 8px;
        border: 0;
        border-radius: 17px;
        background: rgba(var(--g), .06);
        cursor: pointer
    }

    #tk-msheet .tl .i {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        line-height: 1;
        background: #fff;
        box-shadow: inset 0 0 0 1px rgba(var(--g), .2), 0 4px 10px -6px rgba(var(--g), .6)
    }

    #tk-msheet .tl .l {
        font-size: 12px;
        font-weight: 700;
        line-height: 1.2;
        color: #1F3335;
        text-align: center;
        overflow-wrap: anywhere
    }

    #tk-msheet .tl button:active {
        background: rgba(var(--g), .14)
    }

    #tk-msheet .tl button.on {
        background: rgba(var(--g), .14);
        box-shadow: inset 0 0 0 2px rgb(var(--g))
    }

    #tk-msheet .tl button.on .l {
        color: rgb(var(--g))
    }

    html.tk-msheet-open, html.tk-msheet-open body {
        overflow: hidden
    }

    body.dark #tk-mnav {
        background: rgba(9,20,19,.98);
        border-color: rgba(255,255,255,.08)
    }

    body.dark #tk-mnav button {
        color: #A9C2BE
    }

    body.dark #tk-mnav button.on {
        color: #5EEAD4
    }

    body.dark #tk-mnav button.on .i {
        background: rgba(94,234,212,.14)
    }

    body.dark #tk-msheet .pn {
        background: #0F1C1B
    }

    body.dark #tk-msheet .hd b {
        color: #F1F5F9
    }

    body.dark #tk-msheet .x {
        background: rgba(255,255,255,.08);
        color: #E2E8F0
    }

    body.dark #tk-msheet .tl button {
        background: rgba(var(--g), .12)
    }

    body.dark #tk-msheet .tl .i {
        background: rgba(255,255,255,.06)
    }

    body.dark #tk-msheet .tl .l {
        color: #E2E8F0
    }

    #tk-fb-float {
        bottom: calc(76px + env(safe-area-inset-bottom)) !important;
        left: 10px !important
    }

    #tt-fab {
        bottom: calc(126px + env(safe-area-inset-bottom)) !important;
        left: 10px !important
    }

    #toast-container {
        top: calc(10px + env(safe-area-inset-top)) !important
    }

    input:not([type]), input[type=text], input[type=search], input[type=number], input[type=email], input[type=url], input[type=tel], input[type=password], select, textarea {
        font-size: 16px !important
    }

    .sl-hero p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 13.5px
    }

    .sl-search {
        max-width: none;
        flex-basis: 100%
    }

    .slb-bar {
        gap: 8px
    }

    .slb-bar .bk {
        height: 40px
    }

    .slb-bar .shr button {
        height: 36px
    }

    main {
        padding-left: 10px !important;
        padding-right: 10px !important
    }

    .sl-hero {
        gap: 12px 12px
    }

    .sl-hero .sl-tt {
        flex: 1 1 0
    }

    .sl-gh {
        flex-wrap: wrap;
        row-gap: 0;
        column-gap: 10px
    }

    .sl-gh h3 {
        font-size: 17px
    }

    .sl-gh .gl {
        display: none
    }

    .sl-gh .gi {
        width: 32px;
        height: 32px;
        font-size: 17px
    }

    .sl-gh .go {
        margin-left: auto;
        order: 3;
        padding: 6px 12px
    }

    .sl-gh .gc {
        order: 4;
        flex-basis: 100%;
        padding-left: 42px;
        margin-top: -4px
    }

    #student-interactive-container {
        max-height: 62vh !important;
        padding: 6px !important
    }

    #student-interactive-container > div {
        flex-wrap: wrap;
        row-gap: 6px;
        padding: 8px 10px !important
    }

    #student-interactive-container > div > div:first-child {
        flex-basis: 100%
    }

    #student-interactive-container > div > div:last-child {
        margin-left: auto;
        gap: 8px
    }

    #student-interactive-container .truncate {
        white-space: normal;
        overflow: visible
    }

    #student-interactive-container span[title] {
        font-size: 15px;
        line-height: 1.25
    }

    #student-interactive-container button {
        min-width: 34px;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 15px
    }
}

#module-simlab .sl-grid,#module-groups .gp-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px
}

@media (min-width: 430px) {
    #tk-hdr-right {
        flex-shrink:0
    }

    #tk-hdr-logo>div.min-w-0,#tk-hdr-logo h1 {
        overflow: hidden
    }
}

@media (max-width: 359px) {
    header #tk-hdr-right {
        gap:3px!important
    }

    header #tk-hdr-right .hdr-ico {
        width: 30px;
        height: 30px
    }
}

@media (min-width: 430px) and (max-width:519px) {
    #tk-hdr-right #tk-hdr-search,#tk-hdr-right #tk-fb-btn {
        display:none!important
    }
}

:root {
    --tk-hdr-h: 64px
}

html {
    scroll-padding-top: calc(var(--tk-hdr-h) + 14px);
    scrollbar-color: rgba(52,87,168,.38) transparent
}

@media (min-width: 640px) and (pointer: fine) {
    html::-webkit-scrollbar {
        width: 12px
    }

    html::-webkit-scrollbar-track {
        background: transparent
    }

    html::-webkit-scrollbar-thumb {
        border: 3px solid transparent;
        background-clip: padding-box;
        background-color: rgba(52,87,168,.32);
        border-radius: 999px
    }

    html::-webkit-scrollbar-thumb:hover {
        background-color: rgba(52,87,168,.62)
    }
}

.tab-content:not(.hidden) {
    animation: tkTabIn .26s cubic-bezier(.2,.8,.2,1) both
}

@keyframes tkTabIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.app-header {
    transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .2s !important
}

html.tk-scrolled .app-header {
    box-shadow: 0 12px 28px -14px rgba(3,43,39,.85)
}

@media (max-width: 639px) {
    html.tk-hdr-hide .app-header {
        transform: translateY(calc(-100% - 4px))
    }
}

#tk-fb-float, #tt-fab {
    transition: opacity .25s, transform .25s cubic-bezier(.2,.8,.2,1) !important
}

html.tk-sdown #tk-fb-float, html.tk-sdown #tt-fab:not(.open) {
    opacity: 0 !important;
    transform: translateY(16px) scale(.9) !important;
    pointer-events: none
}

#tk-totop {
    position: fixed;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 37;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: #fff;
    color: var(--k-p, #3c5eab);
    box-shadow: 0 10px 24px -10px rgba(10,31,29,.5), 0 0 0 1px rgba(10,31,29,.08);
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateY(14px) scale(.85);
    pointer-events: none;
    transition: opacity .22s, transform .25s cubic-bezier(.2,.8,.2,1), background .15s, color .15s
}

#tk-totop.on {
    opacity: 1;
    transform: none;
    pointer-events: auto
}

#tk-totop svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg)
}

#tk-totop .tr {
    fill: none;
    stroke: rgba(60,94,171,.13);
    stroke-width: 3
}

#tk-totop .pg {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 132;
    stroke-dashoffset: 132
}

#tk-totop b {
    position: relative;
    font: 800 19px/1 system-ui, sans-serif
}

#tk-totop:hover {
    background: var(--k-p, #3c5eab);
    color: #fff
}

#tk-totop:active {
    transform: scale(.92)
}

body.dark #tk-totop {
    background: #13221F;
    color: #5EEAD4;
    box-shadow: 0 10px 24px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08)
}

body.dark #tk-totop:hover {
    background: #4565b6;
    color: #fff
}

@media (max-width: 639px) {
    #tk-totop {
        right: 12px;
        bottom: calc(80px + env(safe-area-inset-bottom));
        width: 42px;
        height: 42px
    }

    html.tk-msheet-open #tk-totop {
        opacity: 0;
        pointer-events: none
    }
}

@media print {
    #tk-totop, #tk-qnav, #tk-loadbar {
        display: none !important
    }
}

#tk-loadbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    z-index: 6000;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity .3s
}

#tk-loadbar.on {
    opacity: 1
}

#tk-loadbar i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, #F6B93B 30%, #34D399 70%, transparent);
    animation: tkLb 1.1s ease-in-out infinite
}

@keyframes tkLb {
    from {
        transform: translateX(-100%)
    }

    to {
        transform: translateX(260%)
    }
}

@media (max-width: 639px) {
    #toast-container {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important
    }
}

#tk-qnav {
    display: none
}

@media (min-width: 640px) {
    #tk-qnav {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        top: var(--tk-hdr-h);
        z-index: 39;
        background: rgba(255,255,255,.985);
        border-bottom: 1px solid var(--k-line, #D8E4E2);
        box-shadow: 0 14px 30px -22px rgba(10,31,29,.6);
        transform: translateY(calc(-100% - var(--tk-hdr-h)));
        visibility: hidden;
        transition: transform .26s cubic-bezier(.2,.8,.2,1), visibility 0s linear .26s
    }

    #tk-qnav.on {
        transform: none;
        visibility: visible;
        transition: transform .26s cubic-bezier(.2,.8,.2,1)
    }

    #tk-qnav .qw {
        max-width: 1440px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 16px;
        overflow-x: auto;
        scrollbar-width: none
    }

    #tk-qnav .qw::-webkit-scrollbar {
        display: none
    }

    #tk-qnav .qg {
        display: flex;
        gap: 2px;
        padding: 3px;
        flex: none;
        border-radius: 13px;
        background: rgba(var(--g), .07);
        box-shadow: inset 0 0 0 1px rgba(var(--g), .15)
    }

    #tk-qnav .qb {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 34px;
        min-width: 34px;
        padding: 0 7px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        cursor: pointer;
        font-size: 13.5px;
        font-weight: 700;
        color: #26383A;
        white-space: nowrap;
        transition: background .15s, color .15s
    }

    #tk-qnav .qb .i {
        font-size: 17px;
        line-height: 1
    }

    #tk-qnav .qb .l {
        display: none
    }

    #tk-qnav .qb:hover {
        background: rgba(var(--g), .15)
    }

    #tk-qnav .qb:active .i {
        transform: scale(.9)
    }

    #tk-qnav .qb.on {
        background: linear-gradient(145deg, rgb(var(--g)), rgb(var(--gt)));
        color: #fff;
        padding: 0 12px 0 8px;
        box-shadow: 0 6px 14px -8px rgba(var(--g), .9)
    }

    #tk-qnav .qb.on .l {
        display: inline
    }

    #tk-qnav .qs {
        margin-left: auto;
        flex: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 34px;
        padding: 0 8px 0 11px;
        border-radius: 10px;
        cursor: pointer;
        border: 1px solid var(--k-line, #D8E4E2);
        background: #fff;
        color: var(--k-mute, #4E6468);
        font-size: 13.5px;
        font-weight: 700;
        transition: border-color .15s, color .15s
    }

    #tk-qnav .qs:hover {
        border-color: var(--k-p, #3c5eab);
        color: var(--k-p, #3c5eab)
    }

    #tk-qnav .qs svg {
        width: 15px;
        height: 15px
    }

    body.dark #tk-qnav {
        background: rgba(9,20,19,.985);
        border-color: rgba(255,255,255,.08)
    }

    body.dark #tk-qnav .qb {
        color: #DCEBE8
    }

    body.dark #tk-qnav .qs {
        background: rgba(255,255,255,.04);
        border-color: rgba(255,255,255,.12);
        color: #A9C2BE
    }
}

html.tk-embed #tk-qnav, html.tk-embed #tk-hdr-search {
    display: none !important
}

.tk-kbd2 {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--k-line, #D8E4E2);
    background: #F5F8F8;
    color: var(--k-mute, #4E6468);
    font: 800 10.5px/1 system-ui, sans-serif;
    letter-spacing: .02em
}

body.dark .tk-kbd2 {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.12);
    color: #A9C2BE
}

#tk-qtip {
    position: fixed;
    z-index: 6001;
    pointer-events: none;
    background: #141d30;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .12s, transform .12s;
    box-shadow: 0 8px 20px -8px rgba(0,0,0,.5)
}

#tk-qtip.on {
    opacity: 1;
    transform: none
}

#tk-hdr-right #tk-guide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    width: auto !important;
    min-width: 36px;
    padding: 0 9px !important;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.3);
    background: #FF0000;
    color: #fff;
    font-weight: 800;
    font-size: 13.5px;
    cursor: pointer;
    box-shadow: 0 6px 14px -6px rgba(255,0,0,.6);
    transition: background .15s, transform .12s
}

#tk-hdr-right #tk-guide[hidden] {
    display: none
}

#tk-hdr-right #tk-guide svg {
    width: 20px;
    height: 20px;
    flex: none
}

#tk-hdr-right #tk-guide .lb {
    display: none;
    white-space: nowrap
}

#tk-hdr-right #tk-guide:hover {
    background: #CC0000
}

#tk-hdr-right #tk-guide:active {
    transform: scale(.94)
}

#tk-guide.pulse {
    animation: tkGuidePulse 1.2s ease-out 3
}

@keyframes tkGuidePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,80,80,.75)
    }

    100% {
        box-shadow: 0 0 0 12px rgba(255,80,80,0)
    }
}

@media (min-width: 1100px) {
    #tk-hdr-right #tk-guide {
        padding: 0 12px 0 9px !important
    }

    #tk-hdr-right #tk-guide .lb {
        display: inline
    }
}

@media (max-width: 639px) {
    #tk-hdr-right #tk-guide {
        height: 34px;
        min-width: 34px;
        padding: 0 !important
    }

    html.tk-has-guide #tk-hdr-right #btn-intro {
        display: none !important
    }
}

@media (max-width: 429px) {
    #tk-hdr-right #tk-guide {
        height: 32px;
        min-width: 32px
    }

    #tk-hdr-right #tk-hdr-search, #tk-hdr-right #tk-fb-btn {
        display: none !important
    }
}

.nav-tile[data-yt] {
    position: relative
}

.nav-tile[data-yt] .nt-ic {
    position: relative
}

.nav-tile[data-yt] .nt-ic::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -4px;
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: #FF0000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.6 2.4v5.2L8 5z' fill='%23fff'/%3E%3C/svg%3E") center/9px no-repeat;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none
}

body.dark .nav-tile[data-yt] .nt-ic::after {
    box-shadow: 0 0 0 2px #0F1C1B
}

@media print {
    #tk-guide {
        display: none !important
    }
}

#tk-hdr-right #tk-hdr-search svg {
    width: 18px;
    height: 18px
}

#tk-cmd {
    position: fixed;
    inset: 0;
    z-index: 3700;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: min(12vh, 110px) 16px 16px
}

#tk-cmd[hidden] {
    display: none
}

#tk-cmd .bd {
    position: absolute;
    inset: 0;
    background: rgba(3,20,18,.5);
    opacity: 0;
    transition: opacity .18s
}

#tk-cmd .pn {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: min(72vh, 580px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 70px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(10,31,29,.08);
    opacity: 0;
    transform: translateY(-10px) scale(.98);
    transition: opacity .18s, transform .22s cubic-bezier(.2,.8,.2,1)
}

#tk-cmd.in .bd {
    opacity: 1
}

#tk-cmd.in .pn {
    opacity: 1;
    transform: none
}

#tk-cmd .sr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 12px 16px;
    border-bottom: 1px solid var(--k-line, #D8E4E2);
    flex: none
}

#tk-cmd .sr > svg {
    width: 20px;
    height: 20px;
    color: var(--k-mute, #4E6468);
    flex: none
}

#tk-cmd .sr input {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 0 !important;
    outline: 0 !important;
    background: transparent;
    box-shadow: none !important;
    padding: 0;
    font-size: 17px !important;
    font-weight: 600;
    color: var(--k-ink, #141d30);
    user-select: text;
    -webkit-user-select: text
}

#tk-cmd .sr input::placeholder {
    color: #8DA1A4;
    font-weight: 500
}

#tk-cmd .sr .x {
    cursor: pointer
}

#tk-cmd .ls {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 8px 10px;
    scroll-padding: 34px 0 8px
}

#tk-cmd .gh {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--k-mute, #4E6468);
    padding: 12px 10px 6px
}

#tk-cmd .it {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    color: var(--k-ink, #141d30)
}

#tk-cmd .it .i {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 19px;
    line-height: 1;
    background: rgba(60,94,171,.08)
}

#tk-cmd .it .t {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px
}

#tk-cmd .it .t b {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

#tk-cmd .it .t span {
    font-size: 13px;
    color: var(--k-mute, #4E6468);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

#tk-cmd .it .k {
    flex: none;
    font-size: 12px;
    font-weight: 700;
    color: #8DA1A4;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(10,31,29,.04)
}

#tk-cmd .it.on {
    background: rgba(60,94,171,.1)
}

#tk-cmd .it.on .k {
    color: var(--k-p, #3c5eab);
    background: rgba(60,94,171,.12)
}

#tk-cmd .it.on .t b::after {
    content: '↵';
    margin-left: 8px;
    color: var(--k-p, #3c5eab);
    font-weight: 800
}

#tk-cmd mark {
    background: rgba(246,185,59,.42);
    color: inherit;
    border-radius: 3px;
    padding: 0 1px
}

#tk-cmd .em {
    padding: 30px 16px;
    text-align: center;
    color: var(--k-mute, #4E6468);
    font-weight: 600;
    font-size: 15px
}

#tk-cmd .ft {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 9px 16px;
    border-top: 1px solid var(--k-line, #D8E4E2);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--k-mute, #4E6468);
    background: #F8FBFA;
    flex: none
}

#tk-cmd .ft span {
    display: inline-flex;
    align-items: center;
    gap: 5px
}

body.dark #tk-cmd .pn {
    background: #0F1C1B;
    box-shadow: 0 30px 70px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08)
}

body.dark #tk-cmd .sr, body.dark #tk-cmd .ft {
    border-color: rgba(255,255,255,.08)
}

body.dark #tk-cmd .ft {
    background: #0B1716
}

body.dark #tk-cmd .sr input, body.dark #tk-cmd .it {
    color: #E2E8F0
}

body.dark #tk-cmd .it .i {
    background: rgba(94,234,212,.1)
}

body.dark #tk-cmd .it.on {
    background: rgba(94,234,212,.12)
}

@media (max-width: 639px) {
    #tk-cmd {
        padding: calc(8px + env(safe-area-inset-top)) 8px 8px
    }

    #tk-cmd .pn {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px - env(safe-area-inset-top));
        border-radius: 18px
    }

    #tk-cmd .ft {
        display: none
    }

    #tk-cmd .it {
        padding: 9px 8px
    }

    html.tk-cmd-open, html.tk-cmd-open body {
        overflow: hidden
    }
}

#tk-msheet .tk-msrch {
    flex: 1;
    min-width: 0;
    margin: 0 10px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--k-line, #D8E4E2);
    border-radius: 12px;
    background: #F5F8F8;
    color: #6B7F82;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: left
}

#tk-msheet .tk-msrch svg {
    width: 16px;
    height: 16px;
    flex: none
}

#tk-msheet .tk-msrch span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

body.dark #tk-msheet .tk-msrch {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.1);
    color: #A9C2BE
}

.nav-tile .nt-ic {
    transition: transform .15s
}

.nav-tile:active .nt-ic {
    transform: scale(.9)
}

#tk-msheet .tl button {
    transition: background .15s, transform .12s
}

#tk-msheet .tl button:active {
    transform: scale(.96)
}

.sl-chip:active, .sl-gh .go:active {
    transform: scale(.96)
}

@media (prefers-reduced-motion: reduce) {
    .tab-content:not(.hidden) {
        animation: none
    }

    #tk-loadbar i {
        animation-duration: 2.4s
    }
}
