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

:root {
    --blue-900: #003087;
    --blue-700: #0057b8;
    --blue-500: #1a73e8;
    --blue-100: #e8f0fe;
    --blue-50: #f4f8ff;
    --yellow-500: #ffc72c;
    --yellow-400: #ffd54f;
    --yellow-100: #fff8e1;
    --white: #ffffff;
    --gray-900: #1e293b;
    --gray-600: #64748b;
    --gray-200: #e2e8f0;
    --shadow-soft: 0 8px 30px rgba(0, 48, 135, 0.08);
    --shadow-card: 0 4px 18px rgba(0, 48, 135, 0.06);
    --landing-max: 480px;
    --page-pad-x: clamp(1rem, 4vw, 1.25rem);
    --page-pad-top: clamp(0.75rem, 3vw, 1.5rem);
    --page-pad-bottom: clamp(1rem, 4vw, 1.5rem);
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    margin: 0;
    min-height: 100%;
    min-height: 100dvh;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.5;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.hidden {
    display: none !important;
}

html.has-agent-session .landing {
    display: none !important;
}

html.has-agent-session #agent-home.hidden {
    display: flex !important;
}

.app-shell {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    min-height: 100svh;
    overflow-x: hidden;
    background: var(--white);
}

.splash-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 100% 80%, rgba(0, 87, 184, 0.08), transparent 35%),
        radial-gradient(circle at 0% 60%, rgba(0, 48, 135, 0.05), transparent 30%),
        linear-gradient(180deg, var(--blue-50) 0%, var(--white) 45%, var(--white) 100%);
}

.splash-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.7;
}

.splash-glow--blue {
    width: min(200px, 50vw);
    height: min(200px, 50vw);
    bottom: 12%;
    right: max(-50px, -10vw);
    background: rgba(0, 87, 184, 0.15);
}

.landing {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--landing-max);
    min-height: 100dvh;
    min-height: 100svh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding:
        calc(var(--page-pad-top) + env(safe-area-inset-top, 0px))
        calc(var(--page-pad-x) + env(safe-area-inset-right, 0px))
        calc(var(--page-pad-bottom) + env(safe-area-inset-bottom, 0px))
        calc(var(--page-pad-x) + env(safe-area-inset-left, 0px));
}

.landing__promo {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 2vh, 1rem) 0;
    overflow: hidden;
}

.landing__promo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(100%, 360px);
    gap: clamp(0.35rem, 1.5vh, 0.75rem);
}

.landing__logo {
    width: clamp(110px, 35vw, 150px);
    height: clamp(110px, 35vw, 150px);
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 48, 135, 0.12));
}

.landing__promo-img {
    width: 100%;
    max-width: 100%;
    max-height: min(78dvh, 68svh, 780px);
    object-fit: contain;
    mix-blend-mode: lighten;
}

.landing__actions {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: clamp(1rem, 3vh, 2rem);
    display: grid;
    gap: 0.75rem;
    width: 100%;
}

.btn {
    width: 100%;
    min-height: clamp(48px, 12vw, 52px);
    border-radius: 14px;
    font-size: clamp(0.95rem, 3.5vw, 1rem);
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    color: var(--blue-900);
    background: linear-gradient(180deg, var(--yellow-400) 0%, var(--yellow-500) 100%);
    box-shadow: 0 8px 22px rgba(255, 199, 44, 0.35);
    border: 1px solid rgba(255, 199, 44, 0.6);
}

.btn--primary:hover {
    box-shadow: 0 10px 26px rgba(255, 199, 44, 0.45);
}

.btn--ghost {
    color: var(--blue-700);
    background: var(--white);
    border: 2px solid var(--blue-700);
}

.landing__note {
    margin: 0.35rem 0 0;
    text-align: center;
    font-size: clamp(0.7rem, 2.8vw, 0.75rem);
    color: var(--gray-600);
}

/* Small phones (e.g. iPhone SE, narrow Android) */
@media (max-width: 374px) {
    :root {
        --page-pad-x: 0.875rem;
    }

    .landing__promo-img {
        max-width: 100%;
        max-height: min(48dvh, 48svh, 400px);
    }
}

