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

: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);
}

html, body {
    overflow-x: hidden; 
}

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

.profile-card, .status-widget, .about-section, .link-box, .modal-content, .weekly-schedule-panel, .monthly-events-panel, .frosted-panel, [class*="-layout"].comments-active {
    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);
}

.main-header, .profile-card, .status-widget, .about-section, .link-box, .weekly-schedule-panel, .monthly-events-panel {
    position: relative; 
}

.profile-card, .status-widget, .about-section, .link-box {
    padding: 25px;
}

.main-header {
    background-color: rgba(211, 182, 234, 0.7); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-radius: 25px;
    border: 2px solid var(--border-color); 
    box-shadow: var(--glow);
    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);
}

.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;
}

.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-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;
}

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

.social-link:hover .webp-icon, .action-btn:hover .webp-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;
}

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

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

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

.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 {
    padding: 40px; 
    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;
}

.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 {
    padding: 40px;
}

.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);
}

.schedule-art-col {
    position: fixed;
    bottom: 0px; 
    width: 20%; 
    z-index: 5;
}

.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;
}

.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);
}

.frosted-panel {
    padding: 20px; 
}

.glass-header {
    margin-top: 0;
    background-color: rgba(211, 182, 234, 0.7);
    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;
}

.credit-text-area {
    padding: 0 10px;
}

.credits-container {
    max-width: 1000px; 
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px; 
}

.credits-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.credit-text-area {
    padding: 20px;
}

.credit-text-area a {
    color: #301754; 
    font-weight: normal;
    text-decoration: underline;
}

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

.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);
}

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

.art-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.art-overlay {
    position: absolute;
    inset: 0; 
    background: rgba(0, 0, 0, 0.75); 
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

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

.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); 
    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; 
}

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

.credit-list {
    list-style: none;
    padding: 0 10px;
    margin: 0;
    text-align: left; 
}

.credit-list li {
    margin-bottom: 12px;
    line-height: 1.5;
    position: relative;
    padding-left: 25px; 
}

.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;
}

.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); 
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
}

.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; 
}

.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; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ref-dropdown summary::after {
    content: '+';
    font-size: 1.5rem;
}
.ref-dropdown[open] summary::after {
    content: '−';
}

.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;
}

.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;
}

.partner-content {
    display: flex;
    gap: 35px;
    align-items: center;
    padding: 10px 20px;
}

.partner-content.reverse {
    flex-direction: row-reverse;
}

.partner-img-wrapper {
    flex: 0 0 300px;
    height: auto; /* Swapped to auto so it naturally fits your baked images */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-img-wrapper a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.partner-img-wrapper img {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
    
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
    transition: transform 0.2s ease-in-out;
}

.partner-img-wrapper a:hover img {
    transform: scale(1.05);
}

.partner-text {
    flex: 1;
    line-height: 1.6;
    font-size: 1.15rem;
}

@media (max-width: 768px) {
    .partner-content, .partner-content.reverse {
        flex-direction: column;
        text-align: center;
    }
    .partner-img-wrapper {
        width: 100%;
        flex: auto;
    }
}

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

.art-overlay-light {
    position: absolute;
    inset: 0; 
    background: rgba(255, 255, 255, 0.85); 
    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); 
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    text-shadow: none; 
    text-align: center;
}

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

.credit-text-area > p:first-child {
    margin-top: 0;
}

.dropdown-subhead {
    color: var(--heading-purple);
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 5px;
}

.dropdown-content .dropdown-subhead:first-child {
    margin-top: 0;
}

/* =========================================================================
   UNIVERSAL GALLERY OUTFIT LAYOUT 
   Applies base formatting to any class ending in "-layout" 
   ========================================================================= */
[class*="-layout"] {
    display: grid;
    padding: 40px;
    border: 2px solid transparent; 
    border-radius: 25px;
    box-sizing: border-box; 
    transition: all 0.4s ease-in-out; 
    margin-top: 20px;
}

