/* ================================================
   style-explorar.css
   Feed público · Layout 100vh fullscreen
   Nav fijo arriba, video ocupa el resto, sin scroll
   ================================================ */

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

:root {
    --bg: #06090f;
    --bg2: #080d16;
    --bg-soft: rgba(11, 18, 32, .6);
    --card: #0b1220;
    --border: rgba(255,255,255,.06);
    --border-hi: rgba(148,210,180,.2);
    --text: #cdd8e8;
    --muted: #5a6e85;
    --muted2: #3d5166;
    --accent: #94d2b4;
    --accent2: #4a9eff;
    --warm: #e8c97a;
    --danger: #e07070;
    --nav-h: 56px;
}

html, body, .body-style {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.body-style {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* ---- AMBIENT ---- */
.ambient {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 800px 500px at 10% 0%, rgba(74,158,255,.07) 0%, transparent 65%),
        radial-gradient(ellipse 600px 700px at 85% 15%, rgba(148,210,180,.05) 0%, transparent 60%),
        radial-gradient(ellipse 500px 600px at 50% 95%, rgba(232,201,122,.04) 0%, transparent 60%);
}
.grain {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==================================
   NAV — altura fija, no scrollea
   ================================== */
header {
    position: relative; z-index: 100;
    height: var(--nav-h);
    flex-shrink: 0;
    background: rgba(6,9,15,.92);
    backdrop-filter: blur(18px) saturate(1.3);
    border-bottom: 1px solid var(--border);
}
/* En tema claro el header debe ser claro para que el logo/links (var(--text)
   oscuro) se lean. */
.light-theme header { background: rgba(255,255,255,.82); }
.nav {
    max-width: 1160px; margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
    font-family: 'Fraunces', serif;
    font-size: 20px; font-weight: 300;
    color: var(--text); letter-spacing: -.2px;
    text-decoration: none;
    display: flex; align-items: center; gap: 10px;
}
.logo-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    flex-shrink: 0;
}
.nav-center { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 7px 14px; border-radius: 10px;
    color: var(--muted); font-size: 13px; font-weight: 500;
    text-decoration: none;
    transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-link.active { color: var(--accent); background: rgba(148,210,180,.06); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    border: 1px solid rgba(148,210,180,.25);
    background: rgba(148,210,180,.06);
    color: var(--accent); font-size: 11px; font-weight: 600;
    letter-spacing: .8px; text-transform: uppercase;
}
.nav-badge-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent); animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.btn-login {
    padding: 8px 18px; border-radius: 10px;
    border: 1px solid var(--border-hi);
    background: transparent; color: var(--accent);
    font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: all .2s;
}
.btn-login:hover { background: rgba(148,210,180,.08); }

/* ==================================
   FEED MAIN — flex:1, ocupa todo
   ================================== */
.feed-main {
    position: relative; z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Header y section tags ocultos en fullscreen */
.feed-header { display: none; }
.s-tag, .s-title, .s-sub { display: none; }

/* ==================================
   FEED CONTAINER
   ================================== */
.feed-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading */
.feed-loading {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--muted); font-size: 14px; gap: 16px;
}
.feed-spinner {
    width: 32px; height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.feed-empty {
    text-align: center; padding: 40px 20px;
    color: var(--muted); font-size: 15px;
}

/* ==================================
   FEED CARD — absolute, llena todo
   ================================== */
.feed-card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.feed-card video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: transparent;
}

/* Hitbox */
.feed-card .feed-hitbox {
    position: absolute; inset: 0;
    background: transparent; border: none;
    cursor: pointer; z-index: 2;
}

/* Play toggle */
.feed-card .feed-play-toggle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff; font-size: 22px;
    display: grid; place-items: center;
    cursor: pointer; z-index: 3;
    transition: opacity .2s, transform .2s;
}
.feed-card .feed-play-toggle.is-hidden {
    opacity: 0; pointer-events: none;
    transform: translate(-50%, -50%) scale(.8);
}

/* ==================================
   OVERLAYS (gradientes)
   ================================== */
