:root {
  --primary: #4b2aad;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --bg: #ffffff;
  --accent-bg: #f7f5ff;
  --radius: 14px;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

header {
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  position: relative;
  flex-wrap: wrap;
  gap: 1rem;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  gap: 0.6rem;
}

.nav-logo-img {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
}

/* SEARCH CONTAINER */
.search-container {
  flex-grow: 1;
  max-width: 200px;
}

.search-container input {
  width: 100%;
  padding: 0.45rem 0.2rem;
  border: 1px solid #ddd;
  border-radius: 40px;
  font-size: 0.95rem;
  outline: none;
  transition: 0.3s;
}

.search-container input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(75,42,173,0.1);
}

/* NAV LINKS */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* MENU & SEARCH TOGGLE ICONS */
.menu-toggle, .search-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* SEARCH DROPDOWN */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -10px);
  width: 85%;
  max-width: 400px;
  background: white;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 90;
}

.search-dropdown.show {
  opacity: 1;
  transform: translate(-50%, 5px);
  pointer-events: auto;
}

.search-dropdown input {
  width: 100%;
  padding: 0.5rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* HERO SECTION */
.hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 2rem 2rem;
  margin-left: 0;
  min-height: 45vh;
  position: relative;
  background: url('images/rose-Copy.jpg') top center / cover no-repeat;
  background-attachment: scroll;
  color: white;
  overflow: hidden;
  white-space: nowrap;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 0;
}

.hero-left,
.hero-right,
.hero-line-content {
  position: relative;
  z-index: 1;
  top: -60px;
}

.hero-left img.hero-logo {
  width: 160px;
  border-radius: 10px;
  object-fit: contain;
  transition: transform 0.3s ease;
  height: 220px;
}

.hero-left img.hero-logo:hover {
  transform: scale(1.05);
}

.hero-right h1 {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--primary);
  margin: 0;
  line-height: 1.1;
}

.hero-right h1 span {
  display: block;
  text-indent: 2.5ch;
  color: #ffffff;
}

.hero-right h1 {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  line-height: 1.1;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.hero-right h1 span {
  display: block;
  text-indent: 2.5ch;
  color: #6a4bc4;
}

.hero-line-content {
  position: absolute;
  top: 57%;
  left: calc(50% + 280px);
  transform: translate(-50%, -50%);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.hero-line-content p {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
  max-width: 600px;
  line-height: 1.6;
}

.cta-btn {
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
}

.cta-btn:hover {
  background: #361d86;
}

/* ===== GARAMOND FONT FOR POEM CONTENT & CATEGORIES ===== */
.poem-content {
  font-family: 'EB Garamond', 'Georgia', serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #4b3f2f;
}

.poem-category-line em,
.poem-category {
  font-family: 'EB Garamond', 'Georgia', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: #B8860B;
}

.category-link {
  font-family: 'EB Garamond', 'Georgia', serif;
  color: #B8860B;
  text-decoration: none;
}

.category-link:hover {
  text-decoration: underline;
}

.poem-title,
.recent-poem-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
  .nav-logo-img { display: inline-block; }
  .hero-left, .hero-right { display: none; }
  .hero {
    padding: 1.5rem 1rem;
    min-height: auto;
    justify-content: center;
  }
  .hero-line-content {
    position: static;
    transform: none;
    text-align: center;
    align-items: center;
    max-width: 100%;
  }
  .hero-line-content p {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
  .search-container { display: none; }
  .menu-toggle, .search-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(75, 42, 173, 0.97);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 75px 0 0 70px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }
  .nav-links.show { transform: translateX(0); }
  .nav-links a {
    color: white;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin: 0.5rem 0;
  }
  .close-btn {
    display: block;
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .close-btn { display: none; }
}

footer {
  background: var(--accent-bg);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2.5rem;
}

/* --- TABS SECTION --- */
.tabs-section {
  max-width: 1000px;
  margin: 5rem auto 3rem auto;
  padding: 0 1rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

.tabs-nav {
  display: inline-flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  transform: translateX(-40px);
}
.tabs-nav::-webkit-scrollbar { display: none; }

@media (max-width: 768px) {
  .tabs-section {
    text-align: center;
  }

  .tabs-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0.5rem;
    border-bottom: 2px solid #ddd;
    padding: 0.5rem 0.5rem 0.7rem;
    margin: 0 auto;
    scrollbar-width: none;
    justify-content: center;
    transform: none;
  }

  .tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
  }
}

.tab-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  flex-shrink: 0;
  transition: 0.3s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary);
  background: var(--accent-bg);
}

.tab-btn.active {
  color: #fff;
  background: var(--primary);
}

.tab-content-container {
  text-align: left;
  border-radius: var(--radius);
  box-shadow: none;
  padding: 0;
  transition: 0.4s ease;
}

.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.tab-content h3 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.tab-content p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .tabs-nav {
    justify-content: flex-start;
    gap: 0.4rem;
  }
  .tab-btn {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.7rem !important;
  }
}

.hero-line-content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  max-width: 550px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.hero-line-content .cta-btn {
  background-color: #6a4bc4;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.hero-line-content .cta-btn:hover {
  background-color: #4a2ca1;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .hero-line-content {
    text-align: center;
    align-items: center;
  }

  .hero-line-content p {
    font-size: 0.80rem;
    line-height: 1.5;
    max-width: 95%;
  }

  .hero-line-content .cta-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
  }
}

.hero-left img.hero-logo {
  height: 210px;
  width: auto;
}

/* Recent Poems Container */
.recent-poems-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  padding-left: 70px;
}

/* Individual Poem Card */
.recent-poem-card {
  background: linear-gradient(160deg, #fdf6f0, #e2e9f0);
  padding: 20px 25px;
  border-radius: var(--radius);
  border: 1px solid #e0d6b0;
  box-shadow: 0 8px 15px rgba(0,0,0,0.08);
  font-family: 'Lato', sans-serif;
  color: #4b3f2f;
  line-height: 1.7;
  width: 83%;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  padding-left: 25px;
}

.recent-poem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(0,0,0,0.12);
}

.recent-poem-card .poem-title {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 700;
  color: #4b2aad;
  margin-bottom: 6px;
}

.recent-poem-card .poem-content {
  white-space: pre-line;
  margin-bottom: 10px;
  font-family: 'EB Garamond', 'Georgia', serif;
  font-size: 1rem;
  color: #4b3f2f;
  line-height: 1.6;
}

/* Read More / Show Less */
.read-more-btn {
  background: none;
  border: none;
  color: #960606;
  cursor: pointer;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.read-more-btn:hover {
  color: #ff0000;
}

/* Poem Tags */
.poem-tags {
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
  margin-bottom: 10px;
}

/* Actions */
.poem-actions {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
  color: #555;
}

/* Load More Button */
.load-more-btn {
  padding: 10px 18px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.25s ease, transform 0.2s ease;
}

.load-more-btn:hover {
  background: #6b1da6;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .recent-poem-card { padding: 18px 20px; }
  .recent-poem-card .poem-title { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .recent-poem-card .poem-title { font-size: 1.1rem; }
  .read-more-btn { font-size: 0.85rem; }
  .load-more-btn { padding: 8px 16px; font-size: 0.9rem; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .recent-poem-card {
    padding: 18px 20px;
  }

  .recent-poem-card h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .recent-poem-card h3 {
    font-size: 1.1rem;
  }

  .read-more-btn {
    font-size: 0.85rem;
  }

  .load-more-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

/* Poem Titles */
.poem-title,
.recent-poem-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

/* Poem Content */
.poem-content {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 10px;
}

/* Poem Categories */
.poem-category-line em,
.poem-category {
  font-size: 0.7rem;
  font-style: italic;
  color: #B8860B;
  margin-bottom: 8px;
  display: inline-block;
}

/* Weekly highlight author and separator */
.poem-author {
  font-size: 1rem;
  font-style: italic;
  color: #444;
}

/* Optional responsive adjustments */
@media (max-width: 768px) {
  .poem-title,
  .recent-poem-title { font-size: 1.6rem; }
  .poem-content { font-size: 1.05rem; }
  .poem-category-line em,
  .poem-category { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .poem-title,
  .recent-poem-title { font-size: 1.4rem; }
  .poem-content { font-size: 0.95rem; }
  .poem-category-line em,
  .poem-category { font-size: 0.9rem; }
}

.poem-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 15px;
  font-family: 'Inter', sans-serif;
  flex-wrap: wrap;
}

.comment-section {
  display: flex;
  align-items: center;
  gap: 5px;
}

.comment-input {
  width: 160px;
  padding: 5px 9px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: #fafafa;
  transition: all 0.2s ease-in-out;
}

.comment-input:focus {
  border-color: #4b2aad;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(75, 42, 173, 0.1);
  outline: none;
}

.comment-btn {
  background: linear-gradient(90deg, #4b2aad, #6b45e2);
  border: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: 0.25s ease;
  white-space: nowrap;
}

.comment-btn:hover {
  background: linear-gradient(90deg, #6b45e2, #4b2aad);
  transform: translateY(-1px);
}

.poem-reactions {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #444;
  font-size: 0.9rem;
}

.poem-reactions .divider {
  color: #aaa;
  margin: 0 3px;
  user-select: none;
}

.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.like-btn:hover {
  color: #e74c3c;
  transform: scale(1.15);
}

.like-btn.liked {
  color: #e74c3c;
}

@media (max-width: 600px) {
  .poem-actions {
    flex-direction: column;
    gap: 8px;
  }

  .comment-input {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .tabs-section {
    padding-top: 2rem;
  }

  .recent-poem-card {
    width: 95%;
    margin-bottom: 20px;
    margin: 0 auto 20px;
    padding: 18px 20px;
  }

  .poem-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 8px;
  }

  .comment-section {
    flex-direction: row;
    gap: 5px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .comment-input {
    width: 60%;
    padding: 6px 8px;
    font-size: 0.85rem;
  }

  .comment-btn {
    width: auto;
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .poem-reactions {
    flex-direction: row;
    gap: 8px;
    font-size: 0.9rem;
  }

  .read-more-btn {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .recent-poems-container {
    width: 100vw;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .recent-poem-card {
    width: 91%;
    margin: 0;
    padding: 16px 18px;
  }

  .tabs-section {
    margin-bottom: 1.5rem;
  }

  .tabs-nav {
    margin-bottom: 1.2rem;
  }
}

@media (max-width: 768px) {
  .tabs-section {
    margin-top: -17px;
  }

  .tabs-nav {
    margin-bottom: 12px;
  }
}

@media (max-width: 768px) {
  #load-more-poems {
    font-size: 0.60rem;
    padding: 6px 12px;
    border-radius: 6px;
    background: #333;
    color: #fff;
    cursor: pointer;
    border: none;
    transition: background 0.3s ease, transform 0.2s ease;
  }

  #load-more-poems:hover {
    background: #4b2aad;
    transform: scale(1.05);
  }

  .recent-poems-section div[style*="text-align: center"] {
    margin-top: 12px;
  }
}

@media (min-width: 1024px) {
  .recent-poems-container {
    gap: 20px;
  }

  .recent-poem-card {
    margin-bottom: 0;
    width: 85%;
    padding: 20px 25px;
  }
}

.logo {
  display: flex;
  align-items: center;
  cursor: default;
}

.logo-highlight {
  color: #fff;
  text-shadow:
    0 0 2px var(--primary),
    0 0 4px var(--primary),
    0 0 6px var(--primary);
}

/* Weekly Highlights Container */
.weekly-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  max-width: 1000px;
  margin: 60px auto;
  padding: 0 20px;
}

.weekly-card {
  flex: 1;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
}

.weekly-card:hover {
  transform: translateY(-5px);
}

.weekly-card h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-family: "Times New Roman", serif;
  color: #444;
}

.weekly-card p {
  line-height: 1.7;
}

.weekly-card .author {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  font-style: italic;
}

.quote-card {
  background: linear-gradient(145deg, #fdfcfb, #e2dcd5);
  border: 1px solid #d6cfc2;
  color: #2c2c2c;
  font-family: "Georgia", serif;
  font-size: 1.05rem;
}

.poem-card {
  background: linear-gradient(145deg, #fafafa, #e4e4e4);
  border: 1px solid #d1d1d1;
  color: #333;
  font-family: 'Lato', sans-serif;
  font-size: 1.1rem;
}

#poem-wrapper .toggle-poem {
  background: none;
  border: none;
  color: #960606;
  cursor: pointer;
  padding: 0;
  margin-top: 5px;
  font-size: 0.95rem;
  font-weight: none;
  text-decoration: none;
  transition: color 0.3s ease;
  font-family: 'Lato', sans-serif;
}

.weekly-title {
  font-size: 1.8rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

.quote-card .weekly-title {
  font-family: "Times New Roman", serif;
  letter-spacing: 1px;
  color: #8B0000;
}

.poem-card .weekly-title {
  color: #8B0000;
  font-family: "Times New Roman", serif;
  font-style: italic;
}

@media (max-width: 768px) {
  .weekly-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
    max-width: 100%;
  }

  .weekly-card {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding: 20px;
    box-sizing: border-box;
  }

  .weekly-card h2 {
    font-size: 1.25rem;
  }

  .weekly-card p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .weekly-card .author {
    font-size: 0.9rem;
  }
}

.site-footer {
  background: #222;
  color: white;
  padding: 20px 15px;
  text-align: center;
  margin-top: 50px;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  margin: 0 10px;
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #fff;
}

.recent-poems-section {
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  background: #fafafa;
  border-radius: 12px;
  box-shadow: 0 2px 6px #fafafa;
}

.recent-poems-section h2 {
  margin-bottom: 15px;
}

.recent-poems-section ul {
  list-style: disc;
  padding-left: 20px;
}

.recent-poems-section li {
  margin-bottom: 10px;
}

.recent-poems-container {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin-top: 20px;
}

.recent-poem-card {
  background: linear-gradient(160deg, #f7f9fb, #e1e6eb);
  padding: 15px 20px 15px 50px;
  border-radius: 12px;
  border: 1px solid #e0d6b0;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  font-family: 'Lato', sans-serif;
  color: #4b3f2f;
  line-height: 1.7;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recent-poem-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.05);
  pointer-events: none;
}

.recent-poem-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.12);
}

.recent-poem-card h3 {
  margin-top: 0;
}

.recent-poem-card p {
  margin: 10px 0;
  white-space: pre-line;
}

.recent-poem-card .author {
  font-family: 'Inter', sans-serif;
  font-style: italic;
  color: #B8860B;
  font-size: 1.0rem;
  text-transform: none;
}

.read-more-btn {
  background: none;
  border: none;
  color: #960606;
  cursor: pointer;
  padding: 0;
  margin-top: 5px;
  font-size: 0.92rem;
}

#recent-poems-search {
  position: absolute;
  top: 0;
  right: 10px;
  padding: 4px 8px;
  font-size: 0.9rem;
  border-radius: 12px;
  border: 1px solid #ccc;
  outline: none;
  width: 120px;
  transition: all 0.2s;
}

#recent-poems-search:focus {
  border-color: #888;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.poem-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.poem-header .poem-title {
  font-family: 'Playfair Display', serif;
  flex: 2;
  text-align: center;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.poem-sort {
  flex: 1;
  text-align: left;
}

.poem-search {
  flex: 1;
  text-align: right;
}

.poem-sort select,
.poem-search input {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.poem-subtitle {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-bottom: 20px;
}

.site-footer > .footer-container > a[href="admin.html"] {
  color: transparent;
  text-decoration: none;
  cursor: default;
}

#user-display {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: bold;
  color: #ff6f61;
  font-size: 16px;
  margin-right: 10px;
  cursor: pointer;
}

.user-dropdown {
  position: relative;
  display: inline-block;
  font-weight: bold;
  font-family: 'Arial', sans-serif;
  color: #ff6600;
  cursor: pointer;
  margin-left: 15px;
}

.user-dropdown .dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 100px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 5px;
  top: 30px;
  left: 0;
}

.user-dropdown .dropdown-content a {
  color: #333;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
  font-size: 14px;
}

.user-dropdown .dropdown-content a:hover {
  background-color: #f0f0f0;
}

.user-dropdown:hover .dropdown-content {
  display: block;
}

@media (max-width: 768px) {
  #user-display {
    display: inline-block;
    margin-left: 10px;
    margin-right: 5px;
  }

  #user-display::after {
    content: " ▼";
    font-size: 0.7rem;
    margin-left: 3px;
  }

  .user-dropdown {
    margin-left: 0;
  }
}

/* ---------- Poem Actions & Comments Styling ---------- */
.recent-poem-card .poem-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 10px;
}

