/* ================================================================
   screen.css — XVIPP v4 Blueprint Edition
   Mobile-first · CSS Grid masonry · Blueprint design system
   ================================================================ */

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
    /* Colors */
    --c-bg:       #000;
    --c-surface:  #0d0d0d;
    --c-surface2: #141414;
    --c-surface3: #1c1c1c;
    --c-border:   #1f1f1f;
    --c-border2:  #2a2a2a;
    --c-text:     #e2e2e2;
    --c-muted:    #666;
    --c-dim:      #333;
    --c-accent:   #dc2626;
    --c-gold:     #d4a017;
    --c-green:    #22c55e;
    --c-blue:     #3b82f6;

    /* Typography */
    --f-body:  'Syne', system-ui, -apple-system, sans-serif;
    --f-mono:  'Fira Code', 'Courier New', monospace;
    --t-xs:    11px;
    --t-sm:    13px;
    --t-base:  14px;
    --t-md:    17px;
    --t-lg:    22px;
    --t-xl:    28px;
    --fw-normal:  400;
    --fw-medium:  500;
    --fw-semi:    600;
    --fw-bold:    700;
    --fw-black:   800;

    /* Spacing (8px grid) */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;

    /* Radii */
    --r-sm:   4px;
    --r:      8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-full: 999px;

    /* Z-index */
    --z-header:  50;
    --z-sheet:  100;
    --z-toast:  200;
    --z-overlay:300;

    /* Transitions */
    --tr-fast:   0.12s ease;
    --tr-base:   0.20s ease;
    --tr-slow:   0.32s cubic-bezier(.32,0,.67,0);
    --tr-spring: 0.35s cubic-bezier(.34,1.56,.64,1);

    /* Masonry row height — must match JS */
    --row-unit: 8px;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: var(--t-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ── Header ──────────────────────────────────────────────────── */
.gh-head {
    background: rgba(0,0,0,0.94);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.gh-head-inner {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 14px;
    display: flex;
    align-items: center;
    height: 50px;
    gap: 8px;
}

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { height: 30px; width: auto; }
.logo-text { font-size: 21px; font-weight: var(--fw-black); letter-spacing: -.5px; color: #fff; }
.logo-text em { color: var(--c-accent); font-style: normal; }

/* Inline category nav (header) */
.cat-nav-inline {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    padding: 0 4px;
}
.cat-nav-inline::-webkit-scrollbar { display: none; }

.header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ── Header buttons ──────────────────────────────────────────── */
.h-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 11px;
    border-radius: var(--r-sm);
    font-size: var(--t-xs);
    font-weight: var(--fw-semi);
    border: none;
    transition: background var(--tr-fast), transform var(--tr-fast), filter var(--tr-fast);
    white-space: nowrap;
    cursor: pointer;
}
.h-btn:active { transform: scale(.96); }

.h-btn--search {
    background: var(--c-surface3);
    color: var(--c-muted);
    border: 1px solid var(--c-border2);
}
.h-btn--search:hover { background: #222; color: #fff; }

.h-btn--premium { background: var(--c-gold); color: #000; font-weight: var(--fw-black); }
.h-btn--premium:hover { filter: brightness(1.1); }

.h-btn--signin {
    background: var(--c-surface3);
    color: var(--c-text);
    border: 1px solid var(--c-border2);
}
.h-btn--signin:hover { background: #222; }

/* ── Wallet pill ──────────────────────────────────────────────── */
.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--c-surface3);
    border: 1px solid var(--c-border2);
    border-radius: var(--r-full);
    padding: 4px 11px;
    font-size: var(--t-xs);
    font-weight: var(--fw-bold);
    color: var(--c-gold);
    white-space: nowrap;
    transition: border-color var(--tr-fast);
    cursor: default;
}
.wallet-pill:hover { border-color: var(--c-gold); }
.wallet-icon { font-size: 10px; opacity: .8; }

/* Wallet pop animation */
@keyframes walletPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); color: var(--c-green); border-color: var(--c-green); }
    100% { transform: scale(1); }
}
.wallet-pill.wallet-updated { animation: walletPop var(--tr-spring) forwards; }

