/* 
  KuraTe Platform - Prototype Styles
  Tone: Elegant, High-End, Trustworthy
*/

/* Global back button — consistent across all pages */
.fm-back-global {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #888;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.fm-back-global:hover {
    color: var(--primary-gold);
    border-color: var(--primary-gold);
}

:root {
    /* Rich metallic gold — warmer bronze undertone, less flat yellow */
    --gold-highlight: #F0E4C3;
    --gold-light: #D9BC6A;
    --primary-gold: #B8922E;
    --gold-mid: #967018;
    --gold-dark: #7A5A14;
    --gold-deep: #4A3810;
    --gold-rgb: 184, 146, 46;
    --gold-gradient: linear-gradient(
        165deg,
        var(--gold-highlight) 0%,
        var(--gold-light) 22%,
        var(--primary-gold) 48%,
        var(--gold-mid) 72%,
        var(--gold-dark) 100%
    );
    --gold-gradient-text: linear-gradient(
        118deg,
        var(--gold-highlight) 0%,
        var(--gold-light) 18%,
        var(--primary-gold) 42%,
        var(--gold-mid) 62%,
        var(--gold-light) 80%,
        var(--gold-highlight) 100%
    );
    --gold-border-gradient: linear-gradient(
        90deg,
        transparent 0%,
        var(--gold-dark) 18%,
        var(--gold-light) 50%,
        var(--gold-dark) 82%,
        transparent 100%
    );
    /* Ornate filigree frame for category sections (discovery + admin directory) */
    --category-frame-border-image: url("data:image/svg+xml;utf8,<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'><rect x='1' y='1' width='38' height='38' fill='none' stroke='%23B8922E' stroke-width='1.2'/><path d='M1 12 Q 12 12 12 1' fill='none' stroke='%23D9BC6A' stroke-width='1.6'/><path d='M28 1 Q 28 12 39 12' fill='none' stroke='%23D9BC6A' stroke-width='1.6'/><path d='M39 28 Q 28 28 28 39' fill='none' stroke='%23D9BC6A' stroke-width='1.6'/><path d='M12 39 Q 12 28 1 28' fill='none' stroke='%23D9BC6A' stroke-width='1.6'/><path d='M4 6 Q 6 4 8 6 Q 6 8 4 6' fill='%232e7d32'/><path d='M36 6 Q 34 4 32 6 Q 34 8 36 6' fill='%232e7d32'/><path d='M36 34 Q 34 36 32 34 Q 34 32 36 34' fill='%232e7d32'/><path d='M4 34 Q 6 36 8 34 Q 6 32 4 34' fill='%232e7d32'/><circle cx='6' cy='6' r='1.5' fill='%23b81d1d'/><circle cx='34' cy='6' r='1.5' fill='%23b81d1d'/><circle cx='34' cy='34' r='1.5' fill='%23b81d1d'/><circle cx='6' cy='34' r='1.5' fill='%23b81d1d'/></svg>");
    --dark-bg: #0D0D0D;
    --light-text: #F5F5F5;
    --accent-red: #8B0000;
    --glass-bg: rgba(255, 255, 255, 0.1);
    /* Sitio ya diseñado en oscuro: evita auto-inversión del navegador (Chrome/Safari dark mode) */
    color-scheme: dark;
}

html {
    color-scheme: dark;
    background-color: var(--dark-bg);
}

/* Logos, banderas e íconos de marca: colores originales, sin inversión del browser */
img.page-logo,
img.landing-logo,
img.preserve-brand-colors,
.lang-switcher img,
.how-to-pay-logo,
img[src*="KuraTe_logo"],
img[src*="flagcdn.com"],
img[src*="/images/mercadopago"],
img[src*="/images/bbva"] {
    color-scheme: only light;
    forced-color-adjust: none;
}

@media (prefers-color-scheme: dark) {
    img.page-logo,
    img.landing-logo,
    img.preserve-brand-colors,
    .lang-switcher img,
    .how-to-pay-logo,
    img[src*="KuraTe_logo"],
    img[src*="flagcdn.com"],
    img[src*="/images/mercadopago"],
    img[src*="/images/bbva"] {
        filter: none !important;
        -webkit-filter: none !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

body.landing-page {
    overflow-x: auto;
}

/* Typography */
h1,
h2,
h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gold-text {
    background: var(--gold-gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
    animation: gold-text-shimmer 10s ease-in-out infinite;
}

@keyframes gold-text-shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

@media (prefers-reduced-motion: reduce) {
    .gold-text {
        animation: none;
        background-size: auto;
    }

    .logo {
        animation: none;
        background-size: auto;
    }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    position: relative;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 60px;
}

header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gold-border-gradient);
    opacity: 0.85;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--gold-gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
    animation: gold-text-shimmer 10s ease-in-out infinite;
    color-scheme: only light;
}

a.logo img {
    color-scheme: only light;
}

/* Components */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--gold-rgb), 0.32);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(var(--gold-rgb), 0.06);
}

.card:hover {
    border-color: var(--gold-light);
    box-shadow:
        inset 0 1px 0 rgba(var(--gold-rgb), 0.12),
        0 0 16px rgba(var(--gold-rgb), 0.08);
    transform: translateY(-5px);
}

button {
    background: var(--gold-gradient);
    color: var(--dark-bg);
    border: 1px solid var(--gold-dark);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 236, 190, 0.38),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22),
        0 2px 8px rgba(0, 0, 0, 0.35),
        0 0 12px rgba(var(--gold-rgb), 0.14);
}

button:hover {
    background: linear-gradient(
        165deg,
        var(--gold-highlight) 0%,
        var(--gold-light) 30%,
        var(--primary-gold) 58%,
        var(--gold-mid) 100%
    );
    box-shadow:
        inset 0 1px 0 rgba(255, 244, 210, 0.48),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18),
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(var(--gold-rgb), 0.22);
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: white;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 100000;
    padding: 10px 16px;
    background: var(--gold-gradient);
    color: var(--dark-bg);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    border: 1px solid var(--gold-dark);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
}

.alert[role="alert"],
.alert[aria-live] {
    margin-bottom: 16px;
}

.landing-login-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #ccc;
    text-align: left;
}

.landing-login-form .form-group {
    margin-bottom: 12px;
}

.landing-login-form .form-group input {
    margin-bottom: 0;
}

.password-recovery-panel label,
.recovery-code-input + label,
.password-recovery-page .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #ccc;
    text-align: left;
}

.remove-overlay {
    border: none;
    padding: 0;
}

.form-select {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: white;
    -webkit-appearance: none;
    /* Removes default browser styling */
    appearance: none;
}

.form-select option {
    /* Ensure dropdown options are readable against light OS backgrounds */
    background: var(--dark-bg);
    color: var(--light-text);
}

/* Filter Form */
.filter-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.filter-control {
    flex: 1;
    text-align: left;
}

.filter-control label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-gold);
}

/* Sections */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-style: italic;
}

/* Discovery Feed — 4 columns desktop, 2 on mobile (inner category grids only) */
.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 50px;
}

