:root {
    color-scheme: dark;
    --background: #0c0e14;
    --surface: #151922;
    --input: #10131b;
    --line: #2b3341;
    --text: #f2f5fa;
    --muted: #a9b4c6;
    --accent: #91e6d4;
    --accent-hover: #b1f4e6;
    --masthead-height: 72px;
    --gutter: clamp(1rem, 4vw, 3.25rem);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    background: var(--background);
    color: var(--text);
}

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
}

h1, h2, h3, p, dl, dd, ul {
    margin: 0;
}

h1, h2, h3 {
    line-height: 1.08;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

button, input {
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.masthead {
    position: relative;
    z-index: 1;
    background: #10131a;
    border-bottom: 1px solid var(--line);
}

.masthead-inner,
.page-width {
    width: min(100%, 1280px);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.masthead-inner {
    min-height: calc(var(--masthead-height) - 1px);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .65rem;
    font-size: 1.15rem;
    font-weight: 730;
    letter-spacing: -.045em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    border-radius: 9px;
    border: 1px solid #3e5e5d;
    background: linear-gradient(150deg, #203d3c, #19242f 78%);
}

.brand-mark::before {
    content: "";
    width: 15px;
    height: 11px;
    border: 1.5px solid var(--accent);
    border-radius: 3px;
    box-shadow: 0 -3px 0 -1.5px #203d3c, 0 -4.5px 0 -1.5px var(--accent);
    transform: translateY(2px);
}

.brand-mark::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(4px, 2px);
}

.masthead-inner > form,
.masthead-action,
.masthead .demo-label {
    margin-inline-start: auto;
}

.operator-name {
    min-width: 0;
    padding-inline-start: 1.25rem;
    border-inline-start: 1px solid var(--line);
    color: var(--muted);
    font-size: .875rem;
    font-weight: 610;
    overflow-wrap: anywhere;
}

.demo-label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: .45rem;
    min-height: 28px;
    padding: .25rem .65rem;
    border: 1px solid #314245;
    border-radius: 100px;
    background: #172326;
    color: #b7dcd5;
    font-size: .75rem;
    font-weight: 610;
}

.demo-label::before,
.wallet-status::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.eyebrow {
    color: var(--accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: .625rem 1rem;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 690;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    background: var(--accent);
    color: #0e2625;
}

.button-primary:hover {
    background: var(--accent-hover);
}

.button-secondary {
    border-color: #607087;
    background: #1b222d;
    color: var(--text);
}

.button-secondary:hover {
    border-color: #71869b;
    background: #263341;
}

.arrow {
    font-size: 1.125rem;
    line-height: 1;
}

.alert {
    border: 1px solid #794751;
    border-radius: 9px;
    padding: .8rem .9rem;
    background: #312126;
    color: #ffc4cb;
    font-size: .875rem;
}

.portal-login {
    background:
        radial-gradient(ellipse at 12% 8%, #172b30 0%, transparent 46%),
        radial-gradient(ellipse at 105% 52%, #1d2038 0%, transparent 53%),
        var(--background);
}

.partner-layout {
    display: grid;
    grid-template:
        "intro signin" auto
        "capabilities signin" auto
        / minmax(0, 1fr) minmax(290px, .64fr);
    align-content: center;
    align-items: start;
    column-gap: clamp(1.75rem, 6vw, 6rem);
    row-gap: 2rem;
    min-height: calc(100svh - var(--masthead-height));
    padding-block: clamp(3rem, 7vh, 5.5rem);
}

.partner-intro {
    grid-area: intro;
}

.partner-intro h1 {
    margin-block: .85rem 1.15rem;
    font-size: clamp(2.3rem, 4.8vw, 4.5rem);
    font-weight: 690;
    line-height: 1.01;
    letter-spacing: -.052em;
}

.partner-intro h1 span {
    color: #b5e1da;
}

.partner-lede {
    max-width: 51ch;
    color: #bcc6d5;
    font-size: clamp(1rem, 1.4vw, 1.1875rem);
}

.capabilities {
    grid-area: capabilities;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.65rem;
}

.capabilities div {
    border-top: 1px solid #303c48;
    padding-block: .95rem 1rem;
}

.capabilities dt {
    margin-block-end: .22rem;
    color: #e4ebf5;
    font-size: .9rem;
    font-weight: 680;
}

.capabilities dd {
    max-width: 36ch;
    color: var(--muted);
    font-size: .875rem;
}

.signin-panel {
    grid-area: signin;
    align-self: center;
    border: 1px solid #374453;
    border-radius: 20px;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    background: linear-gradient(145deg, #1c232e, #151922 65%);
    box-shadow: 0 24px 70px #07091070, inset 0 1px 0 #ffffff0a;
}

.signin-panel h2 {
    margin-block: .5rem .55rem;
    font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.signin-intro {
    color: var(--muted);
    font-size: .9375rem;
}

.signin-panel .alert {
    margin-block-start: 1rem;
}

.signin-form {
    display: grid;
    gap: 1rem;
    margin-block-start: 1.5rem;
}

.form-field {
    display: grid;
    gap: .4rem;
}

.form-field label {
    color: #dce3ef;
    font-size: .875rem;
    font-weight: 630;
}

.form-field input {
    width: 100%;
    min-height: 46px;
    padding: .625rem .75rem;
    border: 1px solid #617388;
    border-radius: 8px;
    background: var(--input);
    color: var(--text);
}

.form-field input:hover {
    border-color: #7a8ea4;
}

.signin-form .button {
    margin-block-start: .25rem;
}

.signin-note {
    margin-block-start: 1.4rem;
    padding-block-start: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .8125rem;
}

.signin-note strong {
    display: block;
    color: #dce3ef;
    font-weight: 650;
}

.lobby {
    padding-block: clamp(1.65rem, 5vw, 3.75rem);
}

.lobby-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, .65fr);
    align-items: center;
    gap: clamp(1.4rem, 4vw, 3.5rem);
    padding: clamp(1.25rem, 3.5vw, 2.75rem);
    border: 1px solid #2d3c49;
    border-radius: 21px;
    background:
        radial-gradient(ellipse at 0% 0%, #1d3b3d 0%, transparent 73%),
        linear-gradient(115deg, #172128, #20243a);
}

.lobby-intro h1 {
    margin-block: .6rem 1.1rem;
    font-size: clamp(2rem, 4.4vw, 4.25rem);
    font-weight: 690;
    letter-spacing: -.045em;
}

.wallet-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    align-items: center;
    gap: .55rem .75rem;
    padding: clamp(1rem, 2.4vw, 1.65rem);
    border: 1px solid #3b4960;
    border-radius: 14px;
    background: #141a25;
    box-shadow: 0 14px 30px #0a111a55;
}

.wallet-panel h2 {
    color: #cfdaea;
    font-size: .9375rem;
    font-weight: 650;
    letter-spacing: 0;
}

.wallet-status {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .2rem .55rem;
    border: 1px solid #345650;
    border-radius: 100px;
    background: #193231;
    color: #a6e5d6;
    font-size: .75rem;
    font-weight: 650;
}

.wallet-status-frozen {
    border-color: #66563d;
    background: #362d22;
    color: #f0d4a4;
}

.wallet-value,
.wallet-unavailable {
    grid-column: 1 / -1;
    font-variant-numeric: tabular-nums;
    font-weight: 720;
    line-height: 1.12;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.wallet-value {
    font-size: clamp(1.9rem, 3.5vw, 3.15rem);
}

.wallet-value span {
    color: #b5c4d7;
    font-size: .49em;
    font-weight: 660;
    letter-spacing: .035em;
}

.wallet-unavailable {
    font-size: clamp(1.15rem, 2vw, 1.6rem);
}

.wallet-note {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: .8125rem;
}

.lobby-alert {
    margin-block-start: 1.5rem;
}

.lobby-games {
    margin-block-start: clamp(2rem, 4vw, 3.25rem);
}

.lobby-games > h2 {
    margin-block-end: 1rem;
    font-size: clamp(1.4rem, 2vw, 1.85rem);
}

.game-list {
    display: grid;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.game-card {
    display: flex;
    min-height: 232px;
    align-items: end;
    border: 1px solid #394456;
    border-radius: 17px;
    padding: clamp(1.25rem, 3.5vw, 2.5rem);
    background: linear-gradient(112deg, #141b26, #262d45);
}

.game-card-marble {
    min-height: clamp(270px, 32vw, 370px);
    background:
        linear-gradient(90deg, #101620 19%, #101620f4 29%, #14192985 55%, #151a2b1a 100%),
        linear-gradient(0deg, #101620ba, #0e142231 60%),
        url("marble-run-6.webp") right 59% / 82% auto no-repeat,
        #101620;
}

.game-card-content {
    max-width: 100%;
}

.game-card h3 {
    margin-block: .4rem 1.1rem;
    font-size: clamp(1.8rem, 4.15vw, 3.55rem);
    font-weight: 720;
    letter-spacing: -.05em;
}

.game-card .button {
    min-width: 106px;
    justify-content: space-between;
}

.game-access,
.empty-catalogue {
    color: #c1ccda;
    font-size: .9375rem;
}

.empty-catalogue {
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.portal-game {
    background: #0b0e14;
}

.portal-game .masthead-inner,
.play-shell {
    width: min(100%, 1680px);
    margin-inline: auto;
    padding-inline: clamp(.75rem, 3vw, 2.5rem);
}

.play-shell {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    min-height: calc(100svh - var(--masthead-height));
    padding-block: 1.1rem 1.25rem;
}

.play-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .65rem 1.25rem;
}

.play-heading h1 {
    margin-block-start: .25rem;
    font-size: clamp(1.5rem, 3vw, 2.6rem);
}

.play-frame {
    position: relative;
    flex: 1;
    min-height: 25rem;
    overflow: hidden;
    border: 1px solid #354051;
    border-radius: 12px;
    background: #10141e;
}

.play-frame iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 860px) {
    .partner-layout {
        column-gap: 1.5rem;
    }

    .capabilities {
        column-gap: 1rem;
    }
}

@media (max-width: 700px) {
    :root {
        --masthead-height: 62px;
    }

    .masthead-inner {
        gap: .7rem;
    }

    .operator-name {
        padding-inline-start: .7rem;
        font-size: .8125rem;
    }

    .partner-layout {
        grid-template:
            "intro" auto
            "signin" auto
            "capabilities" auto
            / minmax(0, 1fr);
        align-content: start;
        gap: 1.5rem;
        padding-block: 2rem;
    }

    .partner-intro h1 {
        margin-block: .6rem .8rem;
    }

    .lobby-overview {
        grid-template-columns: minmax(0, 1fr);
    }

    .game-card-marble {
        background:
            linear-gradient(0deg, #101620 0%, #101620df 26%, #10162033 75%),
            url("marble-run-6.webp") center top / cover no-repeat,
            #101620;
    }
}

@media (max-width: 360px) {
    .brand {
        gap: .4rem;
        font-size: 1rem;
    }

    .brand-mark {
        width: 28px;
        height: 28px;
    }

    .masthead-inner .button {
        padding-inline: .65rem;
    }

    .capabilities {
        grid-template-columns: minmax(0, 1fr);
    }
}
