
:root {
    --collection-width: min(60vw, 700px, 100vh);
    --collection-height: calc(0.35 * var(--collection-width));
    --rules-middle-size-button-w: min(12vw, 100px);
    --intro-size: max(100vh, 100vw);
    --intro-content-width: 80vw;
    --intro-close-height: 10%;
    --intro-video-bgr-height: min(60vh, 700px);
    --intro-video-bgr-width: calc(var(--intro-video-bgr-height) * 2.3);
    --intro-logo-width: max(140px, min(200px, calc(((100vw - var(--intro-video-bgr-width)) / 2))));
    --intro-logo-height: calc(var(--intro-logo-width) * 0.55);
    --intro-transition-duration: 0.8s;
    --intro-slide-width: min(1200px, 100vw);
    --intro-slide-img-min: min(800px, 100vw, 78vh);
    --intro-closebtn-width: min(17vh, 36vw);
    --intro-font-size: min(20px, calc(var(--intro-video-bgr-height) * 0.07));
    --main-img-height: calc(var(--intro-slide-img-min) * 0.9);
    --slide-radio-button-size: min(10vw, 30px);
    --line-cell-width: min(4vw, 22px);
}
#external_clock * {
    text-shadow: 1px 1px 1px black;
}
/*.button_icon_image {*/
/*    width: 46px;*/
/*    background-color: #777777;*/
/*}*/
.no_bgr { background-color: transparent !important; }
.centered {text-align: center}
.unique_font { font-family: "Avenir Next Cyr", sans-serif }
.fit_text {
    font-size: min(1.5cqh, 2cqw);
    place-self: center;
}
.row0 { grid-row: row0 }
.row1 { grid-row: row1 }
.row2 { grid-row: row2 }
.row3 { grid-row: row3 }
.start_col { grid-column: start_col }
.end_col { grid-column: end_col }
.column0 { grid-column: column0 }
.column1 { grid-column: column1 }
.column2 { grid-column: column2 }
.column3 { grid-column: column3 }
.column4 { grid-column: column4 }
.column5 { grid-column: column5 }
.column6 { grid-column: column6 }
.image_vw { width: 10vw }
.vertical_gap { height: 10px}

.image_column{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    row-gap: 5px;
}
.image_column .item_m{
    width: 50%;
    height: 50%;
}
.inline_image {
    display: inline;
    max-width: 50px;
    height: auto;
}
.flex_line {
    justify-content: start;
    align-items: center;
}
/*rules*/
.text_on_image {
    display: grid;
    justify-content: center;
}
.text_on_image > *{
    grid-area: 1 / 1;
}
.rules_multipliers_table{
    display: grid;
    grid-template-columns: [start] auto [column0] 20vw [column1] 16vw [end] auto;
    grid-template-rows: auto;
}
.rules_bonus_item_table{
    display: grid;
    align-items: center;
    grid-template-columns: [start] auto [column0] min(15vw, 130px) [gap] 5px [column1] min(50vw, 350px) [column2] min(10vw, 150px) [end] auto;
    grid-template-rows: auto;
}
.buy_bonus_image img {
    width: min(25vw, 180px);
}
.booster_icon {
    height: auto;
    width: min(20vw, 80px);
}

#buy_button_text{
    text-align: center;
    color: #fefbd0;
    line-height: 100%;
    font-size: min(4cqw, 26px);
    margin: auto;
    text-shadow: 1px 1px #0a2708;
}

.auto_spin_turbo_wrapper{
    display: inline-grid;
    align-items: center;
    justify-items: center;
    grid-template-columns: [auto_column] 20vw [spin_column] 25vw [turbo_column] 20vw;
    grid-template-rows: [row1] auto [row2] auto [row3] auto;
    column-gap: 1vw;
    row-gap: 10px;
}
.auto_spin_turbo_wrapper .text { align-self: start }
.auto_column { grid-column: auto_column }
.spin_column { grid-column: spin_column }
.turbo_column { grid-column: turbo_column }

.menu_buttons_table {
    display: grid;
    align-items: center;
    justify-items: start;
    grid-template-columns: [start] 5px [button_column] 46px [button_describe_column] auto;
    column-gap: 5vw; row-gap: 10px
}
.button_column { grid-column: button_column }
.button_describe_column {
    grid-column: button_describe_column;
    text-align: left;
}
.middle_size_button_bgr {
    width: var(--rules-middle-size-button-w);
}
.middle_size_button {
    width: calc(var(--rules-middle-size-button-w) * 0.75);
}
#spin_bgr {
    width: min(24vw, 200px);
}
#spin_button { width: min(13vw, 120px) }

