@import url('https://fonts.googleapis.com/css2?family=BIZ+UDGothic&display=swap');

/* --- 1. VARIABLES --- */
:root {
    --bg-color: #1a102c; 
    --panel-bg: rgba(228, 215, 241, 0.7); 
    --text-dark: rgb(0, 0, 0); 
    --heading-purple: #301754; 
    --text-light: #ffffff;
    --border-color: rgb(254, 241, 255);
    --glow: 0 0 15px rgba(255, 255, 255, 0.4);
    --hover-bg: rgba(163, 134, 214, 1.0);
    --socials-bg: rgba(242, 235, 251, 0.9);
}

/* --- 2. GENERAL PAGE SETUP --- */
html, body {
    overflow-x: hidden; /* This completely disables horizontal scrolling/shifting! */
}

body {
    margin: 0;
    padding: 100px 20px 40px 20px; 
    background-color: var(--bg-color);
    background-image: url('../assets/bg-desktop.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    font-family: 'BIZ UDGothic', sans-serif;
    color: var(--text-dark);
}

/* --- 3. THE FROSTED PANELS --- */
.main-header, .profile-card, .status-widget, .about-section, .link-box {
    position: relative; 
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-radius: 25px;
    border: 2px solid var(--border-color); 
    box-shadow: var(--glow);
}

/* --- 4. HEADER & NAVIGATION --- */
.main-header {
    background-color: rgba(211, 182, 234, 0.7); 
    position: relative; 
    z-index: 20; 
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    height: 75px; 
    padding: 0 40px;
    width: 70%;
    max-width: none;
    margin: 0 auto 50px auto;
}

.logo-container {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%); 
    z-index: 10; 
}

.logo {
    width: 300px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); 
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 5px; 
    padding: 7px; 
    margin: 0;
    background-color: rgb(231, 218, 246);
    border-radius: 30px; 
    align-items: center;
}

.main-nav a {
    display: inline-block;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 900; 
    font-size: 1.25rem; 
    padding: 8px 24px; 
    border-radius: 25px;
    transition: all 0.2s ease-in-out;
}

.main-nav a.active {
    background-color: var(--hover-bg);
    color: rgb(253, 233, 255);
}

.main-nav a:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.5);
}

/* --- 5. THE 3-COLUMN GRID --- */
.grid-container {
    display: grid;
    grid-template-columns: 1.3fr 2.8fr 1fr; 
    gap: 25px;
    width: 70%;
    max-width: none;
    margin: 0 auto;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* --- 6. INDIVIDUAL PANEL STYLING --- */
.profile-card, .status-widget, .about-section, .link-box {
    padding: 25px;
}

.about-section h2, .link-box h2, .status-widget h2 {
    text-align: center;
    color: var(--heading-purple);
    margin-top: 0;
    margin-bottom: 20px;
}

.about-section p {
    line-height: 1.3; 
}

#next-stream-info {
    color: rgb(0, 0, 0); 
}

.profile-card {
    text-align: center;
}

.profile-card h1 {
    color: rgb(51, 23, 72); 
    margin: 10px 0;
}

.profile-pic {
    width: 250px; 
    height: 250px; 
    border-radius: 50%;
    border: 4px solid var(--border-color);
    object-fit: cover;
    margin-bottom: 5px;
}

.badges {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 8px;
    margin-top: 10px;
}

.badge {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-dark);
}

.badge.pronouns {
    background-color: rgba(255, 255, 255, 0.2); 
    font-size: 1rem; 
    font-weight: normal; 
    opacity: 0.8; 
}

.short-bio {
    margin-top: 15px;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--text-dark);
    opacity: 0.9;
}

.status-widget {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.4); 
    color: var(--heading-purple); 
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, max-content); 
    justify-content: center; 
    gap: 12px; 
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, max-content); 
    justify-content: center; 
    gap: 12px; 
}

.social-link, .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--socials-bg);
    border: 2px solid var(--hover-bg); 
    color: var(--hover-bg); 
    width: 75px; 
    height: 75px; 
    border-radius: 15px; 
    transition: all 0.2s ease-in-out;
}

.social-link:hover, .action-btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-light);
}

.btn-icon {
    width: 60px; 
    height: 60px;
    fill: currentColor; 
    transition: fill 0.2s ease-in-out;
}

.png-icon {
    width: 42px; 
    height: 42px;
    object-fit: contain; 
    transition: filter 0.2s ease-in-out;
}

.social-link:hover .png-icon, .action-btn:hover .png-icon {
    filter: brightness(0) invert(1);
}

.accent {
    position: absolute;
    width: 75px; 
    height: auto;
    z-index: 10;
    pointer-events: none; 
}

.accent-bottom-left {
    bottom: -30px;
    left: -18px;
    width: 95px;
    height: auto;
}

.accent-bottom-right {
    bottom: -15px;
    right: -15px;
}

.accent-top-right {
    top: -25px;
    right: -23px;
}

.accent-top-left {
    top: -20px;
    left: -25px;
}

/* --- 7. MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    body {
        background-image: url('../assets/bg-mobile.png'); 
    }
    .grid-container {
        grid-template-columns: 1fr; 
		width: 95%;
    }
    .main-header {
        justify-content: center;
        height: auto;
        padding: 20px;
        flex-direction: column;
        gap: 20px;
    }
    .logo-container {
        position: static; 
        transform: none;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 5px;
    }
}

/* --- 8. MODAL & FOOTER --- */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background-color: rgba(10, 5, 20, 0.9); 
    display: none; 
    justify-content: center; 
    align-items: center;
    z-index: 1000; 
}

.modal-content {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--border-color); 
    box-shadow: var(--glow);
    padding: 40px; 
    border-radius: 25px; 
    max-width: 500px; 
    text-align: center;
    color: var(--text-dark);
}

.modal-content h2 { 
    color: var(--heading-purple); 
    margin-top: 0; 
}