/* Hogar directory grid — 3 columns on mobile */
#hogarGrid.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 768px) {
    #hogarGrid.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    #hogarGrid.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}

/* Category mount — sections stack full width; photos live in inner .grid rows */
#treasureGrid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    margin-top: 0;
}

#treasureGrid.grid {
    display: grid;
    margin-top: 50px;
}

.discovery-cat-section > .grid,
.fileteado-section.discovery-cat-section .grid {
    margin-top: 10px;
    width: 100%;
}

.discovery-cat-section .treasure-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.treasure-card {
    text-align: center;
}

/* Discovery/category grids — photos fill cells; no gold frame per tile */
.treasure-card.card {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0;
    backdrop-filter: none;
    border-radius: 0;
}

.treasure-card.card:hover {
    border: none;
    transform: none;
    box-shadow: none;
}

.treasure-card {
    transition: transform 0.25s ease;
}

.treasure-card:hover {
    transform: translateY(-2px);
}

.treasure-img-container {
    margin: 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    padding: 0;
    border-radius: 8px;
    background: #111;
    border: 1px solid rgba(var(--gold-rgb), 0.28);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.45),
        inset 0 0 16px rgba(var(--gold-rgb), 0.05);
    overflow: hidden;
    isolation: isolate;
}

.treasure-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    transition: transform 0.35s ease;
}

.treasure-card:hover .treasure-img {
    transform: none;
}

.treasure-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 18px 10px 8px 12px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 100%);
    text-align: left;
    font-style: italic;
    color: #fff;
    pointer-events: none;
}

.treasure-caption-alias {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #fff;
}

.treasure-caption-location,
.treasure-caption-specialty {
    font-size: 0.78rem;
    line-height: 1.2;
    color: #fff;
    opacity: 0.92;
}

/* ---- Hogar directory card variants (uniform rounded-rect cards) ---- */
/* Base: every variant shares the same card surface so all cards match */
.hogar-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.hogar-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-gold);
    box-shadow: 0 6px 20px rgba(var(--gold-rgb), 0.18);
}
.hogar-card .treasure-img-container {
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.hogar-card .treasure-img {
    border-radius: 0;
}

/* A. Filled violet card (matches the frames) — image top, caption below card */
.hogar-card--violet {
    background: #1a1a2e;
}
.hogar-card--violet .treasure-caption {
    position: static;
    background: #1a1a2e;
    border-radius: 0;
    padding: 10px 12px 12px;
    font-style: normal;
}

/* B. Glass card — translucent light surface */
.hogar-card--glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
}
.hogar-card--glass .treasure-caption {
    position: static;
    background: transparent;
    border-radius: 0;
    padding: 10px 12px 12px;
    font-style: normal;
}

/* C. Image with rounded gold frame — overlay caption kept, full card bg behind */
.hogar-card--framed {
    background: #1a1a2e;
}
.hogar-card--framed .treasure-img-container {
    border-radius: 10px;
    margin: 8px;
    width: calc(100% - 16px);
}

/* Ornate gold frame around each category section (not around individual photos) */
.fileteado-section.admin-prof-category,
.fileteado-section.discovery-cat-section {
    border: 14px solid transparent;
    border-image: var(--category-frame-border-image) 12 stretch;
    padding: 22px 26px;
    margin-bottom: 24px;
    box-sizing: border-box;
    background: linear-gradient(
        180deg,
        rgba(var(--gold-rgb), 0.04) 0%,
        rgba(0, 0, 0, 0.12) 100%
    );
    box-shadow:
        inset 0 0 28px rgba(var(--gold-rgb), 0.07),
        0 0 22px rgba(var(--gold-rgb), 0.1);
}

.fileteado-section.admin-prof-category:hover,
.fileteado-section.discovery-cat-section:hover {
    box-shadow:
        inset 0 0 32px rgba(var(--gold-rgb), 0.12),
        0 0 28px rgba(var(--gold-rgb), 0.16);
}

.welcome-guide-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.welcome-guide-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.welcome-guide-dismiss {
    flex: 0 0 auto;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.welcome-guide-dismiss:hover,
.welcome-guide-dismiss:focus-visible {
    background: rgba(212, 175, 55, 0.12);
    outline: none;
}

.welcome-guide-list {
    line-height: 1.6;
    color: #ccc;
    margin: 0 0 0 20px;
    padding: 0;
    font-size: 0.95rem;
}

.welcome-guide-list li {
    margin-bottom: 10px;
}

.welcome-guide-list li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .fileteado-section.admin-prof-category,
    .fileteado-section.discovery-cat-section {
        border-width: 10px;
        padding: 16px 18px;
        margin-bottom: 20px;
    }
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.35);
}

/* Dashboard / admin photo upload grids — fixed tile columns; one photo = one cell */
#photoGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 132px));
    gap: 10px;
    align-items: start;
    justify-content: start;
    width: 100%;
}

@media (max-width: 768px) {
    #photoGrid {
        grid-template-columns: repeat(3, minmax(0, 118px));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    #photoGrid {
        grid-template-columns: repeat(2, minmax(0, 108px));
    }
}

#photoGrid .photo-item {
    position: relative;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    display: block;
    justify-self: start;
    box-sizing: border-box;
    isolation: isolate;
    container-type: inline-size;
}

#photoGrid .photo-item.is-cover-photo {
    outline: 3px solid var(--primary-gold);
    outline-offset: -3px;
    box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.45);
}

#photoGrid .photo-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: zoom-in;
}

#photoGrid .cover-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    max-width: calc(100% - 36px);
    white-space: nowrap;
    line-height: 1.1;
    padding: 2px 4px;
    border-radius: 4px;
    pointer-events: none;
    box-sizing: border-box;
    background: var(--primary-gold);
    color: #111;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    font-size: clamp(0.45rem, 8cqi, 0.58rem);
}

/* Leads / invitations table — status badges scale down to stay on one line */
.lead-status-cell {
    container-type: inline-size;
    min-width: 88px;
    max-width: 140px;
}

.lead-status-stack {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
    width: 100%;
}

.admin-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    line-height: 1.1;
    white-space: nowrap;
    font-size: clamp(0.52rem, 11cqi, 0.72rem);
    max-width: 100%;
    box-sizing: border-box;
    text-transform: capitalize;
}

.admin-leads-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-leads-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: clamp(0.72rem, 1.6vw, 0.9rem);
    min-width: 480px;
}

.admin-leads-table th,
.admin-leads-table td {
    padding: clamp(6px, 1.5vw, 10px);
}

.lead-whatsapp-btn {
    display: inline-block;
    padding: clamp(4px, 1vw, 6px) clamp(6px, 1.5vw, 12px);
    background: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: clamp(0.68rem, 1.4vw, 0.85rem);
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-shell,
.admin-grid-layout,
#adminGridContainer,
#adminGridContent,
.admin-grid-main {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#adminGridContent {
    overflow-x: clip;
}

.admin-pending-table-wrap,
.admin-pending-table {
    width: 100%;
}

.admin-pending-table {
    border-collapse: collapse;
    text-align: left;
    font-size: clamp(0.72rem, 1.6vw, 0.9rem);
    min-width: 520px;
}

.admin-pending-table th,
.admin-pending-table td {
    padding: clamp(6px, 1.5vw, 10px);
    vertical-align: top;
}

.admin-pending-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.admin-verification-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    width: 36px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}

