/* ── TavernMind Public Dark Theme ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0F0D0A;
  --bg2:      #1A1710;
  --bg3:      #242018;
  --gold:     #D4A853;
  --gold2:    #B8923F;
  --text:     #E8E0D0;
  --text2:    #9A9080;
  --border:   rgba(212,168,83,.18);
  --radius:   12px;
  --font-serif: 'Georgia', 'Times New Roman', serif;
}

body { background: var(--bg); color: var(--text); font-family: -apple-system, 'Segoe UI', sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── NAV ── */
.pub-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 32px;
  padding: 0 48px; height: 64px;
  background: rgba(15,13,10,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.pub-logo { font-family: var(--font-serif); font-size: 18px; font-weight: 700; letter-spacing: .05em; color: var(--text); }
.pub-nav-links { display: flex; gap: 28px; flex: 1; }
.pub-nav-links a { font-size: 14px; color: var(--text2); transition: color .2s; }
.pub-nav-links a:hover, .pub-nav-links a.active { color: var(--gold); }
.pub-cta {
  padding: 9px 22px; background: var(--gold); color: #0F0D0A;
  font-weight: 700; font-size: 14px; border-radius: 8px;
  transition: background .2s; white-space: nowrap;
}
.pub-cta:hover { background: var(--gold2); }

/* ── SECTION HEADER ── */
.lib-header {
  padding: 120px 48px 48px; max-width: 860px; margin: 0 auto;
  text-align: center;
}
.pub-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: var(--gold); margin-bottom: 16px;
}
.lib-header h1 {
  font-family: var(--font-serif); font-size: clamp(36px,5vw,64px);
  font-weight: 700; line-height: 1.1; margin-bottom: 16px;
}
.lib-header p { font-size: 18px; color: var(--text2); margin-bottom: 32px; }

/* ── SEARCH ── */
.lib-search-wrap { max-width: 520px; margin: 0 auto 24px; }
.lib-search {
  width: 100%; padding: 12px 20px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 15px; outline: none;
}
.lib-search:focus { border-color: var(--gold); }

/* ── GENRE FILTERS ── */
.lib-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 860px; margin: 0 auto; }
.lib-filter-chip {
  padding: 6px 14px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text2); font-size: 13px; cursor: pointer; transition: all .2s;
}
.lib-filter-chip:hover, .lib-filter-chip.active { background: var(--gold); border-color: var(--gold); color: #0F0D0A; font-weight: 600; }

/* ── LIBRARY GRID ── */
.lib-grid-section { padding: 32px 40px 80px; max-width: 1600px; margin: 0 auto; }
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
@media (min-width: 1440px) { .lib-grid { grid-template-columns: repeat(6, 1fr); } }

.lib-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.lib-card:hover { transform: translateY(-4px); border-color: var(--gold); }

.lib-card-img {
  height: 140px; position: relative;
  display: flex; align-items: flex-end; padding: 10px;
  background-size: cover; background-position: center;
}
.lib-card-img--photo { background-color: var(--bg3); }
.lib-card-img--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  pointer-events: none;
}
.lib-card-emoji { font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); position: relative; z-index: 1; }
.lib-badge-18 {
  position: absolute; top: 8px; right: 8px;
  background: rgba(200,60,60,.85); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
}

.lib-card-body { padding: 14px 14px 8px; flex: 1; }
.lib-card-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.lib-card-desc { font-size: 12px; color: var(--text2); line-height: 1.45; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.lib-tag { font-size: 10px; padding: 2px 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; color: var(--text2); }

.lib-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 12px; }
.lib-sessions { font-size: 11px; color: var(--text2); }
.lib-play-btn {
  padding: 6px 14px; background: var(--gold); color: #0F0D0A;
  font-size: 12px; font-weight: 700; border: none; border-radius: 6px; cursor: pointer; transition: background .2s;
}
.lib-play-btn:hover { background: var(--gold2); }