.site-footer {
    text-align: center; 
    padding: 20px; 
    margin-top: 40px;
    color: var(--text-light); 
    font-size: 0.9rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.site-footer a { 
    color: rgb(240, 200, 255); 
    text-decoration: none; 
    font-weight: bold; 
    transition: color 0.2s;
}

.site-footer a:hover {
    color: white;
}

/* --- 9. SCHEDULE PAGE STYLING --- */
.schedule-container {
    display: flex;
    justify-content: center; 
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.schedule-list-col {
    width: 55%; 
    display: flex;
    flex-direction: column;
    gap: 40px; 
    margin: 0 auto;
    z-index: 10;
}

.weekly-schedule-panel, .monthly-events-panel {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 25px;
    border: 2px solid var(--border-color);
    box-shadow: var(--glow);
    padding: 40px;
    position: relative;
}

.schedule-title {
    text-align: center; 
    color: var(--heading-purple);
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.monthly-events-panel h2 {
    text-align: center;
    color: var(--heading-purple);
    margin-top: 0;
    margin-bottom: 20px;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.monthly-event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(48, 23, 84, 0.2);
    padding-bottom: 10px;
}

.monthly-event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.me-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--heading-purple);
}

.me-date {
    font-size: 1rem;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    border-radius: 15px;
    color: var(--text-dark);
}

/* --- ART POSITIONING --- */
.schedule-art-col {
    position: fixed;
    bottom: 0px; 
    width: 20%; 
    z-index: 5;
    /* Removed the hard-coded left: 2% from here! */
}

/* New predetermined side classes */
.schedule-art-col.left-side {
    left: 1%; 
}

.schedule-art-col.right-side {
    right: 1%; 
}

.cycling-art {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: opacity 0.5s ease-in-out;
}

/* --- SKEWED PARALLELOGRAM BOXES --- */
.day-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-left: 8px solid rgba(163, 134, 214, 1.0); 
    transform: skewX(-15deg); 
    padding: 10px 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
}

.day-card > * {
    transform: skewX(15deg);
}

.day-header {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--heading-purple);
    font-weight: bold;
    opacity: 0.8;
    margin-bottom: 5px;
}

.day-event {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--heading-purple);
    margin: 5px 0;
}

.day-card.no-stream .day-event {
    color: #666;
    font-weight: normal;
    font-style: italic;
}
.day-card.no-stream {
    border-left: 8px solid #ccc;
    background-color: rgba(240, 240, 240, 0.9);
}

/* Mobile Responsiveness for Schedule */
@media (max-width: 900px) {
    .schedule-container {
        flex-direction: column;
    }
    .schedule-list-col {
        width: 95%; 
    }
    .schedule-art-col {
        display: none; 
    }
    .schedule-title {
        font-size: 1.8rem;
    }
}

/* --- CREDITS PAGE LAYOUT --- */
/* --- CREDITS PAGE LAYOUT --- */

/* --- MISSING GLASS CLASSES --- */

/* Gives the model/web design boxes the frosted background */
.frosted-panel {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 25px;
    border: 2px solid var(--border-color);
    box-shadow: var(--glow);
    padding: 20px; 
}

/* Makes the headers look exactly like the top nav bar */
.glass-header {
	margin-top: 0;
    background-color: rgba(211, 182, 234, 0.7); /* Matches your top bar */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 25px;
    border: 2px solid var(--border-color);
    box-shadow: var(--glow);
    color: var(--heading-purple);
    text-align: center;
	font-size: 2rem;
    padding: 10px 20px;
    margin-bottom: 20px;
}

/* Adjust the text area so it fits nicely inside the new panel padding */
.credit-text-area {
    padding: 0 10px;
}

.credits-container {
    max-width: 1000px; /* Adjust to match your top bar width */
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px; /* Space between the rows/sections */
}

/* Top Two Columns */
.credits-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.credit-text-area {
    padding: 20px;
    /* Uses your inherited text colors from the parent frosted-panel */
}

/* Ensure links in the text area look right */
.credit-text-area a {
    color: #301754; /* Your dark purple */
    font-weight: normal;
    text-decoration: underline;
}

/* --- ART GRIDS --- */

.art-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* We put the background on the header here so it matches the top bar */
.art-section .glass-header {
    margin: 0; 
}

.art-grid {
    display: grid;
    gap: 15px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* --- THE ART BOXES & HOVER EFFECTS --- */

.art-box {
    position: relative;
    aspect-ratio: 1 / 1; 
    border: 2px solid #ffffff; 
    border-radius: 8px; 
    overflow: hidden; 
    
    /* --- NEW FROSTED GLASS BACKGROUND --- */
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.art-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the square without stretching */
    display: block;
}

.art-overlay {
    position: absolute;
    inset: 0; /* Stretches overlay to fill the box */
    background: rgba(0, 0, 0, 0.75); /* Darkens the image */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* The Animation Magic */
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.art-box:hover .art-overlay {
    opacity: 1; /* Reveals the dark background and text on hover */
}

.art-overlay a {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); /* Helps text pop */
    padding: 10px;
}

.art-text {
    text-align: center;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    line-height: 1.6; /* Gives a little breathing room between the lines */
}

.art-overlay a:hover {
    text-decoration: underline;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* Stack the top row into one column */
    .credits-top-row {
        grid-template-columns: 1fr;
    }

    /* Change the 6-grid to a 3-grid so emojis aren't microscopic */
    .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    /* Stack the 3-grids to 2-grids on very small screens */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- TEXT PANEL FORMATTING --- */

.credit-list {
    list-style: none;
    padding: 0 10px;
    margin: 0;
    text-align: left; /* Fixes the ragged edges! */
}

.credit-list li {
    margin-bottom: 12px;
    line-height: 1.5;
    position: relative;
    padding-left: 25px; /* Makes room for the custom bullet */
}

/* Custom star bullet points for the lists */
.credit-list li::before {
    content: "✦"; 
    position: absolute;
    left: 0;
    color: var(--heading-purple); 
    font-size: 1.2rem;
    line-height: 1.2;
}

.credit-list li strong {
    color: var(--heading-purple);
    display: inline-block;
    margin-right: 5px;
}

/* Styling for the "Other" section */
.other-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 10px;
}

.other-section p {
    margin: 0;
    line-height: 1.5;
}

.discord-callout {
    background-color: rgba(255, 255, 255, 0.4);
    border: 2px dashed rgba(163, 134, 214, 1.0); /* Uses your hover purple color */
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
}

/* --- REFERENCES PAGE LAYOUT --- */

.references-container {
    max-width: 1000px; 
    margin: 40px auto;
    padding: 0 20px;
	line-height: 1.3; 
	font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 40px; 
}

/* 2x2 Dropdown Menu Grid */
.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ref-dropdown {
    background-color: rgba(255, 255, 255, 0.4);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 10px 15px;
    transition: all 0.2s ease-in-out;
}

.ref-dropdown[open] {
    background-color: rgba(255, 255, 255, 0.6);
}

.ref-dropdown summary {
    font-weight: 900;
    color: var(--heading-purple);
    cursor: pointer;
    font-size: 1.2rem;
    list-style: none; /* Removes the default arrow in most browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Add a custom plus/minus symbol to the dropdown */
.ref-dropdown summary::after {
    content: '+';
    font-size: 1.5rem;
}
.ref-dropdown[open] summary::after {
    content: '−';
}

/* Hide the default webkit arrow */
.ref-dropdown summary::-webkit-details-marker {
    display: none;
}

.ref-dropdown .dropdown-content {
    padding-top: 15px;
    border-top: 1px solid rgba(48, 23, 84, 0.2);
    margin-top: 10px;
}

/* 2x1 Main Reference Grid */
.ref-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.ref-divider {
    border: 0;
    height: 1px;
    background: rgba(48, 23, 84, 0.2);
    margin: 30px 0;
}

/* 4-Wide Grid */
.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Light Hover Effect */
.art-overlay-light {
    position: absolute;
    inset: 0; 
    background: rgba(255, 255, 255, 0.85); /* Lightens the image */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.art-box:hover .art-overlay-light {
    opacity: 1; 
}

.art-text-dark, .art-text-dark a {
    color: var(--text-dark); /* Black/Dark text */
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    text-shadow: none; /* No shadow needed on a light background */
    text-align: center;
}

.art-text-dark a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .dropdown-grid, .ref-main-grid {
        grid-template-columns: 1fr; /* Stacks to 1 column on mobile */
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr); /* 4-wide becomes 2-wide */
    }
}

/* --- REFERENCE PAGE TWEAKS --- */

/* Reduces the gap between the header and the first paragraph */
.credit-text-area > p:first-child {
    margin-top: 0;
}

/* Styling for the bold category headers inside dropdowns */
.dropdown-subhead {
    color: var(--heading-purple);
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 5px;
}

/* Removes top margin if the subhead is the very first item */
.dropdown-content .dropdown-subhead:first-child {
    margin-top: 0;
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT (12-COLUMN GRID) --- */

.reference-gallery-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: end;
    margin-top: 20px;
    width: 110%;
    margin-left: -5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Wrapper setup for comments */
.ref-item-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    z-index: 1; /* Creates a stacking context so comments don't slip behind the frosted panel */
}

/* 1 & 2: Full Body Poses */
.reference-gallery-layout .ref-item-wrapper:nth-child(1) { grid-column: 1 / span 3; grid-row: 1 / span 2; }
.reference-gallery-layout .ref-item-wrapper:nth-child(2) { grid-column: 4 / span 3; grid-row: 1 / span 2; }

/* 3 & 4: Cropped Poses */
.reference-gallery-layout .ref-item-wrapper:nth-child(3) { grid-column: 7 / span 3; grid-row: 1; }
.reference-gallery-layout .ref-item-wrapper:nth-child(4) { grid-column: 10 / span 3; grid-row: 1; }

/* 5, 6, & 7: Accessories */
.reference-gallery-layout .ref-item-wrapper:nth-child(5) { grid-column: 7 / span 2; grid-row: 2; }
.reference-gallery-layout .ref-item-wrapper:nth-child(6) { grid-column: 9 / span 2; grid-row: 2; }
.reference-gallery-layout .ref-item-wrapper:nth-child(7) { grid-column: 11 / span 2; grid-row: 2; }

/* Image Controls */
.reference-gallery-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.reference-gallery-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.reference-gallery-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Specific Height Constraints */
.reference-gallery-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.reference-gallery-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 70vh; 
}