.admin-verification-btn.approve-btn {
    background: green;
}

.admin-verification-btn.reject-btn {
    background: red;
}

#photoGrid .remove-overlay {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 3;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    background: rgba(200, 0, 0, 0.85);
    color: #fff;
}

#photoGrid .add-photo-frame {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    min-height: 0;
    aspect-ratio: 3 / 4;
    border: 1px dashed rgba(255, 255, 255, 0.22) !important;
    border-radius: 8px;
    color: #888 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    font-size: 1.75rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    justify-self: start;
}

/* Profile detail photo carousel — fluid tiles; 3:4 ratio; clipped inside frame */
.photo-carousel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    overflow-x: auto;
    gap: clamp(8px, 2cqi, 16px);
    padding-bottom: 15px;
    margin-bottom: 30px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.photo-carousel::-webkit-scrollbar {
    height: 8px;
}

.photo-carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 0 10px;
}

.photo-carousel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

.photo-carousel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.photo-item-public {
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    scroll-snap-align: center;
    border: 1px solid rgba(var(--gold-rgb), 0.28);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.45),
        inset 0 0 14px rgba(var(--gold-rgb), 0.05);
    background: #111;
    box-sizing: border-box;
    isolation: isolate;
    flex-shrink: 0;
    height: auto;
    min-height: 0;
}

.photo-item-public img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.photo-item-public:hover img {
    transform: none;
}

#treasureContent .card {
    container-type: inline-size;
}

#treasurePhotoGrid.photo-carousel {
    --photo-tile-min: clamp(112px, 26cqi, 140px);
    --photo-tile-fluid: clamp(120px, 32cqi, 300px);
    --photo-tile-solo: min(100%, clamp(180px, 62cqi, 380px));
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
}

#treasurePhotoGrid.photo-carousel--solo {
    justify-content: center;
    overflow-x: hidden;
}

#treasurePhotoGrid.photo-carousel--solo .photo-item-public {
    flex: 0 1 var(--photo-tile-solo);
    width: var(--photo-tile-solo);
    min-width: var(--photo-tile-min);
    max-width: var(--photo-tile-solo);
}

#treasurePhotoGrid.photo-carousel--expand {
    justify-content: center;
}

#treasurePhotoGrid.photo-carousel--expand .photo-item-public {
    flex: 1 1 0;
    min-width: var(--photo-tile-min);
    max-width: min(380px, 46%);
    width: auto;
}

#treasurePhotoGrid.photo-carousel--expand.photo-carousel--count-3 .photo-item-public {
    max-width: min(320px, 31%);
}

#treasurePhotoGrid.photo-carousel--scroll .photo-item-public {
    flex: 0 0 var(--photo-tile-fluid);
    width: var(--photo-tile-fluid);
    min-width: var(--photo-tile-min);
    max-width: var(--photo-tile-fluid);
}

#treasurePhotoGrid .photo-item-public img {
    transform: none !important;
}

@container (max-width: 360px) {
    #treasurePhotoGrid.photo-carousel--expand .photo-item-public {
        max-width: min(280px, 46%);
    }

    #treasurePhotoGrid.photo-carousel--expand.photo-carousel--count-3 .photo-item-public {
        max-width: min(220px, 31%);
    }
}

/* Admin prof cards: grow card size with available width (auto-fit), don't keep adding columns */
.admin-prof-category {
    container-type: inline-size;
}

.admin-prof-grid {
    display: grid;
    gap: clamp(6px, 1.5cqi, 12px);
    grid-template-columns: repeat(auto-fit, minmax(clamp(45px, 17cqi, 100px), 1fr));
    align-items: start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.five-column-grid.admin-prof-grid {
    grid-template-columns: repeat(auto-fit, minmax(clamp(45px, 17cqi, 100px), 1fr));
}

@container (max-width: 280px) {
    .admin-prof-grid,
    .five-column-grid.admin-prof-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.admin-prof-category .category-section-header {
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.admin-prof-category .category-section-header h4 {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(0.65rem, 2vw, 0.8rem);
}

.admin-prof-category .category-section-header h4 span {
    display: block;
    margin-top: 4px;
}

.admin-prof-card {
    padding: clamp(2px, 1cqi, 5px) !important;
    border: 1px solid #2a2a2a !important;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    container-type: inline-size;
    gap: clamp(4px, 1.5cqi, 8px);
    isolation: isolate;
}

@container (max-width: 130px) {
    .admin-prof-email {
        display: none;
    }

    .admin-icon-btn {
        min-width: 30px;
        min-height: 30px;
        max-width: 36px;
        padding: 4px;
        font-size: 0.85rem;
    }
}

.admin-prof-thumb {
    aspect-ratio: 3 / 4 !important;
    border-radius: 4px !important;
    margin-bottom: 2px !important;
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    container-type: inline-size;
}

.admin-prof-status-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    padding: 2px 5px;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: clamp(0.35rem, 7cqi, 0.45rem);
    max-width: calc(100% - 6px);
    box-sizing: border-box;
    text-transform: capitalize;
}

.admin-prof-thumb-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.admin-prof-alias {
    font-weight: bold;
    margin-bottom: 2px;
    color: var(--primary-gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.45rem, 7cqi, 0.7rem);
    min-width: 0;
    flex-shrink: 1;
}

.admin-prof-email {
    font-size: clamp(0.38rem, 5.5cqi, 0.55rem);
    color: #aaa;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.admin-prof-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: clamp(4px, 1.5cqi, 8px);
    width: 100%;
    margin-top: auto;
    min-width: 0;
    flex-shrink: 0;
    justify-content: center;
    padding-top: 2px;
}

.admin-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: clamp(4px, 1.5cqi, 8px);
    font-size: clamp(0.85rem, 10cqi, 1.2rem);
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    background: transparent;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: clamp(32px, 12cqi, 44px);
    max-width: 44px;
}

.admin-prof-card .edit-btn,
.admin-prof-card .delete-btn {
    width: auto;
    box-sizing: border-box;
    white-space: nowrap;
}

.admin-prof-card .edit-btn {
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
}

.admin-prof-card .delete-btn {
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    margin-top: 0;
}

.treasure-alias {
    font-size: 1.1rem;
    margin: 10px 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    font-size: 0.8rem;
    border: 1px solid var(--primary-gold);
    padding: 2px 8px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--light-text);
    transition: background-color 0.2s ease;
}

.tag:hover {
    background-color: var(--glass-bg);
}

.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.quality-premium {
    background: var(--gold-gradient);
    color: var(--dark-bg);
    border: 1px solid var(--gold-dark);
    box-shadow:
        inset 0 1px 0 rgba(255, 236, 190, 0.35),
        0 0 10px rgba(var(--gold-rgb), 0.45);
}