/* Short viewports — keep buttons visible */
@media (max-height: 700px) {
    .landing__promo-img {
        max-height: min(44dvh, 44svh, 380px);
    }

    .landing__actions {
        padding-top: 0.75rem;
    }
}

@media (max-height: 580px) {
    .landing__logo {
        width: 88px;
        height: 88px;
    }

    .landing__promo-img {
        max-height: min(36dvh, 36svh, 280px);
    }

    .landing__actions {
        padding-top: 0.5rem;
        gap: 0.5rem;
    }

    .btn {
        min-height: 44px;
    }
}

/* Landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
    .landing {
        min-height: auto;
        padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    }

    .landing__logo {
        width: 72px;
        height: 72px;
    }

    .landing__promo-img {
        max-height: min(32dvh, 220px);
    }

    .landing__actions {
        padding-top: 0.5rem;
    }
}

/* Tablets and larger */
@media (min-width: 768px) {
    :root {
        --page-pad-top: 2.5rem;
    }

    .landing__logo {
        width: 160px;
        height: 160px;
    }

    .landing__promo-img {
        max-width: 400px;
        max-height: 520px;
    }
}

@media (display-mode: standalone) {
    .landing {
        padding-top: calc(var(--page-pad-top) + env(safe-area-inset-top, 0px));
    }
}

/* Bottom sheet */
.sheet-root {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    visibility: hidden;
}

.sheet-root.is-open {
    pointer-events: auto;
    visibility: visible;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 24, 64, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sheet-root.is-open .sheet-backdrop {
    opacity: 1;
}

.sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    width: 100%;
    max-width: var(--landing-max);
    max-height: min(88dvh, 88svh);
    background: var(--white);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 48, 135, 0.15);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sheet-root.is-open .sheet {
    transform: translateY(0);
}

.sheet-handle {
    flex-shrink: 0;
    width: 40px;
    height: 4px;
    margin: 10px auto 6px;
    border-radius: 999px;
    background: var(--gray-200);
}

.sheet-step {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 clamp(1.25rem, 4vw, 1.5rem) clamp(1rem, 3vw, 1.25rem);
    overflow: hidden;
}

.sheet-title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.35rem, 5vw, 1.5rem);
    font-weight: 800;
    color: var(--blue-900);
    letter-spacing: -0.02em;
}

.sheet-subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.sheet-note {
    margin: -0.75rem 0 1rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    color: var(--blue-700);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 10px;
}

.sheet-text {
    margin: 0;
    font-size: clamp(0.92rem, 3.6vw, 1rem);
    color: var(--gray-600);
    line-height: 1.6;
}

.slide-badge {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-900);
    background: var(--yellow-100);
    border-radius: 999px;
}

.carousel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.carousel-viewport {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 0.25rem 0 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.benefit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: clamp(0.92rem, 3.5vw, 0.98rem);
    color: var(--gray-900);
    line-height: 1.45;
}

.benefit-check {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-100);
    color: var(--blue-700);
    font-size: 0.75rem;
    font-weight: 700;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 0 0.25rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    background: var(--gray-200);
    transition: width 0.25s ease, background 0.25s ease;
}

.carousel-dot.is-active {
    width: 22px;
    border-radius: 999px;
    background: var(--blue-700);
}

.sheet-footer {
    flex-shrink: 0;
    padding-top: 0.75rem;
}

.sheet-form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sheet-form-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 0.85rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.form-error {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: #b42318;
    text-align: center;
}

.form-error.is-success {
    color: var(--blue-700);
}

.sheet-back {
    align-self: flex-start;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blue-700);
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue-900);
}

.field-input {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font: inherit;
    font-size: 1rem;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

body.sheet-open {
    overflow: hidden;
}

.agent-home {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--landing-max);
    min-height: 100dvh;
    min-height: 100svh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding:
        calc(var(--page-pad-top) + env(safe-area-inset-top, 0px))
        calc(var(--page-pad-x) + env(safe-area-inset-right, 0px))
        0
        calc(var(--page-pad-x) + env(safe-area-inset-left, 0px));
}

.agent-home__content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.agent-tab {
    display: none;
}

.agent-tab--active {
    display: block;
}

.agent-tab__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 55dvh;
    padding: 2rem 1rem;
    text-align: center;
}

.agent-tab__placeholder--settings {
    min-height: 50dvh;
}

