.jot-mini-game {
    position: relative;
    min-height: calc(100dvh - 70px);
    overflow: hidden;
    isolation: isolate;
    background: #05070a;
    color: #fff;
    touch-action: none;
}

body.jot-mini-game-active {
    overflow: hidden;
}

.jot-mini-game.is-fullscreen {
    position: fixed;
    z-index: 1000;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
}

.jot-mini-game__scene,
.jot-mini-game__scene canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.jot-mini-game__scene canvas {
    display: block;
}

.jot-mini-game__vignette,
.jot-mini-game__speed-lines {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.jot-mini-game__bonus {
    position: absolute;
    z-index: 6;
    top: 128px;
    left: 50%;
    color: #69d8ff;
    font-family: "Bitter", serif;
    font-size: 30px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 148, 255, 0.9), 0 4px 12px rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(0.82);
}

.jot-mini-game__bonus.is-visible {
    animation: jotMiniBonus 820ms ease-out both;
}

.jot-mini-game__vignette {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 28%, transparent 68%, rgba(0, 0, 0, 0.62)),
        radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.54) 100%);
}

.jot-mini-game__speed-lines {
    opacity: 0;
    background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.07) 47px 48px, transparent 49px 92px);
    transition: opacity 240ms ease;
    animation: jotMiniSpeed 620ms linear infinite;
}

.jot-mini-game.is-running .jot-mini-game__speed-lines {
    opacity: 0.26;
}

