/* MoraRepublic Rocket Week 2026 — Rocket Games
   Reference designs: desktop 1920x1080 and mobile 1080x1920. */
@font-face {
    font-family: 'Conthrax';
    src: url('../../fonts/Conthrax/Conthrax-SemiBold.otf') format('opentype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'MoraRepublic Sans';
    src: url('../../fonts/MoRarepublic-Sans/MoraRepublicSans-Light.otf') format('opentype');
    font-weight: 300; font-display: swap;
}
@font-face {
    font-family: 'MoraRepublic Sans';
    src: url('../../fonts/MoRarepublic-Sans/MoraRepublicSans-Regular.otf') format('opentype');
    font-weight: 400; font-display: swap;
}
@font-face {
    font-family: 'MoraRepublic Sans';
    src: url('../../fonts/MoRarepublic-Sans/MoraRepublicSans-Bold.otf') format('opentype');
    font-weight: 700; font-display: swap;
}
:root {
    /* 1 design unit = 10px on the supplied 1920×1080 desktop mockups. */
    --unit: min(0.520833vw, 0.925926vh);
    --white: #fff;
    --navy: #24117f;
    --blue: #1149e8;
    --blue-hover: #0b38c1;
    --body-font: 'MoraRepublic Sans', Arial, sans-serif;
    --display-font: 'Conthrax', 'Arial Black', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body.games-body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--white);
    background: var(--navy);
    font-family: var(--body-font);
    font-weight: 400;
    overflow-x: hidden;
}
.games-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--navy) url('images/bg-desktop.jpg') center / cover no-repeat;
}
img { max-width: 100%; height: auto; }
a, button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid #b9e9ff;
    outline-offset: 3px;
}
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap;
    clip-path: inset(50%);
}
.games-topbar {
    position: absolute;
    z-index: 2;
    top: calc(4.3 * var(--unit));
    left: calc(5.5 * var(--unit));
    right: calc(5.5 * var(--unit));
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}
.games-topbar > * { pointer-events: auto; }
.games-topbar-logo { display: block; flex: 0 0 auto; }
.games-topbar-logo img { display: block; width: calc(29 * var(--unit)); }
.games-topbar-event { width: calc(39 * var(--unit)); display: block; }
.games-topbar-date { display: none; }
.games-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    width: 100%;
}
.games-main > * { width: 100%; }
.games-footer {
    position: absolute;
    z-index: 2;
    right: calc(5.5 * var(--unit));
    bottom: calc(3.1 * var(--unit));
}
.games-footer img { display: block; width: calc(20.8 * var(--unit)); }