[class*="-layout"] a {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

[class*="-layout"] img:not(.comment-img), 
.variations-layout video {
    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;
}

[class*="-layout"] a:hover img:not(.comment-img), 
.variations-layout a:hover video {
    transform: scale(1.04);
}

[class*="-layout"].comments-active .comment-img {
    opacity: 1;
    visibility: visible;
}

.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; 
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.ref-item-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    z-index: 1; 
}


/* --- REFERENCE GALLERY --- */
.reference-gallery-layout {
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: end;
    width: 110%;
    margin-left: -5%;
}
.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; }
.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; }
.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; }

.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; }


/* --- FISHNETS --- */
.fishnets-layout {
    grid-template-columns: 1fr 1.3fr 1.3fr 1.2fr; 
    gap: 20px;
    align-items: center; 
    width: 120%;
    margin-left: -10%;
}
.fishnets-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; align-self: end; }
.fishnets-layout .ref-item-wrapper:nth-child(2) { grid-column: 1; grid-row: 2; align-self: start; }
.fishnets-layout .ref-item-wrapper:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.fishnets-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; align-self: end; }
.fishnets-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: start; }
.fishnets-layout .ref-item-wrapper:nth-child(6) { 
    grid-column: 4; 
    grid-row: 2; 
    align-self: end; 
    width: 160%; 
    margin-left: -60%; 
    margin-top: -20%;
    z-index: 2; 
}

.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; }
.fishnets-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 85vh; }
.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; }
.fishnets-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 35vh; }


/* --- PUPPY --- */
.puppy-layout {
    grid-template-columns: 1.3fr 1.3fr 1.3fr 0.9fr 0.9fr; 
    gap: 20px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.puppy-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; align-self: start; width: 110%; z-index: 2; }
.puppy-layout .ref-item-wrapper:nth-child(2) { grid-column: 1; grid-row: 2 / span 2; align-self: end; width: 140%; margin-right: -40%; z-index: 2; }
.puppy-layout .ref-item-wrapper:nth-child(3) { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.puppy-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
.puppy-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: start; }
.puppy-layout .ref-item-wrapper:nth-child(6) { grid-column: 5; grid-row: 1; align-self: start; }
.puppy-layout .ref-item-wrapper:nth-child(7) { grid-column: 4; grid-row: 2; align-self: center; }
.puppy-layout .ref-item-wrapper:nth-child(8) { grid-column: 5; grid-row: 2; align-self: center; }
.puppy-layout .ref-item-wrapper:nth-child(9) { grid-column: 4 / span 2; grid-row: 3; align-self: end; }

.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; }
.puppy-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img) { max-height: 35vh; } 
.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),
.puppy-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img),
.puppy-layout .ref-item-wrapper:nth-child(9) img:not(.comment-img) { max-height: 25vh; }
.puppy-layout .ref-item-wrapper:nth-child(7) img:not(.comment-img),
.puppy-layout .ref-item-wrapper:nth-child(8) img:not(.comment-img) { max-height: 15vh; }


/* --- GENERAL --- */
.general-layout {
    grid-template-columns: 1.2fr 1.2fr 1.2fr 1.4fr 0.8fr; 
    gap: 20px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.general-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: end; }
.general-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.general-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.general-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }
.general-layout .ref-item-wrapper:nth-child(5) { grid-column: 5; grid-row: 1; align-self: center; justify-self: center; }
.general-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }
.general-layout .ref-item-wrapper:nth-child(7) { grid-column: 5; grid-row: 2; align-self: center; justify-self: center; }

.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; }
.general-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img) { max-height: 60vh; }
.general-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) { max-height: 40vh; }
.general-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img),
.general-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img),
.general-layout .ref-item-wrapper:nth-child(7) img:not(.comment-img) { max-height: 25vh; }


/* --- VARIATIONS --- */
.variations-layout {
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.variations-layout video { max-height: 35vh; }
.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; }
.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; }
.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; }


/* --- STARRY DRESS --- */
.starrydress-layout {
    grid-template-columns: 1.2fr 1.2fr 1.5fr 0.6fr 0.6fr; 
    gap: 20px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.starrydress-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.starrydress-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.starrydress-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: end; width: 110%; margin-left: -20%; z-index: 2; }