.quality-gold {
    background: linear-gradient(145deg, var(--gold-light), var(--primary-gold), var(--gold-mid));
    color: var(--dark-bg);
    border: 1px solid var(--gold-dark);
}

.quality-silver {
    background: #C0C0C0;
    color: var(--dark-bg);
}

.quality-standard {
    background: #555;
    color: #ddd;
}

/* Category Page */
.category-card {
    text-align: center;
    text-decoration: none;
    color: var(--light-text);
}

.category-card h3 {
    color: var(--primary-gold);
    font-size: 1.5rem;
}

/* Login Status */
.login-status {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.9rem;
    color: var(--primary-gold);
    opacity: 0.9;
    text-transform: none;
    letter-spacing: normal;
}

/* Utilities */
.hidden {
    display: none;
}

.alert {
    color: var(--accent-red);
    margin-bottom: 10px;
}

/* 5-Column Responsive Grid */
.five-column-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

@media (max-width: 1200px) {
    .five-column-grid:not(.admin-prof-grid) {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .five-column-grid:not(.admin-prof-grid) {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .five-column-grid:not(.admin-prof-grid) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Responsive Design for smaller screens */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .card {
        padding: 15px;
    }

    .grid {
        gap: 10px;
    }

    .five-column-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .logo {
        font-size: 2.2rem;
    }

    .login-status {
        position: static;
        margin-top: 10px;
        font-size: 0.8rem;
    }

    .filter-group {
        flex-direction: column;
    }
}

/* Landing page (index.html) */
.landing-page header {
    display: none;
}

.landing-page .landing-container {
    max-width: 100%;
    width: 100%;
    padding: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-gold) #1a1a1a;
}

.landing-page .landing-container::-webkit-scrollbar {
    height: 10px;
}

.landing-page .landing-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.landing-page .landing-container::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 5px;
}

.landing-triple.hero {
    display: grid;
    height: auto;
    min-height: calc(100vh - 60px);
}

.landing-frame .landing-title {
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
    margin: 0 0 12px;
    line-height: 1.15;
}

.landing-frame .landing-tagline {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    margin: 0 0 24px;
    font-style: italic;
    color: #ccc;
    line-height: 1.45;
}

.landing-triple {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    min-width: min(100%, 900px);
    width: max(100%, 900px);
    min-height: calc(100vh - 60px);
    padding: 0;
    text-align: center;
    align-items: stretch;
}

.landing-dual {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    min-width: min(100%, 600px);
    width: max(100%, 600px);
    min-height: calc(100vh - 60px);
    padding: 0;
    text-align: center;
    align-items: stretch;
}

.landing-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding: 32px 24px;
    box-sizing: border-box;
    border-right: 1px solid rgba(var(--gold-rgb), 0.15);
}

.landing-frame:last-child {
    border-right: none;
}

.landing-frame-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.landing-frame-logo .landing-frame-inner {
    max-width: min(92%, 420px);
    height: 100%;
    min-height: 280px;
    color-scheme: only light;
}

.landing-brand-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35em 0.5em;
    margin: 0 0 14px;
    line-height: 1.35;
}

.landing-brand-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    color: var(--primary-gold);
    letter-spacing: 0.1em;
    font-weight: 400;
}