.reference-gallery-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.reference-gallery-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) {
    max-height: 48vh; 
}

.reference-gallery-layout .ref-item-wrapper:nth-child(n+5) img:not(.comment-img) {
    max-height: 15vh; 
    margin-top: 15px; 
}

/* --- THE COMMENT TOGGLE SYSTEM --- */

/* The styling when Comments are turned ON */
.reference-gallery-layout.comments-active,
.fishnets-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

/* The invisible overlay comments */
.comment-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; 
    pointer-events: none; 
    opacity: 0; 
    visibility: hidden;
    z-index: -1; /* Forces the comment behind the character image */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Show the comments when the gallery has the active class */
.reference-gallery-layout.comments-active .comment-img,
.fishnets-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 1000px) {
    .reference-gallery-layout {
        width: 100%; 
        margin-left: 0;
    }
}

@media (max-width: 800px) {
    .reference-gallery-layout {
        grid-template-columns: repeat(6, 1fr);
        gap: 30px;
    }
    .reference-gallery-layout .ref-item-wrapper:nth-child(1) { grid-column: 1 / span 3; grid-row: 1; }
    .reference-gallery-layout .ref-item-wrapper:nth-child(2) { grid-column: 4 / span 3; grid-row: 1; }
    .reference-gallery-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 3; grid-row: 2; }
    .reference-gallery-layout .ref-item-wrapper:nth-child(4) { grid-column: 4 / span 3; grid-row: 2; }
    .reference-gallery-layout .ref-item-wrapper:nth-child(5) { grid-column: 1 / span 2; grid-row: 3; }
    .reference-gallery-layout .ref-item-wrapper:nth-child(6) { grid-column: 3 / span 2; grid-row: 3; }
    .reference-gallery-layout .ref-item-wrapper:nth-child(7) { grid-column: 5 / span 2; grid-row: 3; }
    
    .reference-gallery-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) {
        max-height: 50vh; 
    }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: FISHNETS (4-COLUMN GRID) --- */

.fishnets-layout {
    display: grid;
    /* Gave the left column more width (1fr) so those images can scale up, 
       and slightly reduced the center columns. */
    grid-template-columns: 1fr 1.3fr 1.3fr 1.2fr; 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 120%;
    margin-left: -10%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */
/* 1. Left Col, Top: Earring (Anchored to the BOTTOM of the top row) */
.fishnets-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; align-self: end; }

/* 2. Left Col, Bottom: Belt Chain (Anchored to the TOP of the bottom row) */
.fishnets-layout .ref-item-wrapper:nth-child(2) { grid-column: 1; grid-row: 2; align-self: start; }

/* 3. Center Col, Left: Full Body Front */
.fishnets-layout .ref-item-wrapper:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: end; }

/* 4. Center Col, Right: Full Body Back */
.fishnets-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; align-self: end; }

/* 5. Right Col, Top: Eye Close-up */
.fishnets-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: start; }

/* 6. Right Col, Bottom: Dynamic Pose (Massive & Overlapping) */
.fishnets-layout .ref-item-wrapper:nth-child(6) { 
    grid-column: 4; 
    grid-row: 2; 
    align-self: end; 
    
    /* Pulls it left over the back pose without overflowing the right side */
    width: 160%; 
    margin-left: -60%; 
	margin-top: -20%;
    z-index: 2; 
}


/* Base Image Controls */
.fishnets-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.fishnets-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.fishnets-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}


/* Dynamic Heights for Fishnets Geometry */
.fishnets-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.fishnets-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) {
    max-height: 72vh; /* Reduced down to ~90% of their previous height */
}

