.age-gate {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 24px;
    isolation: isolate;
}

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

html.age-gate-pending,
html.age-gate-pending body {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.age-gate-backdrop {
    position: fixed;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(248, 184, 3, .28), transparent 32%),
        radial-gradient(circle at 82% 88%, rgba(248, 184, 3, .13), transparent 30%),
        rgba(15, 15, 12, .94);
    backdrop-filter: blur(9px);
}

.age-gate-backdrop::after {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 1px, transparent 1px 10px);
    content: "";
}

.age-gate-dialog {
    position: relative;
    width: min(100%, 620px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 22px;
    padding: clamp(28px, 5vw, 46px);
    background: #fffdf8;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .48);
    color: var(--masao-ink, #292821);
    animation: age-gate-in .42s cubic-bezier(.2,.75,.25,1) both;
}

.age-gate-dialog:focus { outline: 0; }

.age-gate-accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 8px;
    background: linear-gradient(90deg, #171713 0 30%, #f8b803 30% 100%);
}

.age-gate-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e1dbc9;
}

.age-gate-brand img {
    width: 190px;
    max-height: 56px;
    object-fit: contain;
    object-position: left center;
}

.age-gate-brand span {
    color: #736c5c;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .2em;
    white-space: nowrap;
}

.age-gate-content {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    align-items: center;
    gap: clamp(22px, 4vw, 34px);
    padding: clamp(26px, 5vw, 38px) 0 28px;
}

.age-gate-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 94px;
    height: 94px;
    border: 5px solid var(--masao-yellow, #f8b803);
    border-radius: 50%;
    background: var(--masao-black, #171713);
    color: #fff;
    box-shadow: 0 10px 24px rgba(23, 23, 19, .18);
    line-height: 1;
}

.age-gate-mark strong {
    font-size: 2.25rem;
    letter-spacing: -.06em;
}

.age-gate-mark span {
    margin-left: 3px;
    color: var(--masao-yellow, #f8b803);
    font-size: 1.1rem;
    font-weight: 900;
    transform: translateY(-.3em);
}

.age-gate-eyebrow {
    margin: 0 0 4px;
    color: #7c5b00;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .18em;
}

.age-gate-dialog h2 {
    margin: 0;
    color: var(--masao-black, #171713);
    font-size: clamp(1.8rem, 5vw, 2.55rem);
    line-height: 1.25;
    letter-spacing: -.025em;
}

.age-gate-dialog #age-gate-description {
    margin: 14px 0 0;
    color: #5d594f;
    font-size: .92rem;
    line-height: 1.8;
}

.age-gate-dialog #age-gate-description strong {
    display: block;
    color: #292821;
}

.age-gate-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 12px;
}

.age-gate-enter,
.age-gate-exit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border-radius: 9px;
    padding: 12px 18px;
    font-size: .88rem;
    font-weight: 900;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.age-gate-enter {
    border: 1px solid var(--masao-yellow-dark, #d99f00);
    background: var(--masao-yellow, #f8b803);
    color: var(--masao-black, #171713);
    box-shadow: 0 8px 22px rgba(217, 159, 0, .22);
}

.age-gate-exit {
    border: 1px solid #b8b1a2;
    background: #fff;
    color: #514e46;
}

.age-gate-enter:hover {
    transform: translateY(-2px);
    background: #ffc61c;
    box-shadow: 0 12px 26px rgba(217, 159, 0, .28);
}

.age-gate-exit:hover {
    transform: translateY(-2px);
    background: #f5f1e8;
}

.age-gate-note {
    margin: 17px 0 0;
    color: #777165;
    font-size: .7rem;
    line-height: 1.65;
    text-align: center;
}

.age-gate.is-closing {
    pointer-events: none;
    animation: age-gate-out .24s ease both;
}

@keyframes age-gate-in {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes age-gate-out {
    to { opacity: 0; }
}

@media (max-width: 560px) {
    .age-gate { padding: 12px; }
    .age-gate-dialog {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 16px;
        padding: 26px 20px 22px;
    }
    .age-gate-brand { align-items: flex-start; flex-direction: column; gap: 8px; padding-bottom: 17px; }
    .age-gate-brand img { width: 164px; max-height: 48px; }
    .age-gate-content { grid-template-columns: 70px minmax(0, 1fr); gap: 16px; padding: 22px 0; }
    .age-gate-mark { width: 70px; height: 70px; border-width: 4px; }
    .age-gate-mark strong { font-size: 1.7rem; }
    .age-gate-mark span { font-size: .9rem; }
    .age-gate-dialog h2 { font-size: clamp(1.55rem, 7vw, 2rem); }
    .age-gate-dialog #age-gate-description { margin-top: 10px; font-size: .82rem; line-height: 1.7; }
    .age-gate-actions { grid-template-columns: 1fr; gap: 9px; }
    .age-gate-enter, .age-gate-exit { min-height: 52px; font-size: .82rem; }
    .age-gate-note { margin-top: 13px; }
}

@media (max-width: 340px) {
    .age-gate-content { grid-template-columns: 1fr; gap: 14px; padding-block: 20px; }
    .age-gate-mark { width: 64px; height: 64px; }
    .age-gate-mark strong { font-size: 1.55rem; }
    .age-gate-dialog h2 { font-size: 1.55rem; white-space: nowrap; }
}

@media (max-height: 620px) and (orientation: landscape) {
    .age-gate { place-items: start center; }
    .age-gate-dialog { padding-block: 24px 20px; }
    .age-gate-brand { padding-bottom: 14px; }
    .age-gate-content { padding-block: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .age-gate-dialog,
    .age-gate.is-closing { animation: none; }
}
