@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');

[hidden] { display: none !important; }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dusk:     #0a0a0a;
  --midnight: #000000;
  --violet:   #6b3fa0;
  --rose:     #c2547a;
  --gold:     #f0c060;
  --mist:     #c8b8e8;
  --light:    #f0f0f0;
  --glass:    rgba(255,255,255,0.06);
  --border:   rgba(255,255,255,0.12);
}

html {
  scroll-behavior: smooth;
  background: #000; /* fallback — shows on pages with no .page-bg */
}

body {
  background: transparent; /* lets fixed .page-bg show through */
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* body background handles the base black — no pseudo-element needed */

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
}

/* Keeps the brand + admin pill grouped together on the left, while the
   nav still space-betweens against .nav-links on the right as before. */
.nav-left { display: flex; align-items: center; gap: 1.1rem; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.nav-links a {
  color: var(--mist);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-login {
  border: 1px solid rgba(240,192,96,0.4);
  border-radius: 20px;
  padding: 0.3rem 0.75rem !important;
  transition: background 0.2s, border-color 0.2s, color 0.2s !important;
}
.nav-login:hover {
  background: rgba(240,192,96,0.1);
  border-color: var(--gold);
  color: var(--gold) !important;
}

/* ── Logged-in user menu ── */
.nav-user { position: relative; }

.nav-user-btn {
  background: rgba(240,192,96,0.1);
  border: 1px solid rgba(240,192,96,0.4);
  border-radius: 20px;
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.nav-user-btn:hover { background: rgba(240,192,96,0.18); border-color: var(--gold); }
.nav-user-caret { font-size: 0.6rem; margin-left: 3px; opacity: 0.7; }

.nav-user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 5px;
  border-radius: 50%;
  background: #2fbf5f;
  color: #fff;
  font-size: 0.55rem;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
}

.nav-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(240,192,96,0.35);
  margin-right: 6px;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-user-avatar--fallback {
  background: linear-gradient(135deg, var(--violet), var(--rose));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  line-height: 1;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  min-width: 120px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 200;
  overflow: hidden;
}
.nav-user-dropdown a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--mist);
  font-size: 0.85rem;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.15s, color 0.15s;
}
.nav-user-dropdown a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ── Admin dropdown (sits to the right of the profile menu) ── */
.nav-admin { position: relative; }

.nav-admin-btn {
  background: rgba(217,90,90,0.1);
  border: 1px solid rgba(217,90,90,0.45);
  border-radius: 20px;
  color: #e07a7a;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.nav-admin-btn:hover { background: rgba(217,90,90,0.18); border-color: #e07a7a; }

.nav-admin-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 200;
  overflow: hidden;
}
.nav-admin-dropdown a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--mist);
  font-size: 0.85rem;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.15s, color 0.15s;
}
.nav-admin-dropdown a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ── Page sections ── */
.hero {
  text-align: center;
  padding: 7rem 2rem 5rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--gold) 0%, var(--mist) 50%, var(--rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  color: var(--mist);
  font-size: 1.05rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 40px;
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--rose));
  color: #fff;
  box-shadow: 0 4px 24px rgba(107,63,160,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(107,63,160,0.6);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--mist);
  background: transparent;
  margin-left: 1rem;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-green {
  background: linear-gradient(135deg, #2fbf5f, #1f8f45);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 24px rgba(47,191,95,0.35);
}

.btn-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(47,191,95,0.55);
}

/* ── Cards / glass panels ── */
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(200,184,232,0.4);
  transform: translateY(-3px);
}

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

/* ── Section containers ── */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--mist);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  opacity: 0.8;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4rem 0;
}

/* ── Chapter list ── */
.chapter-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--light);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.chapter-item:hover {
  background: var(--glass);
  border-color: var(--border);
}

.chapter-num {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--rose);
  min-width: 2.5rem;
  letter-spacing: 0.05em;
}

.chapter-title { font-size: 1rem; }

.chapter-note {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--mist);
  opacity: 0.6;
}

/* ── Art gallery ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--glass);
  border: 1px solid var(--border);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,8,32,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--mist);
}

.gallery-item:hover .overlay { opacity: 1; }

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.3;
  width: 100%;
  height: 100%;
}

/* ── About / bio ── */
.bio-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 640px) {
  .bio-layout { grid-template-columns: 1fr; }
}

.bio-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--violet);
  box-shadow: 0 0 40px rgba(107,63,160,0.5);
  display: block;
}

.bio-avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--glass);
  border: 3px solid var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.5;
}

.bio-text h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.bio-text .handle {
  color: var(--rose);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.bio-text p { margin-bottom: 1rem; color: var(--mist); }

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--mist);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.link-pill:hover { border-color: var(--gold); color: var(--gold); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--mist);
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ── Site banner ──────────────────────────────────────────────────────────
   The banner sits flush below the nav, edge-to-edge across the viewport.

   width: 100%
     Stretch the container to the full browser width, ignoring any page
     padding. Because <body> has no horizontal padding itself, this
     reaches wall-to-wall.

   height: 420px
     A fixed pixel height for the "frame". The image inside will be
     cropped/scaled to fit this box — so no matter how tall your original
     art is, the banner is always exactly this tall on screen.
     Tweak this number freely to make the banner taller or shorter.

   overflow: hidden
     The image will be slightly larger than its container after
     object-fit: cover scales it up. overflow: hidden clips anything
     that spills outside the 420px frame, keeping edges clean.

   position: relative
     Needed so that the ::after gradient overlay (see below) can be
     positioned relative to the banner, not the whole page.
────────────────────────────────────────────────────────────────────────── */
/* ── Site banner ──────────────────────────────────────────────────────────
   Instead of a fixed-height strip that force-crops the art, this uses a
   centered card approach — like the reference. The image displays at its
   natural proportions inside a max-width container, so nothing gets cut.

   padding: 2rem 2rem 0
     Gives breathing room on the left/right and top so the card floats
     away from the nav a little. No bottom padding — the card's bottom
     edge blends into the hero section below via the ::after gradient.

   The outer wrapper is just for horizontal centering + side padding.
────────────────────────────────────────────────────────────────────────── */
.site-banner {
  /* No padding — image goes wall to wall */
}

.site-banner-inner {
  position: relative;
  overflow: hidden;
  background: #000;
  max-height: 320px;
}

.site-banner img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Hero banner — home page only, taller than the gallery banner */
.site-banner--hero .site-banner-inner { max-height: 560px; }
.site-banner--hero img { height: 560px; }

/* Gradient fade at the bottom of the card — same pseudo-element trick
   as before, but now it fades over just the bottom portion of the art
   so the card bleeds smoothly into the hero section below it. */
.site-banner-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    #000 100%
  );
  pointer-events: none;
}

/* Banner read buttons — overlaid bottom-left of hero banner */
.banner-read-menu {
  position: absolute;
  bottom: 1.4rem;
  left: 1.6rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.banner-read-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.banner-read-btns {
  display: flex;
  gap: 0.5rem;
}

.banner-read-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.38em 1em;
  border-radius: 20px;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.82);
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
}

.banner-read-btn:hover {
  transform: translateY(-2px);
  color: #fff;
}

.banner-read-btn--ao3:hover {
  background: rgba(153,0,0,0.55);
  border-color: rgba(220,80,80,0.5);
}

.banner-read-btn--wattpad:hover {
  background: rgba(255,97,34,0.45);
  border-color: rgba(255,140,80,0.5);
}

/* ── Navigation cards section ── */

/* Outer section — just vertical breathing room against the banner */
.nav-section {
  padding: 2.5rem 0 4rem;
}

/* The gray "slab" — inset from the edges so black peeks through on sides.
   border-radius rounds its corners so it floats rather than cuts hard. */
.nav-section-inner {
  background: #141414;
  margin: 0 3rem;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Three equal columns with a gap between them */
.nav-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

/* Each card is a link — position:relative anchors the overlay inside it */
.nav-card {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.nav-card:hover {
  border-color: rgba(240,192,96,0.5);
  box-shadow: 0 0 32px rgba(240,192,96,0.12);
}

/* Image fills the card; object-fit:cover crops it to the 4:3 box */
.nav-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.5s ease;
}

.nav-card:hover img {
  transform: scale(1.05);
}

/* Dark gradient that rises from the bottom — the label sits on top of it */
.nav-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.3)  45%,
    transparent      100%
  );
  display: flex;
  align-items: flex-end;
  padding: 1.25rem 1.5rem;
  transition: background 0.3s;
}

.nav-card:hover .nav-card-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.4)  50%,
    transparent      100%
  );
}

/* The label text */
.nav-card-label {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-card:hover .nav-card-label {
  color: var(--gold);
}

/* ── Synopsis section ── */

/* The outer section — slightly lighter than pure black so it reads
   as a distinct "layer" without being harsh */
.synopsis-section {
  padding: 4rem 3rem;
}

/* Side-by-side: story card (wider) + links card */
.synopsis-row {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.5rem;
  align-items: start;
}

.synopsis-inner {
  min-width: 0; /* prevents grid blowout from wide inner content */
  text-align: center;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 3px solid var(--violet);
  border-radius: 20px;
  padding: 3.5rem;
}

/* Small label above the title */
.synopsis-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1rem;
}

/* Main title */
.synopsis-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

/* Decorative horizontal rule — a thin gold line with fade on the edges */
.synopsis-rule {
  width: 120px;
  height: 1px;
  margin: 0 auto 2.5rem;
  background: linear-gradient(
    to right,
    transparent,
    var(--gold),
    transparent
  );
}

/* Two-column row: text left, cover right */
.synopsis-columns {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  text-align: left;
}

/* The paragraphs */
.synopsis-body {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.synopsis-body p {
  color: var(--mist);
  font-size: 1.05rem;
  line-height: 1.85;
}

/* Character names in italics get a subtle gold tint */
.synopsis-body em {
  color: #e8d4a0;
  font-style: italic;
}

/* Book cover — 2:3 portrait ratio, like a real cover */
.synopsis-cover {
  flex-shrink: 0;
  width: 220px;
}

.synopsis-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

.synopsis-cover-placeholder {
  width: 220px;
  height: 330px;  /* 2:3 ratio */
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

/* ── About the Author section ── */
.author-section {
  padding: 0 3rem 4rem;
}

/* Two columns: donations | bio */
.author-row {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Bio card — warm dark tone to contrast the synopsis above */
.author-card {
  position: relative;
  background: #12100e;
  border: 1px solid rgba(240,192,96,0.15);
  border-top: 3px solid var(--gold);
  border-radius: 20px;
  padding: 2.5rem;
}

/* Profile picture — sits in the top-right corner of the card */
.author-avatar {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(240,192,96,0.4);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.author-avatar-placeholder {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #1e1a14;
  border: 2px solid rgba(240,192,96,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

/* Links card — cool dark tone, rose accent */
.links-card {
  background: #0e1018;
  border: 1px solid rgba(194,84,122,0.18);
  border-top: 3px solid var(--rose);
  border-radius: 20px;
  padding: 2.5rem;
}

.author-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.5rem;
}

.author-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}

.author-rule {
  width: 80px;
  height: 1px;
  margin-bottom: 1.75rem;
  background: linear-gradient(to right, var(--gold), transparent);
}

.author-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.author-body p {
  color: var(--mist);
  font-size: 0.97rem;
  line-height: 1.85;
}

.author-body em {
  color: #e8d4a0;
  font-style: italic;
}

/* Links list */
.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--mist);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.link-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--light);
}

.link-icon { font-size: 1.1rem; flex-shrink: 0; }
.link-name { flex: 1; font-size: 0.95rem; }
.link-arrow { font-size: 0.85rem; opacity: 0.4; }

/* Discord link gets a subtle purple highlight */
.link-item-discord { border-color: rgba(88,101,242,0.2); }
.link-item-discord:hover { background: rgba(88,101,242,0.1); border-color: rgba(88,101,242,0.4); }

/* Discord button at top of bio card */
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  background: rgba(88,101,242,0.15);
  border: 1px solid rgba(88,101,242,0.35);
  color: #9aa3f5;
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  transition: background 0.2s, border-color 0.2s;
}
.discord-btn:hover {
  background: rgba(88,101,242,0.25);
  border-color: rgba(88,101,242,0.6);
}