.starrydress-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: end; }
.starrydress-layout .ref-item-wrapper:nth-child(5) { grid-column: 5; grid-row: 1; align-self: end; }
.starrydress-layout .ref-item-wrapper:nth-child(6) { grid-column: 3; grid-row: 2; align-self: start; }
.starrydress-layout .ref-item-wrapper:nth-child(7) { grid-column: 4 / span 2; grid-row: 2; align-self: start; justify-self: center; }

.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; }
.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; } 
.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; } 


/* --- STRAPPED --- */
.strapped-layout {
    grid-template-columns: 1.3fr 1.3fr 1.2fr 0.9fr; 
    gap: 20px;
    align-items: center; 
    width: 110%;
    margin-left: -5%;
}
.strapped-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.strapped-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.strapped-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: end; }
.strapped-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }
.strapped-layout .ref-item-wrapper:nth-child(5) { grid-column: 3; grid-row: 2; align-self: start; }
.strapped-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: start; justify-self: center; }

.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; }
.strapped-layout .ref-item-wrapper:nth-child(3) img:not(.comment-img) { max-height: 28vh; }
.strapped-layout .ref-item-wrapper:nth-child(4) img:not(.comment-img) { max-height: 18vh; }
.strapped-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 32vh; margin-top: 10px; }
.strapped-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 42vh; margin-top: 10px; }


/* --- YUKATA --- */
.Yukata-layout {
    grid-template-columns: 1.2fr 1.2fr 1.2fr 0.9fr; 
    gap: 20px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.Yukata-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; align-self: center; }
.Yukata-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.Yukata-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
.Yukata-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }
.Yukata-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }
.Yukata-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 3; align-self: center; justify-self: center; }

.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; }
.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; } 


/* --- MAGICAL GIRL --- */
.MagicalGirl-layout {
    grid-template-columns: 1.2fr 1.2fr 1.2fr 0.7fr 0.9fr; 
    gap: 15px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.MagicalGirl-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1; align-self: end; justify-self: center; }
.MagicalGirl-layout .ref-item-wrapper:nth-child(2) { grid-column: 1; grid-row: 2; align-self: start; justify-self: center; }
.MagicalGirl-layout .ref-item-wrapper:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.MagicalGirl-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.MagicalGirl-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1 / span 2; align-self: center; }
.MagicalGirl-layout .ref-item-wrapper:nth-child(6) { grid-column: 5; grid-row: 1 / span 2; align-self: center; }

.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; }
.MagicalGirl-layout .ref-item-wrapper:nth-child(1) img:not(.comment-img) { max-height: 35vh; }
.MagicalGirl-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) { max-height: 50vh; } 
.MagicalGirl-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 40vh; } 
.MagicalGirl-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 60vh; } 


/* --- SWIMSUIT --- */
.Swimsuit-layout {
    grid-template-columns: 1fr 1fr 1fr 0.8fr; 
    gap: 15px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.Swimsuit-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.Swimsuit-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.Swimsuit-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: center; justify-self: center; }
.Swimsuit-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 2; align-self: center; justify-self: center; }
.Swimsuit-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }
.Swimsuit-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }

.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; }
.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; } 


/* --- BUNNY MAID --- */
.BunnyMaid-layout {
    grid-template-columns: 1fr 1fr 0.9fr 1.1fr; 
    gap: 15px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.BunnyMaid-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.BunnyMaid-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.BunnyMaid-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: end; justify-self: center; }
.BunnyMaid-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: end; justify-self: center; }
.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; }

.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; }
.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; } 
.BunnyMaid-layout .ref-item-wrapper:nth-child(5) img:not(.comment-img) { max-height: 35vh; }


/* --- SNOWFLAKES --- */
.Snowflakes-layout {
    grid-template-columns: 1fr 1fr 1fr 0.9fr; 
    gap: 15px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.Snowflakes-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.Snowflakes-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.Snowflakes-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.Snowflakes-layout .ref-item-wrapper:nth-child(4) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }
.Snowflakes-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }

.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; }
.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; } 


/* --- VAMPIRE --- */
.Vampire-layout {
    grid-template-columns: 0.9fr 0.6fr 1.3fr 1.3fr 1.1fr; 
    gap: 15px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.Vampire-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: start; justify-self: center; }