.jot-mini-game__sound {
    position: static;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(253, 230, 138, 0.34);
    border-radius: 50%;
    background: rgba(4, 6, 9, 0.76);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
    color: #fde68a;
    font-size: 16px;
    cursor: pointer;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.jot-mini-game__hud-controls {
    position: absolute;
    z-index: 8;
    top: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    transition: top 160ms ease;
}

.jot-mini-game.is-running .jot-mini-game__hud-controls {
    display: flex;
    top: 18px;
}

.jot-mini-game__sound:hover,
.jot-mini-game__sound:focus-visible {
    border-color: rgba(253, 230, 138, 0.72);
    background: rgba(30, 20, 8, 0.9);
    outline: none;
}

.jot-mini-game__sound.is-muted {
    border-color: rgba(248, 113, 113, 0.38);
    color: #fca5a5;
}

.jot-mini-game__pause-control {
    position: static;
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(253, 230, 138, 0.48);
    border-radius: 50%;
    background: rgba(4, 6, 9, 0.84);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
    color: #fde68a;
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.jot-mini-game.is-running .jot-mini-game__pause-control {
    display: grid;
}

.jot-mini-game__overlay--pause {
    z-index: 11;
    background: rgba(3, 5, 8, 0.78);
    backdrop-filter: blur(8px);
}

.jot-mini-game__pause-panel {
    width: min(100%, 360px);
    padding: 24px;
    border: 1px solid rgba(253, 230, 138, 0.34);
    border-radius: 8px;
    background: rgba(10, 12, 16, 0.96);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.66);
    text-align: center;
}

.jot-mini-game__pause-panel > i {
    color: #fde68a;
    font-size: 30px;
}

.jot-mini-game__pause-panel h2 {
    margin: 10px 0 0;
    font-family: "Special Elite", "Bitter", Georgia, serif;
    font-size: 30px;
    font-weight: 400;
}

.jot-mini-game__pause-panel > p {
    margin: 8px 0 18px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    line-height: 1.5;
}

.jot-mini-game__pause-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.jot-mini-game__pause-action--primary {
    border-color: rgba(253, 230, 138, 0.48);
    background: linear-gradient(180deg, #dc2626, #991b1b);
}

.jot-mini-game__pause-action.is-muted {
    color: #fca5a5;
}

.jot-mini-game__resume-countdown {
    position: absolute;
    z-index: 12;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(3, 5, 8, 0.4);
    pointer-events: none;
}

.jot-mini-game__resume-countdown.hidden {
    display: none;
}

.jot-mini-game__resume-countdown strong {
    color: #fde68a;
    font-family: "Special Elite", "Bitter", Georgia, serif;
    font-size: clamp(92px, 24vw, 180px);
    font-weight: 400;
    line-height: 1;
    text-shadow: 0 10px 34px rgba(0, 0, 0, 0.86), 0 0 34px rgba(251, 191, 36, 0.28);
    animation: jotMiniResumeCount 720ms ease-out both;
}

.jot-mini-game__hud {
    position: absolute;
    inset: 0 0 auto;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 76px 18px 18px;
    pointer-events: none;
}

.jot-mini-game__competition {
    position: absolute;
    z-index: 6;
    top: 82px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: min(92vw, 440px);
    padding: 8px 12px;
    border: 1px solid rgba(244, 114, 182, 0.38);
    border-radius: 8px;
    background: rgba(8, 5, 12, 0.76);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), 0 0 20px rgba(236, 72, 153, 0.12);
    color: #fbcfe8;
    pointer-events: none;
    transform: translateX(-50%);
    backdrop-filter: blur(8px);
}

.jot-mini-game__competition > i {
    color: #fbbf24;
}

.jot-mini-game__competition strong {
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.jot-mini-game__competition span {
    color: rgba(255, 255, 255, 0.64);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.jot-mini-game__brand {
    display: grid;
    gap: 2px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.9);
}

.jot-mini-game__brand-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.jot-mini-game__brand-row > strong {
    white-space: nowrap;
}

.jot-mini-game__hud-countdown {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid rgba(244, 114, 182, 0.38);
    border-radius: 7px;
    background: rgba(8, 5, 12, 0.76);
    color: #fbcfe8;
    font-size: 11px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.jot-mini-game__brand span {
    color: #fbbf24;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
}

.jot-mini-game__brand strong {
    font-family: "Bitter", serif;
    font-size: clamp(17px, 2.2vw, 28px);
    line-height: 1;
}

.jot-mini-game__metrics {
    display: flex;
    gap: 6px;
}

.jot-mini-game__metrics > div {
    min-width: 66px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(4, 6, 9, 0.68);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
    text-align: center;
}

.jot-mini-game__metrics span {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 8px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.jot-mini-game__metrics strong {
    display: block;
    margin-top: 4px;
    color: #fde68a;
    font-size: 17px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.jot-mini-game__overlay {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 50% 42%, rgba(90, 28, 13, 0.2), rgba(3, 5, 8, 0.7) 70%);
    backdrop-filter: blur(3px);
}

.jot-mini-game__overlay.hidden,
.jot-mini-game__error.hidden {
    display: none;
}

.jot-mini-game__overlay--start {
    display: block;
    padding: 0;
}

.jot-mini-game__overlay--result {
    display: block;
    padding: 0;
}

.jot-mini-game__title-lockup {
    max-width: 620px;
    text-align: center;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.94);
}

.jot-mini-game__start-logo {
    position: absolute;
    z-index: 2;
    top: 18px;
    left: 50%;
    display: block;
    width: 82px;
    height: 82px;
    margin: 0;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.58));
    transform: translateX(-50%);
}

.jot-mini-game__title-lockup > span {
    color: #fbbf24;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.jot-mini-game__title-lockup h1,
.jot-mini-game__title-lockup h2 {
    margin: 8px 0 0;
    font-family: "Bitter", Rockwell, Georgia, serif;
    font-size: clamp(36px, 8vw, 78px);
    line-height: 1.02;
    font-weight: 700;
}

.jot-mini-game__title-lockup p {
    max-width: 460px;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.55;
}

.jot-mini-game__title-lockup--start {
    position: absolute;
    z-index: 2;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    width: min(calc(100% - 36px), 560px);
    transform: translateX(-50%);
}

.jot-mini-game__title-lockup--start h1 {
    margin-top: 0;
    font-family: "Special Elite", "Bitter", Georgia, serif;
    font-size: clamp(28px, 5vw, 52px);
    line-height: 1.05;
    font-weight: 400;
}

.jot-mini-game__title-lockup--start p {
    margin-top: 8px;
}

.jot-mini-game__title-lockup--start .jot-mini-game__primary {
    margin-top: 14px;
}

.jot-mini-game__competition-preview {
    position: absolute;
    z-index: 3;
    top: 112px;
    left: 18px;
    width: min(31vw, 300px);
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, 0.34);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(16, 19, 23, 0.92), rgba(5, 7, 10, 0.9));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.jot-mini-game__competition-preview.hidden {
    display: none;
}

.jot-mini-game__competition-preview > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 12, 15, 0.78);
}