/* Inline link within bio text */
.inline-link {
  color: #9aa3f5;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inline-link:hover { color: var(--light); }

/* Donations card — rose accent like the links card but distinct */
.donations-card {
  background: #100e14;
  border: 1px solid rgba(194,84,122,0.18);
  border-top: 3px solid var(--rose);
  border-radius: 20px;
  padding: 2rem 1.75rem;
}

.donations-blurb {
  color: var(--mist);
  font-size: 0.85rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.donations-btns {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.donations-btn {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
}

.donations-feed {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.25rem;
  min-height: 80px;
}

.donations-empty {
  color: rgba(200,184,232,0.35);
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.6;
}

.donations-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 0.75rem;
}
.donations-row:last-of-type { border-bottom: none; }
.donations-name {
  font-size: 0.85rem;
  color: rgba(220,210,240,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donations-amount {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.donations-toggle {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  background: none;
  border: none;
  color: rgba(200,184,232,0.4);
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
  padding: 0.3rem;
  transition: color 0.18s;
}
.donations-toggle:hover { color: rgba(200,184,232,0.8); }

.donations-scroll {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,85,0.2) transparent;
}

/* ── Discord age gate ── */
.agegate-wrapper {
  min-height: calc(100vh - 64px - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.agegate-card {
  max-width: 520px;
  width: 100%;
  background: #0e1018;
  border: 1px solid rgba(194,84,122,0.2);
  border-top: 3px solid var(--rose);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
}

.agegate-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.agegate-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0;
}

.agegate-warning {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1.25rem;
}

.agegate-body {
  color: var(--mist);
  font-size: 0.97rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.agegate-body strong { color: var(--light); }
.agegate-body em { color: #e8d4a0; font-style: italic; }

.agegate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.agegate-actions .btn { width: 100%; text-align: center; }
.agegate-actions .btn-outline { margin-left: 0; }

.agegate-fine {
  font-size: 0.75rem;
  color: rgba(200,184,232,0.4);
  line-height: 1.6;
}

/* ── Fanpages — unboxed "fandom page" layout, no card, just text over the
   blurred background ── */
.fanpages-wrapper {
  min-height: calc(100vh - 64px - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
}

.fanpages-content {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.fanpages-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 28px rgba(240,192,96,0.4);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.fanpages-body {
  text-align: left;
  color: var(--mist);
  font-size: 1.12rem;
  line-height: 1.9;
  margin-bottom: 1.4rem;
}
.fanpages-body strong { color: var(--light); }

.fanpages-actions {
  margin: 2.5rem 0 2rem;
}
.fanpages-actions .btn { font-size: 1.05rem; padding: 1rem 2.75rem; }

.fanpages-fine {
  font-size: 0.85rem;
  color: rgba(200,184,232,0.55);
  line-height: 1.7;
}

/* ── Chapters section ── */
.chapters-section {
  padding: 0 3rem 4rem;
}

/* Side-by-side: chapters card (wider, ~80%) + friends card */
.chapters-row {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.5rem;
  align-items: start;
}

.chapters-inner {
  min-width: 0; /* prevents grid blowout from wide inner content */
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 3px solid var(--violet);
  border-radius: 20px;
  padding: 2.5rem 2.5rem 2rem;
}

/* Friends card — small access point to moderators' stories */
.friends-card {
  background: #12100e;
  border: 1px solid rgba(240,192,96,0.15);
  border-top: 3px solid var(--gold);
  border-radius: 20px;
  padding: 1.75rem;
}

.friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chapters-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}

/* Each chapter row */
.chapter-row {
  display: flex;
  align-items: center;
  padding: 1rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
  border-radius: 8px;
}

.chapter-row-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  text-decoration: none;
  min-width: 0;
}

.chapter-row:first-child { border-top: 1px solid rgba(255,255,255,0.06); }

.chapter-row:hover {
  background: rgba(255,255,255,0.04);
}

/* Square thumbnail */
.cr-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
}

.cr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text column */
.cr-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.cr-title {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 400;
  transition: color 0.2s;
}

.chapter-row:hover .cr-title {
  color: #f8d87a;
}

.cr-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: rgba(200,184,232,0.5);
}

.cr-hearts { letter-spacing: 0.03em; }
.cr-date   { letter-spacing: 0.03em; }

.cr-like-btn {
  background: none;
  border: none;
  color: rgba(200,184,232,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.cr-like-btn:hover { color: var(--rose); background: rgba(255,255,255,0.05); }
.cr-like-btn.liked { color: var(--rose); }

/* Like button on art-view page */
.art-view-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: rgba(200,184,232,0.6);
  font-size: 0.9rem;
  padding: 5px 14px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.art-view-like:hover { color: var(--rose); border-color: var(--rose); background: rgba(224,96,128,0.06); }
.art-view-like.liked { color: var(--rose); border-color: var(--rose); }

.chapters-footer {
  margin-top: 1.5rem;
  text-align: center;
}

/* ── Full-screen blurry background ──────────────────────────────────────
   Used on the chapters hub and individual chapter pages.

   position: fixed / inset: 0
     Pins the background to the viewport so it stays still while the
     page content scrolls over it. Covers the entire screen.

   z-index: -1
     Sits behind everything else on the page.

   The <img> inside is scaled to cover the full viewport (object-fit: cover),
   blurred with CSS filter, and slightly scaled up (scale 1.08) to hide the
   soft white fringe that blur always creates at the edges.

   .page-bg-overlay is a dark semi-transparent layer on top of the blurred
   image so text stays readable regardless of how bright the image is.
────────────────────────────────────────────────────────────────────────── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.page-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(14px);
  transform: scale(1.08); /* hides blur fringe at edges */
}

.page-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* ── Chapter hub ── */
.hub-wrapper {
  min-height: calc(100vh - 64px - 80px);
  padding: 4rem 3rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.hub-card {
  width: 100%;
  max-width: 860px;
  background: rgba(8,8,8,0.72);
  border: 1px solid rgba(255,255,255,0.09);
  border-top: 3px solid var(--violet);
  border-radius: 20px;
  padding: 3rem;
  backdrop-filter: blur(8px);
  text-align: center;
}

.hub-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--gold);
}

.hub-blurb {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--mist);
  font-size: 1rem;
  line-height: 1.8;
}

.hub-blurb em { color: #e8d4a0; font-style: italic; }

/* The chapter list inside the hub — same rows as homepage but no cap */
.hub-card .chapters-list { text-align: left; }

/* ── Individual chapter view ── */
.chapter-view-wrapper {
  min-height: calc(100vh - 64px - 80px);
  padding: 4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chapter-view-card {
  width: 100%;
  max-width: 600px;
  background: rgba(10,10,10,0.85);
  border: 1px solid rgba(255,255,255,0.09);
  border-top: 3px solid var(--gold);
  border-radius: 20px;
  padding: 3rem;
  backdrop-filter: blur(8px);
  text-align: center;
}

.chapter-back {
  display: inline-block;
  color: var(--mist);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.chapter-back:hover { opacity: 1; }

.chapter-view-num {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.5rem;
}

.chapter-view-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--gold);
  font-weight: 600;
  line-height: 1.25;
}

.chapter-view-meta {
  font-size: 0.85rem;
  color: rgba(200,184,232,0.5);
  margin-bottom: 1.25rem;
}
.chapter-view-meta span { color: var(--mist); }

.chapter-view-note {
  color: var(--mist);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 2.5rem;
  font-style: italic;
  opacity: 0.8;
}

.chapter-view-links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.chapter-read-btn {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
}

.chapter-view-links .btn-outline { margin-left: 0; }

/* PDF fullscreen mode — expands wrapper to fill viewport */
.chapter-view-wrapper.chapter-pdf-fullscreen {
  max-width: 100%;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.chapter-view-wrapper.chapter-pdf-fullscreen .chapter-view-card {
  max-width: 100%;
  border-radius: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.chapter-view-wrapper.chapter-pdf-fullscreen #chapter-pdf-view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chapter-pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(8,4,16,0.95);
  flex-shrink: 0;
}

.chapter-pdf-back {
  background: none;
  border: none;
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.3rem 0;
  transition: color 0.18s;
  letter-spacing: 0.02em;
}
.chapter-pdf-back:hover { color: #fff; }

.chapter-pdf-download {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.18s;
}
.chapter-pdf-download:hover { color: #fff; }

.chapter-pdf-viewer {
  display: block;
  width: 100%;
  flex: 1;
  min-height: calc(100vh - 48px);
  border: none;
}

/* ── Art gallery page ── */
.gallery-page-wrapper {
  padding: 4rem 3rem;
}

.gallery-page-card {
  max-width: 1100px;
  margin: 0 auto;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 3px solid var(--rose);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  min-height: 600px;
}

.gallery-eyebrow {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rose);
  opacity: 0.8;
  margin: 0 0 0.5rem;
}

.gallery-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(240,192,96,0.55), 0 0 6px rgba(240,192,96,0.25);
  line-height: 1.15;
}

.gallery-rule {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  border-radius: 2px;
  margin: 0.75rem auto 2rem;
}

.gallery-tile-placeholder {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.15);
  font-weight: 300;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.gallery-tile-placeholder:hover {
  border-color: rgba(194, 84, 122, 0.3);
  background: rgba(194, 84, 122, 0.04);
}

/* Sidebar + main layout inside the card */
.gallery-inner {
  display: flex;
  gap: 0;
  min-height: 500px;
  align-items: flex-start;
}

.gallery-sidebar {
  width: 150px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding-right: 1.5rem;
  margin-right: 2rem;
  padding-top: 0.25rem;
}

.gallery-sidebar-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin: 0 0 0.75rem;
}

.gallery-cat {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  text-decoration: none;
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0.2rem;
  transition: background 0.15s, color 0.15s, text-shadow 0.15s;
  text-shadow: 0 0 10px rgba(240,192,96,0.35);
}

.gallery-cat:hover {
  background: rgba(240,192,96,0.07);
  color: #ffe89a;
  text-shadow: 0 0 14px rgba(240,192,96,0.6);
}

.gallery-cat.active {
  background: rgba(240,192,96,0.12);
  color: #ffe89a;
  text-shadow: 0 0 16px rgba(240,192,96,0.7);
  font-weight: 700;
}

.gallery-main {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.gallery-empty-msg {
  grid-column: 1 / -1;
  padding: 3rem 0;
  color: rgba(200,184,232,0.3);
  font-size: 0.95rem;
}

/* 3-column grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  text-align: left;
  align-items: start;
}

/* Wraps the tile + like button so the button can overlay the bottom */
.gallery-tile-wrap {
  position: relative;
}

.gallery-like-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: rgba(255,255,255,0.85);
  font-size: 0.72rem;
  padding: 3px 9px 3px 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 1;
  transition: background 0.15s, color 0.15s;
  pointer-events: auto;
}
.gallery-like-btn:hover { background: rgba(0,0,0,0.78); }
.gallery-like-btn.liked { color: var(--rose); }

.gallery-tile {
  display: block;
  position: relative;
  padding-top: 116.67%; /* 7÷6 = 6:7 portrait ratio */
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.25s, border-color 0.25s;
}

.gallery-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.25);
}

.gallery-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}

.gallery-tile:hover img {
  transform: scale(1.03);
}


/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 60px rgba(0,0,0,0.8);
}

.lightbox-caption {
  color: var(--mist);
  font-size: 0.9rem;
  opacity: 0.7;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.75rem;
  z-index: 2;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* ── Art view (single artwork page) ── */
@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.art-view-wrapper {
  will-change: transform;
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  animation: pageSlideIn 0.22s ease-out both;
}

.art-view-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(200,184,232,0.65);
  font-size: 0.83rem;
  text-decoration: none;
  margin-bottom: 2rem;
  padding: 0.4em 1.1em;
  border: 1px solid rgba(200,184,232,0.18);
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  letter-spacing: 0.04em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.art-view-back:hover {
  color: var(--gold);
  border-color: rgba(212,175,85,0.45);
  background: rgba(212,175,85,0.07);
}

.art-view-image-wrap {
  background: #0d0d0d;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  margin-bottom: 1.75rem;
  text-align: center;
}

.art-view-image-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.art-view-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.art-view-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: #f0c060;
  text-shadow: 0 0 32px rgba(240,192,96,0.45), 0 1px 3px rgba(0,0,0,0.4);
  letter-spacing: 0.04em;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.art-view-cat-tag {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
  background: rgba(194,84,122,0.12);
  border: 1px solid rgba(194,84,122,0.28);
  padding: 0.3em 0.85em;
  border-radius: 20px;
  white-space: nowrap;
}

.art-view-desc {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.4rem 1.75rem;
  margin: 0.25rem 0 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.art-view-desc p {
  margin: 0;
  color: rgba(220,210,240,0.82);
  font-size: 0.93rem;
  line-height: 1.75;
}

.art-view-credit {
  margin-top: 0.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.83rem;
  color: rgba(200,184,232,0.5);
}

.art-view-credit a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.15s;
}
.art-view-credit a:hover { opacity: 0.75; }

.art-view-desc p a {
  color: var(--rose);
  text-decoration: none;
  transition: opacity 0.15s;
}
.art-view-desc p a:hover { opacity: 0.75; }

.art-view-extra-link {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.art-view-extra-link a {
  color: var(--rose);
  text-decoration: none;
  transition: opacity 0.15s;
}
.art-view-extra-link a:hover { opacity: 0.75; }

/* Art view slideshow nav */
.art-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2.5rem;
}
.art-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55em 1.3em;
  border-radius: 24px;
  border: 1px solid rgba(212,175,85,0.28);
  background: rgba(212,175,85,0.05);
  color: var(--gold);
  font-size: 0.83rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  max-width: 48%;
  overflow: hidden;
}
.art-nav-btn:hover {
  background: rgba(212,175,85,0.12);
  border-color: rgba(212,175,85,0.55);
}
.art-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.art-nav-next { margin-left: auto; text-align: right; }

/* Comments section */
.art-view-comments {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2.5rem;
  margin-top: 2.5rem;
}

.comments-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--mist);
  font-weight: 600;
  margin: 0 0 1.5rem;
  letter-spacing: 0.05em;
}

