.meow-wrap {
    position: relative;
    z-index: 5;
    width: min(940px, calc(100% - 28px));
    margin: 0 auto;
    padding-bottom: 30px;
}

.meow-intro {
    padding: 48px 4px 24px;
    text-align: center;
}

.meow-kicker {
    margin: 0 0 8px;
    color: var(--accent-deep);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.meow-intro h1 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-head);
    font-size: clamp(2.1rem, 6vw, 3.4rem);
    line-height: 1.08;
}

.meow-intro > p:last-child {
    max-width: 640px;
    margin: 12px auto 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.gallery-card {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.9fr);
    align-items: center;
    gap: clamp(22px, 4vw, 42px);
    padding: clamp(20px, 4vw, 36px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    backdrop-filter: blur(16px) saturate(1.15);
}

.cat-portrait {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 520px);
    aspect-ratio: 4 / 5;
    justify-self: center;
    border: 1px solid var(--border);
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card-strong);
    box-shadow: 0 16px 38px rgba(184, 62, 105, 0.2);
}

.cat-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cat-image[hidden],
.image-status[hidden] {
    display: none;
}

.image-status {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    color: var(--text-soft);
    text-align: center;
}

.art-credit {
    margin: -8px 0 16px;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.art-credit a {
    font-weight: 800;
}

.api-status {
    min-height: 1.4em;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.load-more-button {
    margin-top: 12px;
}

.cat-details {
    min-width: 0;
}

.cat-counter {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.cat-details h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-family: var(--font-head);
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    font-weight: 600;
    line-height: 1.1;
}

.cat-title {
    margin: 5px 0 16px;
    color: var(--accent-deep);
    font-family: var(--font-head);
    font-size: 0.94rem;
    font-weight: 600;
}

.cat-bio {
    min-height: 3.2em;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.cat-meow {
    display: inline-block;
    margin: 0 0 18px;
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--accent-deep);
    background: var(--card-strong);
    font-family: var(--font-head);
    font-weight: 600;
}

.cat-meow.is-meowing {
    animation: meow-pop 0.35s ease-out;
}

@keyframes meow-pop {
    50% { transform: scale(1.12) rotate(-2deg); }
}

.cat-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-controls .btn {
    padding: 9px 13px;
    font-size: 0.84rem;
}

.cat-controls .meow-button {
    border-color: var(--accent);
    color: var(--on-accent);
    background: var(--accent);
}

.cat-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.cat-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 1px solid var(--accent-deep);
    border-radius: 50%;
    background: var(--card-strong);
}

.cat-dot[aria-current="true"] {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-2);
}

.meow-chorus {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-2);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    backdrop-filter: blur(16px) saturate(1.15);
}

.meow-chorus h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-family: var(--font-head);
    font-size: 1.22rem;
    font-weight: 600;
}

.meow-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.meow-chips span {
    position: relative;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-soft);
    background: var(--card);
    font-family: var(--font-head);
    transition: transform 180ms ease-out;
}

.meow-chips.is-floating span {
    transform: translate3d(var(--float-x, 0px), var(--float-y, 0px), 0);
}

.after-dark-page {
    --accent: #f075a6;
    --accent-2: #f6a4c4;
    --accent-deep: #ffd1e1;
    --card: rgba(34, 12, 27, 0.68);
    --card-2: rgba(29, 9, 23, 0.58);
    --card-strong: rgba(38, 14, 30, 0.9);
    --border: rgba(255, 190, 218, 0.2);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.44);
    --wash-1: rgba(18, 5, 15, 0.62);
    --wash-2: rgba(33, 9, 25, 0.74);
    --on-accent: #291522;
}

.after-dark-page .bg-layer {
    background-image:
        linear-gradient(180deg, var(--wash-1) 0%, var(--wash-2) 100%),
        url('../cdn/mizuki-nbg.jpg');
}

.after-dark-page .gallery-card,
.after-dark-page .meow-chorus {
    border-color: rgba(255, 190, 218, 0.26);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52), 0 0 34px rgba(240, 117, 166, 0.12);
}

.age-gate {
    width: min(520px, calc(100% - 32px));
    max-width: none;
    padding: clamp(22px, 5vw, 34px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    background: var(--card-strong);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.age-gate::backdrop {
    background: rgba(25, 12, 22, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.age-gate h1 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-head);
    font-size: 1.8rem;
}

.age-gate p {
    color: var(--text-soft);
    line-height: 1.6;
}

.age-gate .gate-note {
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--card-2);
    font-size: 0.9rem;
}

.gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.gate-actions button,
.gate-actions a {
    flex: 1 1 180px;
    text-align: center;
}

.after-dark-content[hidden] {
    display: none !important;
}

@media (max-width: 680px) {
    .meow-intro {
        padding-top: 36px;
    }

    .gallery-card {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .cat-portrait {
        width: min(84vw, 440px);
    }

    .cat-details {
        text-align: center;
    }

    .cat-meow {
        margin-bottom: 14px;
    }

    .cat-controls,
    .cat-dots {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cat-meow.is-meowing,
    .meow-chips span {
        animation: none;
        transition: none;
        transform: none !important;
    }
}