.feed-overlay-top {
    position: absolute; top: 0; left: 0; right: 0; height: 80px;
    background: linear-gradient(to bottom, rgba(0,0,0,.3), transparent);
    z-index: 1; pointer-events: none;
    mix-blend-mode: multiply;
}
.feed-overlay-bottom {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 40px 16px 12px;
    background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 100%);
    /* z-index 3 > hitbox (2): el contenedor sigue siendo pointer-events:none,
       así que las zonas vacías dejan pasar el tap al hitbox (play/pause),
       pero los hijos interactivos (autor, botón seguir) capturan sus clicks. */
    z-index: 3; pointer-events: none;
}
.feed-overlay-bottom * { pointer-events: auto; }

/* Autor */
.feed-author {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px; cursor: pointer;
}
.feed-author-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.2);
    object-fit: cover;
}
.feed-author-info { flex: 1; min-width: 0; }
.feed-author-name {
    font-size: 14px; font-weight: 600; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.feed-author-handle {
    font-family: 'DM Mono', monospace;
    font-size: 11px; color: rgba(255,255,255,.5);
}

/* Botón seguir inline en la card */
.feed-follow-btn {
    background: var(--accent);
    color: #06111e;
    border: none;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
    flex-shrink: 0;
}
.feed-follow-btn:hover { transform: scale(1.04); }
.feed-follow-btn.is-following {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.15);
}


/* Descripción */
.feed-desc {
    font-size: 13px; color: rgba(255,255,255,.85);
    line-height: 1.5; margin-bottom: 8px;
    max-height: 40px; overflow: hidden;
    transition: max-height .3s;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.feed-desc.is-expanded { max-height: 600px; }
.feed-desc-toggle {
    font-size: 12px; color: var(--accent);
    background: none; border: none; cursor: pointer;
    margin-bottom: 8px; padding: 0;
}

/* Mini controles */
.feed-mini-controls {
    display: flex; align-items: center; gap: 8px;
}
.feed-mini-btn {
    background: rgba(0,0,0,.35); border: none;
    color: #fff; font-size: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; display: grid; place-items: center;
    backdrop-filter: blur(4px);
    transition: background .2s;
}
.feed-mini-btn:hover { background: rgba(0,0,0,.55); }
.feed-progress {
    flex: 1; height: 3px; background: rgba(255,255,255,.15);
    border-radius: 2px; cursor: pointer;
}
.feed-progress-bar {
    height: 100%; background: var(--accent);
    border-radius: 2px; width: 0%;
    transition: width .1s linear;
}
.feed-time {
    font-family: 'DM Mono', monospace;
    font-size: 11px; color: rgba(255,255,255,.5);
    min-width: 36px;
}

/* ==================================
   ACCIONES (derecha del video)
   ================================== */
.feed-actions {
    position: absolute;
    right: -64px;
    bottom: 90px;
    display: flex; flex-direction: column;
    align-items: center; gap: 18px;
    z-index: 4;
}
.feed-action-btn {
    display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    background: none; border: none;
    cursor: pointer; color: var(--text);
    transition: transform .15s;
}
.feed-action-btn:hover { transform: scale(1.08); }
.feed-action-btn:active { transform: scale(.94); }
.feed-action-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(11,18,32,.65);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    display: grid; place-items: center;
    font-size: 18px;
    transition: border-color .2s, background .2s;
    position: relative;
}
.feed-action-btn:hover .feed-action-icon {
    border-color: var(--border-hi);
    background: rgba(148,210,180,.06);
}
.feed-action-label {
    font-size: 11px; font-weight: 500;
    color: var(--muted);
}

/* Candado */
.feed-action-btn.is-locked .feed-action-icon {
    border-color: rgba(255,255,255,.04);
    opacity: .6;
}
.feed-action-btn.is-locked .feed-action-icon::after {
    content: '🔒';
    position: absolute;
    font-size: 9px;
    bottom: -2px; right: -2px;
}

/* ==================================
   NAV BOTONES (izquierda del video)
   ================================== */
