* { box-sizing: border-box; }

:root {
  --text: #171717;
  --muted: #999;
  --line: #bdbdbd;
  --background: #fff;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font-family: "Inter", Arial, sans-serif; }
button, input { font: inherit; }

.topbar {
  height: 86px; border: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
}
.brand { font-family: "Cormorant Garamond", Georgia, serif; font-size: 54px; font-style: italic; line-height: 1; font-weight: 500; display: inline-flex; align-items: center; }
.brand-logo { display: block; width: 132px; height: 70px; object-fit: contain; object-position: left center; }
.brand-btn { border: 0; padding: 0; background: transparent; cursor: pointer; }
.brand.big { font-size: 76px; }
.menu-btn { width: 42px; height: 42px; border: 0; background: transparent; display: grid; gap: 5px; align-content: center; cursor: pointer; }
.menu-btn span { display: block; width: 31px; height: 6px; border-radius: 8px; background: #aaa; }

.home-view { min-height: calc(100vh - 86px); }
.home-empty { padding: 28px 24px 60px; text-align: center; }
.home-empty h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(34px, 8vw, 58px); font-weight: 500; line-height: 1.05; margin: 0 0 28px; }
.upload-card {
  width: min(100%, 310px); min-height: 365px; border: 1.5px solid #777; border-radius: 27px;
  background: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 28px; cursor: pointer; margin: 0 auto; font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 31px; line-height: 1.05; transition: transform .2s, background .2s;
}
.upload-card:hover { transform: translateY(-2px); background: #fafafa; }
.upload-card:active { transform: translateY(0); }
.plus { width: 62px; height: 62px; border-radius: 50%; background: #bdbdbd; color: #777; font-family: Arial, sans-serif; font-size: 55px; font-weight: 300; line-height: 58px; }
.small-note { color: #777; font-size: 13px; line-height: 1.5; }
.home-empty .small-note { margin-top: 22px; }

.home-gallery-state { position: relative; padding: 25px 22px 90px; max-width: 1100px; margin: auto; }
.home-gallery-title { margin-bottom: 18px; }
.home-gallery-title h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 39px; font-weight: 500; margin: 0; }

.floating-upload {
  position: fixed; right: 18px; bottom: 22px; z-index: 25; border: 1px solid #999; background: #fff;
  border-radius: 18px; min-width: 74px; min-height: 74px; padding: 9px 12px 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.13); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; cursor: pointer; color: #222; font-size: 9px; letter-spacing: .08em; font-weight: 600;
}
.floating-plus { font-size: 31px; line-height: 28px; font-weight: 300; }
.floating-upload:hover { transform: translateY(-2px); }

.gallery-view, .profile-view, .more-view, .iconicas-view { padding: 25px 22px 60px; max-width: 1100px; margin: auto; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-bottom: 18px; }
.section-title h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 39px; font-weight: 500; margin: 0; }
#photoCount, #galleryPhotoCount { color: #888; font-size: 13px; }
.masonry { columns: 2 170px; column-gap: 12px; }
.photo-card { break-inside: avoid; margin-bottom: 12px; position: relative; border-radius: 18px; overflow: hidden; background: #eee; }
.photo-card img { display: block; width: 100%; height: auto; }
.photo-info { position: absolute; inset: auto 0 0 0; padding: 34px 12px 10px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.62)); display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.photo-name { font-size: 12px; text-shadow: 0 1px 3px #000; }
.photo-actions { display: flex; align-items: center; gap: 5px; }
.star-btn, .delete-btn { border: 0; background: transparent; color: #fff; line-height: 1; cursor: pointer; text-shadow: 0 1px 3px #000; }
.star-btn { font-size: 25px; padding: 2px; }
.star-btn.voted { color: #fff; }
.star-count { font-size: 11px; margin-left: 2px; vertical-align: middle; }
.delete-btn { font-size: 18px; padding: 5px; }
.delete-btn:hover, .star-btn:hover { opacity: .78; }

.more-card { border: 1px solid var(--line); border-radius: 24px; padding: 35px 28px; min-height: 300px; }
.profile-greeting { color: #555; margin-bottom: 20px; }
.empty-state { column-span: all; text-align: center; padding: 50px 20px; color: #777; }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.42); display: flex; justify-content: center; align-items: center; padding: 20px; }
.modal-box { width: min(100%, 430px); background: #fff; border-radius: 25px; padding: 32px 25px 26px; position: relative; box-shadow: 0 15px 50px rgba(0,0,0,.18); }
.modal-box h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 34px; font-weight: 500; margin: 0 0 10px; }
.modal-box p { color: #555; line-height: 1.45; }
.modal-box input { width: 100%; border: 1px solid #aaa; border-radius: 13px; padding: 14px; font-size: 16px; margin: 12px 0; outline: none; }
.modal-box input:focus { border-color: #555; }
.primary-btn { width: 100%; border: 0; border-radius: 13px; padding: 15px; background: #222; color: #fff; font-weight: 600; cursor: pointer; }
.primary-btn:disabled { opacity: .55; cursor: wait; }
.close { position: absolute; top: 10px; right: 16px; border: 0; background: transparent; font-size: 30px; cursor: pointer; }

.menu-panel { position: fixed; top: 86px; right: 0; z-index: 40; width: min(82vw, 350px); padding: 20px 25px 30px; background: #fff; border: 1px solid var(--line); border-top: 0; transform: translateX(105%); transition: transform .25s ease; box-shadow: 0 15px 35px rgba(0,0,0,.08); }
.menu-panel.open { transform: translateX(0); }
.menu-panel button { display: block; width: 100%; text-align: left; padding: 17px 0; background: transparent; border: 0; border-bottom: 1px solid #ddd; font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 20px); background: #222; color: #fff; padding: 13px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; font-size: 13px; max-width: min(90vw, 500px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }

@media (min-width: 700px) {
  .masonry { columns: 3 210px; }
  .home-empty { padding-top: 42px; }
  .floating-upload { right: 28px; bottom: 28px; }
}


/* Entrada suave de las fotos al hacer scroll */
.photo-reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity .7s ease var(--reveal-delay, 0ms), transform .7s cubic-bezier(.22, .61, .36, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.photo-reveal.photo-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .photo-reveal, .photo-reveal.photo-reveal-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.photo-card-clickable { cursor: zoom-in; }
.photo-card-clickable:focus-visible { outline: 2px solid #555; outline-offset: 3px; }
.photo-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox-content { max-width: 94vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-content img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.lightbox-caption { color: #fff; font-size: 13px; text-align: center; }
.lightbox-close { position: absolute; top: 16px; right: 18px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 16px; background: rgba(255,255,255,.14); color: #fff; font-size: 46px; line-height: 1; cursor: pointer; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.24); }
.lightbox-open { overflow: hidden; }
@media (max-width: 600px) { .photo-lightbox { padding: 12px; } .lightbox-content img { max-width: 96vw; max-height: 82vh; border-radius: 7px; } .lightbox-nav { width: 42px; height: 54px; font-size: 38px; } .lightbox-prev { left: 7px; } .lightbox-next { right: 7px; } }

.confirm-photo-box { max-width: 440px; }
.confirm-photo-preview-wrap { width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #f2f2f2; margin-bottom: 18px; }
.confirm-photo-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.confirm-photo-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 16px; }
.secondary-btn { width: 100%; border: 1px solid #bbb; border-radius: 13px; padding: 15px; background: #fff; color: #222; font-weight: 600; cursor: pointer; }
.secondary-btn:hover { background: #f6f6f6; }
@media (max-width: 480px) { .confirm-photo-actions { grid-template-columns: 1fr; } }


/* =========================
   ESTÉTICA MORENA / DISCO
   ========================= */
:root {
  --text: #f4f6f5;
  --muted: rgba(226, 235, 233, .62);
  --line: rgba(197, 224, 221, .30);
  --background: #06100f;
  --panel: rgba(7, 19, 18, .72);
  --teal: #9de7df;
}

html, body { background: var(--background); }
body {
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(93, 180, 171, .12), transparent 34%),
    radial-gradient(circle at 0% 55%, rgba(70, 151, 144, .07), transparent 27%),
    linear-gradient(180deg, #071211 0%, #030908 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  background-image: radial-gradient(rgba(255,255,255,.11) .7px, transparent .7px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

main, .topbar, .menu-panel, .modal, .toast, .photo-lightbox { position: relative; z-index: 1; }

.topbar {
  height: 82px;
  border: 0;
  border-bottom: 1px solid rgba(201, 226, 223, .18);
  padding: 0 22px;
  background: rgba(3, 10, 9, .68);
  backdrop-filter: blur(14px);
}
.brand-logo { width: 142px; height: 68px; }
.menu-btn span { background: rgba(232, 239, 238, .72); height: 4px; width: 30px; }

.party-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.disco-ball {
  position: absolute;
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .18;
  filter: blur(.15px);
  background:
    radial-gradient(circle at 32% 25%, rgba(255,255,255,.95) 0 2%, transparent 7%),
    radial-gradient(circle at 62% 18%, rgba(214,255,250,.85) 0 2%, transparent 7%),
    radial-gradient(circle at 74% 43%, rgba(255,255,255,.75) 0 2%, transparent 7%),
    radial-gradient(circle at 28% 63%, rgba(196,239,235,.72) 0 2%, transparent 7%),
    radial-gradient(circle at 58% 72%, rgba(255,255,255,.72) 0 2%, transparent 7%),
    radial-gradient(circle at 48% 48%, rgba(235,250,248,.42), rgba(44,90,86,.18) 46%, rgba(0,0,0,.5) 72%),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(226,255,251,.22) 14px 15px, transparent 16px 28px),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(226,255,251,.20) 14px 15px, transparent 16px 28px);
  box-shadow: inset -22px -26px 38px rgba(0,0,0,.48), inset 12px 8px 22px rgba(255,255,255,.18), 0 0 48px rgba(118,224,215,.08);
}
.disco-ball::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 70px;
  left: 50%;
  bottom: 98%;
  background: linear-gradient(rgba(215,238,235,.35), transparent);
  opacity: .45;
}
.disco-ball-a { width: 170px; left: -78px; top: 130px; }
.disco-ball-b { width: 210px; right: -112px; top: 245px; }
.disco-ball-c { width: 145px; left: -72px; bottom: 145px; }
.disco-ball-d { width: 175px; right: -82px; bottom: 40px; }

.light-streak {
  position: absolute;
  width: 420px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(160,239,232,.30), transparent);
  filter: blur(.4px);
  opacity: .28;
}
.streak-a { top: 34%; left: -100px; transform: rotate(62deg); }
.streak-b { right: -110px; top: 66%; transform: rotate(-55deg); }

.home-empty {
  padding: 28px 20px 52px;
  min-height: calc(100vh - 82px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.home-empty h1 {
  max-width: 620px;
  margin: 18px 0 22px;
  font-size: clamp(32px, 7vw, 48px);
  color: #f4f6f5;
  text-shadow: 0 2px 18px rgba(100,220,211,.10);
}
.home-empty h1 br { display: none; }

.upload-card {
  width: min(100%, 275px);
  min-height: 285px;
  border: 1px solid rgba(193, 235, 230, .38);
  border-radius: 24px;
  background: rgba(7, 22, 20, .72);
  color: #f4f7f6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 55px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
  gap: 18px;
  font-size: 29px;
}
.upload-card:hover { background: rgba(12, 34, 31, .82); border-color: rgba(166, 239, 231, .55); }
.upload-card .plus {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: transparent;
  border: 1px dashed rgba(168, 233, 226, .55);
  color: #fff;
  font-size: 60px;
  line-height: 70px;
}
.small-note { color: var(--muted); }

.home-gallery-state, .gallery-view, .profile-view, .iconicas-view { max-width: 1120px; }
.home-gallery-state { padding-top: 26px; }
.home-gallery-title h1, .section-title h2 { color: #f3f6f5; }
.section-title h2 { font-size: 36px; }

.home-upload-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(190, 235, 231, .45);
  background: rgba(6, 20, 18, .82); color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.22), inset 0 0 16px rgba(110,220,210,.05);
  backdrop-filter: blur(12px); cursor: pointer;
  font-size: 10px; letter-spacing: .09em; font-weight: 600;
}
.home-upload-btn span { font-size: 25px; line-height: 18px; font-weight: 300; }
.home-upload-btn:hover { transform: translateY(-1px); border-color: rgba(166, 239, 231, .65); }

.masonry { column-gap: 14px; }
.photo-card {
  border: 1px solid rgba(201, 231, 228, .18);
  border-radius: 18px;
  background: #0a1716;
  box-shadow: 0 10px 30px rgba(0,0,0,.20);
}
.photo-card img { filter: saturate(.94) contrast(1.03); }
.photo-info { background: linear-gradient(transparent, rgba(0,0,0,.76)); }

.floating-upload {
  width: 78px;
  height: 78px;
  min-width: 78px;
  min-height: 78px;
  padding: 8px;
  border-radius: 50%;
  border: 1px solid rgba(190, 235, 231, .45);
  background: rgba(6, 20, 18, .82);
  color: #fff;
  box-shadow: 0 10px 34px rgba(0,0,0,.34), inset 0 0 20px rgba(110,220,210,.05);
  backdrop-filter: blur(12px);
}
.floating-plus { font-size: 34px; }

.menu-panel {
  top: 82px;
  color: #f4f6f5;
  background: rgba(5, 16, 15, .94);
  border: 1px solid rgba(198, 229, 226, .20);
  border-top: 0;
  backdrop-filter: blur(18px);
}
.menu-panel button { color: #f4f6f5; border-bottom-color: rgba(206,231,228,.15); }

.modal { background: rgba(0, 0, 0, .66); backdrop-filter: blur(5px); }
.modal-box {
  background: rgba(7, 20, 19, .96);
  border: 1px solid rgba(195, 230, 226, .24);
  color: #f4f6f5;
}
.modal-box p { color: rgba(232, 239, 237, .68); }
.modal-box input { background: rgba(255,255,255,.05); color: #fff; border-color: rgba(205,231,228,.26); }
.modal-box input::placeholder { color: rgba(230,240,238,.42); }
.primary-btn { background: #e9f2f0; color: #07100f; }
.secondary-btn { background: transparent; color: #f4f6f5; border-color: rgba(205,231,228,.28); }
.close { color: #fff; }

.photo-lightbox { background: rgba(0, 5, 5, .92); }

@media (max-width: 600px) {
  .topbar { height: 76px; }
  .home-gallery-title { align-items: center; }
  .home-gallery-title h1 { font-size: 31px; }
  .home-upload-btn { padding: 7px 11px; font-size: 9px; }
  .home-upload-btn span { font-size: 22px; }
  .menu-panel { top: 76px; }
  .brand-logo { width: 128px; height: 62px; }
  .home-empty { padding-top: 20px; }
  .home-empty h1 { margin-top: 10px; margin-bottom: 18px; font-size: 34px; }
  .upload-card { min-height: 255px; width: min(88vw, 270px); }
  .disco-ball-a { width: 130px; left: -65px; top: 105px; }
  .disco-ball-b { width: 150px; right: -82px; top: 260px; }
  .disco-ball-c { width: 120px; left: -68px; bottom: 180px; }
  .disco-ball-d { width: 135px; right: -72px; bottom: 55px; }
}


/* FIXES: keep the hamburger drawer fixed above the page */
.menu-panel { position: fixed !important; z-index: 60 !important; }
.topbar { z-index: 55 !important; }


/* LIGHTBOX DEFINITIVO: la foto ampliada queda centrada en la ventana */
.photo-lightbox {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  z-index: 9999 !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
}
.photo-lightbox.hidden { display: none !important; }
.lightbox-content {
  position: relative;
  width: min(94vw, 1000px);
  max-width: 94vw;
  max-height: 90vh;
  margin: auto;
  align-items: center;
  justify-content: center;
}
.lightbox-content img {
  display: block;
  max-width: 94vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
}

/* FIX DEFINITIVO: los modales deben cubrir toda la pantalla y quedar centrados */
.modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  z-index: 9998 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.modal.hidden { display: none !important; }


/* NAV INFERIOR — versión estable para Hostinger */
.topbar {
  justify-content: center !important;
  padding: 0 !important;
}
.brand-btn {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.brand-logo {
  width: 168px !important;
  height: 78px !important;
  object-fit: contain !important;
  object-position: center !important;
}
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 10px 7px;
  border: 1px solid rgba(190, 235, 231, .28);
  border-radius: 22px;
  background: rgba(5, 16, 15, .88);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
}
.bottom-nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(235,242,240,.72);
  min-height: 58px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: .08em;
  font-weight: 600;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.bottom-nav-item.active {
  color: var(--teal);
  background: rgba(157, 231, 223, .07);
}
.bottom-nav-item:active { transform: scale(.97); }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; }
.nav-icon svg { width: 24px; height: 24px; }
.home-empty, .home-gallery-state, .gallery-view, .profile-view, .iconicas-view {
  padding-bottom: 120px !important;
}
@media (max-width: 600px) {
  .brand-logo { width: 158px !important; height: 74px !important; }
  .bottom-nav { bottom: 10px; width: calc(100vw - 24px); }
  .bottom-nav-item { min-height: 56px; font-size: 8px; }
}

/* POSICIÓN FINAL DEL BOTÓN SUBIR: flotando justo por encima del nav inferior */
.floating-upload {
  position: fixed !important;
  right: 18px !important;
  bottom: 108px !important;
  z-index: 120 !important;
  width: 68px !important;
  height: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
  padding: 6px !important;
}

@media (max-width: 600px) {
  .floating-upload {
    right: 16px !important;
    bottom: 98px !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
  }
}


/* =========================
   CAMBIAR NOMBRE
   ========================= */
.profile-title-row {
  align-items: center;
}
.profile-name-btn {
  border: 1px solid rgba(190,235,231,.35);
  background: rgba(6,20,18,.72);
  color: #f4f6f5;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: .06em;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.profile-name-btn:hover {
  border-color: rgba(166,239,231,.6);
  transform: translateY(-1px);
}

/* =========================
   COMENTARIOS
   ========================= */
.comments-panel {
  width: min(92vw, 560px);
  max-height: min(42vh, 380px);
  overflow: hidden;
  border: 1px solid rgba(195,230,226,.18);
  border-radius: 18px;
  background: rgba(4,14,13,.82);
  backdrop-filter: blur(12px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comments-header h3 {
  margin: 0;
  color: #f4f6f5;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
}
#commentCount {
  color: rgba(232,239,237,.55);
  font-size: 11px;
}
.comments-list {
  min-height: 48px;
  max-height: 170px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.comment-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.comment-main {
  min-width: 0;
}
.comment-author {
  display: block;
  color: #f4f6f5;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 3px;
}
.comment-text {
  color: rgba(235,242,240,.82);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.comment-delete {
  border: 0;
  background: transparent;
  color: rgba(235,242,240,.55);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 0;
}
.comment-delete:hover { color: #fff; }
.comments-empty {
  margin: 0;
  color: rgba(232,239,237,.5);
  font-size: 12px;
  text-align: center;
  padding: 8px 4px;
}
.comment-form {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}
.comment-form input {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(205,231,228,.22);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 11px 12px;
  outline: none;
  font-size: 13px;
}
.comment-form input::placeholder { color: rgba(230,240,238,.42); }
.comment-form input:focus { border-color: rgba(157,231,223,.55); }
.comment-form button {
  border: 0;
  border-radius: 12px;
  background: #e9f2f0;
  color: #07100f;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 600px) {
  .profile-title-row { align-items: flex-start; }
  .profile-name-btn { padding: 8px 11px; }
  .comments-panel {
    width: min(94vw, 560px);
    max-height: 38vh;
    border-radius: 16px;
  }
}

/* Comentarios accesibles directamente desde cada foto */
.photo-actions { position: relative; z-index: 3; }
.comment-btn { border: 0; background: transparent; color: #fff; display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; cursor: pointer; text-shadow: 0 1px 3px #000; }
.comment-icon { width: 22px; height: 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.comment-icon svg { width: 22px; height: 22px; display: block; }
.comment-count { font-size: 11px; }
.inline-comments {
  position: relative;
  z-index: 20;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px 12px;
  background: rgba(4, 15, 14, .98);
  border-top: 1px solid rgba(190,235,231,.16);
  box-shadow: 0 -8px 18px rgba(0,0,0,.12);
  pointer-events: auto;
}
.inline-comments.hidden { display: none !important; }
.inline-comments-header { display: flex; justify-content: space-between; align-items: center; color: #f4f6f5; font-size: 12px; margin-bottom: 7px; letter-spacing: .02em; }
.inline-comment-summary { color: rgba(232,239,237,.62); }
.inline-comments-preview { color: rgba(232,239,237,.80); font-size: 12px; line-height: 1.35; min-height: 18px; margin-bottom: 8px; }
.inline-comments-preview strong { margin-right: 5px; color: #f4f6f5; }
.inline-comment-form { display: grid; grid-template-columns: 1fr 38px; gap: 7px; }
.inline-comment-form input { min-width: 0; width: 100%; border: 1px solid rgba(205,231,228,.25); border-radius: 999px; padding: 9px 12px; background: rgba(255,255,255,.05); color: #fff; outline: none; }
.inline-comment-form input::placeholder { color: rgba(230,240,238,.4); }
.inline-comment-form button { border: 1px solid rgba(190,235,231,.35); border-radius: 50%; background: rgba(233,242,240,.92); color: #07100f; cursor: pointer; font-weight: 700; }
@media (max-width: 600px) {
  .comment-icon { width: 20px; height: 20px; }
  .comment-icon svg { width: 20px; height: 20px; }
  .inline-comments { padding: 9px 10px 11px; }
}


/* =========================
   LIGHTBOX + MIS COMENTARIOS — FIX
   ========================= */
.photo-lightbox {
  align-items: flex-start !important;
  padding: max(18px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
}
.lightbox-content {
  width: min(94vw, 620px) !important;
  max-width: 620px !important;
  max-height: calc(100vh - 36px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding-bottom: 12px;
}
.lightbox-content img {
  max-width: 100% !important;
  max-height: 58vh !important;
  width: auto !important;
  height: auto !important;
  flex: 0 0 auto;
}
.comments-panel {
  flex: 0 0 auto;
  width: 100% !important;
  max-height: none !important;
  min-height: 120px;
}
.comments-list {
  max-height: 190px !important;
}
.my-comments-section {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid rgba(195,230,226,.16);
  border-radius: 18px;
  background: rgba(5,17,16,.55);
}
.my-comments-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.my-comments-title-row h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
}
#myCommentsCount { color: rgba(232,239,237,.55); font-size: 11px; }
.my-comments-list { display: flex; flex-direction: column; gap: 8px; }
.my-comment-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(255,255,255,.045);
}
.my-comment-copy { min-width: 0; }
.my-comment-text { color: rgba(235,242,240,.9); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.my-comment-date { display: block; margin-top: 4px; color: rgba(232,239,237,.42); font-size: 10px; }
.my-comment-delete {
  border: 1px solid rgba(205,231,228,.22);
  border-radius: 999px;
  padding: 7px 10px;
  background: transparent;
  color: rgba(235,242,240,.75);
  cursor: pointer;
  white-space: nowrap;
  font-size: 11px;
}
.my-comment-delete:hover { border-color: rgba(255,255,255,.42); color: #fff; }
@media (max-width: 600px) {
  .photo-lightbox { padding-left: 10px !important; padding-right: 10px !important; }
  .lightbox-content { width: 96vw !important; max-height: calc(100vh - 28px) !important; }
  .lightbox-content img { max-height: 52vh !important; }
  .comments-list { max-height: 160px !important; }
  .my-comment-item { grid-template-columns: 1fr; }
  .my-comment-delete { justify-self: end; }
}

/* Ajuste tipográfico: separa claramente la segunda línea del encabezado. */
.headline-space { display: inline-block; padding-left: .12em; }