.about_wrapper{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2vw;
}
.main_logo img{
    width: min(50vw, 400px);
}
#respin_image img{
    max-width: 50vw;
    height: auto;
}
.tabulated::before {
    content: '\00a0\00a0\00a0\00a0-\00a0';
}
.subtabulated::before {
    content: '\00a0\00a0\00a0\00a0\00a0\00a0\00a0◦\00a0';
}

/*paytable*/
.aligned_left {
    justify-content: left;
}
#instant_win {
    width: min(50vw, 200px);
    margin: auto;
}

#all_payout_wrapper, #lines_wrapper{
    display: flex;
    flex-wrap: wrap;
    gap: 2vw;
    justify-content: center;
}
#all_payout_wrapper {
    row-gap: 5vw;
}
.payout_item{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2vw;
}
.flex_break {
    flex-basis: 100%;
    height: 0;
}
.bonus_item {
    height: auto;
    width: min(8vw, 80px);
}
.collect_item {
    height: auto;
    width: min(6vw, 60px);
}
.payout_image, .game_item img {
    height: auto;
    width: min(15vw, 130px);
}
#all_golden_payout {
    width: min(30vw, 300px);
}
.payout_index,
.payout_value{
    display: inline;
    margin-right: 5px;
}

.line_item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.line_index {
    width: calc(var(--line-cell-width) * 1.1);
    text-align: right;
}
.line_grid{
    display: grid;
    grid-template-rows: [row0] auto [row1] auto [row2] auto [row3] auto;
    grid-template-columns: [column0] auto [column1] auto [column2] auto [column3] auto [column4] auto [column5] auto;
}
.line_cell {
    width: var(--line-cell-width);
    height: min(3vw, 20px);
    border-width: 2px;
    border-style: none solid solid none;
    border-color: #797979;
}
.line_cell.column0 { border-left-style: solid}
.line_cell.row0 { border-top-style: solid}
.line_cell.active{
    background-color: #4eb857;
}

/*collection*/
#collected_wrapper {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
}
#collected_content {
    width: var(--collection-width);
    margin: auto;
}
#progress_group {
    width: var(--collection-width);
    height: var(--collection-height);
    display: grid;
    grid-template-rows: [row0] 100%;
    grid-template-columns: [column0] 100%;
    justify-items: center;
}
/*#progress_mask {*/
/*    transform: scale(0.5, 1) translateX(10%);*/
/*}*/
#progress_mask {
    width: calc(var(--collection-width) * calc(61/70));
    height: calc(var(--collection-width) * calc(18/700));
    overflow-x: hidden;
    overflow-y: hidden;
    margin-left: calc(var(--collection-width) * calc(55/700));
    margin-top: calc(var(--collection-width) * calc(16.5/70));
}
#progress_bar_bgr{
    width: calc(var(--collection-width) * calc(61/70));
    margin-top: calc(var(--collection-width) * calc(14/70));
}
.collection_text {
    font-size: clamp(5cqh, 18px, 2vh);
}

/*intro*/
#intro_content {
    display: flex;
    position: relative;
    flex-flow: column;
    justify-content: space-evenly;
}
#intro_toggle_block {
    display: flex;
    width: calc(var(--intro-content-width) / 2 - var(--intro-closebtn-width) / 2);
    justify-content: right;
}
#intro_toggle_block > * {
    display: flex;
    align-items: center;
}
#intro_back, #intro_video_wrapper {
     position: absolute;
     background-color: #797979;
}
#intro_back img {
    height: var(--intro-size);
    width: var(--intro-size);
    margin-left: calc((100vw - var(--intro-size)) / 2);
    margin-top: calc((100vh - var(--intro-size)) / 2);
}
.intro_flex_item {
    width: var(--intro-content-width);
    display: flex;
    margin: 0 auto;
    justify-content: space-evenly;
}
.text_on_image {
    height: 210px;
    position: relative;
}