.h-btn--topup {
    background: var(--c-gold);
    color: #000;
    font-weight: var(--fw-black);
    font-size: var(--t-xs);
    border: none;
    border-radius: var(--r-sm);
    padding: 5px 10px;
    transition: filter var(--tr-fast), transform var(--tr-fast);
}
.h-btn--topup:hover { filter: brightness(1.12); }
.h-btn--topup:active { transform: scale(.96); }

.h-btn--account {
    background: var(--c-surface3);
    border: 1px solid var(--c-border2);
    color: var(--c-text);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    flex-shrink: 0;
    transition: border-color var(--tr-fast);
}
.h-btn--account:hover { border-color: var(--c-gold); color: var(--c-gold); }

/* ── Pills ────────────────────────────────────────────────────── */
.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--r-full);
    font-size: var(--t-xs);
    font-weight: var(--fw-semi);
    white-space: nowrap;
    background: var(--c-surface2);
    color: var(--c-muted);
    border: 1px solid var(--c-border2);
    transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast);
    flex-shrink: 0;
}
.pill:hover, .pill.active { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.pill--sm { padding: 3px 9px; font-size: 10px; }

/* ── Session banner ───────────────────────────────────────────── */
.session-banner {
    background: rgba(34,197,94,.07);
    border-bottom: 1px solid rgba(34,197,94,.14);
    padding: 5px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--t-xs);
}
.session-banner[hidden] { display: none; }
.session-status { color: var(--c-green); font-weight: var(--fw-bold); flex-shrink: 0; }
.session-progress-bar { flex: 1; height: 3px; background: rgba(34,197,94,.15); border-radius: 2px; overflow: hidden; }
.session-progress-fill { height: 100%; background: var(--c-green); width: 100%; transition: width 30s linear; }
.session-time { color: var(--c-muted); font-size: 10px; flex-shrink: 0; }

/* ── Feed ─────────────────────────────────────────────────────── */
.site-main { padding-top: 16px; }
.feed-wrap { max-width: 1800px; margin: 0 auto; padding: 0 14px; }

.feed-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: var(--t-xs);
    color: var(--c-dim);
}

/* ================================================================
   MASONRY GRID
   grid-auto-rows: 8px — JS sets grid-row-end: span N per item
   2 cols mobile · 3 cols tablet · 6 cols desktop
   ================================================================ */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 8px;
    gap: 8px;
    align-items: start;
}

@media (min-width: 600px) {
    .masonry-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (min-width: 1100px) {
    .masonry-grid { grid-template-columns: repeat(6, 1fr); }
}

.masonry-item { overflow: visible; }

/* ── Post card ────────────────────────────────────────────────── */
.post-card {
    background: var(--c-surface);
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--c-border);
    transition: transform var(--tr-base), box-shadow var(--tr-base), border-color var(--tr-fast);
    display: flex;
    flex-direction: column;
}

@media (hover: hover) {
    .post-card:hover {
        transform: translateY(-3px) scale(1.013);
        box-shadow: 0 10px 36px rgba(0,0,0,.72);
        border-color: var(--c-border2);
        z-index: 10;
    }
}

.post-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }

.post-card-thumb {
    position: relative;
    overflow: hidden;
    background: var(--c-surface2);
}

/* Lazy-load image: invisible until loaded */
.post-card-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: transform var(--tr-slow), opacity .35s ease;
}
.post-card-image.is-loaded { opacity: 1; }

@media (hover: hover) {
    .post-card:hover .post-card-image { transform: scale(1.06); }
}

.post-card-fallback {
    width: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-dim);
}

/* ── Card overlay (hover) ─────────────────────────────────────── */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.78) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--tr-base);
    pointer-events: none;
}
.overlay-play {
    font-size: 22px;
    color: rgba(255,255,255,.9);
    transform: scale(.75);
    transition: transform var(--tr-base);
}
@media (hover: hover) {
    .post-card:hover .card-overlay { opacity: 1; }
    .post-card:hover .overlay-play { transform: scale(1); }
}

/* ── 3-3-∞ LOCK STATES ────────────────────────────────────────── */

/* State: Free (items 1-3) */
.media-item--free .free-badge {
    display: flex !important;
}
.media-item--free .post-card-image { opacity: 1; }