.jot-mini-game__competition-preview > header span {
    overflow: hidden;
    color: #fde68a;
    font-size: 10px;
    font-weight: 900;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.jot-mini-game__competition-preview > header strong {
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
    text-transform: uppercase;
    white-space: nowrap;
}

.jot-mini-game__competition-preview > header .jot-mini-game__preview-countdown {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 6px 9px;
    border: 1px solid rgba(251, 191, 36, 0.62);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(85, 52, 4, 0.92), rgba(21, 13, 3, 0.94));
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #fde68a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.jot-mini-game__competition-preview ol {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 6px;
    list-style: none;
}

.jot-mini-game__competition-preview li {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-height: 23px;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.035);
}

.jot-mini-game__competition-preview li.is-me {
    border-color: rgba(96, 165, 250, 0.42);
    background: rgba(37, 99, 235, 0.14);
}

.jot-mini-game__competition-preview li > span {
    color: #fbbf24;
    font-size: 10px;
    font-weight: 900;
}

.jot-mini-game__competition-preview li > strong {
    overflow: hidden;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jot-mini-game__competition-preview li > b {
    color: #fde68a;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.jot-mini-game__competition-preview > p {
    margin: 0;
    padding: 9px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    text-align: center;
}

.jot-mini-game__all-time-button {
    position: absolute;
    z-index: 3;
    top: 112px;
    right: 18px;
    display: grid;
    place-items: center;
    gap: 5px;
    min-width: 152px;
    min-height: 88px;
    padding: 12px;
    border: 1px solid rgba(253, 230, 138, 0.4);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(52, 35, 8, 0.82), rgba(5, 7, 10, 0.9));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
    color: #fde68a;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.jot-mini-game__all-time-button i {
    font-size: 20px;
}

.jot-mini-game__all-time-button span {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.jot-mini-game__all-time-button small {
    color: rgba(255, 255, 255, 0.54);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.jot-mini-game__all-time-button:hover,
.jot-mini-game__all-time-button:focus-visible {
    border-color: #fde68a;
    background: linear-gradient(180deg, rgba(76, 49, 7, 0.9), rgba(10, 12, 15, 0.94));
    outline: none;
}

.jot-mini-game__title-lockup--result > i {
    color: #f87171;
    font-size: 32px;
}

.jot-mini-game__title-lockup--result {
    position: absolute;
    z-index: 2;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    width: min(calc(100% - 36px), 560px);
    transform: translateX(-50%);
}

.jot-mini-game__title-lockup--result h2 {
    margin-top: 5px;
    font-family: "Special Elite", "Bitter", Georgia, serif;
    font-size: clamp(28px, 5vw, 52px);
    line-height: 1.05;
    font-weight: 400;
}

.jot-mini-game__title-lockup--result .jot-mini-game__primary {
    margin-top: 12px;
}

.jot-mini-game__title-lockup--result > strong {
    display: block;
    margin-top: 14px;
    color: #fde68a;
    font-size: clamp(38px, 9vw, 72px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.jot-mini-game__primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 190px;
    min-height: 48px;
    margin-top: 22px;
    padding: 12px 20px;
    border: 1px solid rgba(253, 230, 138, 0.48);
    border-radius: 8px;
    background: linear-gradient(180deg, #dc2626, #991b1b);
    box-shadow: 0 16px 38px rgba(127, 29, 29, 0.42), inset 0 1px rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 900;
    transition: transform 160ms ease, filter 160ms ease;
}

.jot-mini-game__primary:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
}

.jot-mini-game__primary:disabled {
    cursor: wait;
    filter: grayscale(0.35);
    opacity: 0.72;
}

.jot-mini-game__leaderboard-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 156px;
    min-height: 42px;
    margin: 10px auto 0;
    padding: 9px 16px;
    border: 1px solid rgba(253, 230, 138, 0.42);
    border-radius: 8px;
    background: rgba(5, 7, 10, 0.76);
    color: #fde68a;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.jot-mini-game__leaderboard-button:hover,
.jot-mini-game__leaderboard-button:focus-visible {
    border-color: #fde68a;
    background: rgba(60, 36, 8, 0.86);
    outline: none;
    transform: translateY(-1px);
}

.jot-mini-game__guest-note,
.jot-mini-game__score-status {
    min-height: 18px;
    margin: 10px auto 0 !important;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.jot-mini-game__guest-access {
    width: min(100%, 430px);
    margin: 9px auto 0;
    padding: 8px 10px 9px;
    border: 1px solid rgba(253, 230, 138, 0.3);
    border-radius: 8px;
    background: rgba(5, 7, 10, 0.74);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}

.jot-mini-game__guest-access .jot-mini-game__guest-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 0;
    margin: 0 !important;
    color: #fff !important;
    font-weight: 800;
}

.jot-mini-game__guest-access .jot-mini-game__guest-note i {
    flex: 0 0 auto;
    color: #fde68a;
}

.jot-mini-game__guest-competition {
    display: block;
    margin-top: 3px;
    color: #f9a8d4;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
}

.jot-mini-game__guest-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 7px;
}

.jot-mini-game__guest-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 112px;
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.jot-mini-game__guest-actions a:first-child {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(153, 27, 27, 0.8);
}

.jot-mini-game__guest-actions a:hover,
.jot-mini-game__guest-actions a:focus-visible {
    border-color: #fde68a;
    background: rgba(79, 48, 9, 0.9);
    outline: none;
}

.jot-mini-game__guest-actions--result {
    margin-top: 7px;
}

.jot-mini-game__title-lockup--result .jot-mini-game__guest-actions--result + .jot-mini-game__primary {
    margin-top: 9px;
}

.jot-mini-game__leaderboard {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(7px);
}

.jot-mini-game__leaderboard.hidden {
    display: none;
}

.jot-mini-game__leaderboard-panel {
    width: min(100%, 520px);
    max-height: min(82dvh, 680px);
    overflow-y: auto;
    border: 1px solid rgba(253, 230, 138, 0.34);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(21, 24, 28, 0.98), rgba(5, 7, 10, 0.98));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
}

.jot-mini-game__leaderboard-panel > header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 14, 17, 0.96);
}