.feed-nav {
    position: absolute;
    left: -64px;
    top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column;
    gap: 8px; z-index: 50;
}
.feed-nav-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(11,18,32,.65);
    backdrop-filter: blur(10px);
    color: var(--muted); font-size: 16px;
    cursor: pointer; display: grid; place-items: center;
    transition: all .2s;
}
.feed-nav-btn:hover {
    border-color: var(--border-hi);
    color: var(--accent);
    background: rgba(148,210,180,.06);
}
.feed-nav-btn--primary {
    border-color: var(--border-hi);
    color: var(--accent);
}

/* ==================================
   PERFIL HERO (compacto, overlay)
   ================================== */
.perfil-hero {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 10;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(6,9,15,.85) 0%, rgba(6,9,15,.5) 75%, transparent 100%);
    pointer-events: none;
}
.perfil-hero > * { pointer-events: auto; }
.perfil-hero[hidden] { display: none; }
.perfil-cover { display: none; }
.perfil-body {
    display: flex; gap: 14px; align-items: center;
    background: none; border: none; padding: 0;
}
.perfil-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(148,210,180,.25);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg2);
}
.perfil-meta { flex: 1; min-width: 0; padding: 0; }
.perfil-name {
    font-family: 'Fraunces', serif;
    font-size: 15px; font-weight: 400;
    color: #fff; margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.perfil-handle {
    font-family: 'DM Mono', monospace;
    font-size: 11px; color: rgba(255,255,255,.45);
    margin: 0;
}
.perfil-bio { display: none; }
.perfil-stats {
    display: flex; gap: 12px; margin: 3px 0 0;
}
.perfil-stat {
    display: flex; align-items: baseline; gap: 3px;
    font-size: 10px; color: rgba(255,255,255,.4);
}
.perfil-stat strong {
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75);
}
.btn-follow-cta {
    padding: 6px 14px; border-radius: 8px;
    border: 1px solid var(--border-hi);
    background: rgba(148,210,180,.08);
    color: var(--accent); font-size: 11px; font-weight: 600;
    cursor: pointer; transition: all .2s;
    flex-shrink: 0;
}
.btn-follow-cta:hover { background: rgba(148,210,180,.16); }

/* ==================================
   CTA MODAL
   ================================== */
.cta-modal {
    position: fixed; inset: 0;
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
}
.cta-modal[hidden] { display: none; }
.cta-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
}
.cta-dialog {
    position: relative;
    max-width: 400px; width: 90%;
    background: var(--card);
    border: 1px solid var(--border-hi);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    animation: ctaIn .3s ease;
}
@keyframes ctaIn { from { opacity: 0; transform: scale(.95) translateY(10px); } }
.cta-close {
    position: absolute; top: 12px; right: 12px;
    background: none; border: none;
    color: var(--muted); font-size: 18px;
    cursor: pointer; width: 32px; height: 32px;
    border-radius: 8px; transition: background .2s;
}
.cta-close:hover { background: rgba(255,255,255,.05); }
.cta-icon { font-size: 36px; margin-bottom: 12px; }
.cta-title {
    font-family: 'Fraunces', serif;
    font-size: 22px; font-weight: 300;
    color: var(--text); margin-bottom: 8px;
}
.cta-sub {
    font-size: 14px; color: var(--muted);
    line-height: 1.6; margin-bottom: 24px;
}
.cta-actions {
    display: flex; gap: 10px;
    justify-content: center; flex-wrap: wrap;
}
.btn-primary {
    padding: 12px 24px; border-radius: 12px;
    background: var(--accent); color: #06111e;
    font-weight: 700; font-size: 14px;
    border: none; cursor: pointer;
    box-shadow: 0 6px 28px rgba(148,210,180,.2);
    transition: all .25s; text-decoration: none;
    display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(148,210,180,.3); }
.btn-ghost {
    padding: 12px 24px; border-radius: 12px;
    border: 1px solid var(--border-hi); background: transparent;
    color: var(--text); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all .25s;
    text-decoration: none; display: inline-block;
}
.btn-ghost:hover { background: rgba(148,210,180,.05); border-color: rgba(148,210,180,.35); }
.cta-note { margin-top: 14px; font-size: 11px; color: var(--muted2); }

