/* ============================================================
   JKT48 MEMBER PAGE — Editorial Dark/Light
   Fonts: Playfair Display (display) + DM Sans (body)
   ============================================================ */

/* ── TOKENS ── */
[data-theme="dark"] {
    --c-bg:          #080810;
    --c-surface:     #0f0f1a;
    --c-surface2:    #14141f;
    --c-surface3:    #1c1c2a;
    --c-card:        #111120;
    --c-card-h:      #161628;
    --c-border:      rgba(255,255,255,0.06);
    --c-border-h:    rgba(220,38,38,0.5);
    --c-red:         #dc2626;
    --c-red-hi:      #ef4444;
    --c-red-dim:     rgba(220,38,38,0.12);
    --c-red-glow:    rgba(220,38,38,0.28);
    --c-text:        #eeeef5;
    --c-text-2:      #9494a8;
    --c-text-3:      #52525f;
    --c-chip:        rgba(255,255,255,0.05);
    --c-chip-b:      rgba(255,255,255,0.08);
    --c-shadow:      0 8px 40px rgba(0,0,0,0.6);
    --c-photo-fade:  #111120;
}
[data-theme="light"] {
    --c-bg:          #f4f4f8;
    --c-surface:     #ffffff;
    --c-surface2:    #f9f9fc;
    --c-surface3:    #f0f0f5;
    --c-card:        #ffffff;
    --c-card-h:      #fafafe;
    --c-border:      rgba(0,0,0,0.07);
    --c-border-h:    rgba(220,38,38,0.4);
    --c-red:         #dc2626;
    --c-red-hi:      #ef4444;
    --c-red-dim:     rgba(220,38,38,0.08);
    --c-red-glow:    rgba(220,38,38,0.2);
    --c-text:        #111118;
    --c-text-2:      #555566;
    --c-text-3:      #aaaabc;
    --c-chip:        rgba(0,0,0,0.04);
    --c-chip-b:      rgba(0,0,0,0.08);
    --c-shadow:      0 4px 24px rgba(0,0,0,0.07);
    --c-photo-fade:  #ffffff;
}

/* ── RESET ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
}

/* ── PAGE WRAP ── */
.page-wrap {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ────────────────────────────────────────
   HEADER
──────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    padding: 0 0 0 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-jkt {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--c-red);
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-logo{
    height:30px;
    width:auto;
    object-fit:contain;
}

.brand-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--c-text-3);
    flex-shrink: 0;
}

.brand-sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--c-text-2);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-counter-pill {
    display: flex;
    align-items: baseline;
    gap: 5px;
    background: var(--c-red-dim);
    border: 1px solid var(--c-border-h);
    border-radius: 999px;
    padding: 5px 14px;
}

#memberCount {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-red-hi);
    line-height: 1;
}

.counter-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--c-text-2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.theme-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--c-chip);
    border: 1px solid var(--c-chip-b);
    color: var(--c-text-2);
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.theme-btn:hover {
    border-color: var(--c-red);
    color: var(--c-red);
    background: var(--c-red-dim);
}

/* ────────────────────────────────────────
   FILTER BAR
──────────────────────────────────────── */
.filter-bar-wrap {
    padding: 16px 0 0;
    margin-bottom: 24px;
}

.filter-bar-inner {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Row 1: Tim | divider | Generasi */
.filter-row-top {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.filter-divider {
    width: 1px;
    background: var(--c-border);
    align-self: stretch;
    margin: 0 24px;
    flex-shrink: 0;
}

/* Row 2: Sort + Reset */
.filter-row-bottom {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--c-border);
}

.flex-1 { flex: 1; min-width: 0; }

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.fg-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--c-text-3);
    flex-shrink: 0;
}

/* ── CHIPS ── */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--c-chip-b);
    background: var(--c-chip);
    color: var(--c-text-2);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    line-height: 1.2;
}
.chip:hover {
    border-color: var(--c-border-h);
    color: var(--c-text);
    background: var(--c-red-dim);
}
.chip.active {
    background: var(--c-red);
    color: #fff;
    border-color: var(--c-red);
    font-weight: 600;
    box-shadow: 0 2px 12px var(--c-red-glow);
}