#intro_content .text_on_image img {
    height: 100%;
    width: min(100%, 460px);
}
#intro_content_block {
    height: 79%;
    display: flex;
    flex-flow: column;
    width: 100vw;
}
#intro_video_wrapper {
    margin-left: calc((100vw - var(--intro-video-bgr-width)) / 2);
    margin-top: 20px;
}
/*#intro_video_bgr img {*/
/*    height: var(--intro-video-bgr-height);*/
/*    width: var(--intro-video-bgr-width);*/
/*}*/
#external_intro video {
    width: 98%;
    height: 98%;
    margin: 1%;
}
.video_wrapper {
    display: grid;
    grid-template-rows: [row0] auto;
    grid-template-columns: [column0] auto;
}
#intro_header {
    font-size: clamp(17px, 2.4vw, 30px);
    position: absolute;
    top: 15vh;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    color: white;
}
#intro_image_logo img {
    height: auto;
    width: var(--intro-logo-width);
}

#intro_bottom_buttons_block {
    height: calc(var(--intro-close-height)* 1.2);
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 97%;
}
#intro_toggle_left_gap  { width: 40% }
#intro_button_close {
    display: block;
    width: 100vw;
    height: 15vh;
    position: absolute;
    bottom: 0;
}
#intro_toggle_button { margin: auto 10px }
#intro_image_play_btn {
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
}
.tap_anywhere_text {
    padding: 15px;
    margin: auto;
    background-color: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    color: white;
    text-align: center;
}
/* #intro_image_play_btn img {
    width: var(--intro-closebtn-width);
    height: auto;
} */
.donot_text {
    font-size: max(14px, min(2vh, 2vw));
    color: white;
}

.intro_slide_item_title {
    font-size: 4vh;
    color: beige;
    text-align: center;
    text-shadow: 2px 4px black;
}

#intro_slides_wrapper {
    display: flex;
    justify-content: space-around;
    margin: auto;
    height: calc(var(--intro-video-bgr-height) * 0.2);
    /* pointer-events: none; */
}
.intro_slide_item {
    position: absolute;
    top: 0;
    margin-left: calc( 0vw - 100vw - var(--intro-slide-width));
    width: var(--intro-slide-width);
    height: var(--main-img-height);
    display: grid;
    grid-template-columns: [column0] 100%;
    grid-template-rows: [row0] 100%;
    justify-items: center;
    align-items: center;
}
@supports (-webkit-touch-callout: none) {
    .intro_slide_item {
        top: -10vh;
    }
}
.intro_slide_item .image{
    width: var(--intro-video-bgr-width);
    height: var(--intro-video-bgr-height);
}
.intro_text_wrapper{
    width: calc(var(--intro-video-bgr-width) * 0.8);
    height: var(--intro-video-bgr-height);
}
.intro_slide_item.active {
    margin-left:  calc(0px - var(--intro-slide-width) / 2);
    transition: all .4s;
}
.port.image img {
    width: 0;
    height: 0;
}
#intro_slide_buttons {
    display: flex;
    height: var(--slide-radio-button-size);
    justify-content: center;
    gap: min(60px, 10vw);
}
.slide_radio_button {
    width: var(--slide-radio-button-size);
    height: var(--slide-radio-button-size);
    display: grid;
    grid-template-columns: [column0] 100%;
    grid-template-rows: [row0] 100%;
    margin-top: auto;
    cursor: pointer;
}
.slide_radio_button * {
    grid-column: column0;
    grid-row: row0;
}
.slide_radio_button.active { cursor: default }
.slide_radio_button .active_image {
    width: 0;
    height: 0;
}
.slide_radio_button.active .active_image, .slide_radio_button img {
    width: 100%;
    height: 100%;
}

.intro_image { height: calc(var(--intro-slide-img-min) * 0.6) }
.intro_text_on_image {
    position: relative;
    display: flex;
    justify-content: center;
}

