:host, .theme-age-gate, .theme-age-gate *, .theme-age-gate *::before, .theme-age-gate *::after {
    box-sizing: border-box;
}

:host {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}

html.theme-age-gate-required,
html.theme-age-gate-required body {
    overflow: hidden;
}

.theme-age-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vh, 48px) clamp(20px, 5vw, 64px);
    color: var(--theme-text);
}

html.theme-age-gate-required .theme-age-gate {
    display: flex;
}

.theme-age-gate__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 8%, rgb(var(--theme-accent-primary-rgb) / 0.10), transparent 38rem),
        linear-gradient(180deg, rgb(var(--theme-section-1-rgb) / 0.80), rgb(var(--theme-background-deep-rgb) / 0.92));
    backdrop-filter: blur(12px);
}

.theme-age-gate__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100dvh - clamp(48px, 10vh, 96px));
    border: 1px solid rgb(var(--theme-accent-highlight-rgb) / 0.42);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgb(var(--theme-background-soft-rgb) / 0.97), rgb(var(--theme-section-3-rgb) / 0.985));
    box-shadow:
        0 26px 70px rgb(var(--theme-background-deep-rgb) / 0.52),
        0 0 0 1px rgb(var(--theme-text-rgb) / 0.025) inset,
        0 0 44px rgb(var(--theme-accent-primary-rgb) / 0.055);
    overflow: auto;
    overscroll-behavior: contain;
}

.theme-age-gate__dialog::before {
    position: absolute;
    inset: 9px;
    border: 1px solid rgb(var(--theme-accent-highlight-rgb) / 0.16);
    border-radius: 16px;
    content: "";
    pointer-events: none;
}

.theme-age-gate__inner {
    position: relative;
    padding: 30px 34px 28px;
    text-align: center;
}

.theme-age-gate__brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.theme-age-gate__emblem {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 0 16px rgb(var(--theme-accent-highlight-rgb) / 0.12));
}

.theme-age-gate__brand-name {
    margin: 0;
    color: var(--theme-accent-highlight-soft);
    font-family: var(--theme-serif);
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: 0.08em;
}

.theme-age-gate__title {
    margin: 19px 0 12px;
    font-family: var(--theme-serif);
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: 0.015em;
}

.theme-age-gate__description {
    width: min(520px, 100%);
    margin: 0 auto;
    color: rgb(var(--theme-text-rgb) / 0.84);
    font-size: 14px;
    line-height: 1.8;
}