.chip-sort { border-radius: 6px; }

/* Reset button */
.reset-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid var(--c-chip-b);
    background: transparent;
    color: var(--c-text-3);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.reset-btn:hover {
    border-color: var(--c-red);
    color: var(--c-red);
    background: var(--c-red-dim);
}
.reset-btn i { font-size: 11px; }

/* ────────────────────────────────────────
   MAIN CONTENT
──────────────────────────────────────── */
.main-content { padding-bottom: 20px; }

/* ── MEMBER GRID ── */
.member-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    animation: fadeInGrid 0.4s ease both;
}

@keyframes fadeInGrid {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── MEMBER CARD ── */
.member-card {
    background: var(--c-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    box-shadow: var(--c-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: cardIn 0.35s ease both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.member-card:hover {
    transform: translateY(-5px);
    border-color: rgba(220,38,38,0.35);
    box-shadow: 0 20px 48px rgba(0,0,0,0.25), 0 0 0 1px rgba(220,38,38,0.15);
}

/* ── FOTO ── */
.member-photo-container {
    width: 100%;
    aspect-ratio: 256 / 361;
    overflow: hidden;
    background: var(--c-surface3);
    position: relative;
    flex-shrink: 0;
}

.member-photo-container::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 55%;
    background: linear-gradient(to top, var(--c-photo-fade) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s;
}

.member-photo {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.5s ease;
}
.member-card:hover .member-photo { transform: scale(1.06); }

/* ── CARD INFO ── */
.member-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 2;
}

.member-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--c-text);
    text-align: center;
    line-height: 1.3;
    margin-bottom: 14px;
}

/* ── BIO TABLE ── */
.member-bio {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--c-border);
}

.bio-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0 8px;
    align-items: baseline;
    margin-bottom: 5px;
}
.bio-row:last-child { margin-bottom: 0; }

.bio-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-text-3);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.bio-sep {
    color: var(--c-red);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
}

.bio-value {
    font-size: 11.5px;
    color: var(--c-text-2);
    font-weight: 400;
    word-break: break-word;
    line-height: 1.4;
}

/* ── SOCIAL LINKS ── */
.member-social {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: auto;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    background: var(--c-chip);
    border: 1px solid var(--c-chip-b);
    border-radius: 8px;
    color: var(--c-text-2);
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 500;
    transition: all 0.18s;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}
.social-link i {
    font-size: 13px;
    width: 15px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}