.intro_text, .intro_title {
    text-transform: uppercase;
    text-align: center;
    font-family: 'Avenir Next Cyr', sans-serif;
}
.intro_text {
    color: white;
    font-size: calc(var(--intro-font-size) * 0.65);
    width: 50%;
}
.intro_title {
    color: #feb94a;
    font-size: calc( 0.8 * var(--intro-font-size));
    margin-top: 5%;
}
.intro_text_wrapper, .intro_text_descriptions {
    display: flex;
    align-items: center;
    width: calc(var(--intro-video-bgr-width) * 0.8);
}
.intro_text_wrapper {
    flex-direction: column;
    justify-content: space-between;
}
.intro_text_descriptions {
    flex-direction: row;
    justify-content: space-around;
}
.intro_screens_description {
    font-family: 'JaldiFamily';
}
@media only screen and (max-width: 1200px) {
    :root {
        --intro-content-width: 94vw;
    }
}
@media only screen and (max-width: 1100px) {

}
@media only screen and (max-width: 720px) {
    #all_payout_wrapper { gap: 1vw }
}
/*@media only screen and (max-width: 600px) {*/
/*    :root {*/
/*        --intro-close-height: 16vh;*/
/*    }*/
/*    #intro_toggle_block {*/
/*        width: 90vw;*/
/*        justify-content: center;*/
/*    }*/
/*    #intro_image_play_btn { margin: auto }*/
/*    #intro_bottom_buttons_block { flex-flow: column }*/
/*    #intro_bottom_buttons_block > * { height: calc(var(--intro-close-height) / 2) }*/
/*    .intro_flex_item { width: auto }*/
/*}*/
@media only screen and (max-width: 500px) {
    :root {
        --intro-font-size: min(2.5cqh, 4cqw);
    }
    .text_on_image .text { font-size: 16px }
}
@media only screen and (max-width: 450px) {
    #all_payout_wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        row-gap: 10px;
    }
    .payout_index { min-width: 8vw; }
}
@media only screen and (max-aspect-ratio: 4 / 3) {
    :root{
        --intro-video-bgr-width: min(94vw, 800px);
        --intro-video-bgr-height: calc(0.44 * var(--intro-video-bgr-width));
        --intro-logo-width: min(200px, 15vw);
    }
    #intro_video_wrapper {
        margin-top: calc((100vh - var(--intro-video-bgr-height)) / 2);
    }
}
@media screen and (orientation: portrait) {
    :root {
        --intro-close-height: 14vh;
        --intro-video-bgr-height: calc((100vh - var(--intro-close-height)* 1.5) * 0.7);
        --intro-logo-height: calc((100vh - var(--intro-close-height)* 1.5) * 0.1);
        --intro-logo-width: calc(var(--intro-logo-height) * 1.8);
        --intro-video-bgr-width: calc(var(--intro-video-bgr-height) * 0.75);
    }
    .land.image img {
        width: 0;
        height: 0;
    }
    .intro_text_wrapper, .port.image, .port.image img {
        height: var(--intro-video-bgr-height);
        width: var(--intro-video-bgr-width);
    }
    .intro_slide_item {
        top: 10vh;
        align-items: start;
    }
    .intro_text_descriptions {
        flex-direction: column;
        height: 50%;
        justify-content: space-between;
    }
    .intro_title, .intro_text{
        width: 90vw;
    }
    .intro_title {
        margin-top: 1vh;
    }
    #intro_toggle_block {
        width: 90vw;
        justify-content: center;
    }
    #intro_image_play_btn { margin: auto }
    #intro_bottom_buttons_block {
        flex-flow: column;
        width: 100%;
    }
    #intro_toggle_left_gap{ display: none }
    #intro_bottom_buttons_block > * { height: calc(var(--intro-close-height) / 2) }
    .intro_flex_item { width: auto }
}


/* PORTRAIT: the framework centers BALANCE + BET with a 147px gap, authoring a
   ~782px row inside the 720px scaler — it overflows ~31px per side and gets
   cut on narrow windows. space-between + side padding keeps the row inside
   at any content width. Game css loads after the framework css, so this
   override wins the cascade. Landscape and desktop keep the original look. */
@media (orientation: portrait) {
    .ui_general_info {
        justify-content: space-between;
        padding: 0 14px;
        box-sizing: border-box;
        gap: 20px;
    }
}


/* INFO PAGE IMAGES — widths as a share of the Figma popup content width (702px):
   character 371px, symbol icons ~116px, paylines diagram 655px. */
/* Game logo under the title divider (as in MLK Voyage); native 337x260. */
.menu_info_image_logo {
    max-width: 337px;
    width: 48%;
}
.menu_info_image_character {
    max-width: 371px;
    width: 53%;
}
.menu_info_image_symbol {
    max-width: 116px;
    width: 17%;
}
/* Paylines grid (FRUIT-100, 2026-09-30): the Figma cell style (5x4 grey
   cells, lit = the line), drawn at 2x from the game's own 40 line
   definitions — 1296x1036, so 648px wide shows it pixel-sharp. */
.menu_info_image_paylines {
    max-width: 648px;
    width: 93%;
}


