@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&family=Fira+Mono:wght@400;500&display=swap');

:root {
  --bg: #0e0c0a;
  --surface: #161412;
  --surface2: #1e1b18;
  --surface3: #2a2520;
  --ink: #e8e0d4;
  --ink2: #a89e91;
  --ink3: #8a7f72;
  --gold: #c9a84c;
  --gold2: #e8c97a;
  --rose: #c4617a;
  --teal: #4a9b8e;
  --border: rgba(200,168,76,0.15);
  --border2: rgba(255,255,255,0.06);
  --glow: rgba(201,168,76,0.08);
}

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline-offset: 0;
}
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 60px 24px;
}
.hero-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 90%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 70% 40%, rgba(201,168,76,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 30% 75%, rgba(201,168,76,0.4) 0%, transparent 100%);
  pointer-events: none;
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}
.hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-moon {
  font-size: 52px;
  margin-bottom: 20px;
  display: block;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 8vw, 90px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 8px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  display: block;
}
.hero-sub {
  font-family: 'Fira Mono', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 48px;
}
.hero-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-btn {
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.hero-btn.primary {
  background: var(--gold);
  color: #0e0c0a;
}
.hero-btn.primary:hover { background: var(--gold2); }
.hero-btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink2);
}
.hero-btn.secondary:hover { border-color: var(--gold); color: var(--gold); }