.comment-signin-prompt {
  background: rgba(255,255,255,0.025);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  color: rgba(200,184,232,0.4);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: center;
}

.comment-signin-prompt a {
  color: var(--rose);
  text-decoration: none;
}
.comment-signin-prompt a:hover { text-decoration: underline; }

.comments-empty {
  color: rgba(200,184,232,0.25);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 0;
}

/* Comment form */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.comment-form textarea {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s;
}
.comment-form textarea::placeholder { color: rgba(255,255,255,0.3); }
.comment-form textarea:focus { border-color: rgba(240,192,96,0.45); }

.comment-form-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

.comment-char-count {
  font-size: 0.78rem;
  color: rgba(200,184,232,0.35);
}
.comment-char-count.near-limit { color: var(--rose); }

.comment-submit-btn {
  background: var(--violet);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.55rem 1.25rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.comment-submit-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.comment-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Individual comments */
.comment-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.comment-item:last-child { border-bottom: none; }

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.comment-author {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
}

.comment-time {
  font-size: 0.78rem;
  color: rgba(200,184,232,0.35);
}

.comment-body {
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Spicy comments gate */
.comments-gate {
  background: rgba(255,255,255,0.025);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1.5rem 1.5rem;
  color: rgba(200,184,232,0.4);
  font-size: 0.9rem;
  text-align: center;
}
.comments-gate a {
  color: var(--rose);
  text-decoration: none;
}
.comments-gate a:hover { text-decoration: underline; }

/* ── Profile page ── */
.profile-wrapper {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 3px solid var(--gold);
  border-radius: 16px;
  padding: 2rem 2rem 2.25rem;
}

.profile-card--danger { border-top-color: var(--rose); }
.profile-card--password { border-top-color: var(--violet); }

.profile-card-title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200,184,232,0.5);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.profile-avatar-img,
.profile-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid rgba(240,192,96,0.35);
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.profile-avatar-info { display: flex; flex-direction: column; gap: 0.35rem; }

.profile-avatar-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(200,184,232,0.4);
}

.profile-avatar-btn {
  display: inline-block;
  background: rgba(240,192,96,0.08);
  border: 1px solid rgba(240,192,96,0.28);
  color: var(--gold);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.profile-avatar-btn:hover { background: rgba(240,192,96,0.15); }
.profile-avatar-note { font-size: 0.72rem; color: rgba(200,184,232,0.3); }

.profile-avatar-btn-row { display: flex; gap: 0.5rem; }
.profile-avatar-btn--ghost { background: transparent; }

.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-field { display: flex; flex-direction: column; gap: 0.3rem; }

.profile-field label {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200,184,232,0.45);
}

.profile-field input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.profile-field input:focus { border-color: rgba(240,192,96,0.45); }
.profile-field input::placeholder { color: rgba(255,255,255,0.25); }

.profile-save-btn {
  margin-top: 0.75rem;
  align-self: flex-start;
  background: var(--violet);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.6rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.profile-save-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.profile-save-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.profile-alert {
  font-size: 0.83rem;
  padding: 0.55rem 0.85rem;
  border-radius: 7px;
  margin-top: 0.5rem;
}
.profile-alert--error   { background: rgba(194,84,122,0.15); color: #e8849e; border: 1px solid rgba(194,84,122,0.3); }
.profile-alert--success { background: rgba(80,160,100,0.15); color: #7dd4a0; border: 1px solid rgba(80,160,100,0.3); }

.danger-text {
  color: var(--mist);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  opacity: 0.65;
}

.danger-btn {
  background: rgba(194,84,122,0.12);
  border: 1px solid rgba(194,84,122,0.35);
  color: var(--rose);
  border-radius: 8px;
  padding: 0.6rem 1.4rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.danger-btn:hover { background: rgba(194,84,122,0.22); }

/* ── Comment actions (edit / delete) ── */
.comment-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.comment-action-btn {
  background: none;
  border: none;
  font-size: 0.74rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.comment-action-btn--edit   { color: rgba(200,184,232,0.4); }
.comment-action-btn--edit:hover   { color: var(--mist); background: rgba(255,255,255,0.05); }
.comment-action-btn--delete { color: rgba(194,84,122,0.4); }
.comment-action-btn--delete:hover { color: var(--rose); background: rgba(194,84,122,0.08); }

.comment-edit-area {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
  min-height: 56px;
  outline: none;
  margin-top: 0.4rem;
  transition: border-color 0.2s;
}
.comment-edit-area:focus { border-color: rgba(240,192,96,0.4); }

.comment-edit-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.comment-edit-save {
  background: var(--violet);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  cursor: pointer;
}
.comment-edit-cancel {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--mist);
  border-radius: 5px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
}

@media (max-width: 768px) {
  .profile-wrapper { padding: 2rem 0.75rem 4rem; }
  .profile-card { padding: 1.5rem 1.25rem; }
}

/* ── Characters page ── */
.chars-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.chars-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: rgba(8,8,8,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.4rem 0.6rem 1.4rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,85,0.22) transparent;
}
.chars-sidebar::-webkit-scrollbar { width: 4px; }
.chars-sidebar::-webkit-scrollbar-track { background: transparent; }
.chars-sidebar::-webkit-scrollbar-thumb { background: rgba(212,175,85,0.22); border-radius: 4px; }

.chars-sidebar-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.8rem 0.6rem;
}

.chars-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chars-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55em 0.8em;
  border: none;
  border-left: 2px solid transparent;
  background: transparent;
  color: rgba(200,184,232,0.5);
  font-size: 0.88rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.02em;
}
.chars-tab:hover {
  background: rgba(255,255,255,0.045);
  color: rgba(220,210,240,0.85);
}
.chars-tab.active {
  background: rgba(212,175,85,0.08);
  color: var(--gold);
  border-left-color: var(--gold);
}

/* ── "Ghost slot" — a temporary sidebar entry for a character reached via a
   relationship link who isn't actually part of the current cast list (or
   profile roster). Sits above the persistent list, styled distinctly
   (bright yellow glow, not the gold of a real tab) so it never reads as a
   permanent member — it's replaced or cleared the moment you navigate
   anywhere else. ── */
.chars-ghost-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5d94e;
  margin: 0 0 0.4rem 0.6rem;
  opacity: 0.85;
}
.chars-tab--ghost {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55em 0.8em;
  border: none;
  border-left: 2px solid #f5d94e;
  background: rgba(245,217,78,0.1);
  color: #f5d94e;
  font-size: 0.88rem;
  font-family: 'Lato', sans-serif;
  border-radius: 0 8px 8px 0;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(245,217,78,0.6);
  box-shadow: 0 0 14px rgba(245,217,78,0.25) inset;
  animation: chars-ghost-pulse 2.2s ease-in-out infinite;
}
@keyframes chars-ghost-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(245,217,78,0.25) inset; }
  50% { box-shadow: 0 0 22px rgba(245,217,78,0.5) inset; }
}
.chars-ghost-divider {
  height: 1px; background: rgba(255,255,255,0.1);
  margin: 0.7rem 0.6rem 0.9rem;
}

/* Main profile area */
.chars-main { min-width: 0; overflow-x: hidden; }

.char-profile {
  will-change: transform;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.char-ref-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(10,10,10,0.85);
  border: 1px solid rgba(255,255,255,0.07);
  aspect-ratio: 1 / 1;
}
.char-ref-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.char-ref-placeholder {
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.13);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.char-ref-placeholder span:first-child { font-size: 2rem; opacity: 0.4; }

.char-bio-box {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 1.75rem 2rem;
}

.char-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin: 0 0 0.3rem;
  line-height: 1.1;
  color: #f0c060;
  text-shadow: 0 0 32px rgba(240,192,96,0.45), 0 1px 3px rgba(0,0,0,0.4);
}

.char-role-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
  background: rgba(194,84,122,0.12);
  border: 1px solid rgba(194,84,122,0.28);
  padding: 0.3em 0.85em;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.char-desc { display: flex; flex-direction: column; gap: 0.6rem; }
.char-desc p {
  margin: 0;
  color: rgba(220,210,240,0.82);
  font-size: 0.94rem;
  line-height: 1.8;
}
.char-desc-placeholder {
  color: rgba(255,255,255,0.15) !important;
  font-style: italic;
}
.char-warn-banner {
  display: block;
  background: rgba(194,84,122,0.08);
  border: 1px solid rgba(194,84,122,0.28);
  border-radius: 12px;
  color: rgba(200,184,232,0.65);
  font-size: 0.83rem;
  font-style: italic;
  line-height: 1.65;
  padding: 0.75rem 1.1rem;
  margin-bottom: 0.3rem;
}
.char-warn-banner a { color: var(--rose); text-decoration: none; }
.char-warn-banner a:hover { text-decoration: underline; }

.char-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.char-box {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
}

.char-box-title {
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f0c060;
  text-shadow: 0 0 20px rgba(240,192,96,0.5);
  margin: 0 0 1rem;
  display: block;
}

.char-stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6em 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.char-stat-row:last-child { border-bottom: none; }
.char-stat-label {
  color: #f0c060;
  text-shadow: 0 0 16px rgba(240,192,96,0.4);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.char-stat-value {
  color: rgba(220,210,240,0.82);
  font-size: 0.87rem;
  line-height: 1.65;
  white-space: pre-line;
}

.char-rel-link {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.18s;
}
.char-rel-link:hover {
  color: #fff;
  text-decoration: underline;
}

.char-fact {
  display: flex;
  gap: 0.55rem;
  padding: 0.5em 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.87rem;
  color: rgba(220,210,240,0.82);
  line-height: 1.65;
}
.char-fact:last-child { border-bottom: none; }
.char-fact-bullet {
  color: var(--rose);
  font-size: 0.65em;
  margin-top: 0.38em;
  flex-shrink: 0;
}
.char-fact a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.15s;
}
.char-fact a:hover { opacity: 0.75; }