/* Shared left column, for Game Corner and Mahjong pages */
.games-split {
    display: grid;
    grid-template-columns: 56% 44%;
    min-height: 100vh;
    min-height: 100dvh;
}
.games-left {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(16 * var(--unit)) calc(3 * var(--unit)) calc(9.5 * var(--unit)) calc(3 * var(--unit));
}
.games-brand { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
.games-brand-logo { display: block; width: calc(75.7 * var(--unit)); }
.games-brand-theme { display: block; width: calc(78.9 * var(--unit)); margin-top: calc(3 * var(--unit)); }
.games-celebrate { margin-top: calc(5.2 * var(--unit)); text-align: center; width: 100%; }
.games-celebrate-img { width: calc(40.8 * var(--unit)); display: block; margin: 0 auto; }
.games-celebrate-tagline {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: calc(3.5 * var(--unit)) 0 0;
    font-size: calc(2.9 * var(--unit));
    font-weight: 300;
    line-height: 1.2;
}
.games-celebrate-tagline strong { font-weight: 700; }
.games-event-date {
    font-size: calc(2.5 * var(--unit));
    margin: calc(4.2 * var(--unit)) 0 0;
    line-height: 1.25;
    font-weight: 300;
}
.games-event-date strong { font-weight: 700; }

/* Game Corner landing */
.games-home-choices {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 calc(7 * var(--unit)) 0 0;
    transform: translateY(calc(-8 * var(--unit)));
}
.games-home-title, .games-section-title, .games-mlbb-title {
    margin: 0;
    font-family: var(--display-font);
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 1.15;
    letter-spacing: .005em;
}
.games-home-title { font-size: calc(4.3 * var(--unit)); white-space: nowrap; }
.games-choice-list {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: calc(6.6 * var(--unit));
    margin-top: calc(5.3 * var(--unit));
}
.games-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(5.4 * var(--unit));
    width: max-content;
    max-width: 100%;
    padding: 0 calc(2.25 * var(--unit));
    border-radius: 999px;
    background: linear-gradient(100deg, #a500ad, #6925bb);
    color: #fff;
    font-family: var(--display-font);
    font-size: calc(2.6 * var(--unit));
    line-height: 1.1;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s ease, filter .2s ease;
}
.games-pill:hover { color: #fff; filter: brightness(1.14); transform: translateY(-2px); }

/* Mahjong registration */
.games-mahjong-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
    padding: calc(5 * var(--unit)) calc(14 * var(--unit)) calc(6 * var(--unit)) calc(1 * var(--unit));
}
.games-section-title { font-size: calc(4 * var(--unit)); white-space: nowrap; }
.games-mahjong-form { margin-top: calc(4.7 * var(--unit)); width: calc(54 * var(--unit)); max-width: 100%; }
.games-stacked-field { margin-bottom: calc(4.7 * var(--unit)); }
.games-stacked-field label {
    display: block;
    font-size: calc(2.6 * var(--unit));
    line-height: 1.3;
    margin-bottom: calc(.8 * var(--unit));
}
.games-stacked-field input,
.games-inline-field input,
.games-player-row input {
    display: block;
    width: 100%;
    min-width: 0;
    height: calc(5.4 * var(--unit));
    padding: 0 calc(2.2 * var(--unit));
    background: #fff;
    border: 0;
    border-radius: calc(1.7 * var(--unit));
    color: #262038;
    font-size: calc(2.25 * var(--unit));
    line-height: 1.2;
}
.games-stacked-field input:focus,
.games-inline-field input:focus,
.games-player-row input:focus { outline: 3px solid #a5d1ff; outline-offset: 2px; }
.games-player-row input::placeholder { color: #8e8e8e; opacity: 1; }
.games-submit-wrap { display: flex; justify-content: center; margin-top: calc(8.5 * var(--unit)); }
.games-submit {
    width: calc(22.5 * var(--unit));
    min-height: calc(5.5 * var(--unit));
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: calc(2.6 * var(--unit));
    line-height: 1.2;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.games-submit:hover { background: var(--blue-hover); transform: translateY(-2px); }
.games-form-status {
    margin: 1.2rem auto 0;
    text-align: center;
    font-size: clamp(14px, 1.15vw, 20px);
    line-height: 1.4;
    max-width: 550px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 12px;
    background: rgba(23,0,65,.6);
}
.games-form-status[hidden] { display: none; }

/* MLBB tournament registration: wide horizontal form */
.games-mlbb-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(7.7 * var(--unit)) calc(3 * var(--unit)) calc(5 * var(--unit));
}
.games-mlbb-mobile-brand, .games-mlbb-mobile-celebrate { display: none; }
.games-mlbb-content { width: min(100%, calc(101 * var(--unit))); }
.games-mlbb-title { font-size: calc(5.5 * var(--unit)); margin-bottom: calc(2.7 * var(--unit)); }
.games-mlbb-form { width: 100%; }
.games-inline-field {
    display: grid;
    grid-template-columns: calc(21.5 * var(--unit)) minmax(0, 1fr);
    align-items: center;
    gap: 0;
    margin-bottom: calc(1.9 * var(--unit));
}
.games-inline-field label {
    display: block;
    font-size: calc(2.4 * var(--unit));
    line-height: 1.16;
}
.games-inline-field input { height: calc(4.7 * var(--unit)); }
.games-roster {
    display: grid;
    grid-template-columns: calc(21.5 * var(--unit)) minmax(0, 1fr);
    align-items: start;
    min-width: 0;
    margin: calc(2.5 * var(--unit)) 0 0;
    padding: 0;
    border: 0;
}
.games-roster-label {
    display: block;
    font-weight: 400;
    padding: calc(.9 * var(--unit)) 0 0;
    margin: 0;
    font-size: calc(2.4 * var(--unit));
    line-height: 1.18;
}
.games-roster-fields { min-width: 0; }
.games-player-row {
    display: grid;
    grid-template-columns: calc(10.6 * var(--unit)) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: calc(2.1 * var(--unit));
    margin-bottom: calc(1.6 * var(--unit));
}
.games-player-number { white-space: nowrap; font-size: calc(2.3 * var(--unit)); }
.games-player-row input { height: calc(4.8 * var(--unit)); font-size: calc(2.1 * var(--unit)); text-align: center; padding: 0 calc(.7 * var(--unit)); }
.games-roster--substitutes { margin-top: calc(.2 * var(--unit)); }
.games-mlbb-form .games-submit-wrap { margin-top: calc(2.6 * var(--unit)); }

/* MLBB terms & rulebook (shown before the registration form) */
.games-terms-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(7.7 * var(--unit)) calc(3 * var(--unit)) calc(5 * var(--unit));
}
.games-terms-content { width: min(100%, calc(112 * var(--unit))); }
.games-terms-title {
    margin: 0 0 calc(2.7 * var(--unit));
    font-family: var(--display-font);
    font-size: calc(5.5 * var(--unit));
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
}
.games-terms-box {
    max-height: calc(64 * var(--unit));
    overflow-y: auto;
    padding: calc(2.4 * var(--unit)) calc(3 * var(--unit));
    border: 1px solid rgba(255,255,255,.25);
    border-radius: calc(1.7 * var(--unit));
    background: rgba(23,0,65,.35);
    font-size: calc(1.75 * var(--unit));
    line-height: 1.45;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.55) transparent;
}
.games-terms-box:focus-visible { outline: 3px solid #b9e9ff; outline-offset: 3px; }
.games-terms-box h2 { margin: 0 0 1em; font-size: 1.3em; font-weight: 700; }
.games-terms-box h3 { margin: 1.6em 0 .5em; font-size: 1.05em; font-weight: 700; }
.games-terms-box h4 { margin: 1.1em 0 .4em; font-size: 1em; font-weight: 700; }
.games-terms-box p { margin: 0 0 .7em; }
.games-terms-box ol, .games-terms-box ul { margin: 0 0 .7em; padding-left: 1.6em; }
.games-terms-box li { margin-bottom: .35em; }
.games-terms-box li > ul { margin: .35em 0 0; list-style: circle; }
.games-terms-table { overflow-x: auto; margin: 0 0 1em; }
.games-terms-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .92em; }
.games-terms-table th, .games-terms-table td { padding: .5em .7em; border: 1px solid rgba(255,255,255,.25); text-align: left; vertical-align: top; }
.games-terms-table th { font-weight: 700; }
.games-terms-table td:first-child { white-space: nowrap; }
.games-terms-note { margin: 0 0 .7em; padding: .7em 1em; border-left: 3px solid #ff5a6e; background: rgba(255,255,255,.07); }
.games-terms-doc { font-size: .95em; }
.games-terms-actions { display: flex; flex-direction: column; align-items: flex-end; margin: calc(2.6 * var(--unit)) 0 0; }
.games-terms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: calc(22.5 * var(--unit));
    min-height: calc(5.5 * var(--unit));
    padding: 0 calc(3 * var(--unit));
    border: 0;
    border-radius: 999px;
    background: linear-gradient(100deg, #a500ad, #6925bb);
    color: #fff;
    font-family: var(--display-font);
    font-size: calc(2.6 * var(--unit));
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}
.games-terms-btn:hover { color: #fff; filter: brightness(1.14); transform: translateY(-2px); }
.games-terms-btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); transform: none; }
.games-terms-agree { display: flex; flex-direction: column; align-items: center; margin-top: calc(2.6 * var(--unit)); }
.games-terms-check {
    display: flex;
    align-items: flex-start;
    gap: calc(1.4 * var(--unit));
    margin: 0 0 calc(1.8 * var(--unit));
    font-size: calc(2.2 * var(--unit));
    font-style: italic;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
}
.games-terms-check input {
    flex: none;
    width: calc(2.6 * var(--unit));
    height: calc(2.6 * var(--unit));
    margin: calc(.15 * var(--unit)) 0 0;
    accent-color: #a500ad;
    cursor: pointer;
}
.games-terms-hint {
    margin: 0 0 calc(1.2 * var(--unit));
    font-size: calc(1.6 * var(--unit));
    font-style: italic;
    opacity: .8;
}

@media (max-width: 991.98px) {
    :root { --unit: 1vw; }
    body.games-body { display: flex; flex-direction: column; }
    .games-bg { background-image: url('images/bg-mobile.jpg'); }
    .games-topbar {
        position: relative;
        top: auto; left: auto; right: auto;
        width: 100%;
        padding: 3.0vw 2.7vw 0;
        flex: 0 0 auto;
    }
    .games-topbar-logo img { width: 21.5vw; }
    .games-topbar-date { display: block; width: 29vw; }
    .games-topbar-event { display: none; }
    .games-main { flex: 1 0 auto; display: block; min-height: 0; }
    .games-footer { position: relative; right: auto; bottom: auto; display: flex; justify-content: center; padding: 3vw 0 6vw; }
    .games-footer img { width: 21vw; min-width: 100px; }

    .games-split { display: flex; flex-direction: column; min-height: 0; }
    .games-left { display: contents; }
    .games-brand { order: 1; padding: 0 4vw; }
    .games-brand-logo { width: 76.5vw; }
    .games-brand-theme { width: 83vw; margin-top: 3vw; }
    .games-celebrate { order: 3; margin-top: 0; }
    .games-celebrate-img { width: 37vw; }
    .games-celebrate-tagline { margin-top: 3vw; font-size: clamp(14px, 3vw, 27px); }
    .games-event-date { display: none; }

    .games-home-layout {
        min-height: calc(100svh - 17vw);
        justify-content: space-between;
        gap: 6vw;
        padding: 12vw 0 1vw;
    }
    .games-home-choices { order: 2; padding: 0 4vw; transform: none; }
    .games-home-title { font-size: clamp(20px, 5.9vw, 64px); }
    .games-choice-list { gap: 9vw; margin-top: 10vw; }
    .games-pill { min-height: 6.6vw; padding: .5vw 2.5vw; font-size: clamp(14px, 4vw, 42px); }

    .games-mahjong-layout { min-height: 0; gap: 9vw; padding: 12vw 0 3vw; }
    .games-mahjong-content { order: 2; padding: 0 8vw; }
    .games-section-title { font-size: clamp(19px, 5.4vw, 58px); }
    .games-mahjong-form { margin-top: 8vw; width: min(70vw, 660px); }
    .games-stacked-field { margin-bottom: 4vw; }
    .games-stacked-field label { font-size: clamp(14px, 3vw, 26px); margin-bottom: .8vw; }
    .games-stacked-field input { height: clamp(38px, 5.5vw, 60px); border-radius: clamp(9px, 1.6vw, 16px); font-size: 16px; padding: 0 12px; }
    .games-submit { width: clamp(132px, 23vw, 250px); min-height: clamp(42px, 6.1vw, 64px); font-size: clamp(16px, 3vw, 28px); }
    .games-submit-wrap { margin-top: 7vw; }
    .games-mahjong-layout .games-celebrate { margin-top: 4vw; }

    .games-mlbb-layout { padding: 11vw 4.8vw 0; }
    .games-mlbb-mobile-brand, .games-mlbb-mobile-celebrate { display: block; width: 100%; }
    .games-mlbb-mobile-brand .games-brand-logo { width: 70vw; }
    .games-mlbb-mobile-brand .games-brand-theme { width: 79vw; margin-top: 2vw; }
    .games-mlbb-content { margin-top: 9vw; width: min(100%, 720px); }
    .games-mlbb-title { font-size: clamp(19px, 5.4vw, 58px); margin-bottom: 8vw; }
    .games-inline-field { grid-template-columns: 34% minmax(0, 1fr); margin-bottom: 2.8vw; }
    .games-inline-field label { font-size: clamp(14px, 2.9vw, 24px); }
    .games-inline-field input { height: clamp(38px, 5.4vw, 56px); border-radius: 11px; padding: 0 12px; font-size: 16px; }
    .games-roster { display: block; margin-top: 3vw; }
    .games-roster-label { padding: 0; font-size: clamp(14px, 3vw, 25px); margin-bottom: 4vw; }
    .games-roster-fields { width: 100%; }
    .games-player-row { grid-template-columns: 17% minmax(0, 1.15fr) minmax(0, .86fr); gap: 2.3vw; margin-bottom: 3.3vw; }
    .games-player-number { font-size: clamp(13px, 2.85vw, 24px); }
    .games-player-row input { height: clamp(36px, 5.5vw, 56px); border-radius: 10px; padding: 0 6px; font-size: clamp(12px, 2.65vw, 22px); }
    .games-roster--substitutes { margin-top: 4vw; }
    .games-mlbb-form .games-submit-wrap { margin-top: 6.5vw; }
    .games-mlbb-mobile-celebrate { margin-top: 9vw; }
    .games-mlbb-mobile-celebrate .games-celebrate { margin: 0; }
    .games-mlbb-mobile-celebrate .games-celebrate-img { width: 35vw; }
    .games-mlbb-mobile-celebrate .games-celebrate-tagline { margin-top: 3vw; }

    .games-terms-layout { padding: 11vw 4.8vw 4vw; }
    .games-terms-content { margin-top: 9vw; width: min(100%, 720px); }
    .games-terms-title { font-size: clamp(19px, 5.4vw, 58px); margin-bottom: 6vw; }
    .games-terms-box { max-height: 65vh; max-height: 65svh; overscroll-behavior: contain; padding: 16px; border-radius: 12px; font-size: clamp(13px, 3.2vw, 18px); }
    .games-terms-actions { align-items: center; margin-top: 7vw; }
    .games-terms-agree { margin-top: 7vw; }
    .games-terms-check { gap: 2.5vw; font-size: clamp(14px, 3.4vw, 24px); margin-bottom: 3vw; }
    .games-terms-check input { width: clamp(18px, 4.2vw, 28px); height: clamp(18px, 4.2vw, 28px); margin-top: .1em; }
    .games-terms-hint { font-size: clamp(12px, 2.8vw, 18px); margin-bottom: 3vw; text-align: center; }
    .games-terms-btn { min-width: clamp(132px, 30vw, 250px); min-height: clamp(42px, 6.1vw, 64px); padding: 0 24px; font-size: clamp(16px, 3.4vw, 28px); }
}

@media (max-width: 390px) {
    .games-mahjong-content { padding-left: 5.5vw; padding-right: 5.5vw; }
    .games-mahjong-form { width: 82vw; }
    .games-mlbb-layout { padding-left: 4vw; padding-right: 4vw; }
    .games-player-row { grid-template-columns: 15.5% minmax(0, 1.1fr) minmax(0, .85fr); gap: 2vw; }
    .games-player-row input { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