/* Footer oculto */
footer { display: none; }

/* ==================================
   RESPONSIVE
   ================================== */
@media (max-width: 600px) {
    .nav { padding: 0 16px; }
    .nav-center { display: none; }

    .feed-container { max-width: 100%; }

    /* Acciones dentro del video */
    .feed-actions { right: 8px; bottom: 100px; }

    /* Nav oculto (swipe) */
    .feed-nav { display: none; }

    /* Perfil compacto */
    .perfil-avatar { width: 36px; height: 36px; }
    .perfil-name { font-size: 13px; }
    .perfil-stats { gap: 8px; }
    .btn-follow-cta { padding: 5px 10px; font-size: 10px; }
}

@media (min-width: 601px) {
    .feed-container { max-width: 460px; }
    .feed-actions { right: -64px; }
    .feed-nav { left: -64px; }
}

@media (min-width: 900px) {
    .feed-actions { right: -72px; }
    .feed-nav { left: -72px; }
}

/* ==================================
   ANIMACIONES
   ================================== */
.feed-card.is-entering {
    animation: feedSlideIn .28s ease both;
}
@keyframes feedSlideIn {
    from { opacity: 0; transform: translateY(40px) scale(.98); }
    to { opacity: 1; transform: none; }
}
.feed-card.is-leaving {
    animation: feedSlideOut .2s ease both;
}
@keyframes feedSlideOut {
    to { opacity: 0; transform: translateY(-30px) scale(.98); }
}

/* ==================================
   PERFIL EXTENDIDO (modo handle=X)
   Cuando body.profile-view, el hero
   deja de ser overlay y se vuelve
   página de perfil completa.
   ================================== */
html.profile-view {
    height: auto;
    overflow: auto;
}
/* El scroller es <html>; body en visible para no duplicar la barra. */
body.profile-view, body.profile-view.body-style {
    height: auto;
    overflow: visible;
}
body.profile-view .feed-main { overflow: visible; }
/* En perfil el feed pierde el alto 100vh; le damos un alto real para que el
   video se vea al pulsar "Reproducir". */
body.profile-view .feed-container { height: calc(100dvh - var(--nav-h) - 24px); }
body.profile-view .perfil-hero {
    position: relative;
    background: none;
    padding: 0;
    pointer-events: auto;
    margin: 0 auto;
}
body.profile-view .perfil-cover {
    display: block;
    height: 180px;
    margin: 0 24px;
    border-radius: 14px;
    background-color: var(--bg2);
    background-image: linear-gradient(135deg, rgba(148,210,180,.18), rgba(74,158,255,.12));
    background-size: cover;
    background-position: center;
}
body.profile-view .perfil-body {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0 auto;
    padding: 0 0 16px;
}
/* El padding lateral de 24px va AQUÍ (no en perfil-body) para que el ancho de
   elemento de .perfil-meta sea exactamente igual al de #videos-grid (1160px). */
/* .perfil-meta no se estiraba (quedaba en ~637px centrada): forzamos ancho
   completo para que mida lo mismo que #videos-grid (1160px). */
body.profile-view .perfil-meta { width: 100%; padding: 0 24px; }
body.profile-view .perfil-avatar {
    width: 96px; height: 96px;
    margin-top: -48px;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--bg);
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
body.profile-view .perfil-name {
    font-size: 28px;
    margin-top: 14px;
    text-shadow: none;
    color: var(--text);
}
body.profile-view .perfil-handle { font-size: 13px; margin-top: 2px; color: var(--muted); }
body.profile-view .perfil-bio {
    display: block;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin: 14px 0 0;
    max-width: 580px;
}
body.profile-view .perfil-stats {
    margin: 18px 0;
    gap: 22px;
}
body.profile-view .perfil-stat {
    font-size: 12px;
    color: var(--muted);
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}
body.profile-view .perfil-stat strong {
    font-size: 18px;
    color: var(--text);
}