.recent-poem-card .comment-section {
  display: flex;
  align-items: center;
  gap: 5px;
}

.recent-poem-card .comment-input {
  flex: 1;
  min-width: 150px;
  padding: 5px 10px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fafafa;
  transition: all 0.2s ease;
  outline: none;
}

.recent-poem-card .comment-input:focus {
  border-color: #888;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-poem-card .comment-btn,
.recent-poem-card .like-btn,
.recent-poem-card .show-comments-btn {
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #f8f8f8;
  transition: all 0.2s ease;
}

.recent-poem-card .comment-btn:hover,
.recent-poem-card .like-btn:hover,
.recent-poem-card .show-comments-btn:hover {
  background-color: #eee;
}

.recent-poem-card .like-btn.liked {
  background-color: #ffdddd;
  border-color: #ff6666;
}

.recent-poem-card .show-comments-btn {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
}

.recent-poem-card .comment-list {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid #eee;
  background-color: #fafafa;
  border-radius: 6px;
  padding: 8px;
}

.recent-poem-card .comment-list .comment {
  padding: 6px 8px;
  font-size: 0.9rem;
  border-bottom: 1px solid #eee;
}

.recent-poem-card .comment-list .comment:last-child {
  border-bottom: none;
}

.message-count {
  cursor: pointer;
  text-decoration: none;
}

.message-count:hover {
  color: #960606;
}

/* ---------- Responsive adjustments for small screens ---------- */
@media screen and (max-width: 600px) {
  .poem-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .like-container {
    display: flex;
    align-items: center;
    gap: 2px;
    order: -1;
  }

  .like-btn {
    font-size: 0.8rem;
    padding: 4px 6px;
  }

  .like-count {
    font-size: 0.8rem;
  }

  .message-count {
    font-size: 0.8rem;
    padding: 4px 6px;
  }

  .comment-btn {
    font-size: 0.8rem;
    padding: 4px 6px;
  }

  .comment-input {
    font-size: 0.8rem;
    padding: 4px 6px;
    width: 120px;
    max-width: calc(100% - 80px);
    flex-grow: 1;
  }

  .comment-list {
    padding: 6px;
  }

  .comment-list .comment {
    font-size: 0.8rem;
    padding: 4px 6px;
  }
}

/* 📌 Recent Poems Title */
.recent-poem-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  letter-spacing: 0.4px;
  text-align: left;
}

@media (max-width: 600px) {
  .recent-poem-title {
    font-size: 1.2rem;
    text-align: left;
  }
}

.poem-separator {
  width: 400px;
  height: 2px;
  background: #555;
  margin: 15px auto 5px auto;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .poem-separator {
    width: 90%;
    height: 2px;
    margin: 10px auto;
  }
}

@media (max-width: 480px) {
  .poem-separator {
    width: 95%;
    margin: 8px auto;
  }
}

.poem-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 600;
  text-align: left;
  margin-bottom: 12px;
  color: #573737;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .poem-title {
    font-size: 1.2rem;
    text-align: left;
  }
}

.recent-poems-heading {
  text-align: center;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #222;
}

@media (max-width: 600px) {
  .recent-poems-heading {
    font-size: 1.3rem;
  }
}

.weekly-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  max-width: 1000px;
  margin: 60px auto;
  padding: 0 20px;
}

.weekly-left {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
}

.categories-title {
  font-weight: bold;
  font-size: 2rem;
  color: #2a7ae2;
  margin-bottom: 10px;
  text-align: center;
}

#poem-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.poem-category {
  cursor: pointer;
  color: #8B0000;
  padding: 4px 8px;
  background: #ffffff;
  border-radius: 4px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .weekly-left {
    width: 100%;
    gap: 12px;
  }

  .weekly-left .quote-card {
    padding: 18px 15px;
    font-size: 1rem;
  }

  .weekly-left .quote-card .weekly-title {
    font-size: 1.5rem;
  }

  #weekly-quote {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  #quote-author {
    font-size: 0.9rem;
  }

  #poem-categories-container {
    padding: 8px 0;
  }

  .categories-title {
    font-size: 1.1rem;
  }

  .poem-category {
    font-size: 0.9rem;
    padding: 3px 6px;
  }
}

.all-categories {
  color: #006699;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.all-categories:hover {
  background: #e0f0ff;
  color: #004466;
  text-decoration: none;
}

#poem-categories-container {
  margin-top: 10px;
}

.categories-title {
  font-size: 1.2rem;
  margin-bottom: 6px;
  font-weight: bold;
}

#poem-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
}

#poem-categories a {
  display: inline-block;
  padding: 4px 8px;
  background: none;
  color: #B8860B;
  border-radius: 5px;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}

.categories-container a:hover {
  color: #DAA520;
  transform: translateY(-2px);
}

.weekly-left .weekly-card h2.weekly-title {
  font-size: 24px;
  font-weight: bold;
  font-style: italic;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .weekly-left .weekly-card h2.weekly-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  #user-display {
    display: inline-block;
    margin-left: 10px;
    margin-right: 5px;
  }

  #user-display::after {
    content: " ▼";
    font-size: 0.7rem;
    margin-left: 3px;
  }

  .user-dropdown {
    margin-left: 0;
  }
}

/* ---------- Poem Actions & Comments Styling ---------- */
.recent-poem-card .poem-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 10px;
}

.recent-poem-card .comment-section {
  display: flex;
  align-items: center;
  gap: 5px;
}

.recent-poem-card .comment-input {
  flex: 1;
  min-width: 120px;
  padding: 5px 10px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fafafa;
  transition: all 0.2s ease;
  outline: none;
}

.recent-poem-card .comment-input:focus {
  border-color: #888;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-poem-card .comment-btn,
.recent-poem-card .like-btn,
.recent-poem-card .show-comments-btn {
  padding: 5px 8px;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #f8f8f8;
  transition: all 0.2s ease;
}

.recent-poem-card .comment-btn:hover,
.recent-poem-card .like-btn:hover,
.recent-poem-card .show-comments-btn:hover {
  background-color: #eee;
}

.recent-poem-card .like-btn.liked {
  background-color: #ffdddd;
  border-color: #ff6666;
}

.recent-poem-card .show-comments-btn {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
}

.recent-poem-card .comment-list {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid #eee;
  background-color: #fafafa;
  border-radius: 6px;
  padding: 8px;
}

.recent-poem-card .comment-list .comment {
  padding: 6px 8px;
  font-size: 0.9rem;
  border-bottom: 1px solid #eee;
}

.recent-poem-card .comment-list .comment:last-child {
  border-bottom: none;
}

.message-count {
  cursor: pointer;
  text-decoration: none;
}

.message-count:hover {
  color: #960606;
}

/* ---------- Responsive adjustments for small screens ---------- */
@media screen and (max-width: 600px) {
  .recent-poem-card .poem-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
  }

  .recent-poem-card .comment-input {
    order: 1;
    flex-grow: 1;
    min-width: 150px;
    padding: 3px 6px;
    font-size: 0.8rem;
  }

  .recent-poem-card .comment-btn {
    order: 2;
    font-size: 0.75rem;
    padding: 3px 6px;
  }

  .recent-poem-card .like-btn {
    order: 3;
    font-size: 0.75rem;
    padding: 3px 6px;
  }

  .recent-poem-card .message-count {
    order: 4;
    font-size: 0.75rem;
    padding: 3px 6px;
  }
}

.bottom-categories {
  display: none;
}

@media (max-width: 768px) {
  .bottom-categories {
    display: block;
    background: #fafafa;
    padding: 16px;
    border-top: 1px solid #ddd;
    text-align: center;
    margin: 20px auto 0;
    max-width: 95%;
    box-sizing: border-box;
  }

  #bottom-poem-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: center;
    align-items: center;
    margin-top: 10px;
  }

  .bottom-categories .poem-category,
  .bottom-categories .all-categories {
    background: white;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: normal;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  .bottom-categories .poem-category:hover {
    background: #ffe5cc;
    color: #8B0000;
  }
}

.poem-category-line {
  font-style: italic;
  color: #B8860B;
  margin-top: 10px;
  margin-bottom: 8px;
  font-size: 0.6em;
  text-align: left;
}

.poem-category-line em {
  color: inherit;
}

html {
  scroll-behavior: smooth;
}

.fade-in {
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Container for user info in navbar */
.user-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

#username-display {
  font-weight: 500;
  color: #4b2aad;
}

#login-link {
  color: #4b2aad;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid #4b2aad;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#login-link:hover {
  background: #4b2aad;
  color: #fff;
}

#logoutBtn {
  display: none;
  padding: 6px 12px;
  background: #ff4b4b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

#logoutBtn:hover {
  background: #c0392b;
}

/* --- JOIN COMMUNITY SECTION --- */
.community-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 4rem 10%;
  border-top: 1px solid #eee;
}

.community-content {
  flex: 1;
  max-width: 480px;
}

.community-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  background: linear-gradient(90deg, #5a3cb3, #a67c52);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.community-content p {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
  margin: 1rem 0 2rem;
}

.join-btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(90deg, #5a3cb3, #a67c52);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.join-btn:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.community-image img {
  max-width: 350px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
  .join-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .community-content p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.8rem 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .community-section {
    flex-direction: column;
    text-align: center;
    padding: 3rem 1rem;
  }

  .community-image img {
    margin-top: 2rem;
    width: 80%;
  }
}

/* --- 🖼️ POETRY GALLERY SECTION --- */
.gallery-section {
  text-align: center;
  padding: 4rem 10%;
  background: #fff;
  position: relative;
  z-index: 1;
}

.gallery-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  background: linear-gradient(90deg, #5a3cb3, #a67c52);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.poetry-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: stretch;
  width: 100%;
}

.gallery-item {
  position: relative;
  width: 100%;
  max-width: 340px;
  min-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #fdfbff, #fdf6f0);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.gallery-overlay {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(90, 60, 179, 0.8), rgba(166, 124, 82, 0.8));
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 16px;
  transition: background 0.4s ease;
}

.gallery-overlay:hover {
  background: linear-gradient(135deg, rgba(90, 60, 179, 0.9), rgba(166, 124, 82, 0.9));
}

.gallery-overlay h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.gallery-overlay p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.gallery-overlay .author {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
  font-style: italic;
  color: black;
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 3rem 6%;
  }

  .gallery-section h2 {
    font-size: 1.8rem;
  }

  .gallery-item {
    max-width: 100%;
    min-height: 260px;
  }
}

.view-poem-btn {
  margin-top: 1.2rem;
  padding: 0.5rem 1.2rem;
  background: #fff;
  color: #5a3cb3;
  font-family: 'Playfair Display', serif;
  font-size: 0.70rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40%;
  display: block;
  margin: 10px auto 0;
  text-align: center;
}

.view-poem-btn:hover {
  background: #5a3cb3;
  color: #fff;
  transform: translateY(-2px);
}

.gallery-overlay p {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 3rem 6%;
  }

  .gallery-section h2 {
    font-size: 1.8rem;
  }

  .gallery-item {
    max-width: 100%;
    min-height: auto;
  }

  .gallery-overlay h3 {
    font-size: 1.1rem;
  }

  .gallery-overlay p {
    font-size: 1.13rem;
    line-height: 1.4;
    white-space: pre-line;
  }

  .view-poem-btn {
    font-size: 0.65rem;
    padding: 0.4rem 1rem;
    width: 30%;
    display: block;
    margin: 10px auto 0;
    text-align: center;
    text-decoration: none;
    background: #4b2aad;
    color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  .view-poem-btn:hover {
    background: #3a1f99;
    color: #fff;
    transform: translateY(-2px);
  }
}

.gallery-section {
  display: none;
}