.settings-panel {
    padding: 1.25rem 1rem 2rem;
}

.settings-panel__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.25rem;
}

.settings-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.settings-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.settings-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: var(--blue-50, #eef4ff);
    color: var(--blue-700);
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.settings-card__title {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--blue-900);
}

.settings-card__text {
    margin: 0;
    font-size: 0.78rem;
    color: var(--gray-600);
}

.settings-bet-limit__value {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--blue-900);
}

.settings-bet-limit__meta {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.settings-bet-limit__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-bet-limit__save {
    width: 100%;
}

.agent-tab__icon {
    font-size: 2.5rem;
    color: var(--blue-700);
    margin-bottom: 0.75rem;
}

.agent-tab__title {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--blue-900);
}

.agent-tab__text {
    margin: 0;
    max-width: 28ch;
    font-size: 0.92rem;
    color: var(--gray-600);
}

.btn--settings-logout {
    margin-top: 1.5rem;
    width: auto;
    min-width: 160px;
    padding: 0 1.25rem;
}

.agent-home__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.agent-home--bet-entry .agent-home__header {
    display: none;
}

.agent-home--bet-entry .bet-entry {
    min-height: calc(100dvh - 8.5rem);
    padding-top: 0;
}

.agent-home__header .landing__logo {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.agent-home__profile {
    min-width: 0;
    text-align: right;
}

.agent-home__profile-name {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--blue-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-home__profile-id-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    max-width: 100%;
}

.agent-home__profile-id {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-home__copy {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    color: var(--blue-700);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    transition: background 0.15s ease, color 0.15s ease;
}

.agent-home__copy svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.agent-home__copy:active {
    background: var(--blue-100);
}

.agent-home__copy.is-copied {
    color: var(--blue-900);
    background: var(--yellow-100);
    border-color: rgba(255, 199, 44, 0.45);
}

.agent-home__body {
    margin-top: 0;
}

.agent-home__title {
    margin: 0 0 0.85rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue-900);
}

.agent-home__toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.agent-home__date-search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    min-height: 44px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
}

.agent-home__date-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--blue-700);
}

.agent-home__date-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.agent-home__date-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--gray-900);
    padding: 0.65rem 0;
}

.agent-home__date-input:focus {
    outline: none;
}

.agent-home__print {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--blue-700);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    box-shadow: var(--shadow-card);
    transition: background 0.15s ease;
}

.agent-home__print svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.agent-home__print:active {
    background: var(--blue-100);
}

.agent-home__summary {
    margin-top: 1rem;
}

.grand-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
    background: var(--white);
}

.grand-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    line-height: 1.25;
}

.grand-table th,
.grand-table td {
    padding: 0.42rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.grand-table__title-row th {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--blue-100);
    background: var(--blue-50);
}

.grand-table__title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.grand-table__title-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--blue-900);
    white-space: nowrap;
}

.grand-table__title-leader {
    flex: 1;
    min-width: 0.75rem;
    border-bottom: 1px dotted var(--blue-200);
}

.grand-table__title-date {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--blue-700);
    white-space: nowrap;
}

.grand-table tbody tr:last-child td {
    border-bottom: none;
}

.grand-table__kabig-row td {
    border-top: 1px solid var(--blue-100);
    background: var(--yellow-100);
    font-weight: 800;
    color: var(--blue-900);
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
}

.grand-table__amount {
    text-align: right;
    white-space: nowrap;
}

.draw-results {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
}

.home-results-preview {
    margin-top: 0.85rem;
}

.home-results-preview .home-results-preview__title {
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
}

.home-results-preview__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.home-results-preview__item {
    display: block;
    width: 100%;
    padding: 0.42rem 0.65rem;
    border-radius: 10px;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.home-results-preview__item:active {
    transform: scale(0.99);
}

.home-results-preview .draw-table__header {
    gap: 0.45rem;
}

.home-results-preview .draw-table__time {
    font-size: 0.76rem;
}

.home-results-preview .draw-result__balls {
    gap: 0.28rem;
}

.home-results-preview .lotto-ball {
    width: 1.55rem;
    height: 1.55rem;
    border-width: 1.5px;
    box-shadow:
        inset -1px -2px 4px rgba(0, 0, 0, 0.24),
        inset 1px 1px 1px rgba(255, 255, 255, 0.35),
        0 1px 3px rgba(15, 55, 120, 0.18);
}

.home-results-preview .lotto-ball__num {
    font-size: 0.78rem;
}

.home-results-preview .draw-result__tba {
    flex-direction: row;
    align-items: center;
    gap: 0;
}

.home-results-preview .draw-result__tba-badge {
    padding: 0.1rem 0.32rem;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
}

.home-results-preview .draw-result__tba-text {
    display: none;
}

.home-games {
    margin-top: 1rem;
}

.home-games__title,
.home-results-preview__title {
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-900);
}