.fishnets-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) {
    max-height: 85vh; /* Dynamic pose on bottom right */
}

.fishnets-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.fishnets-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 42vh; /* Scaled WAY up from 30vh so they are prominent on the left */
}

.fishnets-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) {
    max-height: 35vh; /* Eye close up on the right */
}

/* --- MOBILE RESPONSIVENESS FOR FISHNETS --- */
@media (max-width: 1000px) {
    .fishnets-layout {
        width: 100%; 
        margin-left: 0;
    }
}

@media (max-width: 800px) {
    .fishnets-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .fishnets-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 1; }
    .fishnets-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 1; }
    
    .fishnets-layout .ref-item-wrapper:nth-child(6) { 
        grid-column: 1 / span 2; 
        grid-row: 2; 
        justify-content: center; 
        width: 100%;
        margin-left: 0;
    } 
    
    .fishnets-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 3; align-self: center;}
    .fishnets-layout .ref-item-wrapper:nth-child(5) { grid-column: 2; grid-row: 3; align-self: center;}
    
    .fishnets-layout .ref-item-wrapper:nth-child(2) { grid-column: 1 / span 2; grid-row: 4; justify-content: center;}
    
    .fishnets-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) {
        max-height: 50vh; 
    }
}

@media (max-width: 480px) {
    .fishnets-layout {
        grid-template-columns: 1fr; 
    }
    .fishnets-layout .ref-item-wrapper:nth-child(n) { 
        grid-column: 1; 
        grid-row: auto; 
    }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: PUPPY (5-COLUMN GRID) --- */

.puppy-layout {
    display: grid;
    /* Widened the left column (1.3fr) and slightly reduced the center columns (1.3fr) */
    grid-template-columns: 1.3fr 1.3fr 1.3fr 0.9fr 0.9fr; 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Left Col, Top: Eye */
.puppy-layout .ref-item-wrapper:nth-child(1) { 
    grid-column: 1; 
    grid-row: 1; 
    align-self: start; 
    /* Overlaps the center slightly, dialed back from 120% since the column is wider now */
    width: 110%;
    z-index: 2;
}

/* 2. Left Col, Bottom: Ears & Tail (Spans rows 2 & 3) */
.puppy-layout .ref-item-wrapper:nth-child(2) { 
    grid-column: 1; 
    grid-row: 2 / span 2; 
    align-self: end; 
    
    /* Forces the wrapper to be larger and spills it to the right over the center model */
    width: 140%;
    margin-right: -40%;
    z-index: 2; 
}


/* 3. Center Col, Left: Full Body Front (Spans all 3 rows) */
.puppy-layout .ref-item-wrapper:nth-child(3) { 
    grid-column: 2; 
    grid-row: 1 / span 3; 
    align-self: center; 
}

/* 4. Center Col, Right: Full Body Back (Spans all 3 rows) */
.puppy-layout .ref-item-wrapper:nth-child(4) { 
    grid-column: 3; 
    grid-row: 1 / span 3; 
    align-self: center; 
}


/* 5. Right Inner Col, Top: Jewelry */
.puppy-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: start; }

/* 6. Right Outer Col, Top: Tank Top */
.puppy-layout .ref-item-wrapper:nth-child(6) { grid-column: 5; grid-row: 1; align-self: start; }

/* 7. Right Inner Col, Middle: Chain */
.puppy-layout .ref-item-wrapper:nth-child(7) { grid-column: 4; grid-row: 2; align-self: center; }

/* 8. Right Outer Col, Middle: Hand/Claws */
.puppy-layout .ref-item-wrapper:nth-child(8) { grid-column: 5; grid-row: 2; align-self: center; }

/* 9. Right Cols, Bottom: Piercings (Spans bottom of both inner/outer columns) */
.puppy-layout .ref-item-wrapper:nth-child(9) { grid-column: 4 / span 2; grid-row: 3; align-self: end; }


/* Base Image Controls */
.puppy-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.puppy-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.puppy-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Dynamic Heights for Puppy Geometry */
.puppy-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.puppy-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) {
    max-height: 75vh; /* Dropped from 95vh to shrink the overall box height */
}

.puppy-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img) { max-height: 35vh; } /* Increased to let the eye scale up */
.puppy-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) { max-height: 40vh; } 

.puppy-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 25vh; } /* Jewelry */
.puppy-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 25vh; } /* Tank */
.puppy-layout .ref-item-wrapper:nth-child(7) img:not(.comment-img) { max-height: 15vh; } /* Chain */
.puppy-layout .ref-item-wrapper:nth-child(8) img:not(.comment-img) { max-height: 15vh; } /* Claws */
.puppy-layout .ref-item-wrapper:nth-child(9) img:not(.comment-img) { max-height: 25vh; } /* Piercings */


/* Toggle State */
.puppy-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.puppy-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR PUPPY --- */
@media (max-width: 1000px) {
    .puppy-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .puppy-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Reorders everything into a 2-column stack for tablets */
    .puppy-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 1; }
    .puppy-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 1; }
    
    .puppy-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 2; width: 100%; }
    .puppy-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 2; }
    
    .puppy-layout .ref-item-wrapper:nth-child(5) { grid-column: 1; grid-row: 3; }
    .puppy-layout .ref-item-wrapper:nth-child(6) { grid-column: 2; grid-row: 3; }
    
    .puppy-layout .ref-item-wrapper:nth-child(7) { grid-column: 1; grid-row: 4; }
    .puppy-layout .ref-item-wrapper:nth-child(8) { grid-column: 2; grid-row: 4; }
    
    .puppy-layout .ref-item-wrapper:nth-child(9) { grid-column: 1 / span 2; grid-row: 5; justify-content: center; }
    
    .puppy-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .puppy-layout { grid-template-columns: 1fr; }
    .puppy-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: GENERAL (5-COLUMN GRID) --- */

.general-layout {
    display: grid;
    /* 3 equal columns for full bodies, 1 wider for the face, 1 narrower for eye/piercing */
    grid-template-columns: 1.2fr 1.2fr 1.2fr 1.4fr 0.8fr; 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Full Body Front (Spans both rows) */
.general-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: end; }

/* 2. Full Body Back (Spans both rows) */
.general-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: end; }

/* 3. Full Body Side (Spans both rows, Centered Vertically) */
.general-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }

/* 4. Face (Top Left of 2x2 grid) */
.general-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }

/* 5. Eye (Top Right of 2x2 grid) */
.general-layout .ref-item-wrapper:nth-child(5) { grid-column: 5; grid-row: 1; align-self: center; justify-self: center; }

/* 6. Hairpin (Bottom Left of 2x2 grid) */
.general-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }

/* 7. Piercings (Bottom Right of 2x2 grid) */
.general-layout .ref-item-wrapper:nth-child(7) { grid-column: 5; grid-row: 2; align-self: center; justify-self: center; }


/* Base Image Controls */
.general-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.general-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.general-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Dynamic Heights for General Geometry */
.general-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.general-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 85vh; /* Gives the front/back bodies room to dictate height */
}

.general-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img) { 
    max-height: 60vh; /* Keeps the side profile shorter than the main poses */
}

.general-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) { max-height: 40vh; } /* Large Face */
.general-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 25vh; } /* Eye */
.general-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 25vh; } /* Hairpin */
.general-layout .ref-item-wrapper:nth-child(7) img:not(.comment-img) { max-height: 25vh; } /* Piercing */

/* Toggle State */
.general-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.general-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR GENERAL --- */
@media (max-width: 1000px) {
    .general-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .general-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Reorders everything into a 2-column stack for tablets */
    .general-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .general-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    .general-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; justify-content: center; } /* Centers the side profile */
    
    .general-layout .ref-item-wrapper:nth-child(4) { grid-column: 1; grid-row: 3; }
    .general-layout .ref-item-wrapper:nth-child(5) { grid-column: 2; grid-row: 3; }
    
    .general-layout .ref-item-wrapper:nth-child(6) { grid-column: 1; grid-row: 4; }
    .general-layout .ref-item-wrapper:nth-child(7) { grid-column: 2; grid-row: 4; }
    
    .general-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .general-layout { grid-template-columns: 1fr; }
    .general-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: VARIATIONS (5x2 GRID) --- */

.variations-layout {
    display: grid;
    /* 5 equal columns to map to the 2x2, 1x2, and 2x2 groups */
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Base Image & Video Controls */
.variations-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.variations-layout img:not(.comment-img),
.variations-layout video {
    max-width: 100%;
    max-height: 35vh; /* Standardizes all 10 items to the exact same max size */
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.variations-layout a:hover img:not(.comment-img),
.variations-layout a:hover video {
    transform: scale(1.04);
}


/* Grid Placement Mapping */

/* Left 2x2 (HairUp) */
.variations-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; align-self: center; justify-self: center; }
.variations-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; justify-self: center; }
.variations-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 2; align-self: center; justify-self: center; }
.variations-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 2; align-self: center; justify-self: center; }

/* Middle 1x2 (Eye Orange) */
.variations-layout .ref-item-wrapper:nth-child(5) { grid-column: 3; grid-row: 1; align-self: center; justify-self: center; }
.variations-layout .ref-item-wrapper:nth-child(6) { grid-column: 3; grid-row: 2; align-self: center; justify-self: center; }

/* Right 2x2 (Side) */
.variations-layout .ref-item-wrapper:nth-child(7) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }
.variations-layout .ref-item-wrapper:nth-child(8) { grid-column: 5; grid-row: 1; align-self: center; justify-self: center; }
.variations-layout .ref-item-wrapper:nth-child(9) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }
.variations-layout .ref-item-wrapper:nth-child(10) { grid-column: 5; grid-row: 2; align-self: center; justify-self: center; }


/* Toggle State */
.variations-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.variations-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}

/* --- MOBILE RESPONSIVENESS FOR VARIATIONS --- */
@media (max-width: 1000px) {
    .variations-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .variations-layout {
        /* Breaks the 5 columns down into a simple 2-column stack for tablets/phones */
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .variations-layout .ref-item-wrapper:nth-child(n) { 
        grid-column: auto; 
        grid-row: auto; 
    }
}

@media (max-width: 480px) {
    .variations-layout { grid-template-columns: 1fr; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: STARRY DRESS (5-COLUMN GRID) --- */

.starrydress-layout {
    display: grid;
    /* Tweaked columns slightly to give the 3/4 pose more breathing room */
    grid-template-columns: 1.2fr 1.2fr 1.5fr 0.6fr 0.6fr; 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Full Body Front (Spans both rows) */
.starrydress-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }

/* 2. Full Body Back (Spans both rows) */
.starrydress-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* 3. 3/4 Pose (Top middle-right) */
.starrydress-layout .ref-item-wrapper:nth-child(3) { 
    grid-column: 3; 
    grid-row: 1; 
    align-self: end; 
    
    /* Pulls the image left to overlap the back pose and open up space on the right */
    width: 110%;
    margin-left: -20%;
    z-index: 2; /* Ensures it sits on top of the back pose */
}

/* 4. Arms/Gloves (Top far-right inner) */
.starrydress-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: end; }

/* 5. Chain (Top far-right outer) */
.starrydress-layout .ref-item-wrapper:nth-child(5) { grid-column: 5; grid-row: 1; align-self: end; }

/* 6. Makeup (Bottom middle-right) */
.starrydress-layout .ref-item-wrapper:nth-child(6) { grid-column: 3; grid-row: 2; align-self: start; }

/* 7. Hair (Bottom far-right, spans 2 columns) */
.starrydress-layout .ref-item-wrapper:nth-child(7) { grid-column: 4 / span 2; grid-row: 2; align-self: start; justify-self: center; }


/* Base Image Controls */
.starrydress-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.starrydress-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.starrydress-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Dynamic Heights for Starry Dress Geometry */
.starrydress-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.starrydress-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 75vh; /* This drives the entire height of the box */
}

/* Constrained top right images so they don't stretch the box */
.starrydress-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.starrydress-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img),
.starrydress-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { 
	height: 48vh;
    max-height: 48vh; 
} 

/* Constrained bottom right images */
.starrydress-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img),
.starrydress-layout .ref-item-wrapper:nth-child(7) img:not(.comment-img) { 
    max-height: 23vh; 
    margin-top: 15px; 
} 


/* Toggle State */
.starrydress-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.starrydress-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR STARRY DRESS --- */
@media (max-width: 1000px) {
    .starrydress-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .starrydress-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .starrydress-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .starrydress-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    .starrydress-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; justify-content: center; } 
    
    .starrydress-layout .ref-item-wrapper:nth-child(4) { grid-column: 1; grid-row: 3; }
    .starrydress-layout .ref-item-wrapper:nth-child(5) { grid-column: 2; grid-row: 3; }
    
    .starrydress-layout .ref-item-wrapper:nth-child(6) { grid-column: 1; grid-row: 4; }
    .starrydress-layout .ref-item-wrapper:nth-child(7) { grid-column: 2; grid-row: 4; }
    
    .starrydress-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .starrydress-layout { grid-template-columns: 1fr; }
    .starrydress-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: STRAPPED (4-COLUMN GRID) --- */