/* Lore spoiler box */
.char-lore-box {
  background: rgba(18,5,12,0.75);
  border: 1px solid rgba(194,84,122,0.18);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
}

.char-lore-spoiler {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.char-lore-text {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.4s ease;
}
.char-lore-spoiler.revealed .char-lore-text {
  filter: none;
  user-select: auto;
  pointer-events: auto;
}

.char-lore-text p {
  margin: 0;
  color: rgba(220,210,240,0.82);
  font-size: 0.9rem;
  line-height: 1.8;
}

.char-lore-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.22);
  border: none;
  color: rgba(200,184,232,0.6);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: color 0.2s;
}
.char-lore-reveal:hover { color: var(--rose); }
.char-lore-spoiler.revealed .char-lore-reveal { display: none; }

@media (max-width: 820px) {
  .chars-layout {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem 4rem;
    gap: 1rem;
  }
  .chars-sidebar {
    position: sticky;
    top: 64px;
    z-index: 10;
    max-height: none;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 0.9rem 0.75rem 1.1rem;
    border-radius: 0 0 12px 12px;
  }
  .chars-nav-scroller {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .chars-nav-scroller::-webkit-scrollbar { display: none; }
  .chars-nav {
    flex-direction: row;
    gap: 4px;
    width: max-content;
  }
  .chars-tab {
    position: relative;
    border-left: none;
    border-bottom: none;
    border-radius: 8px;
    white-space: nowrap;
    padding: 0.5em 0.9em;
    width: auto;
    text-align: center;
  }
  /* Underline drawn via pseudo-element so it's always centered under the text */
  .chars-tab.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0.9em;
    right: 0.9em;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
  }
  .chars-tab.active {
    border-left-color: transparent;
    border-bottom-color: transparent;
  }
  .char-cards-row { grid-template-columns: 1fr; }
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
  margin-left: auto;
}
.nav-hamburger:hover { background: rgba(240,192,96,0.1); }

/* ── Mobile breakpoint ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Nav */
  nav {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding: 0 1rem;
    align-items: center;
  }
  .nav-brand { padding: 0.9rem 0; font-size: 1rem; }
  .nav-hamburger { display: flex; align-items: center; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0 0.75rem;
    border-top: 1px solid var(--border);
  }
  .nav-links.nav-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.65rem 0.25rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }
  .nav-login {
    border-radius: 6px !important;
    padding: 0.65rem 0.75rem !important;
  }

  /* Nav user dropdown on mobile */
  .nav-user { width: 100%; }
  .nav-user-btn {
    width: 100%;
    text-align: left;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
  }
  .nav-user-dropdown {
    position: static;
    box-shadow: none;
    border-radius: 6px;
    margin-top: 0.25rem;
  }

  /* Nav admin dropdown on mobile */
  .nav-admin { width: 100%; }
  .nav-admin-btn {
    width: 100%;
    text-align: left;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
  }
  .nav-admin-dropdown {
    position: static;
    box-shadow: none;
    border-radius: 6px;
    margin-top: 0.25rem;
  }

  /* Banners */
  .site-banner img { height: 160px; }
  .site-banner-inner { max-height: 160px; }
  .site-banner--hero img { height: 220px; }
  .site-banner--hero .site-banner-inner { max-height: 220px; }

  /* Home nav cards */
  .nav-section-inner { margin: 0 0.75rem; padding: 1.25rem; }
  .nav-cards-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }

  /* Synopsis */
  .synopsis-section { padding: 2rem 0.75rem; }
  .synopsis-row { grid-template-columns: 1fr; }
  .synopsis-inner { padding: 2rem 1.25rem; }
  .synopsis-columns { grid-template-columns: 1fr; gap: 1.5rem; }
  .synopsis-cover { display: none; }

  /* Author / links */
  .author-section { padding: 0 0.75rem 3rem; }
  .author-row { grid-template-columns: 1fr; }
  .author-avatar,
  .author-avatar-placeholder { top: 1rem; right: 1rem; width: 72px; height: 72px; }

  /* Chapters section */
  .chapters-section { padding: 0 0.75rem 3rem; }
  .chapters-row { grid-template-columns: 1fr; }
  .chapters-inner { padding: 1.5rem 1.25rem; }
  .friends-card { padding: 1.5rem 1.25rem; }
  .cr-thumb { width: 56px; height: 56px; }

  /* Chapter hub / view */
  .hub-wrapper { padding: 2rem 0.75rem; }
  .hub-card { padding: 2rem 1.25rem; }
  .chapter-view-wrapper { padding: 2rem 0.75rem; }
  .chapter-view-card { padding: 2rem 1.25rem; }

  /* Gallery */
  .gallery-page-wrapper { padding: 1.5rem 0.75rem; }
  .gallery-page-card { padding: 1.5rem 1.25rem; min-height: unset; }
  .gallery-inner { flex-direction: column; align-items: stretch; }
  .gallery-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-right: 0;
    padding-bottom: 0.75rem;
    margin-right: 0;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
  }
  .gallery-sidebar-label { display: none; }
  .gallery-cat { width: auto; margin-bottom: 0; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }

  /* Art view */
  .art-view-wrapper { padding: 1.5rem 0.75rem 4rem; }

  /* Characters */
  .character-card { grid-template-columns: 1fr; }
  .character-portrait-wrap { width: 100px; height: 100px; }

  /* Auth page */
  .auth-card { flex-direction: column; }
  .auth-divider { width: auto; height: 1px; margin: 0; }
  .auth-panel { padding: 2rem 1.5rem; }

  /* Discord agegate */
  .agegate-card { padding: 2.5rem 1.5rem; }

  /* Section */
  .section { padding: 3rem 1rem; }
}

@media (max-width: 480px) {
  .nav-cards-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
}

/* ── Login / Register page ────────────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: #0a0a0a;
}

.auth-card {
  display: flex;
  width: 100%;
  max-width: 860px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 3px solid var(--rose);
  border-radius: 20px;
  overflow: hidden;
}

.auth-panel {
  flex: 1;
  padding: 2.8rem 2.5rem;
}

.auth-divider {
  width: 1px;
  background: rgba(255,255,255,0.08);
  margin: 2rem 0;
}

.auth-heading {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(240,192,96,0.4);
  margin-bottom: 1.6rem;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  position: relative;
}

.auth-field input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-field input::placeholder { color: rgba(255,255,255,0.3); }
.auth-field input:focus { border-color: rgba(240,192,96,0.5); }

.auth-field--password input { padding-right: 2.8rem; }

.auth-eye {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.3);
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.auth-eye:hover,
.auth-eye--visible { color: var(--gold); }

.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--mist);
  cursor: pointer;
  margin-top: 0.1rem;
}
.auth-remember input[type="checkbox"] { accent-color: var(--gold); }

.auth-btn {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 0.4rem;
}
.auth-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }

.auth-btn--primary {
  background: var(--rose);
  color: #fff;
}

.auth-btn--register {
  background: var(--violet);
  color: #fff;
}

.auth-forgot {
  display: block;
  background: none;
  border: none;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}
.auth-forgot:hover { color: var(--mist); }
.auth-forgot-desc {
  font-size: 0.88rem;
  color: rgba(200,184,232,0.6);
  margin: 0 0 1.1rem;
  line-height: 1.6;
}
.auth-panel--forgot,
.auth-panel--reset { display: flex; flex-direction: column; }

.auth-alert {
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border-radius: 7px;
  margin-bottom: 0.75rem;
}
.auth-alert--error   { background: rgba(194,84,122,0.15); color: #e8849e; border: 1px solid rgba(194,84,122,0.3); }
.auth-alert--info    { background: rgba(107,63,160,0.15); color: var(--mist); border: 1px solid rgba(107,63,160,0.3); }
.auth-alert--success { background: rgba(80,160,100,0.15); color: #7dd4a0; border: 1px solid rgba(80,160,100,0.3); }

.auth-age-notice {
  font-size: 0.8rem;
  color: var(--rose);
  background: rgba(194,84,122,0.1);
  border: 1px solid rgba(194,84,122,0.25);
  border-radius: 7px;
  padding: 0.5rem 0.8rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.auth-age-notice strong { color: #e8849e; }

@media (max-width: 700px) {
  .auth-card { flex-direction: column; }
  .auth-divider { width: auto; height: 1px; margin: 0 2rem; }
}

/* ── Spicy auth gate ──────────────────────────────────────────────────────── */
.spicy-gate {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: #0a0a0a;
}

.spicy-gate-card {
  max-width: 460px;
  text-align: center;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 3px solid var(--rose);
  border-radius: 20px;
  padding: 3rem 2.5rem;
}

.spicy-gate-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.spicy-gate-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(240,192,96,0.4);
  margin-bottom: 1rem;
}

.spicy-gate-text {
  color: var(--mist);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.8rem;
}
.spicy-gate-text strong { color: var(--rose); }

.spicy-gate-btn {
  display: inline-block;
  background: var(--rose);
  color: #fff;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.spicy-gate-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── Inbox page ────────────────────────────────────────────────────────────── */
.inbox-wrap {
  max-width: none;
  margin: 0;
  padding: 2rem 2.5rem 5rem 1.5rem;
}

/* Auth gate */
.inbox-gate {
  display: flex;
  justify-content: center;
  padding: 6rem 1rem;
}
.inbox-gate-card {
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 400px;
}
.inbox-gate-icon { font-size: 2.8rem; margin: 0 0 1rem; }
.inbox-gate-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: #f0c060;
  text-shadow: 0 0 24px rgba(240,192,96,0.4);
  margin: 0 0 0.6rem;
}
.inbox-gate-sub { color: rgba(200,184,232,0.7); font-size: 0.93rem; margin: 0 0 1.8rem; }

/* Layout */
.inbox-app-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* Sidebar */
.inbox-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  padding: 1.5rem 1rem 1.2rem;
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
  backdrop-filter: blur(12px);
}

/* User block */
.inbox-user-block {
  text-align: center;
  padding-bottom: 1.1rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.inbox-pfp {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.65rem;
  border: 2px solid rgba(240,192,96,0.3);
}
.inbox-pfp-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.65rem;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(240,192,96,0.3);
}
.inbox-sidebar-username {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--mist);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar rule */
.inbox-sidebar-rule {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.5rem 0;
}