/* State: Ad (item 4) */
.media-item--ad .post-card {
    border-color: rgba(212,160,23,.2);
    background: #0a1020;
}

/* State: Locked (items 5+) */
.media-item--locked .post-card-image {
    filter: blur(8px) brightness(.55);
    transform: scale(1.04); /* hides blur edges */
    opacity: 1 !important;
    transition: filter .4s ease, transform .4s ease;
}
.media-item--locked .lock-overlay { display: flex !important; }
.media-item--locked .post-card { overflow: hidden; }

/* State: Revealed (after unlock) */
.media-item--revealed .post-card-image {
    filter: none;
    transform: scale(1);
    opacity: 1 !important;
    transition: filter .5s var(--tr-spring), transform .5s var(--tr-spring);
}
.media-item--revealed .lock-overlay { display: none !important; }

/* Lock overlay */
.lock-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10px;
    gap: 6px;
    z-index: 3;
}
.lock-icon-sm { font-size: 18px; }
.lock-unlock-btn {
    background: var(--c-accent);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-size: 10px;
    font-weight: var(--fw-bold);
    padding: 4px 10px;
    transition: filter var(--tr-fast);
}
.lock-unlock-btn:hover { filter: brightness(1.15); }

/* Free badge */
.free-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(5,46,8,.9);
    color: var(--c-green);
    border: 1px solid rgba(34,197,94,.3);
    border-radius: var(--r-sm);
    font-size: 8px;
    font-weight: var(--fw-black);
    padding: 2px 5px;
    z-index: 3;
    display: none;
    letter-spacing: .4px;
}

/* Media badge */
.media-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,.84);
    color: #fff;
    font-size: 9px;
    font-weight: var(--fw-bold);
    padding: 2px 7px;
    border-radius: var(--r-sm);
    display: none;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,.07);
    white-space: nowrap;
    z-index: 3;
    pointer-events: none;
}
.media-badge.is-visible { display: flex; }