.strapped-layout {
    display: grid;
    /* 4 columns: 2 wide for full-bodies, 2 structured columns for details */
    grid-template-columns: 1.3fr 1.3fr 1.2fr 0.9fr; 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 110%;
    margin-left: -5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Full Body Front (Spans both rows) */
.strapped-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }

/* 2. Full Body Back (Spans both rows) */
.strapped-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* 3. Belts (Col 3, Top) */
.strapped-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: end; }

/* 4. Hairpin (Col 4, Top) */
.strapped-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }

/* 5. HairUp (Col 3, Bottom) */
.strapped-layout .ref-item-wrapper:nth-child(5) { grid-column: 3; grid-row: 2; align-self: start; }

/* 6. Arms (Col 4, Bottom) */
.strapped-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: start; justify-self: center; }


/* Base Image Controls */
.strapped-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.strapped-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.strapped-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}


/* Dynamic Heights for Strapped Geometry */
.strapped-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.strapped-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 65vh; /* Shrunk from 85vh to bring the overall box height down */
}

.strapped-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img) { max-height: 28vh; } /* Belts */
.strapped-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) { max-height: 18vh; } /* Hairpin */

.strapped-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 32vh; margin-top: 10px; } /* HairUp */
.strapped-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 42vh; margin-top: 10px; } /* Arms */


/* Toggle State */
.strapped-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.strapped-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR STRAPPED --- */
@media (max-width: 1000px) {
    .strapped-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .strapped-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .strapped-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .strapped-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    .strapped-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 2; }
    .strapped-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 2; }
    
    .strapped-layout .ref-item-wrapper:nth-child(5) { grid-column: 1; grid-row: 3; }
    .strapped-layout .ref-item-wrapper:nth-child(6) { grid-column: 2; grid-row: 3; }
    
    .strapped-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .strapped-layout { grid-template-columns: 1fr; }
    .strapped-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: YUKATA (4-COLUMN GRID) --- */

.Yukata-layout {
    display: grid;
    /* 4 columns: 3 equal wide columns for the tall images, 1 narrower for the details */
    grid-template-columns: 1.2fr 1.2fr 1.2fr 0.9fr; 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Full Body Front (Col 1, spans all 3 rows) */
.Yukata-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; align-self: center; }

/* 2. Full Body Back (Col 2, spans all 3 rows) */
.Yukata-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 3; align-self: center; }

/* 3. Side Pose (Col 3, spans all 3 rows) */
.Yukata-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1 / span 3; align-self: center; }

/* 4. Hairpin (Col 4, Top) */
.Yukata-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }

/* 5. Choker (Col 4, Middle) */
.Yukata-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }

/* 6. New Accessory (Col 4, Bottom) */
.Yukata-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 3; align-self: center; justify-self: center; }


/* Base Image Controls */
.Yukata-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.Yukata-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.Yukata-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Dynamic Heights for Yukata Geometry */
.Yukata-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.Yukata-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img),
.Yukata-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img) {
    max-height: 80vh; /* Drives the box height uniformly */
}

/* Shrunk slightly so all 3 items fit inside the 80vh container limit */
.Yukata-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img),
.Yukata-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img),
.Yukata-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { 
    max-height: 24vh; 
} 


/* Toggle State */
.Yukata-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.Yukata-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR YUKATA --- */
@media (max-width: 1000px) {
    .Yukata-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .Yukata-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .Yukata-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .Yukata-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    .Yukata-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; justify-content: center; }
    
    .Yukata-layout .ref-item-wrapper:nth-child(4) { grid-column: 1; grid-row: 3; }
    .Yukata-layout .ref-item-wrapper:nth-child(5) { grid-column: 2; grid-row: 3; }
    
    .Yukata-layout .ref-item-wrapper:nth-child(6) { grid-column: 1 / span 2; grid-row: 4; justify-content: center; }
    
    .Yukata-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .Yukata-layout { grid-template-columns: 1fr; }
    .Yukata-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: MAGICAL GIRL (5-COLUMN GRID) --- */

.MagicalGirl-layout {
    display: grid;
    /* Gave the first column (1.1fr) a slight bump so it can scale up */
    grid-template-columns: 1.2fr 1.2fr 1.2fr 0.7fr 0.9fr; 
    gap: 15px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Hand (Col 1, Top) */
.MagicalGirl-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; align-self: end; justify-self: center; }

/* 2. Seated Pose (Col 1, Bottom) */
.MagicalGirl-layout .ref-item-wrapper:nth-child(2) { grid-column: 1; grid-row: 2; align-self: start; justify-self: center; }

/* 3. Full Body Front (Col 2, spans both rows) */
.MagicalGirl-layout .ref-item-wrapper:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* 4. Full Body Back (Col 3, spans both rows) */
.MagicalGirl-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }

/* 5. Arm Detail (Col 4, spans both rows) */
.MagicalGirl-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1 / span 2; align-self: center; }

/* 6. Legs Detail (Col 5, spans both rows) */
.MagicalGirl-layout .ref-item-wrapper:nth-child(6) { grid-column: 5; grid-row: 1 / span 2; align-self: center; }


/* Base Image Controls */
.MagicalGirl-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.MagicalGirl-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.MagicalGirl-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Dynamic Heights for Magical Girl Geometry */

/* Models 1 and 2 exclusively drive the 80vh container height */
.MagicalGirl-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.MagicalGirl-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) {
    max-height: 60vh; 
}

/* Scaled up to fill the left side */
.MagicalGirl-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img) { max-height: 35vh; } /* Hand */
.MagicalGirl-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) { max-height: 50vh; } /* Seated Pose */

/* Scaled down so they stop stretching the box */
.MagicalGirl-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 40vh; } /* Arm */
.MagicalGirl-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 60vh; } /* Legs */


/* Toggle State */
.MagicalGirl-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.MagicalGirl-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR MAGICAL GIRL --- */
@media (max-width: 1000px) {
    .MagicalGirl-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .MagicalGirl-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .MagicalGirl-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 1; }
    .MagicalGirl-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 1; }
    
    .MagicalGirl-layout .ref-item-wrapper:nth-child(5) { grid-column: 1; grid-row: 2; }
    .MagicalGirl-layout .ref-item-wrapper:nth-child(6) { grid-column: 2; grid-row: 2; }

    .MagicalGirl-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 3; }
    .MagicalGirl-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 3; }
    
    .MagicalGirl-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .MagicalGirl-layout { grid-template-columns: 1fr; }
    .MagicalGirl-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: SWIMSUIT (4-COLUMN GRID) --- */

.Swimsuit-layout {
    display: grid;
    /* 4 columns: 3 equal widths for the tall images, slightly narrower for the stacked right column */
    grid-template-columns: 1fr 1fr 1fr 0.8fr; 
    gap: 15px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Full Body Front (Col 1, spans both rows) */
.Swimsuit-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }

/* 2. Full Body Back (Col 2, spans both rows) */
.Swimsuit-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* 3. New Image (Col 3, Top) */
.Swimsuit-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: center; justify-self: center; }

/* 4. Coverup (Col 3, Bottom) */
.Swimsuit-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 2; align-self: center; justify-self: center; }

/* 5. Donut (Col 4, Top) */
.Swimsuit-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }

/* 6. Hand Detail (Col 4, Bottom) */
.Swimsuit-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }


/* Base Image Controls */
.Swimsuit-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.Swimsuit-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.Swimsuit-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}


/* Dynamic Heights for Swimsuit Geometry */

/* Models 1 and 2 drive the 90vh container height */
.Swimsuit-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.Swimsuit-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 90vh; 
}

/* Scaled down so they stack cleanly inside the 3rd and 4th columns */
.Swimsuit-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.Swimsuit-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img),
.Swimsuit-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img),
.Swimsuit-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { 
    max-height: 45vh; 
} 


/* Toggle State */
.Swimsuit-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.Swimsuit-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR SWIMSUIT --- */
@media (max-width: 1000px) {
    .Swimsuit-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .Swimsuit-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .Swimsuit-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .Swimsuit-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    .Swimsuit-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 2; justify-self: center; }
    .Swimsuit-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: center; }
    
    .Swimsuit-layout .ref-item-wrapper:nth-child(5) { grid-column: 1; grid-row: 3; justify-self: center; }
    .Swimsuit-layout .ref-item-wrapper:nth-child(6) { grid-column: 2; grid-row: 3; justify-self: center; }
    
    .Swimsuit-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .Swimsuit-layout { grid-template-columns: 1fr; }
    .Swimsuit-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: BUNNY MAID (4-COLUMN GRID) --- */

.BunnyMaid-layout {
    display: grid;
    /* 4 columns: equal widths */
    grid-template-columns: 1fr 1fr 0.9fr 1.1fr; 
    gap: 15px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Full Body Front (Col 1, spans both rows) */
.BunnyMaid-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }

/* 2. Full Body Back (Col 2, spans both rows) */
.BunnyMaid-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* 3. Hand Detail (Col 3, Top) */
.BunnyMaid-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: end; justify-self: center; }

/* 4. Closeup (Col 4, Top) */
.BunnyMaid-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: end; justify-self: center; }

/* 5. Ears Detail (Spans Cols 3 & 4, Bottom) */
.BunnyMaid-layout .ref-item-wrapper:nth-child(5) { grid-column: 3 / span 2; grid-row: 2; align-self: start; justify-self: center; margin-top: 15px; }


/* Base Image Controls */
.BunnyMaid-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.BunnyMaid-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.BunnyMaid-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}


/* Dynamic Heights for Bunny Maid Geometry */

/* Models 1 and 2 drive the vertical container height */
.BunnyMaid-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.BunnyMaid-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 85vh; 
}

/* Scaled to fit cleanly in the top right quadrant */
.BunnyMaid-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.BunnyMaid-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) { 
    max-height: 40vh; 
} 

/* Scaled to stretch across the bottom right quadrant */
.BunnyMaid-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { 
    max-height: 35vh; 
}


/* Toggle State */
.BunnyMaid-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.BunnyMaid-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR BUNNY MAID --- */
@media (max-width: 1000px) {
    .BunnyMaid-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .BunnyMaid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .BunnyMaid-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .BunnyMaid-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    .BunnyMaid-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 2; justify-self: center; }
    .BunnyMaid-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: center; }
    
    .BunnyMaid-layout .ref-item-wrapper:nth-child(5) { grid-column: 1 / span 2; grid-row: 3; justify-self: center; }
    
    .BunnyMaid-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .BunnyMaid-layout { grid-template-columns: 1fr; }
    .BunnyMaid-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}



/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: SNOWFLAKES (4-COLUMN GRID) --- */
.Snowflakes-layout {
    display: grid;
    /* 4 columns: 3 equal widths for the tall images, slightly narrower for the stacked right column */
    grid-template-columns: 1fr 1fr 1fr 0.9fr; 
    gap: 15px;
    align-items: center; 
    margin-top: 20px;

    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 

    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */
/* 1. Full Body Front (Col 1, spans both rows) */
.Snowflakes-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }

/* 2. Full Body Back (Col 2, spans both rows) */
.Snowflakes-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* 3. Coverup (Col 3, spans both rows) */
.Snowflakes-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }

/* 4. Donut (Col 4, Top) */
.Snowflakes-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }

/* 5. Hand Detail (Col 4, Bottom) */
.Snowflakes-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }

/* Base Image Controls */
.Snowflakes-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.Snowflakes-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.Snowflakes-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Dynamic Heights for Snowflake Geometry */

/* Models 1, 2, and Coverup drive the 80vh container height */
.Snowflakes-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.Snowflakes-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img),
.Snowflakes-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img) {
    max-height: 70vh; 
}

/* Scaled down so they stack cleanly inside the 4th column */
.Snowflakes-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img),
.Snowflakes-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { 
    max-height: 45vh; 
} 

/* Toggle State */

.Snowflakes-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.Snowflakes-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}

/* --- MOBILE RESPONSIVENESS FOR Snowflakes --- */
@media (max-width: 1000px) {
    .Snowflakes-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .Snowflakes-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .Snowflakes-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .Snowflakes-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }

    .Snowflakes-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; justify-self: center; }

    .Snowflakes-layout .ref-item-wrapper:nth-child(4) { grid-column: 1; grid-row: 3; justify-self: center; }
    .Snowflakes-layout .ref-item-wrapper:nth-child(5) { grid-column: 2; grid-row: 3; justify-self: center; }

    .Snowflakes-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .Snowflakes-layout { grid-template-columns: 1fr; }
    .Snowflakes-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
} 

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: VAMPIRE (5-COLUMN GRID) --- */

.Vampire-layout {
    display: grid;
    /* 5 columns: Narrow left and far-right sections bordering wide center columns */
    grid-template-columns: 0.9fr 0.6fr 1.3fr 1.3fr 1.1fr; 
    gap: 15px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Back (Col 1, Top Half) */
.Vampire-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: start; justify-self: center; }

/* 2. Rose (Col 2, Top) */
.Vampire-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: start; justify-self: center; }

/* 3. Front (Spans Cols 1 & 2, Bottom Half) */
.Vampire-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 2; grid-row: 3 / span 2; align-self: end; justify-self: center; }

/* 4. Full Body Front (Col 3, Spans all 4 rows) */
.Vampire-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 1 / span 4; align-self: center; }