.social-link span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.social-link .fa-x-twitter { color: var(--c-text-2); }
.social-link .fa-instagram  { color: #e1306c; }
.social-link .fa-tiktok     { color: var(--c-text-2); }
.social-link .fa-tv         { color: #8b5cf6; }
.social-link .fa-video      { color: #f97316; }

.social-link:hover {
    background: var(--c-red);
    color: #fff;
    border-color: var(--c-red);
    box-shadow: 0 4px 12px var(--c-red-glow);
}
.social-link:hover i { color: #fff !important; }

/* ── FIGHT STAMP ── */
.fight-stamp {
    text-align: right;
    margin-top: 32px;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--c-red);
    opacity: 0.1;
    letter-spacing: 4px;
    user-select: none;
}

/* ────────────────────────────────────────
   RESPONSIVE — TABLET 1024px
──────────────────────────────────────── */
@media (max-width: 1200px) {
    .member-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 960px) {
    .member-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }

    .filter-row-top { flex-wrap: wrap; gap: 16px; }
    .filter-divider  { display: none; }
}

/* ────────────────────────────────────────
   RESPONSIVE — HP 768px
──────────────────────────────────────── */
@media (max-width: 768px) {
    .page-wrap { padding: 0 12px 48px; }

    /* Header */
    .header-inner { height: 56px; padding: 0 12px; }
    .brand-jkt { font-size: 1.4rem; }
    .brand-sub { display: none; }
    .brand-dot { display: none; }

    /* Filter bar */
    .filter-bar-inner { padding: 14px 14px; gap: 12px; border-radius: 12px; }

    .filter-row-top {
        flex-direction: column;
        gap: 12px;
    }
    .filter-row-bottom {
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 12px;
    }
    .chip { font-size: 11.5px; padding: 6px 12px; }
    .reset-btn { font-size: 11.5px; padding: 7px 14px; }

    /* Grid: 2 kolom di HP */
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Card */
    .member-card { border-radius: 12px; }
    .member-info { padding: 10px 10px 12px; }
    .member-name { font-size: 0.85rem; margin-bottom: 10px; }

    /* Bio HP — label atas kecil, value bawah lebih besar */
    .bio-row {
        display: flex;
        flex-direction: column;
        gap: 1px;
        margin-bottom: 7px;
    }
    .bio-label {
        font-size: 9px;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        white-space: normal;
    }
    .bio-sep { display: none; }
    .bio-value {
        font-size: 12px;
        color: var(--c-text);
        font-weight: 500;
        word-break: normal;
        overflow-wrap: anywhere;
    }
    .member-bio { margin-bottom: 10px; padding-bottom: 10px; }

    /* Social */
    .social-link { padding: 6px 9px; font-size: 11px; gap: 7px; border-radius: 7px; }
    .social-link i { font-size: 12px; width: 14px; }
}

/* ────────────────────────────────────────
   RESPONSIVE — HP KECIL 420px
──────────────────────────────────────── */
@media (max-width: 420px) {
    .page-wrap { padding: 0 8px 40px; }
    .member-grid { gap: 8px; }
    .member-info { padding: 8px 9px 10px; }
    .member-name { font-size: 0.8rem; }
    .bio-label { font-size: 8.5px; }
    .bio-value { font-size: 11.5px; }
    .social-link { padding: 5px 8px; font-size: 10.5px; }
    .chip { font-size: 11px; padding: 5px 10px; }
    .filter-bar-inner { padding: 12px; }
}

/* ────────────────────────────────────────
   WIKIPEDIA TOOLTIP
──────────────────────────────────────── */
.wiki-tooltip {
    position: fixed;
    z-index: 9999;
    width: 380px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04);
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--c-border) transparent;
}
.wiki-tooltip::-webkit-scrollbar { width: 4px; }
.wiki-tooltip::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 4px; }

.wiki-tooltip.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Loading state */
.wt-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: var(--c-text-2);
    font-size: 13px;
}
.wt-spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--c-border);
    border-top-color: var(--c-red);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Not found */
.wt-notfound {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    color: var(--c-text-2);
    font-size: 13px;
}
.wt-notfound i { color: var(--c-text-3); font-size: 18px; flex-shrink: 0; }

/* Inner wrap */
.wt-inner { padding: 0; }

/* Header */
.wt-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--c-border);
}
.wt-photo {
    width: 64px; height: 90px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--c-border);
}
.wt-head-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.wt-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.3;
}
.wt-wiki-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--c-red);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--c-border-h);
    background: var(--c-red-dim);
    transition: all 0.18s;
    width: fit-content;
}
.wt-wiki-link:hover { background: var(--c-red); color: #fff; }

/* Sections */
.wt-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
}
.wt-section:last-child { border-bottom: none; }

.wt-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--c-red);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wt-section-title i { font-size: 10px; }

.wt-section-body { color: var(--c-text-2); font-size: 12.5px; line-height: 1.6; }
.wt-section-body p { margin-bottom: 6px; }
.wt-section-body p:last-child { margin-bottom: 0; }

.wt-intro { color: var(--c-text-2); }

/* Mobile — tooltip off (touch tidak support hover) */
@media (max-width: 768px) {
    .wiki-tooltip { display: none !important; }
}

/* ────────────────────────────────────────
   WIKI INFO BUTTON ⓘ
──────────────────────────────────────── */
.member-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wiki-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--c-red);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.18s, opacity 0.18s;
    opacity: 0.8;
    vertical-align: middle;
}
.wiki-info-btn:hover { transform: scale(1.25); opacity: 1; }