.theme-age-gate__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.theme-age-gate__action {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 88px;
    align-items: center;
    gap: 12px;
    padding: 16px 17px;
    border: 1px solid rgb(var(--theme-accent-highlight-rgb) / 0.58);
    border-radius: 14px;
    background: rgb(var(--theme-panel-contrast-rgb) / 0.88);
    color: var(--theme-text);
    text-align: left;
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.theme-age-gate__action:hover,
.theme-age-gate__action:focus-visible {
    transform: translateY(-1px);
    border-color: rgb(var(--theme-accent-highlight-soft-rgb) / 0.9);
    box-shadow: 0 12px 26px rgb(var(--theme-background-deep-rgb) / 0.24);
}

.theme-age-gate__action--enter {
    background:
        linear-gradient(135deg, rgb(var(--theme-border-soft-rgb) / 0.95), rgb(var(--theme-panel-raised-rgb) / 0.98));
    box-shadow:
        0 0 0 1px rgb(var(--theme-text-rgb) / 0.02) inset,
        0 0 22px rgb(var(--theme-accent-primary-rgb) / 0.08);
}

.theme-age-gate__action--leave {
    background:
        linear-gradient(135deg, rgb(var(--theme-panel-contrast-rgb) / 0.92), rgb(var(--theme-background-soft-rgb) / 0.98));
}

.theme-age-gate__mark {
    flex: 0 0 auto;
    color: var(--theme-accent-highlight-soft);
    font-family: var(--theme-serif);
    font-size: 29px;
    line-height: 1;
}

.theme-age-gate__mark--circle {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: 27px;
    font-family: var(--theme-sans);
    font-weight: 300;
}

.theme-age-gate__action-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.theme-age-gate__action-copy strong {
    font-family: var(--theme-serif);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.theme-age-gate__action-copy small {
    color: rgb(var(--theme-text-rgb) / 0.62);
    font-size: 12px;
    line-height: 1.35;
}

.theme-age-gate__arrow {
    margin-left: auto;
    color: rgb(var(--theme-accent-highlight-soft-rgb) / 0.75);
    font-size: 27px;
    line-height: 1;
}

.theme-age-gate__note {
    margin: 18px 0 0;
    color: rgb(var(--theme-text-rgb) / 0.56);
    font-size: 12px;
    line-height: 1.55;
}

.theme-age-gate__denied[hidden] {
    display: none;
}

.theme-age-gate__denied {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgb(var(--theme-accent-highlight-rgb) / 0.2);
}

.theme-age-gate__denied-title {
    margin: 0;
    font-family: var(--theme-serif);
    font-size: clamp(23px, 2.5vw, 30px);
}

.theme-age-gate__denied-description {
    width: min(460px, 100%);
    margin: 10px auto 0;
    color: rgb(var(--theme-text-rgb) / 0.76);
    font-size: 13px;
    line-height: 1.7;
}

.theme-age-gate__back-button {
    min-width: 180px;
    margin-top: 18px;
    padding: 11px 20px;
    border: 1px solid rgb(var(--theme-accent-highlight-rgb) / 0.5);
    border-radius: 999px;
    background: transparent;
    color: var(--theme-accent-highlight-soft);
    font-size: 13px;
    cursor: pointer;
    transition:
        border-color 180ms ease,
        color 180ms ease,
        background 180ms ease;
}

.theme-age-gate__back-button:hover,
.theme-age-gate__back-button:focus-visible {
    border-color: rgb(var(--theme-accent-highlight-soft-rgb) / 0.9);
    background: rgb(var(--theme-accent-highlight-rgb) / 0.07);
}

.theme-age-gate[data-theme-denied="true"] .theme-age-gate__actions,
.theme-age-gate[data-theme-denied="true"] .theme-age-gate__note {
    display: none;
}

@media (max-width: 640px) {
    .theme-age-gate {
        align-items: center;
        padding: 18px;
    }

    .theme-age-gate__dialog {
        width: min(480px, 100%);
        max-height: calc(100dvh - 36px);
        border-radius: 18px;
    }

    .theme-age-gate__dialog::before {
        inset: 7px;
        border-radius: 13px;
    }

    .theme-age-gate__inner {
        padding: 25px 20px 22px;
    }

    .theme-age-gate__emblem {
        width: 48px;
        height: 48px;
    }

    .theme-age-gate__brand-name {
        font-size: 16px;
    }

    .theme-age-gate__title {
        margin-top: 15px;
        font-size: clamp(25px, 8vw, 32px);
    }

    .theme-age-gate__description {
        font-size: 13px;
        line-height: 1.65;
    }

    .theme-age-gate__actions {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
    }

    .theme-age-gate__action {
        min-height: 70px;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .theme-age-gate__action-copy strong {
        font-size: 16px;
    }

    .theme-age-gate__mark {
        font-size: 26px;
    }

    .theme-age-gate__note {
        margin-top: 14px;
        font-size: 11px;
    }
}

@media (max-height: 560px) and (min-width: 641px) {
    .theme-age-gate {
        padding-block: 18px;
    }

    .theme-age-gate__dialog {
        max-height: calc(100dvh - 36px);
    }

    .theme-age-gate__inner {
        padding-block: 22px 20px;
    }

    .theme-age-gate__emblem {
        width: 46px;
        height: 46px;
    }

    .theme-age-gate__brand-name {
        font-size: 16px;
    }

    .theme-age-gate__title {
        margin: 13px 0 9px;
        font-size: 30px;
    }

    .theme-age-gate__description {
        font-size: 12px;
        line-height: 1.55;
    }

    .theme-age-gate__actions {
        margin-top: 18px;
    }

    .theme-age-gate__action {
        min-height: 70px;
        padding-block: 12px;
    }

    .theme-age-gate__note {
        margin-top: 12px;
    }
}

.theme-age-gate__mark--circle .theme-icon { width: 20px; height: 20px; vertical-align: 0; }
.theme-age-gate__arrow .theme-icon { width: 21px; height: 21px; vertical-align: 0; }


.theme-age-gate__title { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.28; }
.theme-age-gate__age-label {
    display: inline-flex;
    width: 48px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    font-family: var(--theme-sans);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .03em;
}
.theme-age-gate__action-copy small,
.theme-age-gate__note { font-size: 12px; }
@media (max-width: 640px) {
    .theme-age-gate__title { font-size: clamp(26px, 8vw, 34px); }
    .theme-age-gate__age-label { width: 44px; height: 30px; font-size: 13px; }
}


.theme-age-gate[hidden] {
    display: none !important;
}

.theme-age-gate {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    font-family: var(--theme-sans);
}

.theme-age-gate__dialog,
.theme-age-gate__inner,
.theme-age-gate__description,
.theme-age-gate__actions,
.theme-age-gate__action,
.theme-age-gate__note,
.theme-age-gate__denied,
.theme-age-gate__denied-description {
    max-width: 100%;
}

.theme-age-gate__title,
.theme-age-gate__description,
.theme-age-gate__action-copy,
.theme-age-gate__note,
.theme-age-gate__denied-title,
.theme-age-gate__denied-description {
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 640px) {
    .theme-age-gate {
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }

    .theme-age-gate__dialog {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .theme-age-gate__inner {
        width: 100%;
        min-width: 0;
        padding: 22px 16px 20px;
    }

    .theme-age-gate__actions,
    .theme-age-gate__action,
    .theme-age-gate__action-copy {
        min-width: 0;
    }

    .theme-age-gate__action {
        width: 100%;
    }

    .theme-age-gate__back-button {
        width: 100%;
        min-width: 0;
    }
}