.landing-brochure-link,
.landing-advantages-link {
    margin-left: 0.35em;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(0.72rem, 1.8vw, 0.82rem);
    color: #aaa;
    text-decoration: underline;
    text-underline-offset: 3px;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.landing-brochure-link:hover,
.landing-brochure-link:focus-visible,
.landing-advantages-link:hover,
.landing-advantages-link:focus-visible {
    color: var(--primary-gold);
}

.landing-details-page {
    padding-top: 12px;
    padding-bottom: 48px;
}

.landing-details-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.landing-details-back {
    align-self: flex-start;
    margin-bottom: 0;
}

.landing-details-logo-link {
    display: block;
}

.landing-details-logo {
    display: block;
    max-width: min(280px, 70vw);
    height: auto;
    margin: 0 auto;
}

.landing-advantages-standalone {
    border-top: none;
    padding-top: 8px;
}

.landing-advantages {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 20px 48px;
    box-sizing: border-box;
    border-top: 1px solid rgba(var(--gold-rgb), 0.2);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.landing-advantages-intro {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 8px;
}

.landing-advantages-heading {
    margin: 0 0 10px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    color: var(--primary-gold);
    font-weight: 700;
}

.landing-advantages-sub {
    margin: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #bbb;
}

.landing-advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.landing-advantages-card {
    text-align: left;
    padding: 22px 20px 24px;
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    border-radius: 10px;
    background: rgba(18, 18, 18, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.landing-advantages-pro,
.landing-advantages-model {
    border-color: rgba(var(--gold-rgb), 0.5);
}

.landing-advantages-guest {
    border-color: rgba(143, 223, 176, 0.35);
}

.landing-advantages-title {
    margin: 0 0 10px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    color: var(--primary-gold);
    font-weight: 700;
}

.landing-advantages-guest .landing-advantages-title {
    color: #8fdfb0;
}

.landing-advantages-lead {
    margin: 0 0 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #ccc;
}

.landing-advantages-list {
    margin: 0 0 20px;
    padding-left: 18px;
    color: #ddd;
    font-size: 0.88rem;
    line-height: 1.55;
}

.landing-advantages-list li {
    margin-bottom: 8px;
}

.landing-advantages-list li:last-child {
    margin-bottom: 0;
}

.landing-advantages-cta {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
    background: var(--primary-gold);
    color: #000;
    border: 1px solid var(--primary-gold);
}

.landing-advantages-cta:hover,
.landing-advantages-cta:focus-visible {
    opacity: 0.92;
}

.landing-advantages-cta-muted {
    background: transparent;
    color: #8fdfb0;
    border-color: rgba(143, 223, 176, 0.55);
}

.landing-logo {
    display: block;
    max-width: 100%;
    max-height: min(calc(100vh - 120px), 520px);
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.brand-logo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-services-tagline {
    margin: 10px 0 0;
    padding: 0 10px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(0.65rem, 1.8vw, 0.78rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(212, 175, 55, 0.88);
    letter-spacing: 0.02em;
    max-width: 300px;
}

.categories-frame-left .brand-services-tagline {
    font-size: 0.62rem;
    max-width: 100%;
    margin-top: 8px;
    line-height: 1.35;
}

.reg-logo-block .brand-services-tagline {
    font-size: 0.68rem;
    max-width: 260px;
    margin-top: 8px;
}

.treasure-virtual-badge {
    position: absolute;
    z-index: 4;
    left: -4%;
    top: 36%;
    width: 58%;
    padding: 5px 6px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.96), rgba(168, 132, 32, 0.92));
    color: #141008;
    font-family: sans-serif;
    font-size: clamp(0.58rem, 2.1vw, 0.72rem);
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    transform: rotate(-32deg);
    transform-origin: 0% 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    line-height: 1.1;
}

.landing-age-gate {
    width: 100%;
    max-width: 320px;
}

.landing-age-disclaimer {
    color: #ddd;
    font-size: 1.12rem;
    line-height: 1.55;
    margin: 0 0 22px;
    font-weight: 500;
}

.landing-btn {
    display: block;
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: none;
    margin-bottom: 12px;
}

.landing-btn-enter {
    background: var(--primary-gold);
    color: #000;
}

.landing-btn-exit {
    background: #222;
    color: #888;
    border: 1px solid #444;
}

.landing-btn-login {
    background: var(--primary-gold);
    color: #000;
    margin-top: 8px;
}

.landing-frame-auth {
    background: rgba(0, 0, 0, 0.25);
}

.landing-auth-inner {
    max-width: 340px;
}

.landing-login-heading {
    font-size: 1.65rem;
    margin: 0 0 8px;
    text-align: center;
}

.landing-login-sub {
    color: #aaa;
    font-size: 0.95rem;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.45;
}

.landing-login-form {
    width: 100%;
}

.landing-login-form input {
    margin-bottom: 14px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.landing-forgot {
    text-align: center;
    margin-top: 16px;
    font-size: 0.95rem;
}

.landing-forgot a {
    color: var(--primary-gold);
    text-decoration: none;
}

.landing-pro-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(var(--gold-rgb), 0.25);
}

.landing-pro-link {
    display: block;
    text-align: center;
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.landing-pro-link-login {
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
    background: rgba(var(--gold-rgb), 0.08);
    font-family: inherit;
    width: 100%;
}

.landing-pro-link-register {
    color: #000;
    background: var(--primary-gold);
    border: 1px solid var(--primary-gold);
}

.landing-pro-link:hover {
    opacity: 0.92;
}

.landing-register-link {
    margin-top: 16px;
    font-size: 0.95rem;
    color: #aaa;
}

.landing-register-link a {
    color: var(--primary-gold);
    text-decoration: none;
}

.landing-register-link a:hover {
    text-decoration: underline;
}

#loginAlert:not(.hidden),
#registerAlert:not(.hidden) {
    display: block;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: rgba(139, 0, 0, 0.15);
    border: 1px solid rgba(139, 0, 0, 0.45);
    border-radius: 6px;
    text-align: left;
}

#registerAlert:not(.hidden)[style*="rgb(0, 255, 0)"] {
    background: rgba(0, 128, 0, 0.12);
    border-color: rgba(0, 180, 0, 0.45);
    color: #8fdfb0 !important;
}

.google-signin-block,
.google-signin-mount {
    margin-bottom: 8px;
    text-align: center;
}

.google-signin-label {
    margin: 0 0 10px;
    font-size: 0.88rem;
    color: #ccc;
    text-align: center;
}

.google-signin-divider {
    font-size: 0.88rem;
    color: #999;
    margin: 16px 0 18px;
    text-align: center;
}

.google-signin-divider.hidden,
.google-signin-mount.hidden {
    display: none;
}

.google-signin-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.reg-page .google-signin-wrapper > div,
.landing-login-form .google-signin-wrapper > div {
    width: 100%;
    max-width: 100%;
}

.reg-page .google-signin-wrapper iframe,
.landing-login-form .google-signin-wrapper iframe {
    width: 100% !important;
    max-width: 100%;
}

.reg-google-complete-intro {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(var(--gold-rgb), 0.45);
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.08);
}

.reg-google-complete-intro.hidden {
    display: none;
}

#registerForm[data-google-complete="1"] .reg-google-email-fields,
#registerForm[data-google-complete="1"] #regGoogleMount,
#registerForm[data-google-complete="1"] .google-signin-divider,
#registerForm[data-google-complete="1"] .reg-guest-only,
#registerForm[data-google-complete="1"] #regInstructions {
    display: none !important;
}

body.register-google-complete #regNoPaymentNote {
    display: none !important;
}

#registerForm[data-google-complete="1"] .reg-google-profile-fields {
    display: block !important;
}

#loginAlert .login-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

#loginAlert .login-error-actions button,
#loginAlert .login-error-actions a {
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    font-family: inherit;
}

#loginAlert .login-error-actions button {
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
}

#loginAlert .login-error-actions button[data-login-forgot] {
    background: rgba(var(--gold-rgb), 0.12);
}

#loginAlert .login-error-actions a {
    background: var(--primary-gold);
    color: #000;
    border: 1px solid var(--primary-gold);
}

.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
    margin-bottom: 14px;
}

.password-wrapper input {
    width: 100%;
    padding-right: 44px;
    margin-bottom: 0 !important;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 24px;
    line-height: 0;
}

.password-recovery-panel {
    width: 100%;
}

#passwordRecoveryPanel:not(.hidden),
#recoveryStepEmail:not(.hidden),
#recoveryStepReset:not(.hidden),
#forgotPasswordForm:not(.hidden),
#resetPasswordForm:not(.hidden) {
    display: block;
}

#recoveryAlert:not(.hidden),
#forgotAlert:not(.hidden),
#resetAlert:not(.hidden) {
    display: block;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: rgba(139, 0, 0, 0.15);
    border: 1px solid rgba(139, 0, 0, 0.45);
    border-radius: 6px;
    text-align: left;
}

#recoveryAlert:not(.hidden)[style*="rgb(0, 255, 0)"],
#forgotAlert:not(.hidden)[style*="rgb(0, 255, 0)"],
#resetAlert:not(.hidden)[style*="rgb(0, 255, 0)"] {
    background: rgba(0, 128, 0, 0.15);
    border-color: rgba(0, 128, 0, 0.45);
}

.password-recovery-panel input {
    margin-bottom: 14px;
}

.recovery-step-text {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
    text-align: center;
}

.recovery-email-display {
    font-weight: bold;
    margin-bottom: 18px;
    word-break: break-all;
}

.recovery-code-input {
    text-align: center;
    font-size: 1.4rem !important;
    letter-spacing: 5px;
}

.recovery-back-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 10px;
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

.recovery-back-btn:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.recovery-resend-row {
    margin-top: 14px;
    text-align: center;
}

.recovery-resend-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    color: var(--primary-gold);
    text-decoration: underline;
}

.recovery-resend-link:hover {
    color: #fff;
}

.recovery-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}

.recovery-error-actions button {
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    background: var(--primary-gold);
    color: #000;
    border: 1px solid var(--primary-gold);
}

.recovery-error-actions a {
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    background: var(--primary-gold);
    color: #000;
    border: 1px solid var(--primary-gold);
}

.password-recovery-page input {
    width: 100%;
}

/* Floating discovery controls — gold icons readable on dark and light backgrounds */
.floating-controls-bar .floating-menu-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--primary-gold);
    transition: color 0.2s ease, transform 0.2s ease;
}