.jot-mini-game__leaderboard-panel header span {
    color: #fbbf24;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.jot-mini-game__leaderboard-panel h2 {
    margin: 3px 0 0;
    font-family: "Bitter", serif;
    font-size: 23px;
    line-height: 1.1;
}

.jot-mini-game__leaderboard-panel header button {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
}

.jot-mini-game__leaderboard-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 12px 12px 4px;
}

.jot-mini-game__leaderboard-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.jot-mini-game__leaderboard-tab:hover,
.jot-mini-game__leaderboard-tab:focus-visible {
    border-color: rgba(251, 191, 36, 0.4);
    color: #fff;
}

.jot-mini-game__leaderboard-tab.is-active {
    border-color: rgba(251, 191, 36, 0.52);
    background: rgba(251, 191, 36, 0.13);
    color: #fde68a;
}

.jot-mini-game__leaderboard-tab.hidden {
    display: none;
}

.jot-mini-game__leaderboard-head,
.jot-mini-game__leaderboard-list li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.jot-mini-game__leaderboard-head {
    padding: 12px 18px 7px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.jot-mini-game__leaderboard-head span:last-child {
    text-align: right;
}

.jot-mini-game__leaderboard-list {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0 12px 12px;
    list-style: none;
}

.jot-mini-game__leaderboard-list li {
    min-height: 46px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
}

.jot-mini-game__leaderboard-list li.is-me {
    border-color: rgba(253, 230, 138, 0.62);
    background: rgba(120, 74, 12, 0.24);
}

.jot-mini-game__leaderboard-list li > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 900;
}