.home-games__list {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
}

.home-games__list::-webkit-scrollbar {
    display: none;
}

.home-games__item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 5.25rem;
    padding: 0.5rem 0.4rem 0.55rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    box-shadow: var(--shadow-card);
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.home-games__item:active {
    transform: scale(0.97);
}

.home-games__item--active {
    border-color: var(--blue-200);
    background: var(--blue-50);
}

.home-games__icon {
    width: 3.25rem;
    height: 3.25rem;
    object-fit: contain;
    border-radius: 10px;
}

.home-games__name {
    font-size: 0.66rem;
    font-weight: 700;
    text-align: center;
    color: var(--blue-900);
    line-height: 1.2;
}

.home-games__status {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-align: center;
}

.results-tab__body {
    padding-top: 0.15rem;
}

.play-tab__body {
    padding-top: 0.15rem;
}

.play-tab__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blue-900);
}

.results-tab__title {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blue-900);
}

.results-tab__body .agent-home__toolbar {
    margin-bottom: 0.55rem;
}

.play-tab__body .home-games {
    margin-top: 0.85rem;
}

.play-tab__hint {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    color: var(--gray-600);
}

/* ── Bet entry (3D Lotto) ── */

.bet-entry {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 11.5rem);
    padding-top: 0.15rem;
}

.bet-entry__header {
    margin-bottom: 1rem;
}

.bet-entry__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blue-900);
}

.bet-entry__fields {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bet-entry__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bet-entry__label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-900);
}

.bet-entry__time-select {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}

.bet-entry__time-btn {
    padding: 0.55rem 0.35rem;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-900);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.bet-entry__time-btn--active {
    border-color: var(--blue-700);
    background: var(--blue-50);
    color: var(--blue-900);
}

.bet-entry__combo {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--blue-100);
    background: var(--blue-50);
}

.bet-entry__combo-digit {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 2px solid var(--blue-700);
    background: linear-gradient(180deg, var(--yellow-400) 0%, var(--yellow-500) 100%);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--blue-900);
    box-shadow:
        inset -1px -2px 4px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 48, 135, 0.12);
}

.bet-entry__combo-digit.is-empty {
    background: var(--white);
    color: var(--gray-600);
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: none;
}

.bet-entry__amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.bet-entry__limit {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: var(--gray-600);
}

.bet-entry__limit.is-over {
    color: #b42318;
    font-weight: 700;
}

.bet-entry__amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue-900);
    letter-spacing: 0.02em;
}

.bet-entry__bet-type {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.bet-entry__bet-type-btn {
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-600);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.bet-entry__bet-type-btn--active {
    border-color: var(--blue-700);
    background: var(--blue-700);
    color: var(--white);
}

.bet-entry__bottom {
    margin-top: auto;
    padding-top: 1.25rem;
}

.bet-entry__panel-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0.65rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.bet-entry__panel-tab {
    padding: 0.6rem 0.5rem;
    background: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--gray-600);
    transition: background 0.15s ease, color 0.15s ease;
}

.bet-entry__panel-tab--active {
    background: var(--blue-900);
    color: var(--white);
}

.bet-entry__panel {
    display: none;
}

.bet-entry__panel--active {
    display: block;
}

.bet-keypad__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.bet-keypad__key {
    display: grid;
    place-items: center;
    min-height: 3rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blue-900);
    box-shadow: var(--shadow-card);
    transition: transform 0.1s ease, background 0.1s ease;
}

.bet-keypad__key:active {
    transform: scale(0.96);
    background: var(--blue-50);
}