.Vampire-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: start; justify-self: center; }
.Vampire-layout .ref-item-wrapper:nth-child(3) { grid-column: 1 / span 2; grid-row: 3 / span 2; align-self: end; justify-self: center; }
.Vampire-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 1 / span 4; align-self: center; }
.Vampire-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1 / span 4; align-self: center; }
.Vampire-layout .ref-item-wrapper:nth-child(6) { grid-column: 5; grid-row: 1 / span 2; align-self: start; justify-self: center; }
.Vampire-layout .ref-item-wrapper:nth-child(7) { grid-column: 5; grid-row: 3; align-self: center; justify-self: center; }
.Vampire-layout .ref-item-wrapper:nth-child(8) { grid-column: 5; grid-row: 4; align-self: end; justify-self: center; }

.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; }
.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; } 
.Vampire-layout .ref-item-wrapper:nth-child(2) img:not(.comment-img) { max-height: 25vh; } 
.Vampire-layout .ref-item-wrapper:nth-child(6) img:not(.comment-img) { max-height: 35vh; } 
.Vampire-layout .ref-item-wrapper:nth-child(7) img:not(.comment-img) { max-height: 15vh; } 
.Vampire-layout .ref-item-wrapper:nth-child(8) img:not(.comment-img) { max-height: 25vh; } 


/* --- WITCH --- */
.Witch-layout {
    grid-template-columns: 1fr 1fr 1fr 0.8fr; 
    gap: 15px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.Witch-layout .ref-item-wrapper:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.Witch-layout .ref-item-wrapper:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.Witch-layout .ref-item-wrapper:nth-child(3) { grid-column: 3; grid-row: 1; align-self: center; justify-self: center; }
.Witch-layout .ref-item-wrapper:nth-child(4) { grid-column: 3; grid-row: 2; align-self: center; justify-self: center; }
.Witch-layout .ref-item-wrapper:nth-child(5) { grid-column: 4; grid-row: 1; align-self: center; justify-self: center; }
.Witch-layout .ref-item-wrapper:nth-child(6) { grid-column: 4; grid-row: 2; align-self: center; justify-self: center; }

.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; }
.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; } 


/* --- EISHI --- */
.Eishi-layout {
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    align-items: center; 
    width: 125%;
    margin-left: -12.5%;
}
.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; }

.Eishi-layout .ref-item-wrapper img:not(.comment-img) { max-height: 80vh; }


/* =========================================================================
   UNIVERSAL MOBILE RESPONSIVENESS
   ========================================================================= */

@media (max-width: 900px) {
    body {
        background-image: url('../assets/bg-mobile.webp'); 
    }
    .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;
    }
    .schedule-container {
        flex-direction: column;
    }
    .schedule-list-col {
        width: 95%; 
    }
    .schedule-art-col {
        display: none; 
    }
    .schedule-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 1000px) {
    [class*="-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; }

    .fishnets-layout, .puppy-layout, .general-layout, .variations-layout, .starrydress-layout, .strapped-layout, .Yukata-layout, .MagicalGirl-layout, .Swimsuit-layout, .BunnyMaid-layout, .Snowflakes-layout, .Vampire-layout, .Witch-layout, .Eishi-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;}

    .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; }

    .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; }
    .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; }

    .variations-layout .ref-item-wrapper:nth-child(n) { grid-column: auto; grid-row: auto; }

    .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; }

    .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; }

    .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; }

    .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; }

    .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; }

    .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; }

    .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; }

    .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; } 
    .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; }

    .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; }

    .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; }

    [class*="-layout"] .ref-item-wrapper:nth-child(n) img:not(.comment-img) { max-height: 50vh; }
}

@media (max-width: 768px) {
    .credits-top-row {
        grid-template-columns: 1fr;
    }
    .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    .dropdown-grid, .ref-main-grid {
        grid-template-columns: 1fr; 
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 480px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    [class*="-layout"] {
        grid-template-columns: 1fr;
    }
    [class*="-layout"] .ref-item-wrapper:nth-child(n) {
        grid-column: 1;
        grid-row: auto;
    }
}