.jot-mini-game__leaderboard-list li[data-medal="1"] > span { background: #d9a514; color: #211500; }
.jot-mini-game__leaderboard-list li[data-medal="2"] > span { background: #aeb7c2; color: #12171e; }
.jot-mini-game__leaderboard-list li[data-medal="3"] > span { background: #a8673a; color: #1f0e05; }

.jot-mini-game__leaderboard-list strong {
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jot-mini-game__leaderboard-list b {
    color: #fde68a;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.jot-mini-game__leaderboard-state {
    margin: 0;
    padding: 8px 18px 18px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
    text-align: center;
}

.jot-mini-game__my-rank {
    margin: 0 12px 12px;
    padding: 11px 12px;
    border-top: 1px solid rgba(253, 230, 138, 0.22);
    color: #fde68a;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.jot-mini-game__my-rank.hidden {
    display: none;
}

.jot-mini-game__error {
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 50%;
    width: min(90%, 460px);
    padding: 18px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 8px;
    background: rgba(20, 4, 6, 0.94);
    color: #fecaca;
    text-align: center;
    transform: translate(-50%, -50%);
}

@media (max-width: 640px) {
    .jot-mini-game__start-logo {
        width: 64px;
        height: 64px;
        top: 12px;
    }

    .jot-mini-game__hud {
        display: block;
        padding: 14px 68px 14px 12px;
    }

    .jot-mini-game__brand {
        max-width: 270px;
    }

    .jot-mini-game__brand strong {
        font-size: 15px;
    }

    .jot-mini-game__hud-countdown {
        min-height: 25px;
        padding: 4px 6px;
        font-size: 9px;
    }

    .jot-mini-game__metrics {
        position: absolute;
        top: 66px;
        left: 12px;
        width: calc(100vw - 92px);
        justify-content: flex-start;
        gap: 4px;
        transform: none;
    }

    .jot-mini-game__metrics > div {
        flex: 1;
        max-width: 92px;
        min-width: 0;
        padding-inline: 6px;
    }

    .jot-mini-game__competition {
        top: 118px;
        padding: 7px 10px;
    }

    .jot-mini-game__title-lockup p {
        font-size: 13px;
    }

    .jot-mini-game__competition-preview {
        top: 88px;
        left: 8px;
        width: calc(64% - 12px);
    }

    .jot-mini-game__competition-preview > header {
        min-height: 38px;
        padding: 7px;
    }

    .jot-mini-game__competition-preview > header span {
        font-size: 8px;
    }

    .jot-mini-game__competition-preview > header strong:not(.jot-mini-game__preview-countdown) {
        font-size: 8px;
    }

    .jot-mini-game__competition-preview > header .jot-mini-game__preview-countdown {
        min-height: 27px;
        padding: 6px 7px;
        font-size: 10px;
    }

    .jot-mini-game__competition-preview ol {
        gap: 1px;
        padding: 4px;
    }

    .jot-mini-game__competition-preview li {
        grid-template-columns: 18px minmax(0, 1fr) auto;
        gap: 4px;
        min-height: 20px;
        padding: 2px 4px;
    }

    .jot-mini-game__competition-preview li > span,
    .jot-mini-game__competition-preview li > strong,
    .jot-mini-game__competition-preview li > b {
        font-size: 8px;
    }

    .jot-mini-game__all-time-button {
        top: 88px;
        right: 8px;
        width: calc(36% - 8px);
        min-width: 0;
        min-height: 76px;
        padding: 9px 6px;
    }

    .jot-mini-game__all-time-button span {
        font-size: 9px;
    }

    .jot-mini-game__title-lockup--start {
        bottom: max(18px, env(safe-area-inset-bottom));
        width: calc(100% - 24px);
    }

    .jot-mini-game__title-lockup--result {
        bottom: max(18px, env(safe-area-inset-bottom));
        width: calc(100% - 24px);
    }

    .jot-mini-game__title-lockup--result h2 {
        font-size: clamp(25px, 8vw, 34px);
    }

    .jot-mini-game__title-lockup--start h1 {
        font-size: clamp(25px, 8vw, 34px);
    }

    .jot-mini-game__title-lockup--start p {
        max-width: 330px;
        margin-top: 5px;
        font-size: 11px;
        line-height: 1.35;
    }

    .jot-mini-game__title-lockup--start .jot-mini-game__primary {
        min-height: 50px;
        margin-top: 10px;
    }

    .jot-mini-game__guest-access {
        margin-top: 7px;
        padding: 7px 8px 8px;
    }

    .jot-mini-game__guest-access .jot-mini-game__guest-note {
        font-size: 10px !important;
    }

    .jot-mini-game__guest-actions {
        margin-top: 6px;
    }

    .jot-mini-game__guest-actions a {
        min-width: 104px;
        min-height: 30px;
        padding: 5px 9px;
        font-size: 10px;
    }
}

@media (min-width: 768px) {
    .jot-mini-game {
        min-height: 100dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jot-mini-game__speed-lines {
        animation: none;
    }
}

@keyframes jotMiniSpeed {
    from { background-position: 0 0; }
    to { background-position: 180px 0; }
}

@keyframes jotMiniBonus {
    0% { opacity: 0; transform: translate(-50%, 14px) scale(0.76); }
    22% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
    100% { opacity: 0; transform: translate(-50%, -30px) scale(0.96); }
}

@keyframes jotMiniResumeCount {
    0% {
        opacity: 0;
        transform: scale(1.45);
    }
    24% {
        opacity: 1;
        transform: scale(1);
    }
    78% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.72);
    }
}