/* ── CHARACTERS GRID ── */
.char-grid {
  display: grid; gap: 24px; padding: 32px 40px 80px; max-width: 1400px; margin: 0 auto;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
@media (min-width: 1200px) { .char-grid { grid-template-columns: repeat(4, 1fr); } }

.char-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s;
}
.char-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.char-card-bg {
  height: 160px; position: relative; display: flex; align-items: flex-end; padding: 14px;
  background-size: cover; background-position: center;
}
.char-card-emoji { font-size: 36px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.7)); }
.char-card-body { padding: 16px; }
.char-world-name { font-size: 11px; color: var(--gold); font-weight: 700; letter-spacing: .08em; margin-bottom: 6px; text-transform: uppercase; }
.char-role { font-size: 14px; color: var(--text); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ── BLOG ── */
.blog-section { padding: 32px 40px 80px; max-width: 1000px; margin: 0 auto; }
.blog-grid { display: grid; gap: 24px; }

.blog-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: border-color .2s;
  display: grid; grid-template-columns: 260px 1fr;
}
.blog-card:hover { border-color: var(--gold); }
.blog-card--featured { grid-template-columns: 1fr; }
.blog-card--featured .blog-card-cover { height: 280px; width: 100%; }

.blog-card-cover { width: 260px; height: 100%; object-fit: cover; }
.blog-card-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 8px; }
.blog-pin { font-size: 12px; color: var(--gold); }
.blog-card-date { font-size: 12px; color: var(--text2); }
.blog-card-title { font-family: var(--font-serif); font-size: 22px; font-weight: 700; line-height: 1.3; }
.blog-card-excerpt { font-size: 14px; color: var(--text2); line-height: 1.6; flex: 1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.blog-read-more { font-size: 13px; color: var(--gold); font-weight: 600; }

/* ── BLOG POST ── */
.blog-post-wrap { padding: 100px 24px 80px; }
.blog-post-inner { max-width: 760px; margin: 0 auto; }
.blog-back { color: var(--text2); font-size: 14px; display: inline-block; margin-bottom: 32px; transition: color .2s; }
.blog-back:hover { color: var(--gold); }
.blog-post-date { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.blog-post-title { font-family: var(--font-serif); font-size: clamp(28px,4vw,48px); font-weight: 700; line-height: 1.2; margin-bottom: 28px; }
.blog-post-cover { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--radius); margin-bottom: 36px; }
.blog-post-body { font-size: 16px; line-height: 1.8; color: var(--text); }
.blog-post-body h1, .blog-post-body h2, .blog-post-body h3 { font-family: var(--font-serif); margin: 28px 0 12px; }
.blog-post-body p { margin-bottom: 16px; }
.blog-post-body img { border-radius: 8px; margin: 20px 0; }
.blog-post-body a { color: var(--gold); text-decoration: underline; }
.blog-post-body ul, .blog-post-body ol { padding-left: 24px; margin-bottom: 16px; }
.blog-post-body blockquote { border-left: 3px solid var(--gold); padding-left: 20px; color: var(--text2); font-style: italic; margin: 20px 0; }

/* Quill viewer reset */
.ql-editor { padding: 0 !important; font-size: 16px !important; line-height: 1.8 !important; }

/* ── ABOUT ── */
.about-hero { padding: 120px 48px 48px; text-align: center; max-width: 800px; margin: 0 auto; }
.about-hero h1 { font-family: var(--font-serif); font-size: clamp(36px,4vw,56px); font-weight: 700; line-height: 1.15; margin-bottom: 20px; }
.about-sub { font-size: 18px; color: var(--text2); }

.about-section { padding: 0 40px 80px; max-width: 860px; margin: 0 auto; }
.about-inner { display: flex; flex-direction: column; gap: 56px; }
.about-block h2 { font-family: var(--font-serif); font-size: 28px; margin-bottom: 16px; color: var(--gold); }
.about-block p { font-size: 16px; color: var(--text); line-height: 1.75; margin-bottom: 12px; }

.about-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.about-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.about-stat-num { display: block; font-family: var(--font-serif); font-size: 42px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.about-stat span:last-child { font-size: 13px; color: var(--text2); }

.about-team h2 { font-family: var(--font-serif); font-size: 28px; margin-bottom: 24px; color: var(--gold); }
.about-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.about-member { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 20px; text-align: center; }
.about-member-avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 14px; }
.about-member-name { font-weight: 700; margin-bottom: 4px; }
.about-member-role { font-size: 13px; color: var(--text2); }

.about-contact h2 { font-family: var(--font-serif); font-size: 28px; margin-bottom: 12px; color: var(--gold); }
.about-contact p { color: var(--text2); margin-bottom: 20px; }

/* ── FOOTER ── */
.pub-footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 48px 48px 0; margin-top: 40px; }
.pub-footer-inner { display: flex; gap: 60px; max-width: 1200px; margin: 0 auto; padding-bottom: 40px; }
.pub-footer-brand { flex: 1; }
.pub-footer-brand p { font-size: 13px; color: var(--text2); margin-top: 10px; max-width: 220px; line-height: 1.6; }
.pub-footer-cols { display: flex; gap: 48px; }
.pub-footer-cols > div { display: flex; flex-direction: column; gap: 10px; }
.pub-footer-col-title { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--gold); margin-bottom: 6px; }
.pub-footer-cols a { font-size: 14px; color: var(--text2); transition: color .2s; }
.pub-footer-cols a:hover { color: var(--text); }
.pub-footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; font-size: 13px; color: var(--text2); max-width: 1200px; margin: 0 auto; }