.perfil-detalles {
    margin: 8px 0 14px;
    display: flex; flex-direction: column; gap: 10px;
}
.perfil-chip-group {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.perfil-chip {
    background: rgba(148,210,180,.1);
    border: 1px solid rgba(148,210,180,.2);
    color: var(--accent);
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 500;
}
.perfil-info-row {
    display: flex; gap: 8px;
    font-size: 13px; color: var(--text);
}
.perfil-info-label {
    color: var(--muted); min-width: 80px;
}
.perfil-social {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 4px;
}
.perfil-social-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    transition: border-color .2s, background .2s;
}
.perfil-social-btn:hover {
    border-color: var(--border-hi);
    background: rgba(148,210,180,.08);
}

.perfil-tabs {
    display: flex; gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-top: 10px;
}
.perfil-tab {
    background: none; border: none;
    color: var(--muted);
    padding: 10px 16px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.perfil-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Grid de videos */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    margin: 0 auto;
    padding: 16px 24px 60px;
}
.videos-grid[hidden] { display: none !important; }
.videos-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
    font-size: 14px;
}
.videos-grid-item {
    position: relative;
    aspect-ratio: 9 / 16;
    background: var(--bg2);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    transition: transform .15s;
}
.videos-grid-item:hover { transform: scale(1.02); }
.videos-grid-item img,
.videos-grid-noimg {
    width: 100%; height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--card), var(--bg2));
    display: block;
}
.videos-grid-meta {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    color: #fff;
    padding: 8px;
    display: flex; gap: 10px;
    font-size: 12px;
    font-weight: 600;
}

.feed-container.feed-container--hidden { display: none; }

@media (max-width: 640px) {
    body.profile-view .perfil-avatar { width: 72px; height: 72px; margin-top: -36px; }
    body.profile-view .perfil-name { font-size: 22px; }
    .videos-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==================================
   PANEL DE COMENTARIOS (bottom sheet)
   ================================== */
.comments-panel {
    position: fixed; inset: 0;
    z-index: 100;
    pointer-events: none;
}
.comments-panel[hidden] { display: none !important; }
.comments-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: auto;
}
.comments-panel.is-open .comments-overlay { opacity: 1; }
.comments-dialog {
    position: absolute;
    left: 50%; bottom: 0;
    transform: translate(-50%, 100%);
    width: min(560px, 100vw);
    max-height: 80vh;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    display: flex; flex-direction: column;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    pointer-events: auto;
}
.comments-panel.is-open .comments-dialog {
    transform: translate(-50%, 0);
}
.comments-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.comments-title {
    font-family: 'Fraunces', serif;
    font-size: 18px; font-weight: 400;
    margin: 0;
}
.comments-close {
    background: none; border: none;
    color: var(--muted);
    font-size: 18px; cursor: pointer;
    padding: 4px 8px; border-radius: 6px;
}
.comments-close:hover { color: var(--text); background: rgba(255,255,255,.05); }
.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px;
    min-height: 200px;
}
.comments-loading, .comments-empty {
    color: var(--muted);
    text-align: center;
    padding: 30px 0;
    font-size: 14px;
}
.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg2);
}
.comment-content { flex: 1; min-width: 0; }
.comment-head {
    display: flex; align-items: baseline; gap: 8px;
    margin-bottom: 4px;
}
.comment-author {
    font-size: 13px; font-weight: 600;
    color: var(--text);
}
.comment-date {
    font-size: 11px; color: var(--muted);
}
.comment-body {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.comments-form {
    display: flex; gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    align-items: flex-end;
}
.comments-form textarea {
    flex: 1;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
}
.comments-form textarea:focus { border-color: var(--accent); }
.comments-send {
    background: var(--accent);
    color: #06111e;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px; font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.comments-send:disabled { opacity: .5; cursor: not-allowed; }
.comments-send:hover:not(:disabled) { background: #a7dec3; }
.comments-cta {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.comments-cta a { color: var(--accent); text-decoration: none; font-weight: 600; }