/* 5. Full Body Back (Col 4, Spans all 4 rows) */
.Vampire-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1 / span 4; align-self: center; }

/* 6. Face (Col 5, Top Half) */
.Vampire-layout .ref-item-wrapper:nth-child(6) { grid-column: 5; grid-row: 1 / span 2; align-self: start; justify-self: center; }

/* 7. Jewelry (Col 5, Middle) */
.Vampire-layout .ref-item-wrapper:nth-child(7) { grid-column: 5; grid-row: 3; align-self: center; justify-self: center; }

/* 8. Nails (Col 5, Bottom) */
.Vampire-layout .ref-item-wrapper:nth-child(8) { grid-column: 5; grid-row: 4; align-self: end; justify-self: center; }


/* Base Image Controls */
.Vampire-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.Vampire-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.Vampire-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}


/* Dynamic Heights for Vampire Geometry */

/* Models 1 and 2 exclusively drive the vertical container height */
.Vampire-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img),
.Vampire-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) {
    max-height: 85vh; 
}

/* Scaled down to stack cleanly within the outer columns */
.Vampire-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.Vampire-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img) { max-height: 38vh; } /* Front/Back */

.Vampire-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) { max-height: 25vh; } /* Rose */
.Vampire-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 35vh; } /* Face */
.Vampire-layout .ref-item-wrapper:nth-child(7) img:not(.comment-img) { max-height: 15vh; } /* Jewelry */
.Vampire-layout .ref-item-wrapper:nth-child(8) img:not(.comment-img) { max-height: 25vh; } /* Nails */


/* Toggle State */
.Vampire-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.Vampire-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR VAMPIRE --- */
@media (max-width: 1000px) {
    .Vampire-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .Vampire-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .Vampire-layout .ref-item-wrapper:nth-child(4) { grid-column: 1; grid-row: 1; }
    .Vampire-layout .ref-item-wrapper:nth-child(5) { grid-column: 2; grid-row: 1; }
    
    .Vampire-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 2; }
    .Vampire-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 2; grid-row: 3; justify-self: center; } /* Also fixed for mobile */
    
    .Vampire-layout .ref-item-wrapper:nth-child(6) { grid-column: 1 / span 2; grid-row: 4; justify-self: center; }
    
    .Vampire-layout .ref-item-wrapper:nth-child(2) { grid-column: 1; grid-row: 5; justify-self: center; }
    .Vampire-layout .ref-item-wrapper:nth-child(7) { grid-column: 2; grid-row: 5; justify-self: center; }
    
    .Vampire-layout .ref-item-wrapper:nth-child(8) { grid-column: 1 / span 2; grid-row: 6; justify-self: center; }
    
    .Vampire-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .Vampire-layout { grid-template-columns: 1fr; }
    .Vampire-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: Witch (4-COLUMN GRID) --- */

.Witch-layout {
    display: grid;
    /* 4 columns: 3 equal widths for the tall images, slightly narrower for the stacked right column */
    grid-template-columns: 1fr 1fr 1fr 0.8fr; 
    gap: 15px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */

/* 1. Full Body Front (Col 1, spans both rows) */
.Witch-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }

/* 2. Full Body Back (Col 2, spans both rows) */
.Witch-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* 3. New Image (Col 3, Top) */
.Witch-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: center; justify-self: center; }

/* 4. Coverup (Col 3, Bottom) */
.Witch-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 2; align-self: center; justify-self: center; }

/* 5. Donut (Col 4, Top) */
.Witch-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }

/* 6. Hand Detail (Col 4, Bottom) */
.Witch-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }


/* Base Image Controls */
.Witch-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.Witch-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.Witch-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}


/* Dynamic Heights for Witch Geometry */

/* Models 1 and 2 drive the 90vh container height */
.Witch-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img),
.Witch-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) {
    max-height: 90vh; 
}

/* Scaled down so they stack cleanly inside the 3rd and 4th columns */
.Witch-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img),
.Witch-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) {
	max-height: 30vh;
}
.Witch-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img),
.Witch-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { 
    max-height: 50vh; 
} 


/* Toggle State */
.Witch-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.Witch-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}


/* --- MOBILE RESPONSIVENESS FOR Witch --- */
@media (max-width: 1000px) {
    .Witch-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .Witch-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .Witch-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .Witch-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    
    .Witch-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 2; justify-self: center; }
    .Witch-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: center; }
    
    .Witch-layout .ref-item-wrapper:nth-child(5) { grid-column: 1; grid-row: 3; justify-self: center; }
    .Witch-layout .ref-item-wrapper:nth-child(6) { grid-column: 2; grid-row: 3; justify-self: center; }
    
    .Witch-layout .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .Witch-layout { grid-template-columns: 1fr; }
    .Witch-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}

/* --- INDIVIDUAL OUTFIT GALLERY LAYOUT: EISHI (4-COLUMN GRID) --- */

.Eishi-layout {
    display: grid;
    /* 4 equally sized columns */
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    align-items: center; 
    margin-top: 20px;
    
    width: 125%;
    margin-left: -12.5%;
    transition: all 0.4s ease-in-out; 
    
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
}

/* Image Placement & Vertical Anchoring */
.Eishi-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; align-self: center; }
.Eishi-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; align-self: center; }
.Eishi-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; align-self: center; }
.Eishi-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; align-self: center; }

/* Base Image Controls */
.Eishi-layout a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.Eishi-layout img:not(.comment-img) {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s ease-in-out;
}

.Eishi-layout a:hover img:not(.comment-img) {
    transform: scale(1.04);
}

/* Dynamic Heights for Eishi Geometry */
.Eishi-layout .ref-item-wrapper img:not(.comment-img) {
    max-height: 80vh; /* Standardizes all 4 images to the same height */
}

/* Toggle State */
.Eishi-layout.comments-active {
    background-color: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color); 
    box-shadow: var(--glow);
}

.Eishi-layout.comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}

/* --- MOBILE RESPONSIVENESS FOR EISHI --- */
@media (max-width: 1000px) {
    .Eishi-layout { width: 100%; margin-left: 0; }
}

@media (max-width: 800px) {
    .Eishi-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .Eishi-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; }
    .Eishi-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1; }
    .Eishi-layout .ref-item-wrapper:nth-child(3) { grid-column: 1; grid-row: 2; }
    .Eishi-layout .ref-item-wrapper:nth-child(4) { grid-column: 2; grid-row: 2; }
    
    .Eishi-layout .ref-item-wrapper img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 480px) {
    .Eishi-layout { grid-template-columns: 1fr; }
    .Eishi-layout .ref-item-wrapper:nth-child(n) { grid-column: 1; grid-row: auto; }
}