.bet-keypad__key svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bet-keypad__key--wide {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.bet-keypad__add {
    min-height: 3rem;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.bet-slip {
    min-height: 14rem;
    display: flex;
    flex-direction: column;
}

.bet-slip__empty {
    margin: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.bet-slip__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
    max-height: 16rem;
    overflow-y: auto;
}

.bet-slip__item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--blue-100);
    background: var(--blue-50);
}

.bet-slip__item-combo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blue-900);
    letter-spacing: 0.12em;
}

.bet-slip__item-amount {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--blue-900);
    text-align: right;
}

.bet-slip__item-meta {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--gray-600);
}

.bet-slip__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--blue-100);
}

.bet-slip__total-label {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-900);
}

.bet-slip__total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--blue-900);
}

.bet-slip__message {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    text-align: center;
    color: #b42318;
}

.bet-slip__message.is-success {
    color: #027a48;
    font-weight: 700;
}

.bet-slip__submit {
    width: 100%;
    min-height: 3rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.bet-slip__print {
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.ticket-receipt-print {
    display: none;
}

@media print {
    body.has-print-receipt * {
        visibility: hidden;
    }

    body.has-print-receipt #ticket-receipt-print,
    body.has-print-receipt #ticket-receipt-print * {
        visibility: visible;
    }

    body.has-print-receipt #ticket-receipt-print {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        padding: 4mm;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 11px;
        line-height: 1.35;
        color: #111;
    }

    body.has-print-receipt .app-shell,
    body.has-print-receipt .bottom-nav {
        display: none !important;
    }
}

.receipt__header {
    text-align: center;
    margin-bottom: 8px;
}

.receipt__logo {
    max-height: 36px;
    width: auto;
}

.receipt__meta {
    font-size: 10px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.receipt__meta-row {
    margin: 0 0 2px;
}

.receipt__ticket-no {
    text-align: center;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.08em;
    margin: 8px 0 2px;
    word-break: break-all;
}

.receipt__ticket-label {
    text-align: center;
    font-size: 9px;
    margin-bottom: 8px;
}

.receipt__sig-box {
    width: 90%;
    height: 24px;
    border: 1px solid #000;
    margin: 0 auto 4px;
}

.receipt__sig-label {
    text-align: center;
    font-size: 9px;
    margin-bottom: 8px;
}

.receipt__bet {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #ccc;
}

.receipt__bet:last-child {
    border-bottom: none;
}

.receipt__bet-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
}

.receipt__bet-numbers {
    font-weight: 800;
    letter-spacing: 0.15em;
}

.receipt__bet-price {
    text-align: right;
    font-size: 10px;
    margin-top: 2px;
}

.receipt__total {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 11px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #000;
}

.receipt__footer {
    text-align: center;
    font-size: 9px;
    color: #666;
    margin-top: 10px;
}

.results-tab__body .draw-results,
#results-draw-results {
    gap: 0.55rem;
    margin-top: 0;
}

.results-tab__body .draw-table-wrap {
    border-radius: 12px;
}

.results-tab__body .draw-table {
    font-size: 0.8rem;
    line-height: 1.25;
}

.results-tab__body .draw-table th,
.results-tab__body .draw-table td {
    padding: 0.42rem 0.75rem;
}

.results-tab__body .draw-table__title-row th {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--blue-100);
}

.results-tab__body .draw-table__header {
    gap: 0.5rem;
}

.results-tab__body .draw-table__time {
    font-size: 0.78rem;
}

.results-tab__body .draw-result__balls {
    gap: 0.3rem;
}

.results-tab__body .lotto-ball {
    width: 1.75rem;
    height: 1.75rem;
    border-width: 1.5px;
    box-shadow:
        inset -1px -2px 4px rgba(0, 0, 0, 0.24),
        inset 1px 1px 1px rgba(255, 255, 255, 0.35),
        0 1px 3px rgba(15, 55, 120, 0.18);
}

.results-tab__body .lotto-ball__num {
    font-size: 0.82rem;
}

.results-tab__body .draw-result__tba {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
}

.results-tab__body .draw-result__tba-badge {
    padding: 0.1rem 0.32rem;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
}

.results-tab__body .draw-result__tba-text {
    font-size: 0.52rem;
    letter-spacing: 0.04em;
}