.floating-controls-bar .floating-menu-btn svg {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    stroke-width: 2.75;
    filter:
        drop-shadow(0 0 1px rgba(0, 0, 0, 0.95))
        drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

.floating-controls-bar .floating-menu-btn:hover {
    color: var(--gold-light);
    transform: scale(1.06);
    filter: drop-shadow(0 0 6px rgba(var(--gold-rgb), 0.35));
}

.floating-controls-bar .floating-menu-btn.is-active {
    color: var(--gold-light);
}

.floating-controls-bar .floating-menu-btn.is-dim {
    color: rgba(var(--gold-rgb), 0.5);
}

/* Compact grid toggle (9-square icon) — 6 columns desktop */
body.small-grid-mode #treasureGrid .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px;
}

body.small-grid-mode #treasureGrid .treasure-card h3,
body.small-grid-mode #treasureGrid .treasure-alias,
body.small-grid-mode #treasureGrid .treasure-caption-alias {
    font-size: 0.85rem !important;
}

body.small-grid-mode #treasureGrid .treasure-caption-location,
body.small-grid-mode #treasureGrid .treasure-caption-specialty {
    font-size: 0.7rem !important;
}

body.small-grid-mode #treasureGrid .treasure-img-container {
    margin: 0 !important;
}

body.small-grid-mode #treasureGrid .treasure-card {
    padding: 0 !important;
}

@media (max-width: 768px) {
    body.small-grid-mode #treasureGrid .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

#floatingProgressWrapper {
    transition: opacity 0.25s ease;
    border-left-color: rgba(var(--gold-rgb), 0.35) !important;
}

#floatingProgressText {
    color: var(--primary-gold) !important;
}

#floatingProgressBar {
    background: var(--primary-gold) !important;
}

.payment-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 20px 20px;
    box-sizing: border-box;
}

.payment-modal-overlay.hidden {
    display: none !important;
}

.payment-modal-panel {
    max-width: 520px;
    width: 100%;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.admin-overlay-modal,
.terms-gate-overlay,
#fullTermsOverlay {
    z-index: 10060 !important;
}

.admin-overlay-modal {
    box-sizing: border-box;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.admin-overlay-modal > button:first-of-type,
.admin-modal-close-btn,
.modal-close-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    width: auto;
    max-width: max-content;
    flex: 0 0 auto;
    padding: 8px 16px;
    line-height: 1.2;
    box-sizing: border-box;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 11;
    flex-shrink: 0;
}

.modal-close-bar {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 8px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: sticky;
    top: max(0px, env(safe-area-inset-top));
    z-index: 10;
    flex-shrink: 0;
    pointer-events: none;
    box-sizing: border-box;
}

.modal-close-bar .admin-modal-close-btn,
.modal-close-bar .modal-close-external {
    pointer-events: auto;
}

.how-to-pay-intro {
    margin: 0 0 12px;
    color: #ccc;
    line-height: 1.6;
}

.how-to-pay-billing-note,
.how-to-pay-category-line {
    margin: 0 0 12px;
    color: #bbb;
    line-height: 1.55;
    font-size: 0.92rem;
}

.how-to-pay-category-line {
    color: #ddd;
}

.how-to-pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.how-to-pay-card {
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    border-radius: 8px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.25);
}

.how-to-pay-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #eee;
}

.how-to-pay-bank-label {
    color: #ccc;
    font-size: 0.95rem;
}

.how-to-pay-logo {
    display: block;
    height: 28px;
    width: auto;
    object-fit: contain;
}

.how-to-pay-logo-mp {
    max-width: 130px;
}

.how-to-pay-logo-bbva {
    max-width: 72px;
}

/* Text badge replacing the former logo images (no external assets needed). */
.how-to-pay-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.how-to-pay-brand-mp {
    background: #00a6fb;
    color: #fff;
}

.how-to-pay-details {
    margin: 0;
}

.how-to-pay-details div {
    margin-bottom: 10px;
}

.how-to-pay-details div:last-child {
    margin-bottom: 0;
}

.how-to-pay-details dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    margin-bottom: 2px;
}

.how-to-pay-details dd {
    margin: 0;
    color: var(--primary-gold);
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
    word-break: break-all;
}

@media (max-width: 640px) {
    .how-to-pay-grid {
        grid-template-columns: 1fr;
    }

    .payment-modal-panel {
        max-width: 100%;
    }
}

.payment-sidebar-accounts-wrap {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(var(--gold-rgb), 0.25);
}

.payment-sidebar-accounts-title {
    margin: 0 0 12px;
    color: var(--primary-gold);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.payment-sidebar-accounts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-sidebar-account-block {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    border-radius: 6px;
    padding: 10px 12px;
}

.payment-sidebar-account-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    color: #eee;
    font-size: 0.88rem;
}

.payment-sidebar-account-block p {
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: #ddd;
    word-break: break-all;
}

.payment-sidebar-account-block p:last-child {
    margin-bottom: 0;
}

.payment-sidebar-account-block p span {
    display: inline-block;
    min-width: 42px;
    color: #999;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.payment-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    z-index: 5;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    font-size: 1.5rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    pointer-events: auto;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    color-scheme: only light;
}

.lang-switcher button {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 4px 6px 2px;
    cursor: pointer;
    line-height: 0;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lang-switcher button.lang-active {
    border-bottom-color: var(--primary-gold);
    opacity: 1;
}

.lang-switcher button.lang-inactive {
    opacity: 0.5;
}

.lang-switcher button:hover {
    opacity: 1;
}

.lang-switcher img {
    border-radius: 2px;
    display: block;
}

@media (max-width: 960px) {
    .landing-triple,
    .landing-dual {
        min-height: auto;
    }

    .landing-frame {
        min-height: auto;
        padding: 32px 20px;
    }
}

@media (max-width: 520px) {
    .landing-triple,
    .landing-dual {
        grid-template-columns: 1fr;
        min-width: 100%;
        width: 100%;
    }

    .landing-frame {
        padding: 40px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(var(--gold-rgb), 0.15);
    }

    .landing-frame:last-child {
        border-bottom: none;
    }

    .landing-frame-logo .landing-frame-inner {
        min-height: 220px;
    }

    .landing-logo {
        max-height: min(50vh, 360px);
    }

    .landing-advantages-grid {
        grid-template-columns: 1fr;
    }
}

.landing-platform-link {
    margin-left: 0.15em;
}

/* --- B2B Platform landing (plataforma.html) --- */
body.b2b-page {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0a;
}

body.b2b-page h1,
body.b2b-page h2,
body.b2b-page h3 {
    font-family: 'Playfair Display', serif;
    text-transform: none;
    letter-spacing: 0.04em;
}

.b2b-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid rgba(var(--gold-rgb), 0.25);
    backdrop-filter: blur(8px);
    margin-bottom: 0;
    padding: 0;
}

.b2b-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    flex-wrap: wrap;
}

.b2b-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: var(--primary-gold);
    text-decoration: none;
    letter-spacing: 0.08em;
}

.b2b-logo span {
    display: block;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.65rem;
    color: #888;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.b2b-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
}

.b2b-nav a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.88rem;
}

.b2b-nav a:hover {
    color: var(--primary-gold);
}

.b2b-nav-cta {
    border: 1px solid var(--primary-gold);
    padding: 6px 14px !important;
    border-radius: 4px;
    color: var(--primary-gold) !important;
}