/* ── Native Ad Card (item 4) ──────────────────────────────────── */
.ad-card {
    border-color: rgba(212,160,23,.15) !important;
    background: linear-gradient(135deg, #080c14, #0a1020) !important;
    cursor: pointer;
}
.ad-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    text-align: center;
}
.ad-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--r);
    background: rgba(59,130,246,.15);
    border: 1px solid rgba(59,130,246,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.ad-title { font-size: var(--t-xs); font-weight: var(--fw-semi); color: var(--c-text); line-height: 1.35; }
.ad-sub   { font-size: 9px; color: var(--c-muted); margin-top: 1px; }
.ad-cta {
    background: var(--c-surface3);
    border: 1px solid var(--c-border2);
    color: var(--c-muted);
    border-radius: var(--r-sm);
    font-size: 9px;
    font-weight: var(--fw-semi);
    padding: 3px 8px;
    margin-top: 4px;
    transition: background var(--tr-fast), color var(--tr-fast);
}
.ad-cta:hover { background: #222; color: var(--c-text); }
.sponsored-label {
    font-size: 8px;
    color: var(--c-dim);
    text-align: right;
    padding: 3px 8px 5px;
}

/* Card body */
.post-card-body {
    padding: 7px 8px 9px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card-tag-badge {
    display: inline-block;
    background: var(--c-accent);
    color: #fff;
    font-size: 9px;
    font-weight: var(--fw-bold);
    padding: 2px 6px;
    border-radius: var(--r-full);
    text-transform: uppercase;
    letter-spacing: .4px;
    align-self: flex-start;
}
.post-card-title {
    font-size: 11px;
    font-weight: var(--fw-semi);
    color: #888;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (hover: hover) {
    .post-card:hover .post-card-title { color: #ccc; }
}

/* ── Pagination ───────────────────────────────────────────────── */
.pagination-wrap { margin: 40px 0 56px; text-align: center; }
.pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}
.page-numbers { display: contents; }
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--r-sm);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    color: var(--c-muted);
    font-size: 12px;
    font-weight: var(--fw-semi);
    transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast);
    text-decoration: none;
    cursor: pointer;
}
.page-btn:hover        { background: var(--c-surface3); color: #e0e0e0; border-color: var(--c-border2); }
.page-active           { background: var(--c-accent) !important; border-color: var(--c-accent) !important; color: #fff !important; font-weight: var(--fw-bold); pointer-events: none; }
.page-disabled         { opacity: .3; pointer-events: none; }
.page-ellipsis         { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 34px; color: var(--c-dim); font-size: 13px; }
.pagination-info       { margin-top: 10px; font-size: 10px; color: var(--c-dim); }

/* ── Archive header ───────────────────────────────────────────── */
.archive-header { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--c-border); }
.breadcrumb { font-size: var(--t-xs); color: var(--c-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.breadcrumb a { color: #3a3a3a; }
.breadcrumb a:hover { color: #888; }
.archive-title { font-size: 20px; font-weight: var(--fw-black); color: #fff; line-height: 1.2; margin-bottom: 6px; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; }
.tag-icon { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--c-border2); flex-shrink: 0; }
.archive-desc { font-size: 12px; color: var(--c-muted); line-height: 1.65; max-width: 560px; margin-bottom: 10px; }
.archive-count { display: inline-block; background: var(--c-surface3); color: var(--c-dim); font-size: 10px; font-weight: var(--fw-bold); padding: 2px 8px; border-radius: var(--r-sm); border: 1px solid var(--c-border); text-transform: uppercase; letter-spacing: .4px; }

/* ================================================================
   POST PAGE
   ================================================================ */
.post-main { padding-top: 22px; }
.post-wrap  { max-width: 980px; margin: 0 auto; padding: 0 14px; }

.post-breadcrumb { font-size: 10px; color: var(--c-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.post-breadcrumb a { color: #3a3a3a; }
.post-breadcrumb a:hover { color: #888; }

.post-title { font-size: clamp(17px, 3vw, 24px); font-weight: var(--fw-black); color: #f0f0f0; line-height: 1.3; margin-bottom: 12px; letter-spacing: -.3px; }

.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: 11px; color: var(--c-muted); margin-bottom: 12px; }
.post-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.post-meta-tag { background: var(--c-accent); color: #fff; padding: 2px 7px; border-radius: var(--r-full); font-size: 10px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .3px; }
.post-media-summary { color: #6ee7b7; font-weight: var(--fw-semi); font-size: 11px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; }
.post-tag { display: inline-block; padding: 3px 9px; background: var(--c-surface2); border: 1px solid var(--c-border); border-radius: var(--r-sm); font-size: 10px; color: var(--c-muted); font-weight: var(--fw-semi); transition: background var(--tr-fast), color var(--tr-fast); }
.post-tag:hover { background: var(--c-surface3); color: #bbb; }

/* ── Post media section ───────────────────────────────────────── */
.post-media-section { margin-bottom: 22px; }
.post-content { position: static !important; z-index: auto !important; overflow: visible !important; }
.post-content.is-gallery { display: none; }

/* Gallery grid */
.post-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}
.post-gallery[hidden] { display: none; }
@media (min-width: 480px) { .post-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .post-gallery { grid-template-columns: repeat(4, 1fr); } }
.post-gallery.gallery-single { grid-template-columns: 1fr; }
.post-gallery.gallery-two    { grid-template-columns: repeat(2, 1fr); }

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    cursor: pointer;
    background: var(--c-surface2);
    aspect-ratio: 1;
}
.gallery-item:first-child:only-child { aspect-ratio: 16/9; }
.gallery-item img  { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .28s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-play-wrap  { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.gallery-play-icon  { width: 40px; height: 40px; background: rgba(0,0,0,.72); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; backdrop-filter: blur(3px); transition: transform .2s, background .2s; }
.gallery-item:hover .gallery-play-icon { transform: scale(1.1); background: var(--c-accent); }
.gallery-more-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: var(--fw-black); color: #fff; }

/* ── Video Player ─────────────────────────────────────────────── */
.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 16px;
    border-radius: var(--r);
    overflow: hidden;
    background: #000;
}

/* State 1: Skeleton shimmer */
.player-skeleton {
    position: absolute;
    inset: 0;
    background: var(--c-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.skeleton-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 20%, rgba(255,255,255,.04) 50%, transparent 80%);
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }
.skeleton-play-icon { font-size: 40px; color: rgba(255,255,255,.12); z-index: 1; }

/* State 2: Locked */
.player-locked {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.player-locked[hidden] { display: none; }
.player-lock-content { text-align: center; padding: 20px; }
.player-lock-icon  { font-size: 36px; margin-bottom: 10px; }
.player-lock-title { font-size: var(--t-md); font-weight: var(--fw-bold); color: #fff; margin-bottom: 14px; }
.player-lock-actions { display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* State 3: Active iframe (injected by JS) */
.player-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    /* SECURITY: src is NEVER set in HTML — only via JS after /api/get-signed-url */
}

/* ── Unlock Gate (image posts) ────────────────────────────────── */
.unlock-gate {
    background: linear-gradient(to top, var(--c-surface) 60%, transparent);
    border: 1px solid var(--c-border);
    border-radius: var(--r);
    padding: 24px 16px;
    margin-top: 8px;
    text-align: center;
}
.unlock-gate[hidden] { display: none; }
.gate-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gate-lock  { font-size: 32px; }
.gate-title { font-size: var(--t-md); font-weight: var(--fw-bold); color: #fff; }
.gate-sub   { font-size: var(--t-sm); color: var(--c-muted); max-width: 360px; line-height: 1.5; }
.gate-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 280px; margin-top: 8px; }

/* ── Unlock buttons ───────────────────────────────────────────── */
.unlock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: var(--r);
    font-size: var(--t-sm);
    font-weight: var(--fw-bold);
    border: none;
    cursor: pointer;
    transition: filter var(--tr-fast), transform var(--tr-fast);
    width: 100%;
    text-align: center;
}
.unlock-btn:active { transform: scale(.97); }
.unlock-btn--ad {
    background: var(--c-accent);
    color: #fff;
}
.unlock-btn--ad:hover { filter: brightness(1.12); }
.unlock-btn--wallet {
    background: var(--c-surface3);
    color: var(--c-gold);
    border: 1px solid rgba(212,160,23,.3);
}
.unlock-btn--wallet:hover { background: rgba(212,160,23,.1); border-color: var(--c-gold); }
.unlock-btn--premium {
    background: var(--c-gold);
    color: #000;
}
.unlock-btn--premium:hover { filter: brightness(1.1); }
.unlock-badge {
    background: rgba(255,255,255,.18);
    border-radius: var(--r-full);
    font-size: 9px;
    padding: 1px 6px;
}

/* ── Post description ─────────────────────────────────────────── */
.post-description { font-size: var(--t-base); line-height: 1.78; color: #b8b8b8; margin-bottom: 22px; }
.post-description p  { margin-bottom: 1em; }
.post-description h2,
.post-description h3 { color: #efefef; font-weight: var(--fw-bold); margin: 1.4em 0 .5em; }
.gh-content { position: static !important; z-index: auto !important; overflow: visible !important; }
.gh-content img { width: 100%; height: auto; border-radius: var(--r-sm); }

/* Ghost Koenig */
.kg-width-wide { position: relative; width: 85vw; min-width: 100%; margin: 0 auto; }
@media (min-width: 720px) { .kg-width-wide { min-width: 720px; width: 85vw; margin-left: calc(360px - 42.5vw); } }
.kg-width-full { position: relative; width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }

/* ── Action / share row ───────────────────────────────────────── */
.action-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 13px 0; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); margin: 22px 0; }
.social-group { display: flex; gap: 7px; }
.sc { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; transition: transform .16s, filter .16s; }
.sc:hover { transform: scale(1.12); filter: brightness(1.15); }
.sc-fb { background: #1877f2; } .sc-tw { background: #1da1f2; } .sc-wa { background: #25d366; } .sc-rd { background: #ff4500; }
.copy-link-box { display: flex; gap: 6px; flex: 1; max-width: 360px; min-width: 0; }
.copy-input { flex: 1; min-width: 0; background: var(--c-surface2); border: 1px solid var(--c-border2); border-radius: var(--r-sm); padding: 7px 10px; color: var(--c-muted); font-size: 10px; font-family: var(--f-mono); }
.copy-btn { background: var(--c-surface3); border: 1px solid var(--c-border2); border-radius: var(--r-sm); padding: 7px 12px; color: var(--c-text); font-size: 11px; font-weight: var(--fw-semi); transition: background var(--tr-fast); white-space: nowrap; }
.copy-btn:hover { background: #222; }

/* ── Related ──────────────────────────────────────────────────── */
.related-section { border-top: 1px solid var(--c-border); padding-top: 26px; margin-top: 38px; margin-bottom: 56px; }
.related-title { font-size: var(--t-base); color: #fff; font-weight: var(--fw-bold); margin-bottom: 16px; padding-left: 10px; border-left: 3px solid var(--c-accent); }
.related-masonry-grid { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 600px) { .related-masonry-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px)  { .related-masonry-grid { grid-template-columns: repeat(6, 1fr); } }

/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.97); z-index: 1000; backdrop-filter: blur(10px); }
.lightbox-backdrop[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 1001; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox-inner { max-width: min(92vw,1200px); max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.lightbox-inner img, .lightbox-inner video { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: var(--r); display: block; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: fixed; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: 50%; color: #fff; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: background .13s, transform .13s; z-index: 1002; backdrop-filter: blur(5px); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.22); }
.lightbox-close { top: 14px; right: 14px; font-size: 15px; }
.lightbox-prev  { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover  { transform: translateY(-50%) scale(1.08); }
.lightbox-next  { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next:hover  { transform: translateY(-50%) scale(1.08); }
.lightbox-counter { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #bbb; font-size: 11px; padding: 4px 14px; border-radius: var(--r-full); backdrop-filter: blur(5px); z-index: 1002; }

/* ================================================================
   BOTTOM SHEETS
   ================================================================ */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: calc(var(--z-sheet) - 1);
    backdrop-filter: blur(4px);
}
.sheet-backdrop[hidden] { display: none; }

.bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--c-surface);
    border-top: 1px solid var(--c-border2);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    z-index: var(--z-sheet);
    padding: 12px 16px max(env(safe-area-inset-bottom, 24px), 24px);
    transform: translateY(100%);
    transition: transform var(--tr-slow);
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.bottom-sheet.is-open { transform: translateY(0); }
.bottom-sheet[hidden] { display: none; transform: translateY(100%); }

.sheet-handle {
    width: 36px; height: 4px;
    background: var(--c-border2);
    border-radius: 2px;
    margin: 0 auto 16px;
}
.sheet-title { font-size: 18px; font-weight: var(--fw-bold); color: #fff; margin-bottom: 14px; }
.sheet-sub   { font-size: var(--t-sm); color: var(--c-muted); margin-bottom: 14px; line-height: 1.55; }

/* Amount grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.amount-btn {
    background: var(--c-surface2);
    border: 1.5px solid var(--c-border2);
    color: var(--c-text);
    border-radius: var(--r);
    padding: 10px 0;
    font-size: var(--t-sm);
    font-weight: var(--fw-semi);
    font-family: var(--f-body);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--tr-fast), color var(--tr-fast), background var(--tr-fast);
}
.amount-btn.selected {
    border-color: var(--c-gold);
    color: var(--c-gold);
    background: rgba(212,160,23,.07);
}

/* Method toggle */
.method-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--c-border2);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 12px;
}
.method-btn {
    padding: 9px;
    text-align: center;
    background: var(--c-surface2);
    color: var(--c-muted);
    font-size: var(--t-sm);
    font-weight: var(--fw-semi);
    font-family: var(--f-body);
    cursor: pointer;
    border: none;
    transition: background var(--tr-fast), color var(--tr-fast);
}
.method-btn.selected { background: var(--c-gold); color: #000; font-weight: var(--fw-bold); }

/* Instruction box */
.instruction-box {
    background: var(--c-surface2);
    border: 1px solid var(--c-border);
    border-radius: var(--r);
    padding: 12px;
    font-size: 11px;
    font-family: var(--f-mono);
    color: #9de8a0;
    line-height: 1.75;
    margin-bottom: 12px;
    white-space: pre-wrap;
    overflow-x: auto;
}

.topup-txn-input {
    width: 100%;
    background: var(--c-surface2);
    border: 1.5px solid var(--c-border2);
    border-radius: var(--r);
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: var(--t-base);
    padding: 10px 12px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color var(--tr-fast);
}
.topup-txn-input:focus { border-color: var(--c-gold); }
.topup-txn-input::placeholder { color: var(--c-dim); }

.sheet-legal {
    font-size: 10px;
    color: var(--c-muted);
    line-height: 1.65;
    text-align: center;
    padding: 8px 4px;
    margin-bottom: 10px;
}
.sheet-legal a { color: var(--c-gold); text-decoration: underline; text-underline-offset: 2px; }

.topup-submit {
    display: block;
    width: 100%;
    background: var(--c-gold);
    color: #000;
    border: none;
    border-radius: var(--r);
    font-size: var(--t-base);
    font-weight: var(--fw-bold);
    font-family: var(--f-body);
    padding: 13px;
    cursor: pointer;
    transition: filter var(--tr-fast), transform var(--tr-fast), opacity var(--tr-fast);
    margin-bottom: 10px;
}
.topup-submit:hover:not(:disabled) { filter: brightness(1.12); }
.topup-submit:active:not(:disabled) { transform: scale(.98); }
.topup-submit:disabled { opacity: .4; cursor: not-allowed; }

.topup-whatsapp {
    display: block;
    text-align: center;
    color: var(--c-green);
    font-size: var(--t-sm);
    padding: 4px;
    transition: opacity var(--tr-fast);
}
.topup-whatsapp:hover { opacity: .8; }

/* ── Ad unlock countdown ──────────────────────────────────────── */
.countdown-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}
.countdown-label {
    font-size: 42px;
    font-weight: var(--fw-black);
    color: var(--c-accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
    transition: color .3s;
}
.countdown-label.ready { color: var(--c-green); }

.ad-placeholder {
    background: var(--c-surface2);
    border: 1px dashed var(--c-border2);
    border-radius: var(--r);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-dim);
    font-size: var(--t-xs);
    margin-bottom: 12px;
    overflow: hidden;
}

.countdown-track {
    height: 4px;
    background: var(--c-border2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}
.countdown-fill {
    height: 100%;
    background: var(--c-accent);
    width: 0%;
    border-radius: 2px;
    transition: width .1s linear, background .3s;
}
.countdown-fill.ready { background: var(--c-green); }

.unlock-confirm-btn:not(:disabled) {
    background: var(--c-green) !important;
    color: #000 !important;
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
.toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(90vw, 380px);
    pointer-events: none;
}
.toast {
    padding: 11px 15px;
    border-radius: var(--r);
    font-size: var(--t-sm);
    font-weight: var(--fw-medium);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(-16px);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
    pointer-events: all;
    line-height: 1.4;
}
.toast.visible { transform: translateY(0); opacity: 1; }
.toast--success { background: #0a2e0a; color: var(--c-green); border: 1px solid #163316; }
.toast--warn    { background: #2a1e00; color: var(--c-gold);  border: 1px solid #4a3a00; }
.toast--error   { background: #2e0a0a; color: #ff6b6b;        border: 1px solid #5a1a1a; }

/* ================================================================
   AGE GATE
   ================================================================ */
.age-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.97);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}
.age-gate-overlay[hidden] { display: none; }
.age-gate-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border2);
    border-radius: var(--r-md);
    padding: 36px 28px;
    max-width: 400px;
    width: 92%;
    text-align: center;
}
.age-gate-icon { font-size: 52px; display: block; margin-bottom: 14px; }
.age-gate-card h2 { font-size: 20px; font-weight: var(--fw-black); color: #fff; margin-bottom: 12px; }
.age-gate-card p { font-size: var(--t-sm); color: var(--c-muted); line-height: 1.65; margin-bottom: 20px; }
.age-gate-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.age-btn { padding: 12px 20px; border-radius: var(--r); font-size: var(--t-base); font-weight: var(--fw-bold); font-family: var(--f-body); border: none; cursor: pointer; transition: filter var(--tr-fast), transform var(--tr-fast); }
.age-btn:active { transform: scale(.97); }
.age-btn--confirm { background: var(--c-accent); color: #fff; }
.age-btn--confirm:hover { filter: brightness(1.12); }
.age-btn--decline { background: var(--c-surface3); color: var(--c-muted); border: 1px solid var(--c-border2); }
.age-btn--decline:hover { background: #222; }
.age-gate-legal { font-size: 10px; color: var(--c-dim); }
.age-gate-legal a { color: var(--c-gold); text-decoration: underline; }

/* ================================================================
   ANTI-ADBLOCK MODAL
   ================================================================ */
#aab-modal { display: none; position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.97); align-items: center; justify-content: center; backdrop-filter: blur(8px); }
#aab-modal.aab-on { display: flex; }
body.aab-blur #site-wrap { filter: blur(8px); pointer-events: none; user-select: none; }
.aab-box { background: var(--c-surface); border: 1px solid var(--c-border2); border-radius: var(--r-md); padding: 36px 28px; max-width: 400px; width: 90%; text-align: center; }
.aab-icon  { font-size: 48px; display: block; margin-bottom: 12px; }
.aab-title { font-size: 18px; font-weight: var(--fw-black); color: #fff; margin-bottom: 8px; }
.aab-desc  { font-size: var(--t-sm); color: var(--c-muted); margin-bottom: 20px; line-height: 1.65; }
.aab-steps { list-style: none; text-align: left; background: var(--c-surface2); border: 1px solid var(--c-border); border-radius: var(--r); padding: 12px 14px; margin-bottom: 18px; font-size: var(--t-sm); color: #888; line-height: 1.8; }
.aab-steps li::before { content: '→ '; color: var(--c-accent); font-weight: var(--fw-bold); }
.aab-btn { display: block; width: 100%; background: var(--c-accent); color: #fff; font-size: 13px; font-weight: var(--fw-bold); font-family: var(--f-body); padding: 12px 20px; border-radius: var(--r); border: none; transition: filter .16s, transform .11s; cursor: pointer; }
.aab-btn:hover  { filter: brightness(1.12); transform: translateY(-1px); }
.aab-btn:active { transform: scale(.97); }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer { background: var(--c-surface); border-top: 1px solid var(--c-border); padding: 38px 20px; margin-top: 56px; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-logo img  { height: 28px; margin: 0 auto 14px; }
.footer-brand { font-size: 20px; font-weight: var(--fw-black); color: #fff; display: block; margin-bottom: 14px; }
.footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { font-size: 10px; color: var(--c-dim); text-transform: uppercase; letter-spacing: .5px; transition: color var(--tr-fast); }
.footer-links a:hover { color: #666; }
.footer-dmca { font-size: 10px; color: #282828; line-height: 1.6; margin-bottom: 8px; }
.dmca-badge { background: var(--c-surface3); color: #444; border: 1px solid var(--c-border2); border-radius: var(--r-sm); font-size: 9px; font-weight: var(--fw-bold); padding: 2px 7px; margin-right: 4px; }
.footer-copy { color: #1a1a1a; font-size: 9px; margin-top: 6px; }
.age-bar { background: #020202; border-top: 1px solid #0d0d0d; padding: 8px 18px; text-align: center; font-size: 9px; color: #222; }
.age-bar a { color: #2a2a2a; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 440px) {
    .gh-head-inner { height: 46px; padding: 0 10px; }
    .logo-text { font-size: 18px; }
    .cat-nav-inline { display: none; } /* collapsed on very small screens */
    .h-btn .btn-label { display: none; }
    .h-btn { padding: 5px 8px; }
    .feed-wrap, .post-wrap { padding: 0 8px; }
    .post-gallery { grid-template-columns: repeat(2, 1fr); }
    .action-row { flex-direction: column; align-items: flex-start; }
    .copy-link-box { max-width: 100%; width: 100%; }
    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
    .related-masonry-grid { grid-template-columns: repeat(2, 1fr); }
    .amount-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Post feature image (page.hbs) ──────────────────────────── */
.post-feature-image {
    width: 100%;
    height: auto;
    border-radius: var(--r);
    margin-bottom: 22px;
    display: block;
}

/* ── Member account button — initial shown via JS ────────────── */
.h-btn--account {
    font-size: 13px;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: .5px;
}