.poetry-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-item.classic:nth-of-type(n+5),
.gallery-item.classic:nth-of-type(n+4) {
  display: none;
}

@media (max-width: 768px) {
  .poetry-gallery {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
  }

  .gallery-item {
    min-width: 80%;
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: block !important;
  }
}

/* --- MOBILE NAV PANEL --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 92%;
    height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 9999;
  }

  .nav-links.show {
    right: 0;
  }

  .nav-links .close-btn {
    align-self: flex-end;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--primary);
    margin-bottom: 1.5rem;
  }

  .nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    color: #4b2aad;
    transition: color 0.2s;
    margin-top: 4.4rem;
    margin-bottom: -5rem;
    padding-left: 1rem;
  }

  .nav-links a:hover {
    color: #7b4cc2;
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 9998;
  }
}

#poem-categories-container {
  padding: 2rem 1rem;
  background: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  opacity: 0;
  transition: opacity 0.4s ease;
}

@media (max-width: 768px) {
  #poem-categories-container {
    display: none !important;
  }
}

.categories-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #4b2aad;
  margin-bottom: 1rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 0.5rem 0.8rem;
  width: 100%;
}

.category-card {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: #B8860B;
  text-decoration: none;
  transition: all 0.25s ease;
  background: none;
  border: none;
  white-space: nowrap;
}

.category-card:hover {
  color: #DAA520;
  transform: translateY(-2px);
}

.all-categories {
  font-weight: 600;
  color: #B8860B;
  text-decoration: underline;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
}

.recent-poem-title + .author {
  opacity: 0.85;
  margin-top: -8px;
}

@media (max-width: 768px) {
  .logo-text {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .poem-card,
  .poem-title,
  .poem-content,
  .poem-author,
  .username,
  .recent-poems,
  .poems-section {
    transform: translateX(-17px);
  }
}

@media (max-width: 480px) {
  .poem-card,
  .poem-title,
  .poem-content,
  .poem-author,
  .username,
  .recent-poems,
  .poems-section {
    transform: translateX(-20px);
  }
}

@media (max-width: 768px) {
  .recent-poem-title,
  .author {
    position: relative;
    left: -10px;
  }

  .author {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .recent-poem-title,
  .author {
    position: relative;
    left: -14px;
  }

  .author {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .author {
    position: relative;
    left: -9px;
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  .author {
    position: relative;
    left: -13px;
    font-size: 0.75rem !important;
  }
}

@media (max-width: 480px) {
  .recent-poems-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    padding-left: 0;
  }

  .recent-poem-card {
    background: linear-gradient(160deg, #fdf6f0, #e2e9f0);
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid #e0d6b0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    font-family: 'Lato', sans-serif;
    color: #4b3f2f;
    line-height: 1.7;
    width: 99%;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    margin: 0 auto;
    padding-left: 22px;
  }

  .recent-poem-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.1);
  }

  .recent-poem-card .poem-title {
    font-family: 'Playfair Display', serif;
    color: #4b2aad;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
  }

  .recent-poem-card .poem-content {
    white-space: pre-line;
    margin-bottom: 10px;
    font-family: 'EB Garamond', 'Georgia', serif;
    font-size: 0.9rem;
    color: #4b3f2f;
    line-height: 1.6;
    padding-left: 10px;
  }
}

@media (max-width: 480px) {
  .cta-btn:hover {
    background: #5135a2;
  }
}

@media (max-width: 480px) {
  #logout-btn-mobile {
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 1.2rem;
  }

  #logout-btn-mobile {
    color: red;
    background: none;
    border: none;
    margin-top: 20px;
  }

  .header {
    z-index: 500;
  }
}

#ranking-poets-container {
  max-width: 800px;
  margin: 120px auto 50px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#ranking-poets-container h1 {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #4b2aad;
}

.ranking-poet {
  display: flex;
  flex-direction: column;
  background: #f7f5ff;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-poet:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.poet-link {
  font-weight: 600;
  font-size: 1.2rem;
  color: #4b2aad;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.poet-link:hover {
  text-decoration: underline;
}

.poet-link::before {
  content: "";
  margin-right: 8px;
}

.ranking-poet p {
  margin: 8px 0 0 0;
  font-size: 0.95rem;
  color: #6b6b6b;
}

@media (max-width: 768px) {
  #ranking-poets-container {
    margin: 80px 15px 30px 15px;
    padding: 20px;
  }

  .ranking-poet {
    padding: 12px 15px;
  }

  .poet-link {
    font-size: 1rem;
  }

  .ranking-poet p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  #ranking-poets-container {
    margin: 60px 10px 20px 10px;
    padding: 15px;
  }

  #ranking-poets-container h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
  }

  .ranking-poet {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .poet-link {
    font-size: 1rem;
    word-break: break-word;
  }

  .ranking-poet p {
    font-size: 0.85rem;
    margin-top: 6px;
  }

  .ranking-poet + .ranking-poet {
    margin-top: 10px;
  }
}

.author-link {
  color: #a67c52;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.author-link:hover {
  color: #a67c52;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 480px) {
  nav,
  .navbar,
  .nav-container {
    width: 100%;
    max-width: 100%;
    padding: 0.8rem 1rem;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .nav-right {
    gap: 0.6rem;
  }

  .menu-toggle, .search-toggle {
    font-size: 1.3rem;
  }
}

.load-more-btn {
  padding: 10px 18px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.25s ease, transform 0.2s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.load-more-btn:hover {
  background: #6b1da6;
  transform: translateY(-2px);
}

.load-more-btn.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .recent-poem-card { padding: 18px 20px; }
  .recent-poem-card .poem-title { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .recent-poem-card .poem-title { font-size: 1.1rem; }
  .read-more-btn { font-size: 0.85rem; }
  .load-more-btn { padding: 8px 16px; font-size: 0.9rem; }
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-btn {
  cursor: pointer;
}

.tab-btn.active {
  background: #4b2aad;
  color: #fff;
}

.platform-container ol {
  list-style-position: inside;
  padding-left: 0;
  margin-left: 0;
  text-align: left;
}

.platform-container ol li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .poem-content {
    padding-left: 12px;
  }
}

.ranking-poet-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ranking-poet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.poet-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.poet-rank-badge {
  font-size: 1.4rem;
  width: 28px;
  text-align: center;
}

.poet-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.poet-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.poet-username {
  font-weight: 600;
  color: #B8860B;
  font-size: 1rem;
  text-decoration: none;
}

.poet-username:hover {
  text-decoration: underline;
}

.poet-activity {
  font-size: 0.85rem;
  color: #666;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .author-img {
    width: 34px !important;
    height: 34px !important;
  }

  .author-link {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
  }

  .author-line {
    gap: 6px !important;
    margin-left: -16px;
  }
}

@media (max-width: 768px) {
  .poet-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 0;
    padding-right: 0;
  }

  .poet-avatar {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50%;
    object-fit: cover;
  }

  .poet-username {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
  }

  .poet-activity {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .poet-rank-badge {
    font-size: 1.1rem;
    padding: 2px 6px;
  }
}

.collaborator-line em {
  font-style: normal;
  font-weight: 400;
  color: #555555;
  font-size: 0.95rem;
}

.collaborator-line em a.collaborator-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.collaborator-line em a.collaborator-link:hover {
  color: #333333;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .collaborator-line em {
    font-size: 0.82rem;
  }
}

.collaborators {
  margin: -2px 0 8px 0 !important;
  padding-left: 0 !important;
  font-size: 0.95rem;
  color: #555555;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  text-align: left !important;
}

.collaborators a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.collaborators a:hover {
  color: #333333;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .collaborators {
    font-size: 0.82rem !important;
  }
}

/* ============================================
   MOBILE-FRIENDLY COMMENT LIST STYLES
   ============================================ */

/* Base comment list styles */
.comment-list {
  margin: 16px 0 24px 0;
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* Individual comment styling */
.comment-list .comment {
  background: #faf8f5;
  padding: 14px 16px;
  margin: 10px 0;
  border-radius: 16px;
  transition: background 0.2s;
}

.comment-list .comment:hover {
  background: #f5f0ea;
}

/* Comment author name - MATCHES CATEGORIES COLOR (#B8860B) */
.comment-list .comment-author-link {
  font-weight: 700;
  color: #B8860B;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-block;
  margin-right: 8px;
}

/* Also style any author name that's not using comment-author-link class */
.comment-list .comment > a:first-child,
.comment-list .comment > span:first-child {
  font-weight: 700;
  color: #B8860B;
  text-decoration: none;
}

/* Comment text */
.comment-list .comment > span:not(.comment-author-link) {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #3a2c1f;
  word-break: break-word;
}

/* Reply toggle button */
.comment-list .reply-toggle {
  color: #5a3cb3;
  cursor: pointer;
  font-size: 0.7rem;
  margin-top: 8px;
  display: inline-block;
  padding: 4px 12px;
  background: #f0edf7;
  border-radius: 20px;
  transition: all 0.2s;
}

.comment-list .reply-toggle:hover {
  background: #e0daf0;
  transform: scale(1.02);
}

/* Reply section container */
.comment-list .reply-section {
  margin-left: 16px;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 0;
}

/* Reply styling - author name also matches categories color */
.comment-list .reply-section > div span:first-child,
.comment-list .reply-section > div a:first-child {
  font-weight: 600;
  color: #B8860B;
  text-decoration: none;
}

.comment-list .reply-section > div {
  background: #f5f2ee;
  padding: 8px 12px;
  border-radius: 12px;
  margin: 6px 0;
  font-size: 0.88rem;
}

/* Reply input area */
.comment-list .reply-input {
  margin-top: 12px;
  animation: fadeIn 0.2s ease;
}

.comment-list .reply-input textarea {
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #e0d6c8;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  background: #ffffff;
  transition: border 0.2s;
}

.comment-list .reply-input textarea:focus {
  outline: none;
  border-color: #B8860B;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.comment-list .send-reply-btn {
  margin-top: 8px;
  background: #B8860B;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.comment-list .send-reply-btn:hover {
  background: #9a6b08;
}

/* Empty state message */
.comment-list p {
  text-align: center;
  color: #a0917e;
  padding: 20px;
  font-style: italic;
}

/* ============================================
   PHONE-SPECIFIC STYLES (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  .comment-list {
    padding: 12px;
    margin: 12px 0 20px 0;
    border-radius: 18px;
  }

  .comment-list .comment {
    padding: 12px 14px;
    margin: 8px 0;
    border-radius: 14px;
  }

  .comment-list .comment-author-link {
    font-size: 0.9rem;
  }

  .comment-list .comment > span:not(.comment-author-link) {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .comment-list .reply-toggle {
    font-size: 0.68rem;
    padding: 3px 10px;
    margin-top: 6px;
  }

  .comment-list .reply-section {
    margin-left: 8px;
    padding-left: 8px;
  }

  .comment-list .reply-section > div {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .comment-list .reply-input textarea {
    padding: 10px;
    font-size: 0.85rem;
    border-radius: 14px;
  }

  .comment-list .send-reply-btn {
    padding: 7px 18px;
    font-size: 0.8rem;
  }
}

/* ============================================
   SMALL PHONES (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  .comment-list {
    padding: 10px;
    margin: 8px 0 16px 0;
    border-radius: 16px;
  }

  .comment-list .comment {
    padding: 10px 12px;
    margin: 6px 0;
    border-radius: 12px;
  }

  .comment-list .comment-author-link {
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
  }

  .comment-list .comment > span:not(.comment-author-link) {
    font-size: 0.85rem;
    display: block;
    margin-left: 0;
  }

  .comment-list .reply-toggle {
    font-size: 0.65rem;
    padding: 3px 10px;
  }

  .comment-list .reply-section {
    margin-left: 6px;
    padding-left: 8px;
  }

  .comment-list .reply-section > div {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .comment-list .reply-section > div span:first-child,
  .comment-list .reply-section > div a:first-child {
    font-size: 0.82rem;
  }

  .comment-list .reply-input textarea {
    padding: 10px;
    font-size: 0.82rem;
  }

  .comment-list .send-reply-btn {
    padding: 6px 16px;
    font-size: 0.75rem;
    width: 100%;
  }
}

/* Animation for reply input */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state */
.comment-list:has(> p:first-child) {
  text-align: center;
  color: #a0917e;
}

/* Remove left border from reply section */
.comment-list .reply-section {
  margin-left: 16px;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 0;
}

@media (max-width: 768px) {
  .comment-list .reply-section {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 0;
  }
}

@media (max-width: 480px) {
  .comment-list .reply-section {
    margin-left: 6px;
    padding-left: 8px;
    border-left: 0;
  }
}

.follow-btn-on-card {
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12px;
  margin-left: auto;
  transition: all 0.2s;
}

.follow-btn-on-card:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.follow-btn-on-card.following {
  background: #f44336;
}

.follow-btn-on-card.following:hover {
  background: #d32f2f;
}

/* Force hide hero-left and hero-right on ALL devices under 1024px */
@media (max-width: 1024px) {
  .hero-left,
  .hero-right {
    display: none !important;
  }
  
  .hero {
    justify-content: center !important;
    padding: 2rem 1rem !important;
  }
  
  .hero-line-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    text-align: center !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
}

/* Hide publication date on ranking poems */
.recent-poem-card .author-line .poem-date,
.recent-poem-card .author-line span[style*="font-size:0.75rem"],
.recent-poem-card .author-line > div:last-child span:last-child {
  display: none !important;
}

.recent-poem-card .poem-publish-date {
  display: none !important;
}

.recent-poem-card .author-line span[style*="color:#888"] {
  display: none !important;
}

#rank-poems .ranking-header span[style*="background: #e8e0f0"],
#rank-poems .ranking-header > div span:first-child {
  display: none !important;
}

.ranking-header span[style*="background: #e8e0f0"] {
  display: none !important;
}