.b2b-hero {
    padding: 72px 0 56px;
    background: radial-gradient(ellipse at 30% 0%, rgba(var(--gold-rgb), 0.1), transparent 55%);
}

.b2b-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: #888;
    margin-bottom: 16px;
}

.b2b-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 400;
}

.b2b-lead {
    max-width: 720px;
    font-size: 1.05rem;
    color: #ccc;
    margin-bottom: 28px;
}

.b2b-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.b2b-btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.b2b-btn-primary {
    background: var(--primary-gold);
    color: #111;
}

.b2b-btn-ghost {
    border: 1px solid #555;
    color: #ddd;
}

.b2b-btn-ghost:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.b2b-hero-stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    padding: 0;
    color: #999;
    font-size: 0.9rem;
}

.b2b-hero-stats strong {
    display: block;
    color: var(--primary-gold);
    font-size: 1.4rem;
}

.b2b-section {
    padding: 56px 0;
    border-top: 1px solid #222;
}

.b2b-section-dark {
    background: #111;
}

.b2b-section h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: var(--primary-gold);
}

.b2b-section-intro {
    max-width: 760px;
    color: #aaa;
    margin-bottom: 28px;
}

.b2b-diagram-pre {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #9cf;
    font-family: Consolas, 'Courier New', monospace;
    margin-bottom: 28px;
}

.b2b-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.b2b-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.b2b-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
}

.b2b-card h3 {
    color: var(--primary-gold);
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.b2b-card p {
    color: #aaa;
    font-size: 0.92rem;
    margin: 0;
}

.b2b-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.b2b-price-card {
    position: relative;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 24px 20px;
}

.b2b-price-featured {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.2);
}

.b2b-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--primary-gold);
    color: #111;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.b2b-price-card h3 {
    color: var(--primary-gold);
    margin-bottom: 12px;
}

.b2b-price-tag {
    color: #ccc;
    margin-bottom: 4px;
}

.b2b-price-month {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.b2b-price-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.b2b-price-card li {
    color: #aaa;
    font-size: 0.88rem;
    padding: 6px 0;
    border-bottom: 1px solid #222;
}

.b2b-price-card li::before {
    content: '✓ ';
    color: var(--primary-gold);
}

.b2b-price-note {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.b2b-pricing-footer {
    margin-top: 24px;
    color: #888;
    font-size: 0.92rem;
    text-align: center;
}

.b2b-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.b2b-pills span {
    border: 1px solid #444;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #bbb;
}

.b2b-checklist {
    list-style: none;
    padding: 0;
}

.b2b-checklist li {
    padding: 8px 0 8px 22px;
    position: relative;
    color: #aaa;
    font-size: 0.92rem;
}

.b2b-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-gold);
}

.b2b-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.b2b-contact a {
    color: var(--primary-gold);
}

.b2b-contact-copy {
    background: rgba(var(--gold-rgb), 0.06);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    padding: 20px;
    border-radius: 8px;
    color: #aaa;
    font-size: 0.92rem;
}

.b2b-footer {
    padding: 32px 0;
    border-top: 1px solid #333;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

.b2b-footer a {
    color: var(--primary-gold);
}

@media (max-width: 800px) {
    .b2b-grid-3,
    .b2b-pricing,
    .b2b-grid-2,
    .b2b-contact-grid {
        grid-template-columns: 1fr;
    }

    .b2b-nav {
        width: 100%;
    }
}

/* Categories page — three-frame layout (side | grid | side) */
body.categories-page {
    padding-top: calc(var(--global-topbar-height, 55px) + env(safe-area-inset-top, 0px));
}

body.categories-page .categories-container {
    max-width: min(1720px, 100%);
    padding: 12px max(12px, env(safe-area-inset-right)) 40px max(12px, env(safe-area-inset-left));
}

body.categories-page header.page-header {
    display: none;
}

.categories-shell {
    display: grid;
    grid-template-columns: minmax(88px, 11%) minmax(0, 1fr) minmax(88px, 11%);
    gap: 14px;
    align-items: stretch;
    min-height: calc(100vh - 100px);
}

.categories-frame {
    border: 1px solid rgba(var(--gold-rgb), 0.38);
    border-radius: 6px;
    background: #1a1a2e;
    box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), 0.08);
}

.categories-frame-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 1.4vw, 22px) clamp(8px, 0.9vw, 14px);
    min-height: 320px;
}

/* Left frame mirrors the right side frame: same box, sizing and padding.
   Equal height is handled by the grid's align-items: stretch. */
.categories-frame-left {
    justify-content: flex-start;
}

.categories-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.categories-frame-left .categories-brand-logo {
    flex: 1;
    min-height: 0;
}

.categories-brand-logo .page-logo {
    width: 100%;
    max-width: 120px;
    height: auto;
    max-height: min(42vh, 220px);
    object-fit: contain;
}

.categories-frame-left .categories-brand-logo .page-logo {
    max-width: 100%;
    max-height: 100%;
}

.categories-frame-right {
    justify-content: flex-start;
}

/* Area quick-filter chips — fluid sizing, responsive to window width */
.area-chips {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.8vw, 10px);
    width: 100%;
}

.area-chip {
    width: 100%;
    padding: clamp(7px, 0.9vw, 11px) clamp(8px, 0.9vw, 12px);
    border-radius: 8px;
    border: 1px solid rgba(var(--gold-rgb), 0.4);
    background: transparent;
    color: #aaa;
    cursor: pointer;
    font-size: clamp(0.78rem, 0.9vw, 0.95rem);
    text-align: left;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.area-chip:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.area-chip.is-active {
    background: rgba(var(--gold-rgb), 0.15);
    color: var(--primary-gold);
    border-color: var(--primary-gold);
}

/* Responsive: scale frames and let area chips wrap on smaller windows */
@media (max-width: 1100px) {
    .categories-shell {
        grid-template-columns: minmax(72px, 9%) minmax(0, 1fr) minmax(72px, 9%);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .categories-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .categories-frame-side {
        min-height: 0;
        width: 100%;
    }
    .area-chips {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .area-chip {
        width: auto;
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .area-chip {
        flex: 1 1 100%;
    }
}

.categories-frame-accent {
    width: 2px;
    flex: 1;
    min-height: 120px;
    margin-top: 24px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(var(--gold-rgb), 0.15) 15%,
        rgba(var(--gold-rgb), 0.45) 50%,
        rgba(var(--gold-rgb), 0.15) 85%,
        transparent 100%
    );
    border-radius: 2px;
}

.categories-frame-center {
    padding: 14px 12px 24px;
    min-width: 0;
    background: rgba(8, 8, 8, 0.72);
    border-color: rgba(var(--gold-rgb), 0.55);
}

body.categories-page #pageLoader {
    padding: 40px 16px;
}

body.categories-page #treasureGrid.grid,
body.categories-page #treasureGrid .grid {
    margin-top: 0;
}

body.categories-page #treasureGrid {
    padding-bottom: 0;
}