/* ────────────────────────────────────────
   POPUP CARD
──────────────────────────────────────── */
#fandom-popup {
    position: fixed;
    z-index: 9999;
    width: 350px;
    max-width: calc(100vw - 24px);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--c-border) transparent;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.93) translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
#fandom-popup::-webkit-scrollbar { width: 4px; }
#fandom-popup::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 4px; }
#fandom-popup.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

/* ── Head ── */
.fp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 16px 13px;
    border-bottom: 1px solid var(--c-border);
    position: sticky; top: 0;
    background: var(--c-surface); z-index: 2;
}
.fp-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem; font-weight: 700;
    color: var(--c-text); line-height: 1.3;
    flex: 1; min-width: 0;
}
.fp-close {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: var(--c-chip);
    color: var(--c-text-2); font-size: 13px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.18s; line-height: 1;
}
.fp-close:hover { background: var(--c-red); color: #fff; border-color: var(--c-red); }

/* ── Body ── */
.fp-body {
    padding: 15px 16px 18px;
    display: flex; flex-direction: column; gap: 14px;
}

/* Loading */
.fp-loading {
    flex-direction: row !important;
    align-items: center; gap: 12px;
    color: var(--c-text-2); font-size: 13px;
    padding: 22px 16px !important;
}
.fp-spinner {
    width: 18px; height: 18px;
    border: 2.5px solid var(--c-border);
    border-top-color: var(--c-red);
    border-radius: 50%;
    animation: fpspin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes fpspin { to { transform: rotate(360deg); } }

/* Photo */
.fp-photo {
    width: 100%; max-height: 240px;
    object-fit: cover; object-position: top;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    display: block;
}

/* Lang badge */
.fp-lang-badge {
    display: inline-flex; align-items: center;
    font-size: 11px; font-weight: 600;
    color: var(--c-text-3);
    background: var(--c-chip);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 3px 10px;
    width: fit-content;
}

/* Intro */
.fp-intro {
    font-size: 13px; color: var(--c-text-2);
    line-height: 1.75; margin: 0;
}

/* Sections */
.fp-section {
    border-top: 1px solid var(--c-border);
    padding-top: 13px;
}
.fp-section-title {
    font-size: 10px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--c-red); margin-bottom: 9px;
    display: flex; align-items: center; gap: 7px;
}
.fp-section-title i { font-size: 10px; }
.fp-section-body {
    font-size: 12.5px; color: var(--c-text-2); line-height: 1.7;
}
.fp-section-body p { margin: 0 0 7px; }
.fp-section-body p:last-child { margin: 0; }

/* Link */
.fp-link {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 600;
    color: var(--c-red); text-decoration: none;
    padding: 10px 18px; border-radius: 999px;
    border: 1px solid var(--c-border-h);
    background: var(--c-red-dim);
    transition: all 0.18s; width: fit-content;
    margin-top: 2px;
}
.fp-link:hover { background: var(--c-red); color: #fff; }
.fp-link i { font-size: 11px; }

/* Not found */
.fp-notfound {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 13px; color: var(--c-text-2); margin: 0;
}
.fp-notfound i { color: var(--c-text-3); flex-shrink: 0; margin-top: 2px; }

/* ── HP: bottom sheet ── */
@media (max-width: 768px) {
    #fandom-popup {
        position: fixed !important;
        left: 0 !important; right: 0 !important;
        bottom: 0 !important; top: auto !important;
        width: 100% !important; max-width: 100% !important;
        max-height: 78vh !important;
        border-radius: 22px 22px 0 0 !important;
        transform: translateY(40px) scale(1) !important;
    }
    #fandom-popup.visible { transform: translateY(0) scale(1) !important; }
    /* Drag handle visual */
    .fp-head::before {
        content: '';
        display: block;
        position: absolute;
        top: 8px; left: 50%;
        transform: translateX(-50%);
        width: 36px; height: 4px;
        background: var(--c-border);
        border-radius: 2px;
    }
    .fp-head { padding-top: 20px; position: relative; }
}