.recent-poem-card .author-line > div:last-child {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.recent-poem-card .recent-poem-title span[style*="background: #ff9800"] {
  position: absolute;
  right: 0;
  top: -30px;
}

/* Remove ALL hover effects from Read More button */
.read-more-btn,
.read-more-btn:hover,
.read-more-btn:focus,
.read-more-btn:active,
.read-more-btn:visited {
  background: none !important;
  border: none !important;
  color: #960606 !important;
  cursor: pointer !important;
  padding: 0 !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  margin-bottom: 10px !important;
  text-decoration: none !important;
  opacity: 1 !important;
  transform: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Hide weekly score from poem title */
.recent-poem-title small {
  display: none !important;
}

.recent-poem-title small[style*="font-weight:400"] {
  display: none !important;
}

/* ============================================
   RANKING POETS CONTAINER
   ============================================ */
#ranking-poets-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: transparent;
}

#ranking-poets-container .ranking-header {
  text-align: center;
  margin-bottom: 30px;
}

#ranking-poets-container h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #4b2aad;
  margin-bottom: 10px;
}

#ranking-poets-container .ranking-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
}

#ranking-poets-container .countdown-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.countdown-badge, .week-badge {
  background: #e8e0f0;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: #4b2aad;
  font-weight: 500;
}

.poets-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ranking-poet-card {
  background: linear-gradient(135deg, #ffffff, #faf8f5);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.ranking-poet-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(75, 42, 173, 0.12);
  border-color: #e0d6b0;
}

.poet-card-header {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.rank-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #4b2aad;
  min-width: 50px;
  text-align: center;
}

.poet-rank-badge {
  font-size: 1.8rem;
  min-width: 60px;
  text-align: center;
}

.poet-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0d6b0;
  background: #f0ede8;
}

.poet-info {
  flex: 1;
}

.poet-name-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.poet-username {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #4b2aad;
  text-decoration: none;
  transition: color 0.2s;
}

.poet-username:hover {
  color: #7b4cc2;
  text-decoration: underline;
}

.community-badge {
  background: #4CAF50;
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.poet-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 8px;
}

.stat-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  font-weight: 600;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

.stat-value.highlight {
  color: #4b2aad;
  font-size: 1.3rem;
}

.stat-sub {
  font-size: 0.7rem;
  color: #4CAF50;
  margin-left: 5px;
}

.warning-badge {
  background: #ff9800;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
}

.ranking-explanation {
  margin-top: 30px;
  padding: 15px 20px;
  background: #f5f3ee;
  border-radius: 12px;
  font-size: 0.85rem;
}

.ranking-explanation details summary {
  cursor: pointer;
  font-weight: 600;
  color: #4b2aad;
}

.ranking-explanation details summary:hover {
  color: #7b4cc2;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  #ranking-poets-container {
    padding: 15px;
    margin: 20px auto;
  }

  #ranking-poets-container h3 {
    font-size: 1.6rem;
  }

  .ranking-poet-card {
    padding: 15px;
  }

  .poet-card-header {
    gap: 12px;
  }

  .rank-number {
    font-size: 1.4rem;
    min-width: 40px;
  }

  .poet-rank-badge {
    font-size: 1.4rem;
    min-width: 45px;
  }

  .poet-avatar {
    width: 50px;
    height: 50px;
  }

  .poet-username {
    font-size: 1rem;
  }

  .poet-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-value.highlight {
    font-size: 1.1rem;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  #ranking-poets-container {
    padding: 10px;
  }

  #ranking-poets-container h3 {
    font-size: 1.4rem;
  }

  .ranking-description {
    font-size: 0.75rem;
  }

  .countdown-badge, .week-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .ranking-poet-card {
    padding: 12px;
  }

  .poet-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rank-number {
    font-size: 1.2rem;
    min-width: auto;
    align-self: flex-start;
  }

  .poet-rank-badge {
    font-size: 1.2rem;
    min-width: auto;
    position: absolute;
    right: 12px;
    top: 12px;
  }

  .ranking-poet-card {
    position: relative;
  }

  .poet-avatar {
    width: 45px;
    height: 45px;
  }

  .poet-name-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .poet-username {
    font-size: 0.95rem;
  }

  .community-badge {
    font-size: 0.6rem;
    padding: 2px 8px;
  }

  .poet-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stat-group {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0ede8;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-value {
    font-size: 0.9rem;
  }

  .stat-value.highlight {
    font-size: 1rem;
  }

  .ranking-explanation {
    padding: 12px;
    font-size: 0.75rem;
  }
}

/* Small phones (380px and below) */
@media (max-width: 380px) {
  .poet-stats-grid {
    gap: 6px;
  }

  .stat-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .stat-value {
    font-size: 0.85rem;
  }
}

/* ============================================
   RANKING POETS - SMALL SCREENS ONLY (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
  #ranking-poets-container {
    padding: 10px 15px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .ranking-poet-card {
    padding: 12px 15px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .poet-card-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
    width: 100% !important;
  }

  .rank-number {
    font-size: 1rem !important;
    min-width: 30px !important;
    font-weight: bold !important;
    color: #4b2aad !important;
  }

  .poet-rank-badge {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    font-size: 1.2rem !important;
    background: transparent !important;
  }

  .poet-avatar {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .poet-info {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .poet-name-line {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  .poet-username {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #B8860B !important;
    text-decoration: none !important;
  }

  .community-badge {
    font-size: 0.6rem !important;
    padding: 2px 8px !important;
    background: #4CAF50 !important;
    color: white !important;
    border-radius: 20px !important;
  }

  .poet-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }

  .stat-group {
    background: #f8f6f3 !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .stat-label {
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    color: #888 !important;
    text-transform: uppercase !important;
  }

  .stat-value {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #333 !important;
  }

  .stat-value.highlight {
    color: #4b2aad !important;
    font-size: 0.9rem !important;
  }

  .stat-sub {
    font-size: 0.6rem !important;
  }

  .warning-badge {
    font-size: 0.55rem !important;
    padding: 2px 6px !important;
  }

  .ranking-explanation {
    margin-top: 15px !important;
    padding: 10px 12px !important;
    font-size: 0.7rem !important;
    border-radius: 10px !important;
  }
}

/* ============================================
   EXTRA SMALL PHONES (max-width: 480px)
   ============================================ */

@media (max-width: 480px) {
  #ranking-poets-container {
    padding: 10px 12px !important;
  }

  .ranking-poet-card {
    padding: 10px 12px !important;
  }

  .poet-card-header {
    gap: 10px !important;
  }

  .rank-number {
    font-size: 0.9rem !important;
    min-width: 25px !important;
  }

  .poet-rank-badge {
    font-size: 1rem !important;
    top: -2px !important;
  }

  .poet-avatar {
    width: 38px !important;
    height: 38px !important;
  }

  .poet-username {
    font-size: 0.85rem !important;
  }

  .community-badge {
    font-size: 0.55rem !important;
    padding: 2px 6px !important;
  }

  .poet-stats-grid {
    gap: 6px !important;
  }

  .stat-group {
    padding: 5px 8px !important;
  }

  .stat-label {
    font-size: 0.6rem !important;
  }

  .stat-value {
    font-size: 0.8rem !important;
  }
}

/* ============================================
   VERY SMALL (max-width: 360px)
   ============================================ */

@media (max-width: 360px) {
  #ranking-poets-container {
    padding: 8px 10px !important;
  }

  .ranking-poet-card {
    padding: 8px 10px !important;
  }

  .poet-avatar {
    width: 32px !important;
    height: 32px !important;
  }

  .poet-username {
    font-size: 0.8rem !important;
  }

  .stat-group {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
  }

  .stat-label {
    font-size: 0.55rem !important;
  }

  .stat-value {
    font-size: 0.75rem !important;
  }
}

/* Small screens only - move rank number from left edge */
@media (max-width: 768px) {
  .rank-number {
    margin-left: 12px !important;
  }
}

/* Increase poet username on small screens */
@media (max-width: 768px) {
  .poet-username {
    font-size: 1.5rem !important;
  }
}

/* Make profile image a box/square on small screens only */
@media (max-width: 768px) {
  .poet-avatar {
    border-radius: 8px !important;
    width: 45px !important;
    height: 45px !important;
    object-fit: cover !important;
  }
}


/* ===== INCREASE CATEGORY LINK SIZE ===== */
.category-link {
  font-size: 0.85rem !important;  /* Change this to your desired size */
}

/* ===== RESPONSIVE SIZES ===== */
/* Tablet (768px and below) */
@media (max-width: 768px) {
  .category-link {
    font-size: 0.85rem !important;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .category-link {
    font-size: 0.8rem !important;
  }
}

/* ===== INCREASE POEM CONTENT SIZE ON PHONES ONLY ===== */
@media (max-width: 480px) {
  .recent-poem-card .poem-content,
  .poem-content,
  .poem-body .poem-content,
  #poem-content {
    font-size: 1rem !important;
    line-height: 1.4 !important;
  }
}

/* ============================================================
   NIGHT READING TOGGLE (poetry site)  — theme.js + this block
   ============================================================ */
.night-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.night-toggle:hover { transform: scale(1.2); opacity: 0.85; }
.night-toggle .theme-icon { font-size: 1.15rem; line-height: 1; }
:root {
  --vp-theme-moon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M21%2012.79A9%209%200%201%201%2011.21%203%207%207%200%200%200%2021%2012.79z'%2F%3E%3C%2Fsvg%3E");
  --vp-theme-sun: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'5'%2F%3E%3Cpath%20d%3D'M12%201v2M12%2021v2M4.22%204.22l1.42%201.42M18.36%2018.36l1.42%201.42M1%2012h2M21%2012h2M4.22%2019.78l1.42-1.42M18.36%205.64l1.42-1.42'%2F%3E%3C%2Fsvg%3E");
}
.night-toggle .theme-icon { font-size: 0 !important; line-height: 0 !important; }
.night-toggle .theme-icon::before { content: ""; display: block; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--vp-theme-moon) center / contain no-repeat; mask: var(--vp-theme-moon) center / contain no-repeat; }
html[data-theme="dark"] .night-toggle .theme-icon::before { -webkit-mask-image: var(--vp-theme-sun); mask-image: var(--vp-theme-sun); }
.night-toggle .theme-icon svg { display: none !important; }
.night-toggle .theme-label { display: none; }