/* INFO PAGE SCROLL TAIL — the framework fades out the bottom 20% of
   .menu_info_wrapper with a mask, and supplies the compensating bottom
   spacer inside its buy-bonus common template (.menu_info_common_container,
   padding-bottom: 80px). This game does not use that template, so the last
   RULES lines (RTP / game version) ended their scroll INSIDE the faded band
   and read as cut off. Trailing padding lets them scroll clear of it:
   the wrapper is at most 795px tall, so the fade covers at most ~159px. */
.menu_info_wrapper {
    padding-bottom: 170px;
}


/* BUY BONUS BUTTON — defensive hide (igaming-fe-qa-audit, 2026-08-26).
   src/settings/other.ts sets GAME_SETTINGS.buyBonusEnabled = false, which is the
   flag UIButtonsTemplate's {{#if buyBonusEnabled}} is supposed to gate #ui_buy_
   bonus_button on. Confirmed against the live bundle.js (777 build) that this
   {{#if}} wrapper is simply absent there — the button renders unconditionally.
   That gate is one of the "Pending @stormfe patch proposals" in CLAUDE.md (lives
   only in vendor/, which CI ignores) and has not landed in the real @stormfe/
   common package this deploy builds against, so the GAME_SETTINGS flag alone
   cannot hide it today. Clicking the button also confirmed it's a dead end:
   BuyBonusModule's popup content never initializes (buyBonusUIPopupEnabled is
   also false), so it dispatches RADIO:ui => buy into an empty view with nothing
   to cancel back out of cleanly. Hide it here so this game doesn't depend on the
   upstream patch landing; remove once it has and is verified in a live build. */
#ui_buy_bonus_button {
    display: none !important;
}

/* DESKTOP BUTTON ROW CENTERING (2026-09-25, Rene: "win value / reels not
   centred with the UI like MLK Voyage"). .ui_buttons_container is a flex row
   with justify-content: space-evenly: [left group: buy bonus 113px]
   [spin group, margin 25px left / 51px right][right group: turbo 84px]. The
   framework balances it by design (113+25 ~ 51+84), which is why popeye's
   spin button sits dead centre. With the buy bonus display:none above, the
   left group collapses to 0px and the whole row re-centres around
   [spin group + turbo], pushing the spin button ~35 screen px LEFT of the
   reels, the balance/bet row and the win pill. On desktop only, keep the
   button's footprint but make it invisible and unclickable, so the row
   lays out exactly like popeye's. Not applied to touch/portrait: portrait
   moves the turbo button INTO that left group (UILayoutManager) and the
   touch-landscape column has its own arrangement — both approved as is. */
@media (orientation: landscape) and (hover: hover) and (pointer: fine) {
    #ui_buy_bonus_button {
        display: block !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    #ui_buy_bonus_button * {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
/* AUTOPLAY MENU — remove the options this game cannot use (2026-09-25, Rene).
   Sweet Takes is spin-only: no bonus game and no features, so the framework's
   TurboAutoplayTemplate (@stormfe/common, no config flag for either) shows two
   dead controls:
     - TURBO > "Bonus game" toggle   (#turbo_bonus_game_button + its title)
     - AUTOPLAY > "Stop on feature"  (#autoplay_stop_onFeature_win + its title)
   Each lives in its own group element, so the WHOLE group is removed with
   display:none (title and toggle together). Every container in that popup is a
   flex column/row with `gap`, so nothing leaves a hole: the remaining
   "Base game" group is centred by .turbo_buttons_container's
   justify-content: space-around, and the win/loss limit groups close up with
   the same 20px gap as every other section. :has() is supported by every
   current browser; the id rules underneath are a fallback that at least hides
   the toggles on an older engine. */
.turbo_autoplay_vertical_group:has(#turbo_bonus_game_button),
.turbo_autoplay_horizontal_group:has(#autoplay_stop_onFeature_win) {
    display: none !important;
}
#turbo_bonus_game_button,
#autoplay_stop_onFeature_win {
    display: none !important;
}

/* WIN FIELD a little lower on desktop (2026-09-25, Rene), so it clears the
   bigwin popup's number now that the number sits below the "BIG WIN" title.
   Framework rule: translate(-50%, 463%) of its own 60px height. +20px here is
   ~12 screen px at a 1360px-wide window. Desktop only — the touch/landscape
   layout positions #ui_win with its own rule. */
@media (hover: hover) and (pointer: fine) {
    #ui_win.ui_info_container {
        transform: translate(-50%, calc(463% + 20px));
    }
}