/* Tabs (sidebar-style) */
.inbox-tab {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: rgba(200,184,232,0.6);
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.inbox-tab:hover { background: rgba(255,255,255,0.05); color: var(--mist); }
.inbox-tab.active { background: rgba(240,192,96,0.1); color: #f0c060; }

/* New Message button */
.inbox-tab--compose {
  text-align: center;
  background: rgba(240,192,96,0.07);
  border: 1px solid rgba(240,192,96,0.28);
  border-radius: 12px;
  color: #f0c060;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.inbox-tab--compose:hover { background: rgba(240,192,96,0.13); border-color: rgba(240,192,96,0.5); color: #f0c060; }
.inbox-tab--compose.active { background: rgba(240,192,96,0.17); border-color: rgba(240,192,96,0.6); color: #f0c060; }

/* Disabled tab */
.inbox-tab--disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* Admin tab */
.inbox-tab--admin { color: var(--rose); }
.inbox-tab--admin:hover { background: rgba(194,84,122,0.08); color: var(--rose); }
.inbox-tab--admin.active { background: rgba(194,84,122,0.12); color: var(--rose); }

/* Content area */
.inbox-content { flex: 1; min-width: 0; }

/* Message list */
.inbox-list { display: flex; flex-direction: column; gap: 1rem; }
.inbox-loading { color: rgba(200,184,232,0.4); font-size: 0.88rem; padding: 1rem 0; }
.inbox-empty {
  text-align: center;
  color: rgba(200,184,232,0.35);
  font-size: 0.9rem;
  padding: 3rem 1rem;
  border: 1px dashed rgba(255,255,255,0.07);
  border-radius: 14px;
}
.inbox-guest-note {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
  backdrop-filter: blur(12px);
}
.inbox-guest-note p {
  color: rgba(200,184,232,0.75);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 1.6rem;
}
.inbox-guest-register {
  display: inline-block;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.7rem 2.2rem;
  transition: opacity 0.2s, transform 0.15s;
}
.inbox-guest-register:hover { opacity: 0.88; transform: translateY(-1px); }

/* Message card */
.inbox-msg-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  transition: border-color 0.2s;
}
.inbox-msg-card:hover { border-color: rgba(255,255,255,0.14); }
.inbox-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.inbox-msg-from { font-size: 0.8rem; font-weight: 700; color: #f0c060; letter-spacing: 0.04em; }
.inbox-msg-time { font-size: 0.76rem; color: rgba(200,184,232,0.38); white-space: nowrap; }
.inbox-msg-body { margin: 0; color: rgba(220,210,240,0.85); font-size: 0.93rem; line-height: 1.75; white-space: pre-wrap; }
.inbox-msg-attach { margin-top: 0.9rem; }
.inbox-msg-attach-img { max-width: 100%; max-height: 340px; border-radius: 10px; object-fit: cover; display: block; }
.inbox-msg-attach-link { color: var(--rose); font-size: 0.88rem; text-decoration: none; }
.inbox-msg-attach-link:hover { text-decoration: underline; }
.inbox-msg-attach-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.inbox-msg-attach-grid .inbox-msg-attach-img { max-height: 200px; max-width: 220px; width: auto; border-radius: 10px; object-fit: cover; }
.inbox-msg-attach-grid video.inbox-msg-attach-img { max-height: 220px; max-width: 260px; }

/* Unified input box (compose + reply) */
.unified-input-box {
  border: 1px solid rgba(180,140,255,0.22);
  border-radius: 14px;
  background: rgba(10,6,22,0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.unified-textarea {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  resize: none;
  padding: 0.85rem 1rem 0.5rem;
  color: rgba(220,210,240,0.9);
  font-size: 0.95rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 90px;
}
.unified-textarea:focus { box-shadow: none; }
.unified-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 0.85rem 0.5rem;
  min-height: 0;
}
.unified-input-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid rgba(180,140,255,0.12);
  background: rgba(0,0,0,0.18);
}
.unified-attach-btn {
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.22rem 0.45rem;
  border-radius: 8px;
  transition: background 0.15s;
  user-select: none;
}
.unified-attach-btn:hover { background: rgba(180,140,255,0.15); }
.unified-attach-count {
  font-size: 0.76rem;
  color: rgba(200,184,232,0.45);
  min-width: 2.5ch;
}

/* Compose preview thumbnails inside unified box */
.compose-preview-item {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(180,140,255,0.18);
}
.compose-preview-thumb {
  display: block;
  max-height: 90px;
  max-width: 120px;
  width: auto;
  object-fit: cover;
  border-radius: 8px;
}
.compose-preview-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 60px;
  font-size: 1.6rem;
}
.compose-preview-name {
  font-size: 0.68rem;
  color: rgba(200,184,232,0.55);
  padding: 0.15rem 0.35rem 0.2rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compose-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.68);
  border: none;
  border-radius: 50%;
  color: #fff;
  width: 20px;
  height: 20px;
  font-size: 0.68rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.compose-preview-remove:hover { background: var(--rose); }

/* Panels */
.inbox-panel { animation: fadeInUp 0.18s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Compose */
.compose-box {
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
  backdrop-filter: blur(12px);
}
.compose-to-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 1rem;
}
.compose-to-label { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(200,184,232,0.45); }
.compose-to-name { font-size: 0.95rem; color: #f0c060; font-weight: 700; }
.compose-prompt { color: rgba(200,184,232,0.6); font-size: 0.88rem; margin: 0 0 1rem; line-height: 1.6; }
.compose-textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-size: 0.93rem;
  line-height: 1.7;
  padding: 0.85rem 1rem;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.compose-textarea:focus { outline: none; border-color: rgba(240,192,96,0.4); }
.compose-char-row { text-align: right; margin: 0.35rem 0 0.9rem; }
.compose-chars { font-size: 0.78rem; color: rgba(200,184,232,0.35); }
.compose-chars--warn { color: var(--rose); }
.compose-attach-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.compose-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: rgba(200,184,232,0.7);
  font-size: 0.82rem;
  padding: 0.38rem 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.compose-attach-btn:hover { background: rgba(255,255,255,0.09); color: var(--mist); }
.compose-file-name { font-size: 0.82rem; color: rgba(200,184,232,0.6); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-file-clear { background: none; border: none; color: rgba(200,184,232,0.4); cursor: pointer; font-size: 0.9rem; padding: 0; }
.compose-file-clear:hover { color: var(--rose); }
.compose-file-hint { font-size: 0.77rem; color: rgba(200,184,232,0.28); margin: 0 0 1.2rem; }
.compose-feedback {
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.compose-feedback--error   { background: rgba(194,84,122,0.12); color: #e8849e; border: 1px solid rgba(194,84,122,0.25); }
.compose-feedback--success { background: rgba(80,180,120,0.1);  color: #7ecfa8; border: 1px solid rgba(80,180,120,0.22); }
.compose-send-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.7rem 2rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.compose-send-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.compose-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Compose: subject input */
.compose-subject-row { margin-bottom: 0.85rem; }
.compose-subject-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(240,192,96,0.22);
  border-radius: 10px;
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.compose-subject-input::placeholder { color: rgba(200,184,232,0.3); font-weight: 400; }
.compose-subject-input:focus { outline: none; border-color: rgba(240,192,96,0.45); }

/* Thread cards (clickable list items) */
.inbox-thread-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1rem 1.3rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  user-select: none;
  opacity: 0.72;
}
.inbox-thread-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.15); opacity: 1; }
.inbox-thread-card--unread {
  background: rgba(18, 12, 34, 0.92);
  border: 1px solid rgba(200,160,255,0.5);
  box-shadow: 0 0 22px rgba(147,112,219,0.28), inset 0 0 18px rgba(30,10,60,0.4);
  opacity: 1;
}
.inbox-thread-card--unread:hover { background: rgba(28, 18, 52, 0.97); border-color: rgba(220,180,255,0.7); }
.inbox-thread-card--unread .inbox-tc-subject { color: #f0e6ff; font-weight: 800; }
.inbox-thread-card--unread .inbox-tc-preview { color: rgba(220,200,255,0.65); }
/* Read messages — transparent with soft purple border */
.inbox-thread-card--read {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(147,112,219,0.22);
  opacity: 0.6;
}
.inbox-thread-card--read:hover { opacity: 0.9; background: rgba(147,112,219,0.06); border-color: rgba(147,112,219,0.4); }
.inbox-tc-opened-at { font-size: 0.72rem; color: rgba(160,130,210,0.45); margin-top: 0.28rem; font-style: italic; }
/* Card outer wrapper (checkbox + body) */
.inbox-tc-outer { display: flex; align-items: flex-start; gap: 0.7rem; }
.inbox-tc-checkbox { margin-top: 0.3rem; width: 16px; height: 16px; accent-color: var(--violet); cursor: pointer; flex-shrink: 0; }
.inbox-tc-body { flex: 1; min-width: 0; cursor: pointer; }
/* Delete toolbar */
/* Floating trash FAB — appears when cards are selected */
.inbox-float-trash {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: rgba(160, 30, 30, 0.88);
  border: 1px solid rgba(220, 80, 80, 0.45);
  border-radius: 50px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  transition: background 0.15s, transform 0.12s;
}
.inbox-float-trash:hover { background: rgba(200, 40, 40, 0.95); transform: scale(1.05); }
.inbox-float-trash-count {
  font-size: 0.85rem;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 0.1rem 0.5rem;
  min-width: 1.4em;
  text-align: center;
}
.inbox-trash-restored {
  padding: 0.6rem 0.8rem;
  color: rgba(140,220,160,0.9);
  font-size: 0.88rem;
  font-style: italic;
}
/* Trash card extras */
.inbox-tc-trash-meta { font-size: 0.73rem; color: rgba(210,130,130,0.5); margin-top: 0.22rem; }
.inbox-trash-actions { display: flex; gap: 0.5rem; margin-top: 0.55rem; }
.inbox-trash-restore-btn, .inbox-trash-delete-btn {
  border: none; border-radius: 8px; font-size: 0.78rem; font-weight: 700;
  padding: 0.25rem 0.75rem; cursor: pointer; transition: background 0.15s;
}
.inbox-trash-restore-btn { background: rgba(60,160,90,0.28); color: #a8f0bc; }
.inbox-trash-restore-btn:hover { background: rgba(60,160,90,0.55); }
.inbox-trash-delete-btn { background: rgba(160,30,30,0.28); color: #f0a0a0; }
.inbox-trash-delete-btn:hover { background: rgba(180,30,30,0.55); }
.inbox-tc-new-banner {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f0c060;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 10px rgba(240,192,96,0.5);
}
.inbox-tc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.3rem; }
.inbox-tc-from { font-size: 0.78rem; font-weight: 700; color: var(--gold); letter-spacing: 0.04em; text-transform: uppercase; }
.inbox-tc-time { font-size: 0.74rem; color: rgba(200,184,232,0.35); white-space: nowrap; }
.inbox-tc-subject { font-size: 1rem; font-weight: 700; color: rgba(220,210,240,0.95); margin-bottom: 0.2rem; }
.inbox-tc-preview { font-size: 0.85rem; color: rgba(200,184,232,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-tc-badge {
  display: inline-block;
  background: var(--gold);
  color: #1a0a2e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.1em 0.5em;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 0.4em;
}

/* Thread view */
.inbox-thread-wrap { display: flex; flex-direction: column; height: 100%; gap: 1rem; }
.inbox-thread-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.inbox-thread-back {
  background: none;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
  color: rgba(200,184,232,0.7);
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.inbox-thread-back:hover { background: rgba(255,255,255,0.06); color: var(--mist); }
.inbox-thread-subject { font-size: 1.05rem; font-weight: 700; color: rgba(220,210,240,0.95); margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-thread-messages {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,85,0.2) transparent;
}
.inbox-thread-messages::-webkit-scrollbar { width: 4px; }
.inbox-thread-messages::-webkit-scrollbar-thumb { background: rgba(212,175,85,0.2); border-radius: 4px; }

/* Message bubbles */
.inbox-bubble {
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
.inbox-bubble--admin {
  background: rgba(123,94,167,0.18);
  border: 1px solid rgba(123,94,167,0.35);
  align-self: flex-start;
}
.inbox-bubble--user {
  background: rgba(20,20,40,0.65);
  border: 1px solid rgba(255,255,255,0.1);
  align-self: flex-start;
}
.inbox-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.inbox-bubble-sender { font-size: 0.8rem; font-weight: 700; color: var(--gold); letter-spacing: 0.04em; }
.inbox-bubble-date   { font-size: 0.74rem; color: rgba(200,184,232,0.35); white-space: nowrap; }
.inbox-bubble-body   { margin: 0; color: rgba(220,210,240,0.88); font-size: 0.93rem; line-height: 1.75; white-space: pre-wrap; }

/* Thread reply box */
.inbox-thread-reply {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.9rem;
}
.inbox-thread-reply-area {
  width: 100%;
  min-height: 80px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 10px;
  color: var(--light);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.inbox-thread-reply-area:focus { outline: none; border-color: rgba(240,192,96,0.4); }
.inbox-thread-reply-foot { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 0.6rem; }
.inbox-thread-reply-fb  { font-size: 0.82rem; color: rgba(200,184,232,0.55); flex: 1; }
.inbox-thread-reply-btn {
  background: linear-gradient(135deg, var(--violet), var(--rose));
  color: #fff;
  border: none;
  border-radius: 24px;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.5rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}
.inbox-thread-reply-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.inbox-thread-reply-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.inbox-thread-reply-attach {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  flex-wrap: wrap;
}
.inbox-media-preview {
  margin: 0.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-block;
  max-width: 100%;
}
.inbox-media-preview-img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
}

/* Nav inbox unread badge */
.nav-inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e53935;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}

/* Keep old msg-card styles for any remaining references */
.inbox-msg-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  transition: border-color 0.2s;
}
.inbox-msg-card:hover { border-color: rgba(255,255,255,0.14); }
.inbox-msg-header { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.55rem; }
.inbox-msg-from { font-size: 0.8rem; font-weight: 700; color: #f0c060; letter-spacing: 0.04em; }
.inbox-msg-time { font-size: 0.76rem; color: rgba(200,184,232,0.38); white-space: nowrap; }
.inbox-msg-body { margin: 0; color: rgba(220,210,240,0.85); font-size: 0.93rem; line-height: 1.75; white-space: pre-wrap; }
.inbox-msg-attach { margin-top: 0.9rem; }
.inbox-msg-attach-img { max-width: 100%; max-height: 340px; border-radius: 10px; object-fit: cover; display: block; }
.inbox-msg-attach-link { color: var(--rose); font-size: 0.88rem; text-decoration: none; }
.inbox-msg-attach-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .inbox-wrap { padding: 1.5rem 1rem 4rem; }
  .inbox-app-layout { flex-direction: column; }
  .inbox-sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 1rem; }
  .inbox-user-block { display: flex; align-items: center; gap: 0.75rem; text-align: left; padding-bottom: 0; margin-bottom: 0; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.07); padding-right: 0.75rem; margin-right: 0.25rem; }
  .inbox-pfp, .inbox-pfp-fallback { width: 40px; height: 40px; font-size: 1rem; margin: 0; }
  .inbox-sidebar-rule { display: none; }
  .inbox-tab--compose { margin-bottom: 0; }
  .compose-box { padding: 1.4rem 1.1rem; }
  .inbox-thread-messages { max-height: 360px; }
}

/* â”€â”€ Community page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.community-wrap { max-width: none; margin: 0; padding: 2rem 2.5rem 5rem 1.5rem; }
.community-layout { display: flex; gap: 1.5rem; align-items: flex-start; }

/* Sidebar column — sidebar box + friends box stacked at the same width */
.community-side-col {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 5rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}

/* Sidebar */
.community-sidebar {
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  padding: 1.5rem 1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
  backdrop-filter: blur(12px);
}
.community-user-block { text-align: center; padding-bottom: 1.1rem; margin-bottom: 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.community-sidebar-username { font-size: 0.88rem; font-weight: 700; color: var(--mist); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-sidebar-rule { height: 1px; background: rgba(255,255,255,0.08); margin: 0.5rem 0; }
.community-sidebar-section-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(200,184,232,0.35); margin: 0.3rem 0 0.5rem; }

/* Friends' stories box — same visual treatment as the sidebar, stacked below it */
.community-friends-box {
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  padding: 1.25rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
  backdrop-filter: blur(12px);
}
.community-friends-box-title { font-size: 0.85rem; font-weight: 700; color: var(--mist); margin: 0; line-height: 1.4; }
.community-friends-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.community-friends-link {
  display: block;
  font-size: 0.82rem;
  color: #f0c060;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.community-friends-link:hover { background: rgba(255,255,255,0.06); color: #f8d87a; }

/* Avatar sizes */
.community-avatar-lg, .community-avatar-fallback-lg { width: 72px; height: 72px; border-radius: 50%; display: block; margin: 0 auto 0.65rem; border: 2px solid rgba(240,192,96,0.3); object-fit: cover; }
.community-avatar-fallback-lg { background: linear-gradient(135deg, var(--violet), var(--rose)); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; font-weight: 700; color: #fff; }
.community-avatar-md, .community-avatar-fallback-md { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 1.5px solid rgba(255,255,255,0.1); }
.community-avatar-fallback-md { background: linear-gradient(135deg, var(--violet), var(--rose)); display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; color: #fff; }
.community-avatar-sm, .community-avatar-fallback-sm { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.community-avatar-fallback-sm { background: linear-gradient(135deg, var(--violet), var(--rose)); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: #fff; }

/* Tag filter pills */
.community-tag-filters { display: flex; flex-direction: column; gap: 0.15rem; }
.community-tag-pill { display: block; width: 100%; text-align: left; background: transparent; border: none; border-radius: 10px; color: rgba(200,184,232,0.6); font-family: 'Lato', sans-serif; font-size: 0.84rem; padding: 0.55rem 0.85rem; cursor: pointer; transition: background 0.18s, color 0.18s; }
.community-tag-pill:hover { background: rgba(255,255,255,0.05); color: var(--mist); }
.community-tag-pill--active { background: rgba(255,255,255,0.07); color: #fff; border: 1px solid transparent; }

/* Guest card */
.community-guest-card { background: rgba(0,0,0,0.72); border: 1px solid rgba(255,255,255,0.13); border-radius: 18px; padding: 2rem; text-align: center; margin-bottom: 1.5rem; box-shadow: 0 8px 32px rgba(0,0,0,0.55); backdrop-filter: blur(12px); }
.community-guest-card p { color: rgba(200,184,232,0.75); font-size: 0.93rem; line-height: 1.7; margin: 0 0 1.4rem; }
.community-guest-register { display: inline-block; background: linear-gradient(135deg, var(--violet), var(--rose)); color: #fff; text-decoration: none; border-radius: 30px; font-family: 'Lato', sans-serif; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.65rem 2rem; transition: opacity 0.2s, transform 0.15s; }
.community-guest-register:hover { opacity: 0.88; transform: translateY(-1px); }

/* Compose card */
.community-main { flex: 1; min-width: 0; }
.community-compose-card { background: rgba(0,0,0,0.72); border: 1px solid rgba(255,255,255,0.13); border-radius: 18px; padding: 1.4rem 1.5rem 1.2rem; margin-bottom: 1.5rem; box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset; backdrop-filter: blur(12px); }
.community-compose-row { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 0.9rem; }
.community-compose-textarea { flex: 1; min-height: 80px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: var(--light); font-family: 'Lato', sans-serif; font-size: 0.93rem; line-height: 1.6; padding: 0.7rem 0.9rem; resize: vertical; transition: border-color 0.2s; box-sizing: border-box; }
.community-compose-textarea:focus { outline: none; border-color: rgba(240,192,96,0.4); }
.community-compose-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.community-compose-tag-btn { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; color: rgba(200,184,232,0.55); font-family: 'Lato', sans-serif; font-size: 0.78rem; padding: 0.3rem 0.8rem; cursor: pointer; transition: background 0.18s, color 0.18s; }
.community-compose-tag-btn.selected { background: rgba(255,255,255,0.09); color: #fff; }
/* .community-compose-footer overridden below */
.community-attach-btn { display: inline-flex; align-items: center; gap: 0.3rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; color: rgba(200,184,232,0.65); font-size: 0.8rem; padding: 0.35rem 0.9rem; cursor: pointer; transition: background 0.2s; }
.community-attach-btn:hover { background: rgba(255,255,255,0.09); }
.community-file-name { font-size: 0.8rem; color: rgba(200,184,232,0.5); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-file-clear { background: none; border: none; color: rgba(200,184,232,0.35); cursor: pointer; font-size: 0.85rem; padding: 0; }
.community-file-clear:hover { color: var(--rose); }
.community-char-count { font-size: 0.76rem; color: rgba(200,184,232,0.3); margin-left: auto; }
.community-submit-btn { background: linear-gradient(135deg, var(--violet), var(--rose)); color: #fff; border: none; border-radius: 30px; font-family: 'Lato', sans-serif; font-size: 0.88rem; font-weight: 700; letter-spacing: 0.05em; padding: 0.55rem 1.6rem; cursor: pointer; transition: opacity 0.2s, transform 0.15s; }
.community-submit-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.community-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.community-compose-error { font-size: 0.83rem; color: #e8849e; margin-top: 0.6rem; }

/* Feed */
.community-feed { display: flex; flex-direction: column; gap: 0.5rem; max-width: 720px; margin: 0 auto; }
.community-loading { color: rgba(200,184,232,0.35); font-size: 0.88rem; padding: 1.5rem 0; }
.community-empty { text-align: center; color: rgba(200,184,232,0.3); font-size: 0.9rem; padding: 3rem 1rem; border: 1px dashed rgba(255,255,255,0.07); border-radius: 14px; }

/* Post card */
.community-post { background: rgba(12,6,24,0.88); border: 1px solid rgba(255,255,255,0.09); border-radius: 14px; padding: 1.2rem 1.4rem; transition: border-color 0.2s; }
.community-post:hover { border-color: rgba(167,139,250,0.22); }
.community-post--pinned { border-color: rgba(240,192,96,0.3); background: rgba(14,8,22,0.92); }
.community-post--open { border-color: rgba(167,139,250,0.3); }
.community-post-header { display: flex; align-items: flex-start; gap: 0.8rem; margin-bottom: 0.85rem; }
.community-post-meta { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.community-post-author { font-size: 0.88rem; font-weight: 700; color: var(--mist); }
.community-post-author--admin { color: #f0c060; text-shadow: 0 0 16px rgba(240,192,96,0.4); }
.community-post-tag { font-size: 0.72rem; font-weight: 600; padding: 0.18rem 0.6rem; border-radius: 20px; border: 1px solid; letter-spacing: 0.04em; }
.community-post-time { font-size: 0.74rem; color: rgba(200,184,232,0.35); margin-left: auto; white-space: nowrap; }
.community-post-header-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.community-pin-badge { font-size: 0.72rem; color: #f0c060; background: rgba(240,192,96,0.1); border: 1px solid rgba(240,192,96,0.3); border-radius: 20px; padding: 0.15rem 0.55rem; white-space: nowrap; }
.community-post-delete { background: none; border: none; color: rgba(200,184,232,0.2); cursor: pointer; font-size: 0.88rem; padding: 0.3rem 0.45rem; border-radius: 8px; transition: color 0.2s, background 0.2s; }
.community-post-delete:hover { color: var(--rose); background: rgba(194,84,122,0.1); }
.community-post-body { margin: 0 0 0.85rem; color: rgba(220,210,240,0.88); font-size: 0.93rem; line-height: 1.75; white-space: pre-wrap; }
.community-post-img { max-width: 100%; max-height: 420px; border-radius: 12px; object-fit: cover; display: block; margin-bottom: 0.85rem; }

/* Actions */
.community-post-actions { display: flex; gap: 1rem; padding-top: 0.5rem; border-top: 1px solid rgba(255,255,255,0.06); }
.community-action { background: none; border: none; color: rgba(200,184,232,0.45); font-family: 'Lato', sans-serif; font-size: 0.84rem; cursor: pointer; padding: 0.3rem 0.5rem; border-radius: 8px; transition: background 0.18s, color 0.18s; display: flex; align-items: center; gap: 0.3rem; }
.community-action:hover { background: rgba(255,255,255,0.05); color: var(--mist); }
.community-action--liked { color: #c2547a; }
.community-action--liked:hover { color: #c2547a; }

/* Comments */
.community-comments-wrap { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 0.75rem; }
.community-comment { display: flex; gap: 0.65rem; align-items: flex-start; }
.community-comment-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.community-comment-main { width: 100%; }
.community-comment-top { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.2rem; }
.community-comment-author { font-size: 0.8rem; font-weight: 700; color: var(--mist); }
.community-comment-time { font-size: 0.72rem; color: rgba(200,184,232,0.3); }
.community-comment-body { margin: 0; color: rgba(220,210,240,0.78); font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; }
.community-comment-guest { font-size: 0.84rem; color: rgba(200,184,232,0.4); margin: 0; }
.community-comment-guest a { color: var(--rose); text-decoration: none; }
.community-comment-input-row { display: flex; gap: 0.6rem; align-items: flex-start; padding-top: 0.4rem; }
.community-comment-textarea { flex: 1; min-height: 52px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: var(--light); font-family: 'Lato', sans-serif; font-size: 0.86rem; padding: 0.5rem 0.75rem; resize: vertical; box-sizing: border-box; transition: border-color 0.2s; }
.community-comment-textarea:focus { outline: none; border-color: rgba(240,192,96,0.35); }
.community-comment-submit { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); border-radius: 20px; color: var(--mist); font-family: 'Lato', sans-serif; font-size: 0.8rem; padding: 0.4rem 1rem; cursor: pointer; white-space: nowrap; transition: background 0.2s; align-self: flex-start; margin-top: 4px; }
.community-comment-submit:hover:not(:disabled) { background: rgba(255,255,255,0.12); }
.community-comment-err { font-size: 0.78rem; color: #e8849e; align-self: center; }

/* Load more */
.community-load-more { display: block; margin: 1rem auto 0; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; color: rgba(200,184,232,0.6); font-family: 'Lato', sans-serif; font-size: 0.86rem; padding: 0.6rem 2rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.community-load-more:hover { background: rgba(255,255,255,0.09); color: var(--mist); }

/* Search + quick-filter row */
.community-search-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.community-search-input { width: 270px; flex-shrink: 0; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.12); border-radius: 30px; color: var(--light); font-family: 'Lato', sans-serif; font-size: 0.9rem; padding: 0.6rem 1.1rem; backdrop-filter: blur(8px); transition: border-color 0.2s; }
.community-search-input:focus { outline: none; border-color: rgba(240,192,96,0.4); }
.community-search-input::placeholder { color: rgba(200,184,232,0.35); }
.community-search-header { font-size: 0.8rem; color: rgba(200,184,232,0.4); margin-bottom: 0.75rem; letter-spacing: 0.04em; }
.community-quick-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.community-quick-pill { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 20px; color: rgba(200,184,232,0.55); font-family: 'Lato', sans-serif; font-size: 0.8rem; padding: 0.35rem 0.85rem; cursor: pointer; transition: background 0.18s, color 0.18s; white-space: nowrap; }
.community-quick-pill:hover { background: rgba(255,255,255,0.07); color: var(--mist); }
.community-quick-pill--active { background: rgba(255,255,255,0.09); color: #fff; }

/* Create Post button in sidebar */
.community-create-post-btn { display: block; width: 100%; background: linear-gradient(135deg, var(--violet), var(--rose)); border: none; border-radius: 20px; color: #fff; font-family: 'Lato', sans-serif; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; padding: 0.6rem 1rem; cursor: pointer; transition: opacity 0.2s, transform 0.15s; margin-bottom: 0.4rem; }
.community-create-post-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.community-create-post-btn--active { opacity: 0.7; }
.community-sidebar-search-btn { display: block; width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; color: rgba(200,184,232,0.6); font-family: 'Lato', sans-serif; font-size: 0.84rem; padding: 0.5rem 1rem; cursor: pointer; transition: background 0.18s, color 0.18s; text-align: center; }
.community-sidebar-search-btn:hover { background: rgba(255,255,255,0.09); color: var(--mist); }

/* Sidebar rules */
.community-rules { margin: 0; padding: 0 0 0 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.community-rules li { font-size: 0.78rem; color: rgba(200,184,232,0.55); line-height: 1.55; }

/* Compose modal overlay */
.community-compose-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.community-compose-modal[hidden] { display: none; }
.community-compose-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.community-compose-modal-inner { position: relative; z-index: 1; width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; }
.community-compose-modal-inner .community-compose-card { margin: 0; }
.community-compose-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.community-compose-modal-title { font-size: 0.9rem; font-weight: 700; color: rgba(200,184,232,0.6); letter-spacing: 0.06em; text-transform: uppercase; }
.community-compose-discard { background: none; border: none; color: #e8849e; font-family: 'Lato', sans-serif; font-size: 0.82rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 6px; transition: background 0.18s; }
.community-compose-discard:hover { background: rgba(194,84,122,0.12); }

/* Post view modal */
.post-modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; }
.post-modal[hidden] { display: none; }
.post-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.post-modal-inner { position: relative; z-index: 1; width: 100%; max-width: 680px; background: rgba(10,5,20,0.97); border: 1px solid rgba(255,255,255,0.11); border-radius: 18px; padding: 1.6rem 1.8rem 1.8rem; box-shadow: 0 20px 60px rgba(0,0,0,0.8); margin: auto; }
.post-modal-close { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,0.07); border: none; border-radius: 50%; width: 32px; height: 32px; color: rgba(200,184,232,0.6); font-size: 0.88rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.18s, color 0.2s; }
.post-modal-close:hover { background: rgba(255,255,255,0.13); color: #fff; }
.post-modal-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; padding-right: 2.5rem; }
.post-modal-time-label { font-size: 0.76rem; color: rgba(200,184,232,0.38); margin: 0.2rem 0 0.7rem; letter-spacing: 0.01em; }
.post-modal-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 1.1rem 0; }
.post-modal-actions { display: flex; gap: 0.75rem; }
.post-modal-action-btn { display: flex; align-items: center; gap: 0.3rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: rgba(200,184,232,0.7); font-family: 'Lato', sans-serif; font-size: 0.95rem; font-weight: 600; padding: 0.55rem 1.1rem; cursor: pointer; transition: background 0.18s, color 0.2s, border-color 0.2s; }
.post-modal-action-btn:hover { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.28); color: #fff; }
.post-modal-action-btn--liked { color: #e87a9f; border-color: rgba(232,122,159,0.35); background: rgba(232,122,159,0.08); }
.post-modal-action-btn--liked:hover { background: rgba(232,122,159,0.14); }
.post-modal-action-btn--passive { cursor: default; }
.post-modal-action-btn--passive:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: rgba(200,184,232,0.7); }
.post-modal-comments { display: flex; flex-direction: column; gap: 0; }
.post-modal-empty { font-size: 0.88rem; color: rgba(200,184,232,0.42); font-style: italic; text-align: center; padding: 1.2rem 0 0.4rem; }

/* Timestamp in post cards */
.community-post-time-stamp { margin-left: auto; font-size: 0.75rem; color: rgba(200,184,232,0.32); letter-spacing: 0.01em; white-space: nowrap; }

/* Multi-tag selected pills row */
.community-selected-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-bottom: 0.65rem; flex-shrink: 0; }
.community-selected-tag-pill { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid; border-radius: 20px; padding: 0.22rem 0.5rem 0.22rem 0.7rem; font-size: 0.78rem; font-family: 'Lato', sans-serif; }
.community-selected-tag-remove { background: none; border: none; padding: 0; cursor: pointer; color: inherit; opacity: 0.55; font-size: 0.72rem; line-height: 1; display: flex; align-items: center; transition: opacity 0.15s; }
.community-selected-tag-remove:hover { opacity: 1; }
/* Tag option checkmark column */
.community-tag-option-check { display: inline-block; width: 1.1em; font-weight: 700; }
.community-tag-option--selected { background: rgba(167,139,250,0.1); }

/* Compose image preview */
.community-compose-preview { margin: 0.6rem 0 0.2rem; }
.community-compose-img-grid { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.community-compose-img-item { position: relative; border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.community-compose-preview-img { max-height: 150px; max-width: 180px; width: auto; border-radius: 10px; display: block; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.community-compose-preview-remove { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.65); border: none; border-radius: 50%; color: #fff; width: 22px; height: 22px; font-size: 0.72rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.18s; }
.community-compose-preview-remove:hover { background: var(--rose); }

/* GIF button */
.community-gif-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; color: rgba(200,184,232,0.65); font-family: 'Lato', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.32rem 0.6rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.community-gif-btn:hover { background: rgba(255,255,255,0.09); color: #fff; }

/* File count indicator */
.community-file-count { font-size: 0.78rem; color: rgba(200,184,232,0.45); min-width: 22px; }

/* GIF picker — floating popover */
.community-gif-picker { position: fixed; z-index: 400; background: rgba(15,10,26,0.97); border: 1px solid rgba(255,255,255,0.13); border-radius: 14px; box-shadow: 0 14px 48px rgba(0,0,0,0.75); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: hidden; display: flex; flex-direction: column; }
.community-gif-picker[hidden] { display: none; }
.community-gif-picker-top { padding: 0.6rem 0.7rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.community-gif-search { width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.11); border-radius: 8px; color: var(--light); font-family: 'Lato', sans-serif; font-size: 0.88rem; padding: 0.42rem 0.75rem; outline: none; transition: border-color 0.2s; }
.community-gif-search:focus { border-color: rgba(167,139,250,0.5); }
.community-gif-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(200,184,232,0.4); padding: 0.45rem 0.75rem 0.2rem; }
.community-gif-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; max-height: 320px; overflow-y: auto; padding: 3px; }
.community-gif-item { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer; border-radius: 4px; display: block; transition: opacity 0.14s, transform 0.11s; }
.community-gif-item:hover { opacity: 0.8; transform: scale(0.95); }
.community-gif-loading { grid-column: 1 / -1; text-align: center; color: rgba(200,184,232,0.38); font-size: 0.82rem; padding: 2rem; }

/* Post multi-image grid */
.community-post-img-grid { display: grid; gap: 3px; margin-bottom: 0.85rem; border-radius: 12px; overflow: hidden; }
.community-post-img-grid--2 { grid-template-columns: 1fr 1fr; }
.community-post-img-grid--3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.community-post-img-grid--3 .community-post-img-grid-item:first-child { grid-row: 1 / 3; }
.community-post-img-grid--4 { grid-template-columns: 1fr 1fr; }
.community-post-img-grid-item { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

/* Compose footer split */
.community-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.community-compose-footer-left { display: flex; align-items: center; gap: 0.45rem; }
.community-compose-footer-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* + Attach button */
.community-attach-plus { font-size: 1rem; font-weight: 700; line-height: 1; margin-right: 1px; }

/* Compose tag picker dropdown */
.community-tag-picker-wrap { position: relative; }
.community-tag-picker-btn { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; color: rgba(200,184,232,0.55); font-family: 'Lato', sans-serif; font-size: 0.78rem; padding: 0.3rem 0.85rem; cursor: pointer; transition: background 0.18s, color 0.18s, border-color 0.18s; white-space: nowrap; }
.community-tag-picker-btn:hover { background: rgba(255,255,255,0.07); color: var(--mist); }
.community-tag-caret { font-size: 0.65rem; opacity: 0.7; margin-left: 1px; }
.community-tag-dropdown { position: absolute; bottom: calc(100% + 6px); right: 0; background: rgba(18,12,30,0.97); border: 1px solid rgba(255,255,255,0.13); border-radius: 12px; padding: 0.4rem; min-width: 190px; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,0.6); backdrop-filter: blur(12px); }
.community-tag-option { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; font-family: 'Lato', sans-serif; font-size: 0.84rem; padding: 0.45rem 0.75rem; cursor: pointer; transition: background 0.15s; }
.community-tag-option:hover { background: rgba(255,255,255,0.07); }

/* NSFW switch toggle */
.community-nsfw-switch { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; user-select: none; }
.community-nsfw-checkbox { display: none; }
.community-nsfw-slider { width: 30px; height: 17px; background: rgba(255,255,255,0.15); border-radius: 9px; position: relative; transition: background 0.22s; flex-shrink: 0; }
.community-nsfw-slider::after { content: ''; position: absolute; width: 13px; height: 13px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: transform 0.22s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.community-nsfw-checkbox:checked + .community-nsfw-slider { background: #4a9eff; }
.community-nsfw-checkbox:checked + .community-nsfw-slider::after { transform: translateX(13px); }
.community-nsfw-label { font-size: 0.76rem; color: rgba(200,184,232,0.45); white-space: nowrap; }

/* NSFW on post cards */
.community-post--nsfw { border-color: rgba(194,84,122,0.2); }
.community-post-nsfw-flag { font-size: 0.8rem; opacity: 0.75; }
.community-nsfw-gate { position: relative; margin-bottom: 0.85rem; }
.community-nsfw-blur { filter: blur(8px); user-select: none; pointer-events: none; }
.community-nsfw-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.88rem; color: rgba(200,184,232,0.8); background: rgba(0,0,0,0.3); border-radius: 10px; }
.community-nsfw-overlay a { color: #f0c060; text-decoration: none; margin-left: 0.2em; }
.community-nsfw-overlay a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .community-wrap { padding: 1.5rem 1rem 4rem; }
  .community-layout { flex-direction: column; }
  .community-side-col { width: 100%; position: static; }
  .community-sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; gap: 0.5rem; padding: 1rem; }
  .community-friends-box { width: 100%; }
  .community-user-block { display: flex; align-items: center; gap: 0.75rem; text-align: left; padding-bottom: 0; margin-bottom: 0; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.07); padding-right: 0.75rem; }
  .community-avatar-lg, .community-avatar-fallback-lg { width: 38px; height: 38px; font-size: 1rem; margin: 0; }
  .community-sidebar-rule { display: none; }
  .community-tag-filters { flex-direction: row; flex-wrap: wrap; }
  .community-tag-pill { width: auto; font-size: 0.8rem; padding: 0.4rem 0.75rem; }
}


/* ── Admin Stats page ── */
.stats-wrapper {
  padding: 4rem 2rem 5rem;
  min-height: 80vh;
}
.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.stats-title {
  font-family: 'Lato', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}
.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stats-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 3px solid var(--gold);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.stats-card-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.stats-card-num {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stats-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.stats-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.stats-panel--wide {
  width: 100%;
}
.stats-panel-title {
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
}
.stats-panel-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}
.stats-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.stats-bar-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  width: 130px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.stats-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.stats-bar-count {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  width: 32px;
  text-align: right;
}
.stats-empty {
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem 0;
}
.stats-donation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
}
.stats-donation-row:last-child { border-bottom: none; }
.stats-donation-total {
  font-weight: 700;
  color: #fff;
  padding-top: 0.75rem;
}
.stats-donation-amt {
  color: var(--gold);
  font-weight: 600;
}
.stats-user-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 400px;
  overflow-y: auto;
}
.stats-user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
}
.stats-user-row:last-child { border-bottom: none; }
.stats-user-name {
  color: #fff;
  font-weight: 600;
}
.stats-user-handle {
  color: var(--gold);
  font-size: 0.8rem;
  flex: 1;
}
.stats-user-date {
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .stats-row-2  { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .stats-cards { grid-template-columns: 1fr 1fr; }
  .stats-bar-label { width: 80px; }
}

/* ── Admin comment delete button ── */
.community-comment-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}
.community-comment-reply-btn {
  background: none;
  border: none;
  color: rgba(180, 160, 220, 0.7);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  font-weight: 600;
}
.community-comment-reply-btn:hover { color: rgba(200, 180, 255, 1); }
.community-comment-delete {
  background: none;
  border: none;
  color: #e8849e;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.community-comment-delete:hover { opacity: 1; }

/* Threaded replies */
.community-comment-replies {
  margin-top: 0.6rem;
  padding-left: 1.1rem;
  border-left: 2px solid rgba(147, 112, 219, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.community-comment--reply {
  padding: 0.5rem 0;
}
.community-comment--reply .community-comment-body {
  font-size: 0.87rem;
}

/* Inline reply input */
.community-comment-inline-input {
  margin-top: 0.5rem;
  padding-left: 0.5rem;
}
.community-comment-btn-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}
.community-comment-cancel {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: rgba(200,200,200,0.6);
  font-size: 0.78rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.community-comment-cancel:hover { background: rgba(255,255,255,0.07); }

/* ── Report form ── */
.report-form {
  margin-top: 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid #e8849e;
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.report-form-label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.5rem;
}
.report-form-textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0.5rem 0.65rem;
  resize: vertical;
  box-sizing: border-box;
}
.report-form-textarea:focus { outline: none; border-color: #e8849e; }
.report-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.report-form-submit {
  background: #e8849e;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.report-form-submit:hover { opacity: 0.85; }
.report-form-submit:disabled { opacity: 0.5; cursor: default; }
.report-form-cancel {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  border-radius: 7px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.report-form-cancel:hover { color: #fff; border-color: rgba(255,255,255,0.35); }
.report-form-msg { display: block; font-size: 0.8rem; color: #e8849e; margin-top: 0.45rem; }
.report-form-msg--ok { color: #7dcfb6; }

/* Report trigger buttons */
.community-post-report {
  background: none;
  border: none;
  color: rgba(255,255,255,0.28);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0 0.15rem;
  transition: color 0.15s;
  margin-left: auto;
}
.community-post-report:hover { color: #e8849e; }
.comment-action-btn--report {
  color: rgba(255,255,255,0.28) !important;
}
.comment-action-btn--report:hover { color: #e8849e !important; }

/* ── Art comment avatars ── */
.comment-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.comment-inner {
  flex: 1;
  min-width: 0;
}
.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.comment-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #1a1a2e;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ── Admin NSFW toggle ── */
.community-post-nsfw-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.community-post-nsfw-toggle:hover {
  color: #e8849e;
  border-color: #e8849e;
}
.community-post-nsfw-toggle--on {
  color: #e8849e;
  border-color: #e8849e;
  background: rgba(232,132,158,0.1);
}

/* ── Profile newsletter checkbox ── */
.profile-field--checkbox {
  margin-top: 0.25rem;
}
.profile-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
}
.profile-checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--gold);
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ── NSFW / SFW Mode toggle — used on both the main site's and the
   Fanpages side's Account Settings, since the two now run independently
   but must agree on this one shared preference. ── */
.nsfw-toggle-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; }
.nsfw-toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.nsfw-toggle-switch input { opacity: 0; width: 0; height: 0; }
.nsfw-toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #d97a72; border-radius: 999px; transition: background 0.2s;
}
.nsfw-toggle-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
}
.nsfw-toggle-switch input:not(:checked) + .nsfw-toggle-slider { background: #2fbf5f; }
.nsfw-toggle-switch input:checked + .nsfw-toggle-slider::before { transform: translateX(20px); }
.nsfw-toggle-label { font-weight: 700; font-size: 0.95rem; color: #d97a72; }
.nsfw-toggle-label--sfw { color: #2fbf5f; }
.nsfw-toggle-note { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-top: 0.5rem; }

/* ── Newsletter blast panel ── */
.newsletter-blast {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-top: 3px solid var(--gold);
  border-radius: 14px;
  padding: 1.25rem 1.5rem 1.1rem;
  margin-bottom: 1.5rem;
}
.newsletter-blast-title {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 0.2rem;
}
.newsletter-blast-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin: 0 0 0.9rem;
}
.newsletter-blast-fields {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.newsletter-blast-input,
.newsletter-blast-body {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.87rem;
  font-family: inherit;
  padding: 0.55rem 0.75rem;
  box-sizing: border-box;
}
.newsletter-blast-input:focus,
.newsletter-blast-body:focus { outline: none; border-color: var(--gold); }
.newsletter-blast-body {
  min-height: 140px;
  resize: vertical;
}
.nl-attach-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.newsletter-blast-foot {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.newsletter-blast-btn {
  background: var(--gold);
  color: #1a1a2e;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.newsletter-blast-btn:hover { opacity: 0.85; }
.newsletter-blast-btn:disabled { opacity: 0.5; cursor: default; }
.newsletter-blast-fb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* ════════════════════════════════════════════════════════
   Community — Mobile redesign (≤ 640px only)
   ════════════════════════════════════════════════════════ */

/* ── Left drawer (hidden on desktop) ── */
.mobile-drawer-overlay { display: none; }
.mobile-drawer         { display: none; }
.mobile-bottom-bar     { display: none; }

@media (max-width: 640px) {

  /* ── Drawer overlay ── */
  .mobile-drawer-overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0);
    z-index: 220;
    pointer-events: none;
    transition: background 0.25s;
  }
  .mobile-drawer-overlay--open {
    background: rgba(0,0,0,0.6);
    pointer-events: all;
  }

  /* ── Drawer panel ── */
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 80vw; max-width: 320px;
    background: #080613;
    z-index: 230;
    padding: 3rem 0 2.5rem;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
  }
  .mobile-drawer--open {
    transform: translateX(0);
    box-shadow: 6px 0 32px rgba(0,0,0,0.7);
  }

  /* ── Drawer user block ── */
  .mobile-drawer-user {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0 1.4rem 1.1rem;
  }
  .mobile-drawer-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
  }
  .mobile-avatar--fallback {
    display: flex; align-items: center; justify-content: center;
    background: var(--gold);
    color: #1a1a2e;
    font-weight: 700;
    font-size: 1.2rem;
  }
  .mobile-drawer-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
  }
  .mobile-drawer-handle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin: 0.1rem 0 0;
  }

  /* ── Drawer divider ── */
  .mobile-drawer-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 0.5rem 0 0.75rem;
  }

  /* ── Drawer menu items ── */
  .mobile-drawer-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none; border: none;
    color: #e8e4f8;
    font-family: 'Lato', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.85rem 1.4rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.14s;
  }
  .mobile-drawer-btn:active {
    background: rgba(255,255,255,0.06);
  }
  .mobile-drawer-caret {
    font-size: 0.9rem;
    opacity: 0.45;
    font-weight: 400;
  }

  /* ── Guides rules sub-panel ── */
  .mobile-drawer-rules {
    display: none;
    padding: 0 1.4rem 0.5rem 2rem;
  }
  .mobile-drawer-rules--open { display: block; }
  .mobile-drawer-rules ol {
    margin: 0; padding-left: 1.1rem;
    display: flex; flex-direction: column; gap: 0.6rem;
  }
  .mobile-drawer-rules li {
    font-size: 0.83rem;
    color: rgba(200,184,232,0.5);
    line-height: 1.5;
  }

  /* ── Prevent horizontal scroll ── */
  html, body { overflow-x: hidden; max-width: 100vw; }
  .community-wrap, .community-layout, .community-main { overflow-x: hidden; max-width: 100%; }

  /* ── Bottom tab bar — always fixed, always visible ── */
  .mobile-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: rgba(8,6,19,0.97);
    border-top: 1px solid rgba(255,255,255,0.07);
    z-index: 250;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateZ(0); /* force GPU layer so it never disappears */
  }
  .mobile-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1; height: 100%;
    background: none; border: none;
    color: rgba(200,184,232,0.4);
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
  }
  .mobile-tab-btn:active { color: #fff; }
  .mobile-tab-icon {
    font-size: 1.35rem;
    line-height: 1;
  }
  .mobile-tab-label {
    font-size: 0.6rem;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.02em;
  }

  /* Centre compose button — gradient circle */
  .mobile-tab-btn--compose { color: #fff; }
  .mobile-tab-btn--compose .mobile-tab-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--violet), var(--rose));
    border-radius: 50%;
    font-size: 1.7rem;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(194,84,122,0.45);
  }

  /* Avatar in bottom-right tab */
  .mobile-tab-avatar-wrap {
    width: 28px; height: 28px;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
  }
  .mobile-tab-avatar {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    font-size: 0.75rem;
  }

  /* ── Layout adjustments ── */
  .community-main    { padding-bottom: 80px; }
  .community-sidebar,
  .community-side-col { display: none !important; }
  .community-layout  { flex-direction: column; padding: 0; }
  .community-wrap    { padding: 0.75rem 0.75rem 0; }
  .community-search-row { margin-top: 0.25rem; }

  /* ── Compose modal: full-screen on mobile ── */
  .community-compose-modal {
    padding: 0;
    align-items: stretch;
    /* JS sets height via visualViewport so keyboard never covers the footer */
    bottom: auto;
  }
  .community-compose-modal-inner {
    width: 100%; max-width: 100%;
    height: 100%; max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .community-compose-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border: none;
    min-height: 0;
    overflow: hidden;
  }
  /* Textarea row fills all space between header and footer */
  .community-compose-row {
    flex: 1;
    min-height: 0;
    align-items: flex-start;
    margin-bottom: 0;
    overflow: hidden;
  }
  .community-compose-textarea {
    height: 100%;
    min-height: 0;
    resize: none;
    overflow-y: auto;
  }
  /* Footer always pinned at bottom, never shrinks */
  .community-compose-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-top: 0.5rem;
  }
  .community-compose-footer-left  { flex-wrap: wrap; gap: 0.4rem; }
  .community-compose-footer-right {
    display: flex; align-items: center;
    justify-content: space-between; width: 100%;
  }
  .community-char-count { margin-left: 0; }
  /* Tag dropdown: open leftward-anchored so it stays on screen */
  .community-tag-dropdown {
    right: auto;
    left: 0;
    min-width: 160px;
  }
}