/* Floating version (reading pages with no nav) */
.night-toggle.float-night {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9001;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.35rem;
  border: none;
  background: rgba(33, 27, 22, 0.85);
  color: #fbbf24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.night-toggle.float-night .theme-icon { font-size: 1.35rem; }
.night-toggle.float-night:hover { background: #2a241e; transform: scale(1.08); }

/* Toggle rows inside mobile menus (overlay is mobile-only) */
.overlay-menu .night-toggle {
  display: flex !important;
  width: 100%;
  justify-content: flex-start;
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 12px 16px;
  font-family: inherit;
  font-weight: 500;
  text-align: left;
}
.overlay-menu .night-toggle:hover { background: rgba(75, 42, 173, 0.08); }
.overlay-menu .night-toggle .theme-label { display: inline; }

@media (max-width: 768px) {
  .nav-links .night-toggle {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    border: none;
    border-radius: 0;
    background: transparent;
    color: inherit;
    padding: 12px 16px;
    font-family: inherit;
    font-weight: 500;
    text-align: left;
  }
  .nav-links .night-toggle:hover { background: rgba(75, 42, 173, 0.08); }
  .nav-links .night-toggle .theme-label { display: inline; }
}

/* ===== ESPRESSO NIGHT — dark reading palette ===== */
html[data-theme="dark"] {
  --pt-bg: #161210;
  --pt-surface: #211b16;
  --pt-card: #1d1813;
  --pt-ink: #ece2d0;
  --pt-muted: #a2947e;
  --pt-line: #332b22;
  --pt-accent: #a78bfa;
  --pt-gold: #fbbf24;
  --text: #ece2d0;
  --muted: #a2947e;
  --bg: #161210;
  --line: #332b22;
  --accent-bg: #2a241e;
  --bg-light: #161210;
  --bg-white: #1d1815;
  --text-dark: #ece2d0;
  --text-muted: #a2947e;
  --border-light: #332b22;
  --border-input: #4a3f34;
  --section-bg: #211b16;
}
html[data-theme="dark"] body {
  background: #161210 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: #a78bfa !important;
}
html[data-theme="dark"] a { color: #a78bfa; }
html[data-theme="dark"] a:hover { color: #c9b6ff; }
html[data-theme="dark"] .tabs-nav { border-bottom-color: #332b22 !important; }
html[data-theme="dark"] .view-count-inline { color: #a2947e !important; }
html[data-theme="dark"] .featured-poem-card {
  background: #211b16 !important;
  color: #ece2d0 !important;
  border: 1px solid #332b22 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .featured-poem-card .title { color: #a78bfa !important; }
html[data-theme="dark"] .featured-poem-card .content { color: #ece2d0 !important; }
html[data-theme="dark"] .featured-poem-card .author { color: #fbbf24 !important; }
html[data-theme="dark"] .featured-share-section { border-top-color: #332b22 !important; }

/* Poetry in Motion gallery + community section */
html[data-theme="dark"] .gallery-section { background: #161210 !important; }
html[data-theme="dark"] .gallery-item {
  background: #211b16 !important;
  border: 1px solid #332b22 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .gallery-overlay {
  background: linear-gradient(135deg, rgba(42, 36, 30, 0.92), rgba(33, 27, 22, 0.92)) !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] .gallery-overlay:hover {
  background: linear-gradient(135deg, rgba(51, 43, 34, 0.95), rgba(42, 36, 30, 0.95)) !important;
}
html[data-theme="dark"] .gallery-overlay h3 { color: #a78bfa !important; }
html[data-theme="dark"] .gallery-overlay p { color: #ece2d0 !important; }
html[data-theme="dark"] .gallery-overlay .author,
html[data-theme="dark"] .gallery-overlay .author-line { color: #fbbf24 !important; }
html[data-theme="dark"] .view-poem-btn {
  background: #2a241e !important;
  color: #a78bfa !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] .view-poem-btn:hover { background: #332b22 !important; color: #c9b6ff !important; }
html[data-theme="dark"] .community-section { background: #161210 !important; }
html[data-theme="dark"] .community-content h2 { color: #a78bfa !important; }
html[data-theme="dark"] .community-content p { color: #ece2d0 !important; }
html[data-theme="dark"] .join-btn { background: #4b2aad !important; color: #f5f0ff !important; }
html[data-theme="dark"] .join-btn:hover { background: #2a241e !important; color: #a78bfa !important; }

/* Links tab header */
html[data-theme="dark"] .links-header {
  background: #211b16 !important;
  border: 1px solid #332b22 !important;
}
html[data-theme="dark"] .links-header h2 { color: #a78bfa !important; }
html[data-theme="dark"] .links-header p { color: #a2947e !important; }

/* Ranking reset countdown badge + captions */
html[data-theme="dark"] .ranking-header span[style*="background:#e8e0f0"],
html[data-theme="dark"] .ranking-header span[style*="background: #e8e0f0"],
html[data-theme="dark"] .countdown-container span[style*="background:#e8e0f0"] {
  background: #2a241e !important;
  color: #fbbf24 !important;
  border: 1px solid #332b22 !important;
}
html[data-theme="dark"] .ranking-header p[style*="color:#666"],
html[data-theme="dark"] .ranking-header p[style*="color: #666"],
html[data-theme="dark"] .countdown-container + p {
  color: #a2947e !important;
}
html[data-theme="dark"] .ranking-header small,
html[data-theme="dark"] #ranking-poets-container .ranking-description {
  color: #a2947e !important;
}

/* Nav & header */
html[data-theme="dark"] header {
  background: #161210 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] nav,
html[data-theme="dark"] .header-bar {
  background: #161210 !important;
  border-bottom-color: #332b22 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] .logo-text { color: #a78bfa !important; }
html[data-theme="dark"] .logo .highlight,
html[data-theme="dark"] .logo .logo-highlight {
  color: #ffffff !important;
  text-shadow: 0 0 2px #4b2aad, 0 0 4px #4b2aad, 0 0 6px #4b2aad !important;
}
html[data-theme="dark"] nav .search-container input,
html[data-theme="dark"] nav .desktop-search-container input,
html[data-theme="dark"] #global-search-input,
html[data-theme="dark"] #desktop-search-input,
html[data-theme="dark"] #mobile-search-input {
  background: #211b16 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
  caret-color: #fbbf24;
}
html[data-theme="dark"] nav .search-container input::placeholder,
html[data-theme="dark"] nav .desktop-search-container input::placeholder {
  color: #a2947e;
}
html[data-theme="dark"] .username-display { color: #ece2d0 !important; }
html[data-theme="dark"] #login-link { color: #a78bfa !important; }
html[data-theme="dark"] .notif-bell { color: #ece2d0 !important; }
html[data-theme="dark"] .menu-toggle,
html[data-theme="dark"] .search-toggle { color: #ece2d0 !important; }

/* Mobile menus */
html[data-theme="dark"] .nav-links,
html[data-theme="dark"] .overlay-menu,
html[data-theme="dark"] .dropdown-content {
  background: #211b16 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] .nav-links a,
html[data-theme="dark"] .overlay-menu a,
html[data-theme="dark"] .dropdown-content a {
  color: #ece2d0 !important;
}
html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .overlay-menu a:hover,
html[data-theme="dark"] .dropdown-content a:hover { background: #2a241e !important; }
html[data-theme="dark"] .close-btn,
html[data-theme="dark"] .close-btn-overlay { color: #ece2d0 !important; }
html[data-theme="dark"] .night-toggle {
  background: transparent !important;
  border-color: transparent !important;
  color: #a78bfa !important;
}
html[data-theme="dark"] .night-toggle:hover { border-color: transparent !important; background: transparent !important; color: #c9b6ff !important; }

/* Reading surfaces */
html[data-theme="dark"] .recent-poem-card,
html[data-theme="dark"] .poem-card,
html[data-theme="dark"] .weekly-card,
html[data-theme="dark"] .quote-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .widget {
  background: #211b16 !important;
  border-color: #332b22 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .poem-content,
html[data-theme="dark"] .weekly-static-content,
html[data-theme="dark"] #weekly-quote,
html[data-theme="dark"] .quote-text {
  color: #ece2d0 !important;
}
html[data-theme="dark"] .poem-title,
html[data-theme="dark"] .weekly-static-title,
html[data-theme="dark"] .category-header,
html[data-theme="dark"] .community-title {
  color: #a78bfa !important;
}
html[data-theme="dark"] .read-more-btn,
html[data-theme="dark"] .category-link {
  color: #a78bfa !important;
}
html[data-theme="dark"] .author-link { color: #fbbf24 !important; }
html[data-theme="dark"] .muted,
html[data-theme="dark"] .view-badge,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .lower-caption,
html[data-theme="dark"] .author { color: #a2947e !important; }
html[data-theme="dark"] .home-btn { background: #4b2aad !important; color: #f5f0ff !important; }
html[data-theme="dark"] .home-btn:hover { background: #2a241e !important; color: #a78bfa !important; }

/* Comments & interaction */
html[data-theme="dark"] .comment,
html[data-theme="dark"] .comment-card {
  background: #1d1813 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] .comment-input,
html[data-theme="dark"] .comment-list textarea {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] .comment-btn { background: #4b2aad !important; color: #fff !important; }
html[data-theme="dark"] .like-btn,
html[data-theme="dark"] .show-comments-btn { color: #ece2d0 !important; border-color: #332b22 !important; }
html[data-theme="dark"] .welcome-banner {
  background: #12211a !important;
  border-left-color: #2d7d46 !important;
  color: #b7e6c5 !important;
}

/* Footer & misc containers */
html[data-theme="dark"] footer,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .footer { background: #0f0c0a !important; border-top-color: #332b22 !important; }

/* Modal & toast */
html[data-theme="dark"] .share-modal-content {
  background: #1d1813 !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="dark"] .share-modal-header { border-bottom-color: #332b22 !important; }
html[data-theme="dark"] .share-modal-header h3 { color: #ece2d0 !important; }
html[data-theme="dark"] .share-poem-info,
html[data-theme="dark"] .share-quote-info {
  background: #2a241e !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] .share-poem-info span,
html[data-theme="dark"] .share-quote-info span,
html[data-theme="dark"] .share-modal-body textarea { color: #a2947e !important; }
html[data-theme="dark"] .share-link-display {
  background: #211b16 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] .share-link-display input,
html[data-theme="dark"] .share-link-display { color: #ece2d0 !important; }
html[data-theme="dark"] .share-modal-close { background: #2a241e !important; color: #ece2d0 !important; }
html[data-theme="dark"] .toast-notification {
  background: #211b16 !important;
  color: #ece2d0 !important;
  border: 1px solid #332b22 !important;
}
html[data-theme="dark"] .comment-input,
html[data-theme="dark"] .comment-input:focus,
html[data-theme="dark"] .comment-list .reply-input textarea {
  background: #1d1813 !important;
  border-color: #332b22 !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .poem-category,
html[data-theme="dark"] .view-poem-btn,
html[data-theme="dark"] .gallery-section,
html[data-theme="dark"] .ranking-poet,
html[data-theme="dark"] .comment-list,
html[data-theme="dark"] .comment-list .comment {
  background: #1d1813 !important;
  color: var(--text) !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"] {
  --accent: #a78bfa !important;
  --accent-dark: #c9b6ff !important;
  --primary: #4b2aad !important;
  --primary-dark: #6d4ee7 !important;
  --primary-light: rgba(167, 139, 250, 0.14) !important;
  --secondary: #fbbf24 !important;
  --store-accent: #a78bfa !important;
  --store-gold: #fbbf24 !important;
  --store-grad-start: #4b2aad !important;
  --store-grad-end: #2a1a5e !important;
  --bg: #161210 !important;
  --bg-white: #1d1813 !important;
  --bg-cream: #161210 !important;
  --bg-light: #211b16 !important;
  --bg-main: #161210 !important;
  --bg-card: #1d1813 !important;
  --panel: #1d1813 !important;
  --panel-soft: #2a241e !important;
  --section-bg: #211b16 !important;
  --text: #ece2d0 !important;
  --text-dark: #ece2d0 !important;
  --text-light: #ece2d0 !important;
  --text-muted: #a2947e !important;
  --text-primary: #ece2d0 !important;
  --text-secondary: #a2947e !important;
  --muted: #a2947e !important;
  --line: #332b22 !important;
  --border: #332b22 !important;
  --border-light: #332b22 !important;
  --border-input: #3a3027 !important;
  --wishlist-red: #ef6b73 !important;
  --wishlist-grey: #a2947e !important;
}

html[data-theme="dark"] .dashboard,
html[data-theme="dark"] .admin-layout,
html[data-theme="dark"] .book-details-page,
html[data-theme="dark"] .store-main,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .page-wrap,
html[data-theme="dark"] .content,
html[data-theme="dark"] .container,
html[data-theme="dark"] .wrapper {
  background: #161210 !important;
  color: #ece2d0 !important;
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-soft,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .card,
html[data-theme="dark"] .page-card,
html[data-theme="dark"] .book-card,
html[data-theme="dark"] .book-info,
html[data-theme="dark"] .book-body,
html[data-theme="dark"] .book-info-wrapper,
html[data-theme="dark"] .book-cover,
html[data-theme="dark"] .sidebar-section,
html[data-theme="dark"] .reviews-summary,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .review-form,
html[data-theme="dark"] .purchase-options,
html[data-theme="dark"] .library-filters,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .library-empty-state,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .payout-card,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .book-row,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .cart-sidebar,
html[data-theme="dark"] .cart-header,
html[data-theme="dark"] .cart-items,
html[data-theme="dark"] .cart-item,
html[data-theme="dark"] .cart-footer,
html[data-theme="dark"] .preview-modal,
html[data-theme="dark"] .preview-header,
html[data-theme="dark"] .preview-footer,
html[data-theme="dark"] .contact-modal-content,
html[data-theme="dark"] .contact-modal-form,
html[data-theme="dark"] .account-menu,
html[data-theme="dark"] .acct-menu,
html[data-theme="dark"] .share-modal-content,
html[data-theme="dark"] .featured-card {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .section-title,
html[data-theme="dark"] .book-title,
html[data-theme="dark"] .book-info h2,
html[data-theme="dark"] .book-info h3,
html[data-theme="dark"] .sidebar-title,
html[data-theme="dark"] .stat .value,
html[data-theme="dark"] .stat h4,
html[data-theme="dark"] .page-info h3,
html[data-theme="dark"] .payout-amount,
html[data-theme="dark"] .review-form h4,
html[data-theme="dark"] .modal-header h3,
html[data-theme="dark"] .cart-header h2,
html[data-theme="dark"] .preview-header h3 {
  color: #ece2d0 !important;
}

html[data-theme="dark"] .topbar p,
html[data-theme="dark"] .payout-sub,
html[data-theme="dark"] .book-meta,
html[data-theme="dark"] .book-description,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .review-meta,
html[data-theme="dark"] .activity-item p {
  color: #a2947e !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .promo-form input,
html[data-theme="dark"] .promo-form select,
html[data-theme="dark"] .library-filters input,
html[data-theme="dark"] .library-filters select,
html[data-theme="dark"] .review-form textarea,
html[data-theme="dark"] .modal input,
html[data-theme="dark"] .modal select,
html[data-theme="dark"] .modal textarea,
html[data-theme="dark"] #payoutType {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #3a3027 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #8a7c6a !important;
}

html[data-theme="dark"] .btn-store,
html[data-theme="dark"] .btn-signin,
html[data-theme="dark"] .btn-submit,
html[data-theme="dark"] .action-btn,
html[data-theme="dark"] .checkout-btn,
html[data-theme="dark"] .btn-browse,
html[data-theme="dark"] .btn-submit-review,
html[data-theme="dark"] .btn-send-message,
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .promo-form button,
html[data-theme="dark"] .settings-nav-item.active {
  background: #4b2aad !important;
  color: #fff !important;
  border-color: #6d4ee7 !important;
}

html[data-theme="dark"] .quantity-btn,
html[data-theme="dark"] .tab,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .settings-nav-item {
  background: #2a241e !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"] .sidebar a,
html[data-theme="dark"] .settings-nav a,
html[data-theme="dark"] .acct-item,
html[data-theme="dark"] .nav a {
  color: #ece2d0 !important;
}

html[data-theme="dark"] .sidebar a.active,
html[data-theme="dark"] .settings-nav-item.active,
html[data-theme="dark"] .nav a.active {
  background: #2a241e !important;
  color: #c9b6ff !important;
}

html[data-theme="dark"] [class*="badge"],
html[data-theme="dark"] [class*="status"] {
  border-color: #332b22 !important;
}

html[data-theme="dark"] [class*="available"],
html[data-theme="dark"] [class*="success"],
html[data-theme="dark"] [class*="purchased"],
html[data-theme="dark"] [class*="owned"] {
  background: #12211a !important;
  color: #b7e6c5 !important;
}

html[data-theme="dark"] [class*="preorder"],
html[data-theme="dark"] [class*="pending"],
html[data-theme="dark"] [class*="warning"] {
  background: #2a241e !important;
  color: #fcd34d !important;
}

html[data-theme="dark"] [class*="sold-out"],
html[data-theme="dark"] [class*="out-of-stock"],
html[data-theme="dark"] [class*="unavailable"],
html[data-theme="dark"] [class*="error"],
html[data-theme="dark"] [class*="danger"] {
  background: #2a1414 !important;
  color: #fca5a5 !important;
}

html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background:#f7f7fb"],
html[data-theme="dark"] [style*="background: #f7f7fb"],
html[data-theme="dark"] [style*="background:#f8f5f0"],
html[data-theme="dark"] [style*="background: #f8f5f0"],
html[data-theme="dark"] [style*="background:#faf7f2"],
html[data-theme="dark"] [style*="background: #faf7f2"],
html[data-theme="dark"] [style*="background:#faf9fe"],
html[data-theme="dark"] [style*="background: #faf9fe"],
html[data-theme="dark"] [style*="background:#fcf9f6"],
html[data-theme="dark"] [style*="background: #fcf9f6"],
html[data-theme="dark"] [style*="background:#fdfbf7"],
html[data-theme="dark"] [style*="background: #fdfbf7"],
html[data-theme="dark"] [style*="background:#fef3e2"],
html[data-theme="dark"] [style*="background: #fef3e2"],
html[data-theme="dark"] [style*="background:#fff3e0"],
html[data-theme="dark"] [style*="background: #fff3e0"],
html[data-theme="dark"] [style*="background:#fde8e8"],
html[data-theme="dark"] [style*="background: #fde8e8"],
html[data-theme="dark"] [style*="background:#f8d7da"],
html[data-theme="dark"] [style*="background: #f8d7da"],
html[data-theme="dark"] [style*="background:#dff7e5"],
html[data-theme="dark"] [style*="background: #dff7e5"],
html[data-theme="dark"] [style*="background:#e8f0fe"],
html[data-theme="dark"] [style*="background: #e8f0fe"],
html[data-theme="dark"] [style*="background:#f0f4ff"],
html[data-theme="dark"] [style*="background: #f0f4ff"],
html[data-theme="dark"] [style*="background:#f0eaff"],
html[data-theme="dark"] [style*="background: #f0eaff"],
html[data-theme="dark"] [style*="background:#f0ebe4"],
html[data-theme="dark"] [style*="background: #f0ebe4"],
html[data-theme="dark"] [style*="background:#f0ece6"],
html[data-theme="dark"] [style*="background: #f0ece6"],
html[data-theme="dark"] [style*="background:#f0f0f0"],
html[data-theme="dark"] [style*="background: #f0f0f0"],
html[data-theme="dark"] [style*="background:#ede7df"],
html[data-theme="dark"] [style*="background: #ede7df"],
html[data-theme="dark"] [style*="background:#eee"],
html[data-theme="dark"] [style*="background: #eee"],
html[data-theme="dark"] [style*="background:#fee"],
html[data-theme="dark"] [style*="background: #fee"] {
  background: #1d1813 !important;
}

html[data-theme="dark"] [style*="color:#2d2a24"],
html[data-theme="dark"] [style*="color: #2d2a24"],
html[data-theme="dark"] [style*="color:#1d1833"],
html[data-theme="dark"] [style*="color: #1d1833"],
html[data-theme="dark"] [style*="color:#1d1a2b"],
html[data-theme="dark"] [style*="color: #1d1a2b"],
html[data-theme="dark"] [style*="color:#333"],
html[data-theme="dark"] [style*="color: #333"],
html[data-theme="dark"] [style*="color:#444"],
html[data-theme="dark"] [style*="color: #444"],
html[data-theme="dark"] [style*="color:#666"],
html[data-theme="dark"] [style*="color: #666"],
html[data-theme="dark"] [style*="color:#6f6252"],
html[data-theme="dark"] [style*="color: #6f6252"],
html[data-theme="dark"] [style*="color:#7a5c00"],
html[data-theme="dark"] [style*="color: #7a5c00"],
html[data-theme="dark"] [style*="color:#888"],
html[data-theme="dark"] [style*="color: #888"],
html[data-theme="dark"] [style*="color:#8a7b6a"],
html[data-theme="dark"] [style*="color: #8a7b6a"],
html[data-theme="dark"] [style*="color:#8a8698"],
html[data-theme="dark"] [style*="color: #8a8698"],
html[data-theme="dark"] [style*="color:#999"],
html[data-theme="dark"] [style*="color: #999"],
html[data-theme="dark"] [style*="color:#b0a496"],
html[data-theme="dark"] [style*="color: #b0a496"],
html[data-theme="dark"] [style*="color:#c4b8aa"],
html[data-theme="dark"] [style*="color: #c4b8aa"],
html[data-theme="dark"] [style*="color:#cbb9a8"],
html[data-theme="dark"] [style*="color: #cbb9a8"] {
  color: #ece2d0 !important;
}

html[data-theme="dark"] [style*="color:#a2947e"],
html[data-theme="dark"] [style*="color: #a2947e"],
html[data-theme="dark"] [style*="color:#8b7d6f"],
html[data-theme="dark"] [style*="color: #8b7d6f"] {
  color: #a2947e !important;
}

html[data-reader-light="1"] .night-toggle {
  display: none !important;
}

/* Extreme small screens: keep header toggle icon comfortably tappable */
@media (max-width: 480px) {
  .night-toggle { padding: 4px; font-size: 1.1rem; }
}

/* ===== Store forms and notices — espresso night readability pass ===== */
html[data-theme="dark"] {
  --bg-light: #161210 !important;
  --bg-white: #211b16 !important;
  --text-dark: #ece2d0 !important;
  --text-muted: #a2947e !important;
  --border-light: #332b22 !important;
  --border-input: #4a3f34 !important;
  --section-bg: #1d1813 !important;
}

html[data-theme="dark"] .container,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .policy-card,
html[data-theme="dark"] .legal-section,
html[data-theme="dark"] .legal-item,
html[data-theme="dark"] .downloads-group,
html[data-theme="dark"] .pricing-group,
html[data-theme="dark"] .draft-notice,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .notice-box,
html[data-theme="dark"] .warning-banner,
html[data-theme="dark"] .info-banner,
html[data-theme="dark"] .status-card,
html[data-theme="dark"] .stat-card {
  background: #211b16 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="dark"] label,
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .downloads-title,
html[data-theme="dark"] .pricing-title,
html[data-theme="dark"] .section-title-block h3,
html[data-theme="dark"] .legal-item,
html[data-theme="dark"] .legal-item label,
html[data-theme="dark"] .draft-text,
html[data-theme="dark"] .draft-text strong,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .legal-subtext,
html[data-theme="dark"] .helper-text,
html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .section-badge,
html[data-theme="dark"] .required,
html[data-theme="dark"] .user-badge,
html[data-theme="dark"] .user-badge span,
html[data-theme="dark"] [style*="color:#8a7b6a"],
html[data-theme="dark"] [style*="color: #8a7b6a"],
html[data-theme="dark"] [style*="color:#b76e4b"],
html[data-theme="dark"] [style*="color: #b76e4b"] {
  color: #ece2d0 !important;
}

html[data-theme="dark"] .legal-subtext,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .helper-text,
html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .user-badge span,
html[data-theme="dark"] [style*="color:#8a7b6a"],
html[data-theme="dark"] [style*="color: #8a7b6a"] {
  color: #a2947e !important;
}

html[data-theme="dark"] .section-badge,
html[data-theme="dark"] [style*="color:#b76e4b"],
html[data-theme="dark"] [style*="color: #b76e4b"] {
  background: #2a241e !important;
  border: 1px solid #4a3f34 !important;
  color: #fbbf24 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color-scheme: dark;
  background: #161210 !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}

html[data-theme="dark"] select option {
  background: #211b16 !important;
  color: #ece2d0 !important;
}

html[data-theme="dark"] input[type="checkbox"],
html[data-theme="dark"] input[type="radio"] {
  accent-color: #a78bfa !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #8b7d6f !important;
}

html[data-theme="dark"] .keyword-picker-wrap .choose-keyword-btn,
html[data-theme="dark"] .keyword-input-wrapper .add-keyword-btn {
  background: #2a241e !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}

html[data-theme="dark"] .keyword-picker-wrap .choose-keyword-btn:hover,
html[data-theme="dark"] .keyword-input-wrapper .add-keyword-btn:hover {
  background: #4b2aad !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .keyword-picker-wrap .choose-keyword-btn:disabled,
html[data-theme="dark"] .keyword-input-wrapper .add-keyword-btn:disabled {
  background: #241f1b !important;
  color: #8b7d6f !important;
  border-color: #3a3027 !important;
}

html[data-theme="dark"] .keyword-picker {
  background: #1d1815 !important;
  border-color: #4a3f34 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55) !important;
}

html[data-theme="dark"] .keyword-picker-title,
html[data-theme="dark"] .keyword-counter {
  color: #c9b6ff !important;
}

html[data-theme="dark"] .keyword-picker-search {
  background: #161210 !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}

html[data-theme="dark"] .keyword-picker-search::placeholder {
  color: #8b7d6f !important;
}

html[data-theme="dark"] .keyword-option {
  background: #2a241e !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}

html[data-theme="dark"] .keyword-option:hover {
  background: #4b2aad !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .keyword-option.selected {
  background: #332b22 !important;
  color: #c9b6ff !important;
  border-color: #a78bfa !important;
}

html[data-theme="dark"] .keyword-picker-empty,
html[data-theme="dark"] .keyword-tag .remove-keyword {
  color: #a2947e !important;
}

html[data-theme="dark"] .keyword-picker-more {
  border-color: #4a3f34 !important;
  color: #c9b6ff !important;
}

html[data-theme="dark"] .keyword-picker-more:hover {
  background: #2a241e !important;
}

html[data-theme="dark"] .keyword-tag {
  background: #2a241e !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}

html[data-theme="dark"] .keyword-tag .remove-keyword:hover {
  color: #c9b6ff !important;
}
html[data-theme="dark"] .keyword-tags,
html[data-theme="dark"] .keyword-picker-options { background: transparent !important; }
html[data-theme="dark"] .keyword-counter .count-required,
html[data-theme="dark"] .form-group .hint { color: #c9b6ff !important; }

html[data-theme="dark"]:not([data-reader-light="1"]) #backLink {
  background: #2a241e !important;
  color: #c9b6ff !important;
  border: 1px solid #332b22 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) #backLink:hover {
  background: #332b22 !important;
  color: #e9d5ff !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) #backLink i {
  color: inherit !important;
}

html[data-theme="dark"] #backDestination {
  color: #a2947e !important;
}

html[data-theme="dark"] #payoutWarningBanner,
html[data-theme="dark"] #formFeedback.success,
html[data-theme="dark"] #formFeedback .feedback-actions {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"] #payoutWarningBanner .banner-text h4,
html[data-theme="dark"] #payoutWarningBanner .banner-text p {
  color: #ece2d0 !important;
}

html[data-theme="dark"] #payoutWarningBanner .btn-setup-payout,
html[data-theme="dark"] #formFeedback .feedback-actions .btn-dashboard {
  background: #4b2aad !important;
  color: #f5f0ff !important;
}

html[data-theme="dark"] #page-dashboard .section-title h2,
html[data-theme="dark"] #page-dashboard #salesLink {
  color: #a78bfa !important;
}

html[data-theme="dark"] #page-dashboard #recentSales .sale-item {
  background: #211b16 !important;
  border-color: #332b22 !important;
  color: #ece2d0 !important;
}

html[data-theme="dark"] #page-dashboard #recentSales .sale-item:hover {
  background: #2a241e !important;
  border-color: #4b3f33 !important;
}

html[data-theme="dark"] #page-dashboard #recentSales .sale-item i {
  color: #c9b6ff !important;
}

html[data-theme="dark"] #page-dashboard #recentSales .sale-item span[style*="color:#888"],
html[data-theme="dark"] #page-dashboard #recentSales .sale-item span[style*="color: #888"],
html[data-theme="dark"] #page-dashboard #recentSales > p[style*="color:#888"],
html[data-theme="dark"] #page-dashboard #recentSales > p[style*="color: #888"] {
  color: #a2947e !important;
}

html[data-theme="dark"] .checkbox-group,
html[data-theme="dark"] .radio-group {
  background: transparent !important;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .draft-actions button,
html[data-theme="dark"] #loadDraftBtn,
html[data-theme="dark"] #discardDraftBtn {
  background: #2a241e !important;
  color: #ece2d0 !important;
  border: 1px solid #4a3f34 !important;
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .draft-actions button:hover,
html[data-theme="dark"] #loadDraftBtn:hover {
  background: #332b22 !important;
  color: #c9b6ff !important;
}

html[data-theme="dark"] .btn-discard-draft,
html[data-theme="dark"] #discardDraftBtn {
  color: #fca5a5 !important;
}

html[data-theme="dark"] .draft-notice,
html[data-theme="dark"] .notice-box,
html[data-theme="dark"] .warning-banner {
  border-left: 4px solid #a78bfa !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) body,
html[data-theme="dark"]:not([data-reader-light="1"]) #new-books,
html[data-theme="dark"]:not([data-reader-light="1"]) .store-main,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-grid,
html[data-theme="dark"]:not([data-reader-light="1"]) .new-book-grid,
html[data-theme="dark"]:not([data-reader-light="1"]) .facet-toolbar {
  background: #161210 !important;
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) #new-books .section-title,
html[data-theme="dark"]:not([data-reader-light="1"]) #new-books .section-subtitle,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-count,
html[data-theme="dark"]:not([data-reader-light="1"]) .reading-list-chip,
html[data-theme="dark"]:not([data-reader-light="1"]) .reading-list-chip.active,
html[data-theme="dark"]:not([data-reader-light="1"]) .reading-list-chip:hover {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) #new-books .section-subtitle,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-count {
  color: #a2947e !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .reading-list-chip,
html[data-theme="dark"]:not([data-reader-light="1"]) .reading-list-chip.active,
html[data-theme="dark"]:not([data-reader-light="1"]) .reading-list-chip:hover,
html[data-theme="dark"]:not([data-reader-light="1"]) .chip-count {
  background: #2a241e !important;
  border: 1px solid #4a3f34 !important;
  color: #c9b6ff !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .facet-select,
html[data-theme="dark"]:not([data-reader-light="1"]) .search-container input {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .book-details,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-header,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-body,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-sidebar,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .sidebar-section,
html[data-theme="dark"]:not([data-reader-light="1"]) .more-by-author,
html[data-theme="dark"]:not([data-reader-light="1"]) .details-loading {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-cover,
html[data-theme="dark"]:not([data-reader-light="1"]) .more-by-author .cover-wrapper {
  background: #211b16 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-info .title,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-info .subtitle,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-info .author,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-info .publisher,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-info .price,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-body .section-title,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-body .synopsis,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-body .author-bio,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .sidebar-section .label,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .sidebar-section .value,
html[data-theme="dark"]:not([data-reader-light="1"]) .exchange-rate-widget,
html[data-theme="dark"]:not([data-reader-light="1"]) .exchange-rate-widget span {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-info .subtitle,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .book-info .publisher,
html[data-theme="dark"]:not([data-reader-light="1"]) .exchange-rate-widget,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .sidebar-section .label {
  color: #a2947e !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .faq-container,
html[data-theme="dark"]:not([data-reader-light="1"]) .faq-section,
html[data-theme="dark"]:not([data-reader-light="1"]) .author-guidance,
html[data-theme="dark"]:not([data-reader-light="1"]) .contact-cta,
html[data-theme="dark"]:not([data-reader-light="1"]) .category-tab,
html[data-theme="dark"]:not([data-reader-light="1"]) .faq-question,
html[data-theme="dark"]:not([data-reader-light="1"]) .faq-answer,
html[data-theme="dark"]:not([data-reader-light="1"]) .faq-section-title {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .author-guidance h4,
html[data-theme="dark"]:not([data-reader-light="1"]) .author-guidance ul li,
html[data-theme="dark"]:not([data-reader-light="1"]) .faq-answer p,
html[data-theme="dark"]:not([data-reader-light="1"]) .contact-cta p {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .author-guidance ul li i,
html[data-theme="dark"]:not([data-reader-light="1"]) .faq-section-title,
html[data-theme="dark"]:not([data-reader-light="1"]) .category-tab.active {
  color: #a78bfa !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .contact-cta .btn {
  background: #4b2aad !important;
  color: #fff !important;
  border-color: #6d4ee7 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .reading-stats-grid,
html[data-theme="dark"]:not([data-reader-light="1"]) .reading-stat-card,
html[data-theme="dark"]:not([data-reader-light="1"]) .panel,
html[data-theme="dark"]:not([data-reader-light="1"]) .panel-soft {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .stat-number,
html[data-theme="dark"]:not([data-reader-light="1"]) .stat-label,
html[data-theme="dark"]:not([data-reader-light="1"]) .panel h3,
html[data-theme="dark"]:not([data-reader-light="1"]) .panel h4 {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .stat-sub,
html[data-theme="dark"]:not([data-reader-light="1"]) .panel p {
  color: #a2947e !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .refund-container,
html[data-theme="dark"]:not([data-reader-light="1"]) .refund-card,
html[data-theme="dark"]:not([data-reader-light="1"]) .refund-content,
html[data-theme="dark"]:not([data-reader-light="1"]) .contact-card,
html[data-theme="dark"]:not([data-reader-light="1"]) .contact-item {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .refund-card h2,
html[data-theme="dark"]:not([data-reader-light="1"]) .refund-card h3,
html[data-theme="dark"]:not([data-reader-light="1"]) .refund-card h4,
html[data-theme="dark"]:not([data-reader-light="1"]) .refund-card p,
html[data-theme="dark"]:not([data-reader-light="1"]) .refund-card li,
html[data-theme="dark"]:not([data-reader-light="1"]) .contact-item a {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .contact-item a {
  text-decoration-color: #a78bfa !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .page-header,
html[data-theme="dark"]:not([data-reader-light="1"]) .publish-container,
html[data-theme="dark"]:not([data-reader-light="1"]) .hero-section,
html[data-theme="dark"]:not([data-reader-light="1"]) .publish-card,
html[data-theme="dark"]:not([data-reader-light="1"]) .feature-grid,
html[data-theme="dark"]:not([data-reader-light="1"]) .feature-item,
html[data-theme="dark"]:not([data-reader-light="1"]) .publish-content,
html[data-theme="dark"]:not([data-reader-light="1"]) .quick-tips,
html[data-theme="dark"]:not([data-reader-light="1"]) .quick-tip,
html[data-theme="dark"]:not([data-reader-light="1"]) .author-guidance,
html[data-theme="dark"]:not([data-reader-light="1"]) .note-box,
html[data-theme="dark"]:not([data-reader-light="1"]) .royalty-box,
html[data-theme="dark"]:not([data-reader-light="1"]) .royalty-item,
html[data-theme="dark"]:not([data-reader-light="1"]) .key-points,
html[data-theme="dark"]:not([data-reader-light="1"]) .key-point,
html[data-theme="dark"]:not([data-reader-light="1"]) .payment-methods,
html[data-theme="dark"]:not([data-reader-light="1"]) .payment-method,
html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list,
html[data-theme="dark"]:not([data-reader-light="1"]) .cta-section,
html[data-theme="dark"]:not([data-reader-light="1"]) .page-footer,
html[data-theme="dark"]:not([data-reader-light="1"]) .breadcrumb {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .page-header h1,
html[data-theme="dark"]:not([data-reader-light="1"]) .publish-card h2,
html[data-theme="dark"]:not([data-reader-light="1"]) .publish-card h3,
html[data-theme="dark"]:not([data-reader-light="1"]) .publish-card h4,
html[data-theme="dark"]:not([data-reader-light="1"]) .publish-content h3,
html[data-theme="dark"]:not([data-reader-light="1"]) .feature-item h3,
html[data-theme="dark"]:not([data-reader-light="1"]) .feature-item h4,
html[data-theme="dark"]:not([data-reader-light="1"]) .quick-tip,
html[data-theme="dark"]:not([data-reader-light="1"]) .royalty-item,
html[data-theme="dark"]:not([data-reader-light="1"]) .payment-method,
html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list li,
html[data-theme="dark"]:not([data-reader-light="1"]) .cta-section h2,
html[data-theme="dark"]:not([data-reader-light="1"]) .cta-section p {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .page-header .subtitle,
html[data-theme="dark"]:not([data-reader-light="1"]) .section-subtitle,
html[data-theme="dark"]:not([data-reader-light="1"]) .note-box,
html[data-theme="dark"]:not([data-reader-light="1"]) .small,
html[data-theme="dark"]:not([data-reader-light="1"]) .label,
html[data-theme="dark"]:not([data-reader-light="1"]) .breadcrumb a {
  color: #a2947e !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .percentage,
html[data-theme="dark"]:not([data-reader-light="1"]) .role-badge,
html[data-theme="dark"]:not([data-reader-light="1"]) .icon-item {
  background: #2a241e !important;
  color: #c9b6ff !important;
  border-color: #4a3f34 !important;
}


/* Extreme small screens: keep header toggle icon comfortably tappable */
@media (max-width: 480px) {
  .night-toggle { padding: 4px; font-size: 1.1rem; }
}

html[data-theme="dark"]:not([data-reader-light="1"]) .category-tabs,
html[data-theme="dark"]:not([data-reader-light="1"]) .category-tab,
html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .sidebar-item.download-limit,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .download-reminder,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .purchase-status,
html[data-theme="dark"]:not([data-reader-light="1"]) .download-limit-badge,
html[data-theme="dark"]:not([data-reader-light="1"]) div[style*="background:#f8f6ff"],
html[data-theme="dark"]:not([data-reader-light="1"]) div[style*="background: #f8f6ff"] {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .category-tab.active {
  background: #4b2aad !important;
  color: #ffffff !important;
  border-color: #6d4ee7 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list li,
html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list li strong,
html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list li em,
html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list li a,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .sidebar-item.download-limit .label,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .sidebar-item.download-limit .value,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .download-reminder,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .download-reminder .limit-value,
html[data-theme="dark"]:not([data-reader-light="1"]) .book-details .purchase-status span {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list li {
  background: #211b16 !important;
  border-left-color: #6d4ee7 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .steps-list li:hover {
  background: #2a241e !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) a[style*="color: var(--primary)"],
html[data-theme="dark"]:not([data-reader-light="1"]) a[style*="color:var(--primary)"],
html[data-theme="dark"]:not([data-reader-light="1"]) h4[style*="color: var(--primary)"],
html[data-theme="dark"]:not([data-reader-light="1"]) h4[style*="color:var(--primary)"] {
  color: #c9b6ff !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) p[style*="color: var(--text-muted)"],
html[data-theme="dark"]:not([data-reader-light="1"]) p[style*="color:var(--text-muted)"],
html[data-theme="dark"]:not([data-reader-light="1"]) div[style*="color: var(--text-secondary)"] span,
html[data-theme="dark"]:not([data-reader-light="1"]) div[style*="color:var(--text-secondary)"] span {
  color: #ece2d0 !important;
}

html[data-theme="dark"]:not([data-reader-light="1"]) .cta-section .btn:not(.btn-outline) {
  background: #4b2aad !important;
  color: #ffffff !important;
  border-color: #6d4ee7 !important;
}

html[data-theme="dark"] .card-side {
  background: #1d1813 !important;
  border: 1px solid #332b22 !important;
}
html[data-theme="dark"] .card-side h3 {
  color: #c9b6ff !important;
}
html[data-theme="dark"] .card-side p {
  color: #a2947e !important;
}
html[data-theme="dark"] #deleteConfirmModal,
html[data-theme="dark"] #deleteConfirmModal .modal,
html[data-theme="dark"] #deleteConfirmModal .delete-modal-content {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] #deleteConfirmModal .send-message-header {
  border-bottom-color: #6d4ee7 !important;
}
html[data-theme="dark"] #deleteConfirmModal .send-message-header h3,
html[data-theme="dark"] #deleteConfirmModal .send-message-header p {
  color: #fca5a5 !important;
}
html[data-theme="dark"] #deleteConfirmModal .send-message-header span[style*="background"] {
  background: #2a241e !important;
}
html[data-theme="dark"] #deleteConfirmModal .send-message-close {
  background: #2a241e !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] #deleteConfirmModal .account-info-card {
  background: #2a241e !important;
  border-color: #6d4ee7 !important;
}
html[data-theme="dark"] #deleteConfirmModal .account-info-text .name {
  color: #c9b6ff !important;
}
html[data-theme="dark"] #deleteConfirmModal .account-info-text .email {
  color: #a2947e !important;
}
html[data-theme="dark"] #deleteConfirmModal .warning-box {
  background: #2a241e !important;
  border-color: #6d4ee7 !important;
}
html[data-theme="dark"] #deleteConfirmModal .warning-box p {
  color: #fcd34d !important;
}
html[data-theme="dark"] #deleteConfirmModal .warning-box p span {
  color: #fca5a5 !important;
}
html[data-theme="dark"] #deleteConfirmModal .info-box {
  background: #211b16 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] #deleteConfirmModal .info-box p {
  color: #c9b6ff !important;
}
html[data-theme="dark"] #deleteConfirmModal .confirm-check,
html[data-theme="dark"] #deleteConfirmModal .gdpr-check {
  background: #211b16 !important;
  border-color: #332b22 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] #deleteConfirmModal .confirm-check label,
html[data-theme="dark"] #deleteConfirmModal .gdpr-check label,
html[data-theme="dark"] #deleteConfirmModal .username-confirm label {
  color: #ece2d0 !important;
}
html[data-theme="dark"] #deleteConfirmModal .username-confirm label span {
  color: #c9b6ff !important;
}
html[data-theme="dark"] #deleteConfirmModal .modal-actions .btn-cancel {
  background: #2a241e !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}

html body .dashboard > .sidebar,
.dashboard > .sidebar {
  top: 70px !important;
  height: calc(100vh - 70px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 24px !important;
}
html body .dashboard > .sidebar .nav,
.dashboard > .sidebar .nav {
  max-width: none !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: auto !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 6px !important;
}
.dashboard > .sidebar .card-side {
  text-align: left !important;
}
html[data-theme="dark"] .dashboard > .sidebar {
  scrollbar-color: #4a3f34 #1d1813;
  scrollbar-width: thin;
}
html[data-theme="dark"] .dashboard > .sidebar::-webkit-scrollbar {
  width: 8px;
}
html[data-theme="dark"] .dashboard > .sidebar::-webkit-scrollbar-track {
  background: #1d1813;
}
html[data-theme="dark"] .dashboard > .sidebar::-webkit-scrollbar-thumb {
  background: #4a3f34;
  border-radius: 8px;
}
html[data-theme="dark"] #page-messages .page-header p,
html[data-theme="dark"] #notifPageSummary,
html[data-theme="dark"] .notif-page-time,
html[data-theme="dark"] .message-item .message-meta {
  color: #a2947e !important;
}
html[data-theme="dark"] .notif-page-item,
html[data-theme="dark"] .message-item {
  border-color: #332b22 !important;
}
html[data-theme="dark"] .notif-page-item.unread,
html[data-theme="dark"] .message-item.unread {
  background: #2a241e !important;
}
html[data-theme="dark"] .notif-page-msg,
html[data-theme="dark"] .message-item .message-sender,
html[data-theme="dark"] .message-item .message-subject,
html[data-theme="dark"] .message-item .message-body {
  color: #ece2d0 !important;
}
html[data-theme="dark"] .notif-page-platform {
  background: #2a241e !important;
  color: #c9b6ff !important;
  border-color: #6d4ee7 !important;
}
html[data-theme="dark"] .notif-page-msg a,
html[data-theme="dark"] .message-item .message-body a {
  color: #c9b6ff !important;
}
html[data-theme="dark"] #updateModal,
html[data-theme="dark"] #updateModal .modal {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] #updateModal .modal-close {
  background: #2a241e !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] #updateModal .modal-sub,
html[data-theme="dark"] #updateModal .file-hint,
html[data-theme="dark"] #updateModal .form-group small,
html[data-theme="dark"] #updateModal p[style*="color:#888"] {
  color: #a2947e !important;
}
html[data-theme="dark"] #updateModal .current-file {
  color: #b7e6c5 !important;
}
html[data-theme="dark"] #updateModal select option {
  background: #1d1813 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] #updateModal .btn-cancel,
html[data-theme="dark"] #updateModal .btn-delete {
  background: #2a241e !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"] #updateModal .form-actions .btn-delete {
  color: #fca5a5 !important;
  border-color: #dc3545 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card {
  background: #211b16 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card h3,
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card p,
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card div,
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card span {
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card small,
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card .promo-code-meta,
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-card .promo-detail {
  color: #a2947e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-status {
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-status.status-active {
  background: #183424 !important;
  color: #86efac !important;
  border-color: #2f6b47 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-status.status-paused {
  background: #3a2f12 !important;
  color: #fcd34d !important;
  border-color: #6b571f !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-status.status-expired {
  background: #3a1717 !important;
  color: #fca5a5 !important;
  border-color: #7a2e2e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-action {
  background: #2a241e !important;
  color: #c9b6ff !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-action:hover {
  background: #332b22 !important;
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-action.danger {
  background: #2a1414 !important;
  color: #fca5a5 !important;
  border-color: #7a2e2e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-action.danger:hover {
  background: #3a1717 !important;
  color: #fca5a5 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-form .form-group label {
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-msg {
  color: #fca5a5 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .promo-form .btn:disabled {
  background: #2a241e !important;
  color: #8b7d6f !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) body {
  background: #161210 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .container {
  background: rgba(29, 24, 19, 0.96) !important;
  border-color: #332b22 !important;
  color: #ece2d0 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) h2,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .brand {
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .subtitle,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .breadcrumb,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .breadcrumb a,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .field-hint,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .links small,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .countdown,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) p[style*="color: #555"],
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) p[style*="color:#555"] {
  color: #a2947e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .platform-badge {
  background: #2a241e !important;
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .platform-badge.poetry { background: linear-gradient(135deg, #4b2aad, #6f4ae4) !important; }
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .platform-badge.reads { background: linear-gradient(135deg, #7a5530, #a87a45) !important; }
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .platform-badge.foundry { background: linear-gradient(135deg, #34495e, #4a627a) !important; }
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .google-btn {
  background: #211b16 !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .google-btn .google-text {
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .google-btn:hover:not(:disabled) {
  background: #332b22 !important;
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .divider-text {
  color: #a2947e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .divider-text::before,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .divider-text::after {
  background: #332b22 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) form label {
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) input[type="text"],
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) input[type="email"],
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) input[type="password"] {
  background: #161210 !important;
  color: #ece2d0 !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) input:focus {
  background: #1d1813 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) input::placeholder {
  color: #8b7d6f !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .password-eye {
  color: #a2947e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .password-eye:hover,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .password-eye.showing {
  background: #332b22 !important;
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .password-strength.weak {
  background: #3a1717 !important;
  color: #fca5a5 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .password-strength.medium {
  background: #3a2f12 !important;
  color: #fcd34d !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .password-strength.strong {
  background: #183424 !important;
  color: #86efac !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-primary {
  background: #4b2aad !important;
  color: #fff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-primary:hover:not(:disabled) {
  background: #6f4ae4 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-primary:disabled {
  background: #2a241e !important;
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-primary:disabled #buttonText {
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-secondary,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-outline {
  background: #2a241e !important;
  color: #c9b6ff !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-secondary:hover,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .btn-outline:hover {
  background: #332b22 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .status {
  background: #211b16 !important;
  color: #ece2d0 !important;
  border-color: #332b22 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .status.success {
  background: #183424 !important;
  color: #86efac !important;
  border-color: #2f6b47 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .status.error {
  background: #3a1717 !important;
  color: #fca5a5 !important;
  border-color: #7a2e2e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .status.info {
  background: #2a241e !important;
  color: #fbbf24 !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .account-check {
  background: rgba(42, 36, 30, 0.65) !important;
  border-color: #332b22 !important;
  color: #a2947e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .account-check a,
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .links a {
  color: #a78bfa !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .email-display {
  background: #2a241e !important;
  color: #c9b6ff !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .message-box {
  background: #1d1813 !important;
  color: #ece2d0 !important;
  border-left-color: #6f4ae4 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .spam-tip {
  background: #3a2f12 !important;
  border-color: #4a3f34 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) code {
  background: #2a241e !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) hr {
  border-top-color: #332b22 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .nav a:hover {
  background: #2a241e !important;
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .nav a:hover i {
  color: #c9b6ff !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .page-header h2 {
  color: #c9a227 !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .page-header p {
  color: #a2947e !important;
}
html[data-theme="dark"]:not([data-reader-light="1"]) .msg-tab.active {
  background: #4b2aad !important;
  color: #c9a227 !important;
  border-color: #7c55e8 !important;
}
.epub-toc-body {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}
.epub-toc-item {
  display: block !important;
  width: 100% !important;
}
html[data-theme="dark"] .continue-book-card,
html[data-theme="dark"] .recommend-book-card {
  background: #211b16 !important;
  border-color: #332b22 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24) !important;
}
html[data-theme="dark"] .continue-book-card .book-title,
html[data-theme="dark"] .recommend-book-card .book-title {
  color: #ece2d0 !important;
}
html[data-theme="dark"] .continue-book-card .book-author,
html[data-theme="dark"] .continue-book-card .progress-text,
html[data-theme="dark"] .recommend-book-card .book-author {
  color: #a2947e !important;
}
html[data-theme="dark"] .recommend-book-card .book-price {
  color: #c9b6ff !important;
}
html[data-theme="dark"] .section-title .btn-pill {
  color: #c9b6ff !important;
  border-color: #7c55e8 !important;
}
html[data-theme="dark"] .section-title > span[style*="color:#999"] {
  color: #a2947e !important;
}
html[data-theme="dark"] .continue-cover,
html[data-theme="dark"] .recommend-cover {
  background: #2a241e !important;
}
html[data-theme="dark"] .continue-cover .no-image,
html[data-theme="dark"] .recommend-cover .no-image {
  color: #a2947e !important;
}
html[data-theme="dark"] #settings-tab-earnings h3,
html[data-theme="dark"] #settings-tab-earnings h4 {
  color: #ece2d0 !important;
}
html[data-theme="dark"] #settings-tab-earnings p,
html[data-theme="dark"] #settings-tab-earnings div[style*="color:#888"],
html[data-theme="dark"] #settings-tab-earnings span[style*="color:#888"],
html[data-theme="dark"] #settings-tab-earnings div[style*="color: #888"],
html[data-theme="dark"] #settings-tab-earnings span[style*="color: #888"] {
  color: #a2947e !important;
}
html[data-theme="dark"] #settings-tab-earnings div[style*="background:#f8f6ff"],
html[data-theme="dark"] #settings-tab-earnings div[style*="background:#dff7e5"],
html[data-theme="dark"] #settings-tab-earnings div[style*="background:#e8f6ff"],
html[data-theme="dark"] #settings-tab-earnings div[style*="background:#fff8e6"],
html[data-theme="dark"] #settings-tab-earnings div[style*="background:#f0f0f0"] {
  background: #2a241e !important;
  border-color: #4b3f33 !important;
}
html[data-theme="dark"] #settings-tab-earnings div[style*="color:#4b2aad"],
html[data-theme="dark"] #settings-tab-earnings div[style*="color:#15723d"],
html[data-theme="dark"] #settings-tab-earnings div[style*="color:#1a73e8"],
html[data-theme="dark"] #settings-tab-earnings div[style*="color:#a8640b"] {
  color: #c9b6ff !important;
}
html[data-theme="dark"] #transactionHistory {
  background: #211b16 !important;
}
html[data-theme="dark"] #transactionHistory p {
  color: #a2947e !important;
}
html[data-theme="dark"] #transactionHistory .row {
  border-bottom: 1px solid #3a3229 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] #transactionHistory .row strong {
  color: #ece2d0 !important;
}
html[data-theme="dark"] #transactionHistory .row span[style*="color:#15723d"] {
  color: #86efac !important;
}
html[data-theme="dark"] #transactionHistory [style*="background:#dff7e5"] {
  background: #1e3a2a !important;
  color: #86efac !important;
}
html[data-theme="dark"] #transactionHistory [style*="background:#fff8e6"] {
  background: #3b2f1b !important;
  color: #fcd34d !important;
}
html[data-theme="dark"] #transactionHistory [style*="background:#fdeaea"] {
  background: #3b1f1f !important;
  color: #fca5a5 !important;
}
.notif-delete-btn {
  flex-shrink: 0;
  margin-left: auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #9a8f80;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.notif-delete-btn:hover { background: #fee2e2 !important; color: #b91c1c !important; }
html[data-theme="dark"] #notifPanel { background: #1d1813 !important; border-color: #332b22 !important; }
html[data-theme="dark"] #notifPanel .notif-panel-header {
  background: #211b16 !important;
  border-bottom-color: #332b22 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] #notifPanel .notif-mark { color: #c9b6ff !important; }
html[data-theme="dark"] #notifPanel .notif-item,
html[data-theme="dark"] #notifPanel .notif-item.unread,
html[data-theme="dark"] #notifPanel .notif-item.msg-item:hover {
  background: #211b16 !important;
  border-bottom-color: #332b22 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] #notifPanel .notif-time,
html[data-theme="dark"] #notifPanel .notif-empty,
html[data-theme="dark"] #notifPanel .notif-panel-footer { color: #a2947e !important; }
html[data-theme="dark"] #notifPanel .notif-msg-text .notif-user-link,
html[data-theme="dark"] #notifPanel .notif-msg-text a.notif-poem-link,
html[data-theme="dark"] #notifPanel .notif-panel-footer a { color: #c9b6ff !important; }
html[data-theme="dark"] #notifPanel .notif-platform {
  background: #2a241e !important;
  color: #c9b6ff !important;
  border-color: #4a3f34 !important;
}
html[data-theme="dark"] #notif-bell,
html[data-theme="dark"] .btn-notif { color: #c9b6ff !important; }
html[data-theme="dark"] .notif-delete-btn { color: #a2947e !important; }
html[data-theme="dark"] .notif-delete-btn:hover { background: #3b1f1f !important; color: #fca5a5 !important; }
html[data-theme="dark"] .lib-gate {
  background: linear-gradient(160deg, rgba(106, 52, 255, 0.22), rgba(10, 8, 7, 0.86)) !important;
}
html[data-theme="dark"] .gate-card {
  background: #1d1813 !important;
  border-color: #332b22 !important;
  color: #ece2d0 !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="dark"] .lib-gate h2 { color: #ece2d0 !important; }
html[data-theme="dark"] .lib-gate p { color: #c9bda9 !important; }
html[data-theme="dark"] .lib-gate .gate-icon { background: linear-gradient(135deg, #6a34ff, #4b2aad) !important; color: #fff !important; }
html[data-theme="dark"] .lib-gate .gate-btn { background: #6a34ff !important; color: #fff !important; }
html[data-theme="dark"] .lib-gate .gate-btn:hover { background: #7d4bff !important; }
html[data-theme="dark"] .lib-gate .gate-alt { color: #c9b6ff !important; }
html[data-theme="dark"] .lib-gate .gate-note { color: #a2947e !important; border-top-color: #332b22 !important; }
html[data-theme="dark"] .va-overlay .va-card {
  background: #1d1813 !important;
  border-color: #332b22 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] .va-overlay .va-close { color: #a2947e !important; }
html[data-theme="dark"] .va-overlay .va-close:hover { background: #2a241e !important; color: #c9b6ff !important; }
html[data-theme="dark"] .va-overlay .va-title,
html[data-theme="dark"] .va-overlay .va-subtitle,
html[data-theme="dark"] .va-overlay .va-form label { color: #ece2d0 !important; }
html[data-theme="dark"] .va-overlay .va-or { color: #a2947e !important; }
html[data-theme="dark"] .va-overlay .va-input,
html[data-theme="dark"] .va-overlay .va-google {
  background: #2a241e !important;
  border-color: #4a3f34 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] .va-overlay .va-input::placeholder { color: #a2947e !important; }
html[data-theme="dark"] .va-overlay .va-input:focus { background: #211b16 !important; border-color: #a78bfa !important; }
html[data-theme="dark"] .va-overlay .va-google i { color: #4285f4 !important; background: transparent !important; }
html[data-theme="dark"] .va-overlay .va-submit { background: #6a34ff !important; color: #fff !important; }
html[data-theme="dark"] .va-overlay .va-links a,
html[data-theme="dark"] .va-overlay .va-footer a { color: #c9b6ff !important; }
html[data-theme="dark"] .auth-container .subtitle { color: #ece2d0 !important; }
html[data-theme="dark"]:not([data-reader-light="1"]):not([data-auth-light="1"]) .subtitle { color: #ece2d0 !important; }
html[data-theme="dark"] .logo-text { color: #c9b6ff !important; }
html[data-theme="dark"] .va-alt { background: transparent !important; color: #a2947e !important; }
html[data-theme="dark"] .va-alt a { color: #c9b6ff !important; }
html[data-theme="dark"] .cart-overlay,
html[data-theme="dark"] .cart-header,
html[data-theme="dark"] .cart-body,
html[data-theme="dark"] .cart-footer,
html[data-theme="dark"] .wishlist-overlay,
html[data-theme="dark"] .wishlist-header,
html[data-theme="dark"] .wishlist-body,
html[data-theme="dark"] .wishlist-footer {
  background: #1d1813 !important;
  border-color: #332b22 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] .cart-overlay h2,
html[data-theme="dark"] .cart-overlay span,
html[data-theme="dark"] .cart-overlay strong,
html[data-theme="dark"] .cart-overlay input,
html[data-theme="dark"] .cart-overlay button,
html[data-theme="dark"] .wishlist-overlay h2,
html[data-theme="dark"] .wishlist-overlay span,
html[data-theme="dark"] .wishlist-overlay strong,
html[data-theme="dark"] .wishlist-overlay input,
html[data-theme="dark"] .wishlist-overlay button {
  color: #ece2d0 !important;
}
html[data-theme="dark"] .cart-text { color: #2a241e !important; }
html[data-theme="dark"] .cart-total #cartTotalAmount { color: #c9b6ff !important; }
html[data-theme="dark"] .coupon-input,
html[data-theme="dark"] .wishlist-overlay input {
  background: #2a241e !important;
  border-color: #4a3f34 !important;
  color: #ece2d0 !important;
}
html[data-theme="dark"] .btn-checkout,
html[data-theme="dark"] .btn-coupon-apply,
html[data-theme="dark"] .btn-coupon-remove,
html[data-theme="dark"] .btn-cart-remove,
html[data-theme="dark"] .btn-wishlist-remove {
  background: #6a34ff !important;
  border-color: #6a34ff !important;
  color: #fff !important;
}
html[data-theme="dark"] .btn-checkout:disabled {
  background: #4b2aad !important;
  border-color: #4b2aad !important;
  color: #fff !important;
}

/* Consistent dark-mode brand colors across Volant Poetry and Volant Reads navs */
html[data-theme="dark"] .logo-text,
html[data-theme="dark"] .logo-text .logo-highlight,
html[data-theme="dark"] .logo .highlight,
html[data-theme="dark"] .logo .logo-highlight {
  color: #f4f5f9 !important;
  text-shadow: none !important;
}