/* ── STATES ── */
.lib-loading { padding: 80px; text-align: center; color: var(--text2); font-size: 16px; }
.lib-empty { padding: 60px; text-align: center; color: var(--text2); }
.lib-empty a { color: var(--gold); }

/* ── WORLD GRADIENTS (reuse existing names) ── */
.wg-dark    { background: linear-gradient(135deg, #1a0a0a 0%, #2d1515 100%); }
.wg-gold    { background: linear-gradient(135deg, #1a1400 0%, #3d2e00 100%); }
.wg-blue    { background: linear-gradient(135deg, #0a0a1a 0%, #0d1530 100%); }
.wg-teal    { background: linear-gradient(135deg, #001a18 0%, #003330 100%); }
.wg-purple  { background: linear-gradient(135deg, #120a1a 0%, #261040 100%); }
.wg-rose    { background: linear-gradient(135deg, #1a0a10 0%, #3d1525 100%); }
.wg-pink    { background: linear-gradient(135deg, #1a0a14 0%, #3a1225 100%); }
.wg-red     { background: linear-gradient(135deg, #1a0505 0%, #3d0f0f 100%); }
.wg-green   { background: linear-gradient(135deg, #001a08 0%, #003515 100%); }
.wg-orange  { background: linear-gradient(135deg, #1a0e00 0%, #3a1f00 100%); }
.wg-slate   { background: linear-gradient(135deg, #0a0e14 0%, #141d28 100%); }
.wg-indigo  { background: linear-gradient(135deg, #080a1a 0%, #101535 100%); }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .pub-nav { padding: 0 20px; gap: 16px; }
  .pub-nav-links { display: none; }
  .lib-header { padding: 90px 20px 32px; }
  .lib-grid-section, .char-grid, .blog-section { padding-left: 16px; padding-right: 16px; }
  .lib-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .char-grid { grid-template-columns: 1fr; }
  .blog-card { grid-template-columns: 1fr; }
  .blog-card-cover { width: 100%; height: 180px; }
  .pub-footer { padding: 32px 20px 0; }
  .pub-footer-inner { flex-direction: column; gap: 28px; }
  .about-stats-row { grid-template-columns: 1fr; }
  .about-section { padding: 0 20px 60px; }
}