/* ── NAV STICKY ── */
.top-nav {
  background: rgba(14,12,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  padding: 14px 20px 14px 0;
  margin-right: 16px;
  border-right: 1px solid var(--border2);
  text-decoration: none;
}
.nav-links { display: flex; overflow-x: auto; scrollbar-width: none; gap: 0; flex: 1; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink3);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── SESIÓN EN NAV ── */
.session-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  flex-shrink: 0;
}
.session-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--border2);
  border-radius: 20px;
  font-size: 12px;
  color: var(--ink2);
}
.session-chip .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}
.session-chip .dot.admin { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.session-chip .logout {
  cursor: pointer;
  color: var(--ink3);
  border: none;
  background: none;
  font-size: 14px;
  padding: 0 2px;
}
.session-chip .logout:hover { color: var(--rose); }
.nav-login-btn {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.nav-login-btn:hover { background: var(--gold); color: var(--bg); }

/* ── SECTIONS ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-eyebrow {
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}
.section-title em { font-style: italic; color: var(--gold); }
.section-desc { color: var(--ink2); font-size: 14px; max-width: 500px; margin: 0 auto; }

hr.divider {
  border: none;
  border-top: 1px solid var(--border2);
  margin: 0;
}

/* ── BOOKSHELF ── */
.shelf-container {
  position: relative;
  margin-bottom: 32px;
}
.shelf {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 24px 16px 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px 12px 0 0;
  overflow-x: auto;
  min-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--surface2);
}
.shelf-plank {
  height: 20px;
  background: linear-gradient(180deg, #4a3520 0%, #3a2810 60%, #2a1e0c 100%);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}
.shelf-label {
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 32px 0 12px;
}
.shelf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 200px;
  color: var(--ink3);
  font-size: 13px;
  text-align: center;
  width: 100%;
}
.shelf-empty .big { font-size: 34px; opacity: 0.4; }

/* ── LIBRARY TOOLS: lectura del mes + toggle de vista ── */
.library-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.view-toggle {
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--ink2);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.view-toggle:hover { border-color: var(--gold); color: var(--gold); }

.month-reading {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(90deg, rgba(201,168,76,0.10), rgba(201,168,76,0.02));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
.month-reading-cover {
  width: 46px; height: 60px;
  border-radius: 3px 5px 5px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.month-reading-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.month-reading-eyebrow {
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}
.month-reading-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.month-reading-meta { font-size: 12px; color: var(--ink2); }

/* ── BOOK CARD (vista grilla) ── */
.shelf.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  overflow: visible;
}
.book-card {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.book-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.book-card-cover {
  position: relative;
  height: 150px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 8px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.45);
}
.book-card-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.book-card-author { font-size: 11px; color: var(--gold); font-family: 'Fira Mono', monospace; letter-spacing: 1px; margin-top: 2px; }
.book-card-stars { font-size: 12px; color: var(--gold); margin-top: 6px; }
.book-card-score { font-size: 10px; color: var(--ink3); margin-left: 4px; }
.book-card .book-admin-btns { display: flex; }

/* ── NAV countdown global ── */
.meeting-countdown {
  font-family: 'Fira Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--gold2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  white-space: nowrap;
}

/* ── READING WIDGET ── */
.reading-widget {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 16px;
  margin-top: 20px;
}
.read-status-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.read-chip {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--ink2);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.read-chip:hover { border-color: var(--gold); color: var(--gold); }
.read-chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.read-clear {
  background: none;
  border: none;
  color: var(--ink3);
  cursor: pointer;
  font-size: 13px;
  margin-left: 4px;
}
.read-clear:hover { color: var(--rose); }
.read-progress {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.read-progress select,
.read-progress input {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
}
.read-progress input { width: 90px; }
.read-login { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.read-group { margin-top: 16px; }
.read-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface3);
}
.read-bar-fill.finished { background: #4caf72; }
.read-bar-fill.reading { background: var(--gold); }
.read-group-meta { font-size: 11px; color: var(--ink3); margin-top: 6px; }
.read-readers {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.read-reader {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.read-reader-icon { font-size: 13px; }
.read-reader-name { color: var(--ink); }
.read-reader-progress { color: var(--ink3); margin-left: auto; font-family: 'Fira Mono', monospace; font-size: 11px; }

/* ── SKELETON ── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  border-radius: 8px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-shelf { height: 220px; }
.skeleton-grid { height: 260px; }

/* ── TIMELINE "Nuestro año" ── */
.timeline {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.timeline-item {
  position: relative;
  padding-left: 56px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: -28px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--border2));
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline-card {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 18px 20px;
}
.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.timeline-date {
  font-family: 'Fira Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}
.timeline-place { font-size: 12px; color: var(--ink2); }
.timeline-winner {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.timeline-winner-cover {
  width: 42px; height: 56px;
  border-radius: 3px 5px 5px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}
.timeline-winner-eyebrow {
  font-family: 'Fira Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}
.timeline-winner-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.timeline-winner-author { font-size: 12px; color: var(--gold); font-family: 'Fira Mono', monospace; letter-spacing: 1px; }
.timeline-attendees { font-size: 12px; color: var(--ink2); margin-top: 12px; }
.timeline-photos {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.timeline-photos img {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border2);
}
.timeline-empty {
  text-align: center;
  color: var(--ink3);
  font-size: 13px;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}
.timeline-empty .big { font-size: 34px; opacity: 0.4; display: block; margin-bottom: 10px; }

/* ── STATS ── */
.timeline-stats {
  max-width: 720px;
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat-card.wide { grid-column: 1 / -1; }
.stat-card .n {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}
.stat-card .l { display: block; font-size: 11px; color: var(--ink3); margin-top: 6px; }
.stat-card .tags { display: block; font-size: 12px; color: var(--ink2); margin-top: 6px; }

/* ── LIBRARY FILTER ── */
.library-filter {
  max-width: 640px;
  margin: 16px auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#book-search {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
#book-search:focus { border-color: var(--gold); }
#book-search::placeholder { color: var(--ink3); }
.genre-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-chip {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  color: var(--ink2);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.genre-chip:hover { border-color: var(--gold); color: var(--gold); }
.genre-chip.active { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 600; }

/* ── PROFILE ── */
.user-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.user-link:hover { color: var(--gold2); text-decoration-color: var(--gold); }
.profile-modal { text-align: left; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #8a6f2f);
  color: var(--bg);
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-name { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.profile-admin { font-family: 'Fira Mono', monospace; font-size: 11px; color: var(--gold); }
.profile-meta { font-size: 12px; color: var(--ink3); }
.profile-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.profile-stat {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.profile-stat .n { display: block; font-size: 20px; font-weight: 600; color: var(--gold); font-family: 'Cormorant Garamond', serif; }
.profile-stat .l { font-size: 10px; color: var(--ink3); }
.profile-reading { font-size: 13px; color: var(--ink2); margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.profile-reading-progress { color: var(--gold); font-family: 'Fira Mono', monospace; font-size: 11px; }
.profile-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.profile-book { cursor: pointer; text-align: center; }
.profile-book-cover {
  height: 96px;
  border-radius: 4px 6px 6px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}
.profile-book-title { font-size: 11px; color: var(--ink); margin-top: 6px; line-height: 1.3; }
.profile-book-stars { font-size: 11px; color: var(--gold); }
.profile-comments { display: flex; flex-direction: column; gap: 10px; }
.profile-comment { background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 10px 12px; }
.profile-comment-text { font-size: 12px; color: var(--ink2); font-style: italic; line-height: 1.5; }
.profile-comment-book { font-size: 10px; color: var(--ink3); margin-top: 4px; }
.profile-proposals { font-size: 12px; color: var(--ink2); display: flex; flex-direction: column; gap: 4px; }
.profile-proposals .prop-status { font-family: 'Fira Mono', monospace; font-size: 10px; color: var(--gold); }
.profile-proposals-note { font-size: 11px; color: var(--ink3); margin-top: 6px; }
.profile-empty { font-size: 12px; color: var(--ink3); margin-top: 8px; }

/* ── BOOK ── */
.book {
  position: relative;
  height: 200px;
  min-width: 36px;
  border-radius: 3px 6px 6px 3px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  transform-origin: bottom center;
  flex-shrink: 0;
  box-shadow: 3px 3px 12px rgba(0,0,0,0.5), inset -2px 0 4px rgba(0,0,0,0.3);
}
.book:hover {
  transform: translateY(-20px) scale(1.05);
  box-shadow: 6px 8px 24px rgba(0,0,0,0.6), inset -2px 0 4px rgba(0,0,0,0.3);
  z-index: 5;
}
.book-spine {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  border-radius: 3px 6px 6px 3px;
  position: relative;
  overflow: hidden;
}
.book-spine::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 100%;
  background: rgba(0,0,0,0.25);
  border-radius: 3px 0 0 3px;
}
.book-spine::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 2px; height: 100%;
  background: rgba(255,255,255,0.08);
}
.book-title-spine {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  max-height: 140px;
  overflow: hidden;
  letter-spacing: 0.5px;
}
.book-stars-spine {
  font-size: 8px;
  color: rgba(255,220,100,0.9);
  margin-top: 6px;
  letter-spacing: -1px;
}
.book-badge {
  position: absolute;
  top: 6px;
  right: 4px;
  background: var(--gold);
  color: #0e0c0a;
  font-family: 'Fira Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 3px;
  writing-mode: horizontal-tb;
}
.book-emoji {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.book-admin-btns {
  position: absolute;
  top: 6px; left: 4px;
  display: none;
  gap: 4px;
  z-index: 6;
}
.book:hover .book-admin-btns { display: flex; }
.book-admin-btns button {
  border: none;
  border-radius: 3px;
  width: 22px; height: 22px;
  font-size: 11px;
  cursor: pointer;
  background: rgba(0,0,0,0.6);
  color: var(--ink);
}
.book-admin-btns button:hover { background: var(--gold); color: var(--bg); }
.book-admin-btns button.del:hover { background: var(--rose); color: white; }

/* ── BOOK MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-top {
  display: flex;
  gap: 24px;
  padding: 28px;
  border-bottom: 1px solid var(--border2);
  align-items: flex-start;
}
.modal-cover {
  width: 90px;
  height: 130px;
  border-radius: 4px 8px 8px 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.5);
  object-fit: cover;
}
.modal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px 8px 8px 4px;
}
.modal-info { flex: 1; }
.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 4px;
}
.modal-author {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 12px;
  font-family: 'Fira Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
}
.star-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.stars { font-size: 18px; letter-spacing: 2px; }
.star-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
}
.star-label { font-size: 11px; color: var(--ink3); }
.modal-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--ink3);
  margin-right: 4px;
  margin-bottom: 4px;
  font-family: 'Fira Mono', monospace;
  letter-spacing: 0.5px;
}
.modal-body { padding: 24px 28px; }
.modal-section-title {
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.modal-desc { font-size: 14px; color: var(--ink2); line-height: 1.7; margin-bottom: 24px; }
.comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.comment {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 14px 16px;
}
.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.comment-author { font-weight: 600; font-size: 12px; color: var(--gold); }
.comment-delete {
  background: none;
  border: none;
  color: var(--ink3);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  visibility: hidden;
}
.comment:hover .comment-delete { visibility: visible; }
.comment-delete:hover { color: var(--rose); }
.comment-text { font-size: 13px; color: var(--ink2); font-style: italic; line-height: 1.6; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--ink2);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--rose); color: white; border-color: transparent; }

/* ── RATING WIDGET ── */
.rate-stars {
  display: inline-flex;
  gap: 2px;
  margin-top: 10px;
  cursor: pointer;
}
.rate-stars span {
  font-size: 24px;
  color: var(--surface3);
  transition: transform 0.15s, color 0.15s;
  user-select: none;
}
.rate-stars span.on { color: var(--gold); text-shadow: 0 0 10px rgba(201,168,76,0.4); }
.rate-stars span:hover { transform: scale(1.25); }
.rate-hint { font-size: 11px; color: var(--ink3); margin-top: 4px; }

/* ── COMMENT FORM ── */
.comment-form { margin-bottom: 24px; }
.comment-form textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  resize: vertical;
  min-height: 70px;
  outline: none;
  transition: border-color 0.15s;
}
.comment-form textarea:focus { border-color: var(--gold); }
.comment-form textarea::placeholder { color: var(--ink3); }
.comment-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.btn {
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
}
.btn:hover { background: var(--gold2); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn.ghost:hover { background: var(--gold); color: var(--bg); }
.btn.danger { background: var(--rose); }
.btn.danger:hover { background: #d0758c; }
.btn.small { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── ADMIN TOOLBAR ── */
.admin-toolbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

/* ── MURAL ── */
#mural { background: var(--surface); }
.mural-section { background: var(--surface); }
.mural-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.mural-slot {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--surface2);
  border: 1px dashed var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.mural-slot:hover { border-color: var(--gold); }
.mural-slot.has-photo { border: 2px solid var(--border2); }
.mural-slot.has-photo:hover { border-color: var(--gold); transform: scale(1.02); }
.mural-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.mural-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  color: var(--ink3);
}
.mural-empty-icon { font-size: 28px; opacity: 0.4; }
.mural-empty-text { font-size: 11px; text-align: center; opacity: 0.5; }
.mural-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 24px 12px 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  transform: translateY(100%);
  transition: transform 0.2s;
}
.mural-slot.has-photo:hover .mural-caption { transform: translateY(0); }
.photo-delete {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.65);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s;
}
.mural-slot.has-photo:hover .photo-delete { opacity: 1; }
.photo-delete:hover { background: var(--rose); color: white; }
.mural-upload-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px auto 0;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.mural-upload-btn:hover { background: var(--gold); color: var(--bg); }
#photo-input { display: none; }
.mural-note {
  text-align: center;
  font-size: 12px;
  color: var(--ink3);
  margin-top: 16px;
  font-family: 'Fira Mono', monospace;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  cursor: default;
}
.lightbox-cap { font-size: 13px; color: var(--ink2); }

/* ── DEBATES ── */
.debates-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 768px) { .debates-layout { grid-template-columns: 1fr; } }
.debate-col-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.debate-col-sub { font-size: 12px; color: var(--ink3); margin-bottom: 20px; }
.debate-list { display: flex; flex-direction: column; gap: 8px; }
.debate-item {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.15s;
  cursor: default;
  position: relative;
}
.debate-item:hover { border-color: var(--border); }
.debate-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  font-size: 11px;
}
.debate-check.done {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}
.debate-check:hover:not(.done) { border-color: var(--gold); }
.debate-content { flex: 1; }
.debate-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 3px;
}
.debate-title.done { color: var(--ink3); text-decoration: line-through; }
.debate-meta { font-size: 11px; color: var(--ink3); }
.debate-badge {
  font-family: 'Fira Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--surface3);
  color: var(--ink3);
  margin-right: 6px;
}
.debate-badge.funable { background: rgba(196,97,122,0.15); color: var(--rose); }
.debate-badge.serio { background: rgba(74,155,142,0.15); color: var(--teal); }
.debate-badge.filosofico { background: rgba(201,168,76,0.15); color: var(--gold); }
.debate-badge.nuevo { background: rgba(168,158,145,0.12); color: var(--ink2); }
.debate-delete {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  color: var(--ink3);
  cursor: pointer;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s;
}
.debate-item:hover .debate-delete { opacity: 1; }
.debate-delete:hover { color: var(--rose); }
.new-debate {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.new-debate input, .form-field input, .form-field textarea, .form-field select {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.new-debate input:focus, .form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--gold);
}
.new-debate input::placeholder, .form-field input::placeholder, .form-field textarea::placeholder {
  color: var(--ink3);
}
.new-debate button {
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.new-debate button:hover { background: var(--gold2); }

/* ── RUELETA / SORTEO ── */
.roulette-status {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
}
.roulette-badge {
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 16px;
}
.roulette-badge.live {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
.roulette-countdown {
  font-family: 'Fira Mono', monospace;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--gold2);
  margin: 12px 0 4px;
}
.roulette-date { font-size: 13px; color: var(--ink2); }
.roulette-hint { font-size: 13px; color: var(--ink3); margin-top: 10px; line-height: 1.6; }

.proposal-form {
  max-width: 640px;
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proposal-form input, .proposal-form textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.proposal-form input:focus, .proposal-form textarea:focus { border-color: var(--gold); }
.proposal-form textarea { min-height: 80px; resize: vertical; }
.proposal-form input::placeholder, .proposal-form textarea::placeholder { color: var(--ink3); }

.prop-field { position: relative; }
.prop-count {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  color: var(--ink3);
  pointer-events: none;
}
.prop-error {
  background: rgba(214,69,65,0.12);
  border: 1px solid var(--rose);
  color: var(--rose);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.proposal-list {
  max-width: 640px;
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.proposal-list-title {
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink3);
  text-align: center;
}
.proposal-card {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}
.proposal-emoji {
  width: 40px; height: 52px;
  border-radius: 3px 5px 5px 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}
.proposal-card-title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.proposal-card-author { font-size: 11px; color: var(--gold); font-family: 'Fira Mono', monospace; letter-spacing: 1px; }
.proposal-card-desc { font-size: 12px; color: var(--ink2); margin-top: 4px; line-height: 1.5; }
.proposal-card-meta { font-size: 11px; color: var(--ink3); margin-top: 6px; }
.proposal-delete {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  color: var(--ink3);
  cursor: pointer;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s;
}
.proposal-card:hover .proposal-delete { opacity: 1; }
.proposal-delete:hover { color: var(--rose); }

.btn.mini { padding: 5px 12px; font-size: 11px; margin-top: 6px; }

.proposal-back-yes {
  display: inline-block;
  font-size: 11px;
  color: var(--gold2);
  margin-top: 6px;
}

.attendance-panel,
.disqualified-panel {
  max-width: 640px;
  margin: 28px auto 0;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 18px 20px;
}
.attendance-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.attendance-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.attendance-chip:hover { border-color: var(--gold); }
.attendance-chip.yes { border-color: #4caf72; background: rgba(76,175,114,0.12); }
.attendance-chip.no { border-color: var(--rose); background: rgba(214,69,65,0.10); }
.att-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.att-state { font-size: 10px; color: var(--ink3); }
.attendance-chip.yes .att-state { color: #7ed0a0; }
.attendance-chip.no .att-state { color: var(--rose); }

.disqualified-panel { border-color: var(--rose); border-style: dashed; }
.disqualified-panel.preview { border-color: var(--border2); }
.disq-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.disq-card:last-child { border-bottom: none; }
.disq-card .disq-main { flex: 1 1 220px; }
.disq-card .proposal-card-meta { margin-top: 2px; }
.disq-added { font-size: 11px; color: #7ed0a0; white-space: nowrap; }

.winner-card {
  max-width: 560px;
  margin: 28px auto 0;
  background: linear-gradient(180deg, rgba(201,168,76,0.08), transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}
.winner-cover {
  width: 110px; height: 160px;
  border-radius: 5px 10px 10px 5px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  box-shadow: 6px 8px 24px rgba(0,0,0,0.6);
}
.winner-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--gold2);
  line-height: 1.1;
  margin-bottom: 4px;
}
.winner-author { font-size: 13px; color: var(--ink2); font-family: 'Fira Mono', monospace; letter-spacing: 1px; margin-bottom: 14px; }
.winner-desc { font-size: 14px; color: var(--ink2); line-height: 1.7; max-width: 420px; margin: 0 auto 20px; }
.winner-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.admin-meeting-form {
  max-width: 520px;
  margin: 28px auto 0;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.admin-meeting-form label {
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}
.admin-meeting-form input[type="date"],
.admin-meeting-form input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  color-scheme: dark;
  width: 100%;
  margin-top: 8px;
}
.admin-meeting-form input[type="date"]:focus,
.admin-meeting-form input[type="text"]:focus { border-color: var(--gold); }

.history-list {
  max-width: 560px;
  margin: 28px auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 16px;
}
.history-emoji { font-size: 20px; }
.history-info { flex: 1; text-align: left; }
.history-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.history-meta { font-size: 11px; color: var(--ink3); }

/* ── RUELETA OVERLAY (slot machine) ── */
.roulette-overlay {
  position: fixed; inset: 0;
  background: rgba(6,5,4,0.96);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.roulette-overlay.open { opacity: 1; pointer-events: all; }
.roulette-overlay-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--ink);
  text-align: center;
}
.roulette-overlay-title em { color: var(--gold); font-style: italic; }
.slot-frame {
  width: min(340px, 86vw);
  height: 84px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--surface);
  box-shadow: 0 0 40px rgba(201,168,76,0.15);
}
.slot-frame::before, .slot-frame::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 26px;
  z-index: 2;
  pointer-events: none;
}
.slot-frame::before { top: 0; background: linear-gradient(rgba(22,20,18,1), transparent); }
.slot-frame::after { bottom: 0; background: linear-gradient(transparent, rgba(22,20,18,1)); }
.slot-window {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0; right: 0;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  height: 80px;
  pointer-events: none;
}
.slot-track {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.slot-item {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-item.winner {
  color: var(--gold2);
  text-shadow: 0 0 16px rgba(201,168,76,0.6);
}
.slot-item .slot-emoji { font-size: 24px; }
.roulette-overlay .btn { font-size: 15px; padding: 12px 26px; }

/* ── AUTH MODAL ── */
.auth-modal { max-width: 420px; }
.auth-modal .modal-body { padding: 28px; }
.auth-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--border2); }
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  color: var(--ink3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: 'Inter', sans-serif;
}
.auth-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-family: 'Fira Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 6px;
}
.form-field input { width: 100%; }
.form-field textarea { width: 100%; }
.auth-error {
  background: rgba(196,97,122,0.12);
  border: 1px solid rgba(196,97,122,0.3);
  color: var(--rose);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
}
.auth-error.show { display: block; }
.auth-hint { font-size: 11px; color: var(--ink3); margin-top: 12px; text-align: center; }

/* ── FORM MODAL (admin book) ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-field.full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ── TOASTS ── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: toast-in 0.25s ease-out;
  max-width: 90vw;
  text-align: center;
}
.toast.error { border-color: var(--rose); color: var(--rose); }
.toast.success { border-color: var(--teal); color: var(--teal); }
.toast-action {
  margin-left: 12px;
  background: none;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.toast-action:hover { background: var(--gold); color: var(--bg); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border2);
  color: var(--ink3);
  font-size: 12px;
  font-family: 'Fira Mono', monospace;
  letter-spacing: 1px;
}
footer span { color: var(--gold); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .modal-top { flex-direction: column; gap: 16px; }
  .hero-btn { padding: 12px 20px; font-size: 12px; }
  .session-area { display: none; }
}

/* ── TOOLTIP ── */
.tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  width: 220px;
  font-size: 12px;
  color: var(--ink2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateX(-50%) translateY(6px);
  z-index: 10;
  line-height: 1.5;
}
.book:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tooltip-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.tooltip-stars { color: var(--gold); font-size: 12px; margin-bottom: 4px; }
.tooltip-desc { font-size: 11px; color: var(--ink3); }

/* ── SHARE ── */
.share-btn {
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.share-btn:hover { background: rgba(201,168,76,0.12); color: var(--gold2); }

/* ── ENCUESTAS ── */
#polls-root {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.poll-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.poll-card.done { opacity: 0.78; }
.poll-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.poll-emoji { font-size: 22px; line-height: 1; }
.poll-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.poll-meta { font-size: 11px; color: var(--ink3); margin: 2px 0 0; }
.poll-status {
  margin-left: auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.poll-status.open { background: rgba(125,178,134,0.15); color: #7db286; border: 1px solid rgba(125,178,134,0.4); }
.poll-status.closed { background: rgba(138,127,114,0.15); color: var(--ink3); border: 1px solid var(--border2); }
.poll-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.poll-option {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 10px 14px;
}
.poll-option.mine { border-color: var(--gold); }
.poll-option-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.poll-option-label { font-size: 14px; color: var(--ink); }
.poll-option-count { font-size: 11px; color: var(--ink3); white-space: nowrap; }
.poll-bar { margin-top: 6px; height: 5px; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.poll-bar-fill { height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.3s; }
.poll-pct { font-size: 11px; color: var(--gold); }
.poll-vote-btn {
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--ink2);
  cursor: pointer;
}
.poll-vote-btn:hover, .poll-vote-btn.mine { border-color: var(--gold); color: var(--gold); }
.poll-my-vote { font-size: 12px; color: var(--ink3); margin: 12px 0 0; }
.poll-my-vote strong { color: var(--gold); font-weight: 600; }
.poll-actions { margin-top: 12px; text-align: right; }
.poll-login-prompt {
  text-align: center;
  color: var(--ink3);
  font-size: 13px;
  padding: 10px 0;
}
.poll-login-prompt .btn { margin-top: 8px; }
.poll-empty { text-align: center; color: var(--ink3); font-size: 13px; }
.poll-admin-form {
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.poll-admin-form h3 {
  font-family: 'Fira Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin: 0 0 12px;
}
.poll-admin-form input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  margin-bottom: 8px;
}
.poll-admin-form input:focus { border-color: var(--gold); }
.poll-form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ── FEED DE EVENTOS ── */
.events-feed {
  max-width: 720px;
  margin: 46px auto 0;
}
.events-feed-title {
  font-family: 'Fira Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin: 0 0 14px;
  text-align: center;
}
.events-list {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 0;
}
.event-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--ink2);
}
.event-item + .event-item { border-top: 1px solid var(--border); }
.event-icon { flex: none; }
.event-text { flex: 1; line-height: 1.45; }
.event-time { flex: none; font-size: 11px; color: var(--ink3); white-space: nowrap; }
.events-empty { text-align: center; color: var(--ink3); font-size: 13px; padding: 14px; }
.user-chip {
  color: var(--gold);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.user-chip:hover { text-decoration: underline; }
.feed-book-link, .feed-poll-link { color: var(--gold); }


/* ── Puerta del club ── */
.club-door[hidden] { display: none; }
.club-door {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(212,175,55,0.08), transparent 60%), var(--bg);
}
.club-door-card {
  width: min(420px, 90vw);
  text-align: center;
  padding: 44px 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
}
.club-door-card .hero-moon {
  position: static;
  display: inline-block;
  font-size: 42px;
  margin-bottom: 6px;
}
.club-door-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  color: var(--ink);
  margin: 0 0 6px;
}
.club-door-card h1 em { color: var(--gold); font-style: normal; }
.club-door-sub {
  color: var(--ink2);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 22px;
}
.club-door-card form { display: flex; flex-direction: column; gap: 12px; }
.club-door-card input {
  width: 100%;
  padding: 13px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--ink);
  outline: none;
}
.club-door-card input:focus { border-color: var(--gold); }
.club-door-card .btn { width: 100%; justify-content: center; }
.club-door-error {
  margin: 14px 0 0;
  color: var(--rose);
  font-size: 13px;
}
