#top {
    scroll-margin-top: 90px;
}

.free-play-page {
    padding-top: calc(clamp(12px, 2vh, 22px) + 96px);
}

.free-play-page__frame {
    display: block;
    width: 100%;
    min-height: clamp(560px, 70svh, 780px);
    border: 1px solid #ffffff26;
    border-radius: 22px;
    background: #161321;
}

.free-game {
    margin: 0;
    color: #fbf5ee;
    background: #161321;
}

.free-game__surface {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 100svh;
    padding: 16px;
    place-items: center;
    overflow: hidden;
}

.free-game__cover {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(7px);
    opacity: .52;
}

.free-game__surface::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, #120e1a80, #120e1af5 56%, #120e1a80);
    content: "";
}

.free-game__table {
    display: grid;
    gap: 16px;
    width: min(100%, 570px);
    padding: clamp(15px, 4vw, 36px);
    border: 1px solid #ffdf9138;
    border-radius: 22px;
    background: #191524ed;
    box-shadow: 0 18px 65px #090611a0;
    text-align: center;
}

.free-game__balance {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: .55rem;
    color: #e4d7cb;
}

.free-game__count {
    color: #ffda77;
    font: 800 clamp(24px, 5vw, 42px) Bricolage Grotesque, Manrope, sans-serif;
    font-variant-numeric: tabular-nums;
}

.free-game__reels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: #a86732;
}

.free-game__reels span {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(#e4c7a2, #fff6df 45%, #e8c9a2);
    font-size: clamp(28px, 8vw, 66px);
    line-height: 1;
}

.free-game__table[data-result="reel_win"] .free-game__reels {
    background: #ffdb72;
    box-shadow: 0 0 26px #ffcd5368;
}

.free-game__reels[data-spinning] span {
    animation: free-play-reel .26s ease both;
}

@keyframes free-play-reel {
    50% { filter: blur(3px); transform: scaleY(.9); }
}

.free-game__result,
.free-game__rules {
    margin: 0;
    color: #e4d7cb;
    line-height: 1.5;
}

.free-game__result {
    min-height: 1.5em;
}

.free-game__controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.free-game__controls button {
    min-height: 44px;
    padding: 9px 19px;
    border: 1px solid #ffdf9160;
    border-radius: 999px;
    background: #31263f;
    color: #fff3de;
    font: 800 16px Manrope, sans-serif;
    cursor: pointer;
}

.free-game__controls .free-game__primary {
    background: linear-gradient(#ffdb72, #ffb748);
    color: #201226;
}

.free-game :focus-visible {
    outline: 2px solid #ffdf91;
    outline-offset: 3px;
}

.free-game__controls button:disabled {
    cursor: default;
    opacity: .55;
}

.free-game [hidden] {
    display: none;
}

.free-game__hands {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #bbeaca38;
    border-radius: 16px;
    background: radial-gradient(#245744, #12362b);
}

.free-game__hand {
    display: flex;
    min-height: 54px;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.free-game__hand span {
    display: grid;
    min-width: 38px;
    height: 47px;
    padding: 3px;
    place-items: center;
    border-radius: 5px;
    background: #fcf1d8;
    color: #201226;
    font-size: .9rem;
    font-weight: 800;
}

.free-game__hand .red-card { color: #a52b39; }
.free-game__hand .hidden-card { background: #61386b; color: #ffdf91; }

.free-game__lanes {
    position: relative;
    height: min(290px, 50svh);
    border: 1px solid #ffdf9150;
    border-radius: 16px;
    overflow: hidden;
    background: repeating-linear-gradient(90deg, #26213a, #39324e calc(33.333% - 1px), #d6b28490 33.333%);
}

.free-game__runner,
.free-game__obstacle {
    position: absolute;
    left: calc((var(--lane, 1) + .5) * 100% / 3);
    transform: translate(-50%, -50%);
    font-size: clamp(28px, 6vw, 40px);
    line-height: 1;
}

.free-game__runner { top: 86%; }
.free-game__obstacle { top: var(--position); color: #ff8f91; }

@media (prefers-reduced-motion: reduce) {
    .free-game__reels[data-spinning] span { animation: none; }
}