.results-tab__body .draw-table__kabig-row td {
    border-top: 1px solid var(--blue-100);
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.draw-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
    background: var(--white);
}

.draw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.draw-table th,
.draw-table td {
    padding: 0.65rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.draw-table__title-row th {
    padding: 0.85rem 0.9rem;
    border-bottom: 2px solid var(--blue-100);
    background: var(--white);
}

.draw-table__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.draw-table__time {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--blue-900);
    white-space: nowrap;
}

.draw-result {
    flex-shrink: 0;
}

.draw-result__tba {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
    margin: 0;
    text-align: right;
}

.draw-result__tba-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--gray-600);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.draw-result__tba-text {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    text-transform: uppercase;
}

.draw-result__balls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lotto-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 24%, #ffffff 0%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 50% 115%, #0a2f6b 0%, #1a56b0 55%, #0d3d8a 100%);
    box-shadow:
        inset -2px -4px 8px rgba(0, 0, 0, 0.28),
        inset 1px 1px 2px rgba(255, 255, 255, 0.35),
        0 2px 5px rgba(15, 55, 120, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.lotto-ball__num {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.draw-result--announced .lotto-ball:nth-child(1) {
    background:
        radial-gradient(circle at 30% 24%, #ffffff 0%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 50% 115%, #8a6200 0%, var(--yellow-500) 55%, #d4a017 100%);
}

.draw-result--announced .lotto-ball:nth-child(2) {
    background:
        radial-gradient(circle at 30% 24%, #ffffff 0%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 50% 115%, #0a2f6b 0%, #1a56b0 55%, #0d3d8a 100%);
}

.draw-result--announced .lotto-ball:nth-child(3) {
    background:
        radial-gradient(circle at 30% 24%, #ffffff 0%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 50% 115%, #6b0a0a 0%, #c62828 55%, #8b0000 100%);
}

.draw-result--announced .lotto-ball:nth-child(1) .lotto-ball__num {
    color: var(--blue-900);
    text-shadow: none;
}

.draw-table tbody tr:last-child td {
    border-bottom: none;
}

.draw-table__kabig-row td {
    border-top: 2px solid var(--blue-100);
    background: var(--blue-50);
    font-weight: 700;
    color: var(--blue-900);
}

.draw-table__amount {
    text-align: right;
    white-space: nowrap;
}

.agent-home__name {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    color: var(--gray-600);
}

.agent-home__card {
    padding: 1.25rem;
    border-radius: 16px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    text-align: center;
}

.agent-home__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-600);
}

.agent-home__id {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--blue-900);
    letter-spacing: 0.06em;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--landing-max);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: flex-end;
    gap: 0;
    padding:
        0.35rem calc(var(--page-pad-x) + env(safe-area-inset-right, 0px))
        calc(0.5rem + env(safe-area-inset-bottom, 0px))
        calc(var(--page-pad-x) + env(safe-area-inset-left, 0px));
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 24px rgba(0, 48, 135, 0.08);
    z-index: 50;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    padding: 0.35rem 0.15rem;
    color: var(--gray-600);
    font-size: 0.65rem;
    font-weight: 600;
    transition: color 0.15s ease;
}

.bottom-nav__item--active {
    color: var(--blue-700);
}

.bottom-nav__item--active .bottom-nav__icon {
    color: var(--blue-700);
}

.bottom-nav__icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: var(--gray-600);
}

.bottom-nav__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-nav__item--scan .bottom-nav__icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.bottom-nav__label {
    line-height: 1.1;
}

.bottom-nav__item--scan {
    position: relative;
}

.bottom-nav__scan-btn {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-top: -1.35rem;
    margin-bottom: 0.15rem;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--yellow-400) 0%, var(--yellow-500) 100%);
    color: var(--blue-900);
    box-shadow: 0 6px 18px rgba(255, 199, 44, 0.45);
    border: 3px solid var(--white);
}

.bottom-nav__item--scan .bottom-nav__icon {
    color: var(--blue-900);
}

.bottom-nav__item--scan.bottom-nav__item--active .bottom-nav__label {
    color: var(--blue-700);
}

@media (max-height: 580px) {
    .sheet {
        max-height: 92dvh;
    }

    .carousel-slide {
        padding-bottom: 0.25rem;
    }
}