/* Shared mount point for pageLoader, treasure grid, and launch curtain */
.treasure-grid-slot {
    width: 100%;
    min-width: 0;
    position: relative;
}

body.categories-page .treasure-grid-slot {
    padding-bottom: 80px;
}

.treasure-grid-slot.launch-curtain-slot-active #pageLoader,
.treasure-grid-slot.launch-curtain-slot-active #treasureGrid {
    display: none !important;
}

/* Launch curtain — theater telón until grand opening */
body.launch-curtain-active {
    overflow-x: hidden;
}

body.launch-curtain-active.categories-page .categories-filter-source {
    display: none !important;
}

.launch-curtain-stage {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-height: clamp(320px, 52vh, 560px);
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 55% 30% at 50% 92%, rgba(255, 214, 150, 0.40) 0%, rgba(150, 95, 40, 0.12) 45%, transparent 72%),
        linear-gradient(180deg, transparent 76%, rgba(120, 75, 35, 0.50) 78%, rgba(70, 42, 18, 0.88) 100%),
        linear-gradient(180deg, #1a0a0a 0%, #0a0505 55%, #140a06 100%);
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.92);
}

/* Match .grid margin-top on discovery/home pages */
body.launch-curtain-active:not(.categories-page) .treasure-grid-slot .launch-curtain-stage {
    margin-top: 50px;
}

/* Top valance (cenefa) with draped swags */
.launch-curtain-gauze {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(56px, 12vh, 104px);
    z-index: 5;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.30) 0,
            rgba(0, 0, 0, 0.30) 5px,
            rgba(150, 25, 40, 0.0) 12px,
            rgba(255, 220, 200, 0.10) 16px,
            rgba(0, 0, 0, 0.30) 24px
        ),
        linear-gradient(180deg, #a01828 0%, #82111f 42%, #5e0b16 100%);
    border-top: 2px solid rgba(var(--gold-rgb), 0.55);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.55), inset 0 -10px 22px rgba(0, 0, 0, 0.55);
    -webkit-mask: radial-gradient(30px at 50% 100%, #0000 96%, #000 100%) 50% 0 / 66px 100% repeat-x;
            mask: radial-gradient(30px at 50% 100%, #0000 96%, #000 100%) 50% 0 / 66px 100% repeat-x;
    transition: transform 2.6s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Velvet side drapes with vertical pleats, gathered and tied back */
.launch-curtain-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    z-index: 3;
    background:
        repeating-linear-gradient(
            90deg,
            #3a060c 0px,
            #620e1a 13px,
            #8c1626 25px,
            #620e1a 37px,
            #3a060c 50px
        );
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.75);
    transition: transform 2.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Gold tieback knot near the inner edge */
.launch-curtain-panel::before {
    content: '';
    position: absolute;
    top: 47%;
    width: 48px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f7e3a1 0%, #d4af37 45%, #9c7711 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 -3px 6px rgba(0, 0, 0, 0.4);
    z-index: 4;
}

.launch-curtain-panel-left {
    left: 0;
    border-right: 2px solid rgba(var(--gold-rgb), 0.40);
    transform-origin: left center;
    clip-path: polygon(0 0, 100% 0, 100% 58%, 60% 100%, 0 92%);
    border-bottom-right-radius: 80% 45%;
}

.launch-curtain-panel-left::before {
    right: 2px;
}

.launch-curtain-panel-right {
    right: 0;
    border-left: 2px solid rgba(var(--gold-rgb), 0.40);
    transform-origin: right center;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 40% 100%, 0 58%);
    border-bottom-left-radius: 80% 45%;
}

.launch-curtain-panel-right::before {
    left: 2px;
}

body.launch-curtain-opening .launch-curtain-panel-left {
    transform: translateX(-105%);
}

body.launch-curtain-opening .launch-curtain-panel-right {
    transform: translateX(105%);
}

body.launch-curtain-opening .launch-curtain-gauze {
    transform: translateY(-110%);
}

.launch-curtain-center {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: inherit;
    padding: clamp(78px, 15vh, 128px) 24px 48px;
}

.launch-curtain-kicker {
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin: 0 0 12px;
}

.launch-curtain-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: #fff;
    margin: 0 0 12px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.launch-curtain-subtitle {
    max-width: 34rem;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 28px;
    line-height: 1.5;
}

.launch-curtain-countdown {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 20px;
}

.launch-curtain-unit {
    min-width: 72px;
    padding: 14px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    box-shadow: inset 0 0 20px rgba(var(--gold-rgb), 0.08);
}

.launch-curtain-value {
    display: block;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--primary-gold);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.launch-curtain-label {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.launch-curtain-footnote {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}

.admin-launch-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #111;
    border: 1px solid rgba(var(--gold-rgb), 0.25);
    border-radius: 8px;
    margin-bottom: 8px;
}

.admin-launch-switch-label {
    flex: 1;
    font-size: 0.9rem;
    color: #ddd;
}

.admin-toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.admin-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #444;
    border-radius: 999px;
    transition: background 0.25s ease;
    border: 1px solid #555;
}

.admin-toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.admin-toggle-switch input:checked + .admin-toggle-slider {
    background: rgba(var(--gold-rgb), 0.85);
    border-color: var(--primary-gold);
}

.admin-toggle-switch input:checked + .admin-toggle-slider::before {
    transform: translateX(24px);
}

.admin-toggle-switch input:focus-visible + .admin-toggle-slider {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

/* ===== Universal Phone Country Picker ===== */
.phone-picker-row {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}
.phone-picker-select {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 58px;
    z-index: 2;
}
.phone-picker-btn {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 28px auto;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    border-right: 1px solid #444;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.phone-picker-btn:hover,
.phone-picker-btn:focus-visible {
    outline: none;
}
.phone-picker-btn:hover {
    filter: brightness(1.15);
}
.phone-picker-code {
    font-size: 0.95rem;
    font-weight: 800;
    color: #000;
    text-shadow: 0 0 2px #fff, 0 0 4px rgba(255,255,255,0.6);
    pointer-events: none;
    white-space: nowrap;
    line-height: 1.2;
}
.phone-picker-input {
    width: 100%;
    padding: 8px 8px 8px 66px;
    background: #222; color: white;
    border: 1px solid #444;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.95rem;
    line-height: normal;
    margin-bottom: 0;
}
.phone-picker-input:focus {
    border-color: var(--primary-gold);
    outline: none;
}
.phone-picker-menu {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;
    min-width: 260px;
    width: max(100%, 260px);
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #151515;
    border: 1px solid rgba(212,175,55,0.55);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.65);
}
.phone-picker-menu.hidden { display: none; }
.phone-picker-option {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 12px; cursor: pointer; color: #eee; font-size: 0.88rem;
}
.phone-picker-option:hover,
.phone-picker-option[aria-selected="true"] {
    background: rgba(212,175,55,0.12);
}
.phone-picker-option-dial {
    flex-shrink: 0; font-weight: 700; color: var(--primary-gold); min-width: 3.2rem;
}
.phone-picker-option-name {
    flex: 1; text-align: right; color: #ddd;
}