/* TuQuang Library - Vietnamese Font & Responsive Library / Reader Styles */

/* Global Vietnamese-friendly Roboto font (preserves icon fonts like FontAwesome, Dashicons, DearFlip, Elementor) */
body,
body p,
body a,
body li,
body td,
body th,
body label,
body input,
body select,
body textarea,
body button,
body blockquote,
h1, h2, h3, h4, h5, h6,
#topmenu ul li a,
.logo h2 a,
.postitle,
.page-title,
.product_title,
.footer-post-area ul li h4 a,
.tq-library-wrap,
.tq-home-wrap,
.tq-reader-shell,
.tq-reader-shell p,
.tq-reader-shell li,
.tq-reader-shell a,
.tq-reader-shell button,
.tq-reader-shell span:not(.fa):not(.fas):not(.far):not(.fab):not(.dashicons):not([class*="df-icon"]):not([class*="df-ui"]):not([class*="eicon"]):not([class*="ti-"]):not([class*="sricon"]) {
  font-family: "Roboto", serif !important;
}

.tq-library-wrap,
.tq-home-wrap,
.tq-reader-shell {
  --tq-accent: #9a5b13;
  --tq-accent-dark: #78440a;
  --tq-surface: #ffffff;
  --tq-surface-soft: #faf6f0;
  --tq-border: #e7ddd0;
  --tq-text: #2a241e;
  --tq-muted: #6c6157;
  color: var(--tq-text);
}

/* Hero */
.tq-hero {
  background: linear-gradient(135deg, #fdf8f0 0%, #f4e6d2 100%);
  border: 1px solid var(--tq-border);
  border-radius: 14px;
  padding: 36px 28px;
  text-align: center;
  margin-bottom: 36px;
}

.tq-hero h2 {
  margin: 0 0 10px;
  font-size: 30px;
  color: #4f2c07;
}

.tq-hero p {
  margin: 0 auto 22px;
  max-width: 640px;
  color: var(--tq-muted);
  font-size: 16px;
}

.tq-hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 18px;
  flex-wrap: wrap;
}

.tq-hero-search input[type="text"] {
  flex: 1 1 280px;
  padding: 12px 16px;
  border: 1px solid #d7c7b2;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}

.tq-topic-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tq-topic-pills a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--tq-border);
  color: var(--tq-accent-dark);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.tq-topic-pills a:hover {
  background: var(--tq-accent);
  color: #fff;
  border-color: var(--tq-accent);
}

/* Section Headers */
.tq-home-section {
  margin-bottom: 42px;
}

.tq-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--tq-border);
  padding-bottom: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tq-section-head h3 {
  margin: 0;
  font-size: 22px;
  color: #4f2c07;
}

.tq-section-head a {
  color: var(--tq-accent);
  font-weight: 600;
  text-decoration: none;
}

/* Filter Bar */
.tq-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  background: var(--tq-surface-soft);
  border: 1px solid var(--tq-border);
  border-radius: 10px;
  margin-bottom: 24px;
  align-items: center;
}

.tq-filter-bar input[type="text"],
.tq-filter-bar select {
  flex: 1 1 180px;
  padding: 10px 12px;
  border: 1px solid #d7c7b2;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
}

/* Buttons */
.tq-btn-primary,
.tq-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--tq-accent);
  transition: all 0.15s ease;
}

.tq-btn-primary {
  background: var(--tq-accent);
  color: #fff !important;
}

.tq-btn-primary:hover {
  background: var(--tq-accent-dark);
  border-color: var(--tq-accent-dark);
}

.tq-btn-outline {
  background: #fff;
  color: var(--tq-accent-dark) !important;
}

.tq-btn-outline:hover {
  background: var(--tq-surface-soft);
}

.tq-btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

/* Book Cards Grid */
.tq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.tq-card {
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tq-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 44, 7, 0.08);
}

.tq-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #efe3d2;
  overflow: hidden;
  text-decoration: none;
}

.tq-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tq-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c78b3b 0%, #874c12 100%);
  color: #fff8ed;
  font-size: 54px;
  font-weight: 700;
}

.tq-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tq-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tq-badge-pdf {
  background: #b91c1c;
  color: #fff;
}

.tq-badge-ch {
  background: #4f2c07;
  color: #fff;
}

.tq-badge-audio {
  background: #0f766e;
  color: #fff;
}

.tq-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tq-card-topic {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tq-accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.tq-card-title {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

.tq-card-title a {
  color: var(--tq-text);
  text-decoration: none;
}

.tq-card-title a:hover {
  color: var(--tq-accent);
}

.tq-card-author {
  font-size: 13px;
  color: var(--tq-muted);
  margin-bottom: 10px;
}

.tq-card-excerpt {
  font-size: 14px;
  color: #4d453d;
  line-height: 1.55;
  margin: 0 0 14px;
}

.tq-card-footer {
  margin-top: auto;
}

/* Audio List */
.tq-audio-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tq-audio-card {
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 12px;
  padding: 20px;
}

.tq-audio-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tq-audio-card-head h1,
.tq-audio-card-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  color: #4f2c07;
}

.tq-audio-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tq-audio-meta a.tq-badge {
  text-decoration: none;
}

.tq-audio-meta .tq-card-author {
  margin-bottom: 0;
}

/* Single Book Reader */
.tq-breadcrumb {
  margin-bottom: 14px;
  font-size: 14px;
}

.tq-breadcrumb a {
  color: var(--tq-accent-dark);
  text-decoration: none;
}

.tq-book-meta-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px 20px;
  background: var(--tq-surface-soft);
  border: 1px solid var(--tq-border);
  border-radius: 10px;
  margin-bottom: 22px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tq-meta-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  font-size: 14.5px;
}

.tq-meta-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1.55;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(154, 91, 19, 0.16);
}

.tq-meta-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tq-meta-item strong {
  min-width: 148px;
  flex-shrink: 0;
  color: #5c4938;
  font-weight: 600;
}

.tq-meta-value {
  flex: 1 1 auto;
  color: var(--tq-text);
}

.tq-meta-value a {
  color: var(--tq-accent-dark);
  font-weight: 500;
  text-decoration: none;
}

.tq-meta-value a:hover {
  color: var(--tq-accent);
  text-decoration: underline;
}

.tq-reader-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tq-ctrl-btn {
  border: 1px solid #d7c7b2;
  background: #fff;
  color: var(--tq-text);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
}

.tq-ctrl-btn.is-active,
.tq-ctrl-btn:hover {
  background: var(--tq-accent);
  color: #fff;
  border-color: var(--tq-accent);
}

.tq-font-indicator {
  font-size: 12px;
  font-weight: 600;
  color: var(--tq-muted);
  min-width: 36px;
  text-align: center;
}

.tq-ctrl-sep {
  width: 1px;
  height: 18px;
  background: #d7c7b2;
  margin: 0 2px;
}

.tq-section-label {
  font-weight: 700;
  font-size: 15px;
  color: #4f2c07;
  margin-bottom: 10px;
  display: block;
}

.tq-audio-box,
.tq-pdf-box,
.tq-chapters-box {
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tq-native-audio {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tq-native-audio audio {
  flex: 1 1 280px;
}

/* Full-width, distraction-free reading layout on single Book, Audio & Video pages (hides blog sidebar & blog meta) */
body.single-book #sidebar,
body.single-book .single_metainfo,
body.single-book .comments_template .nocomments,
body.single-sr_playlist #sidebar,
body.single-sr_playlist .single_metainfo,
body.single-sr_playlist .post-single-img,
body.single-sr_playlist #ast_nextprev,
body.single-sr_playlist .comments_template,
body.single-tq_video #sidebar,
body.single-tq_video .single_metainfo,
body.single-tq_video .post-single-img,
body.single-tq_video #ast_nextprev,
body.single-tq_video .comments_template {
  display: none !important;
}

/* Match exact SKT Buddhism container (.center max-width: 1200px) so reading area aligns pixel-perfect with header & footer */
body.single-book #content .center,
body.single-sr_playlist #content .center,
body.single-tq_video #content .center {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  box-sizing: border-box !important;
}

body.single-book .single_wrap,
body.single-book .single_wrap_right,
body.single-book .single_post,
body.single-book .single_post_content,
body.single-book .thn_post_wrap,
body.single-sr_playlist .single_wrap,
body.single-sr_playlist .single_wrap_right,
body.single-sr_playlist .single_post,
body.single-sr_playlist .single_post_content,
body.single-sr_playlist .thn_post_wrap,
body.single-tq_video .single_wrap,
body.single-tq_video .single_wrap_right,
body.single-tq_video .single_post,
body.single-tq_video .single_post_content,
body.single-tq_video .thn_post_wrap {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* 2-Column Reader Layout: Main reading area fills left + Smart Library Sidebar on right */
.tq-reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.tq-reader-main {
  min-width: 0;
}

.tq-reader-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 24px;
}

.tq-jump-sidebar-btn {
  display: none;
  text-decoration: none;
}

.tq-side-card {
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 12px;
  padding: 16px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tq-side-title {
  margin: 0 0 12px !important;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tq-border);
  font-size: 16px !important;
  font-weight: 700;
  color: #4f2c07;
}

.tq-side-subhead {
  font-size: 13px;
  font-weight: 700;
  color: var(--tq-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 14px 0 8px;
}

/* Next Volume / Chapter highlight card */
.tq-next-highlight {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, #fdf6ea 0%, #f5e5cc 100%);
  border: 1px solid #e1c596;
  text-decoration: none !important;
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tq-next-highlight:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(154, 91, 19, 0.12);
}

.tq-next-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tq-accent);
  font-weight: 700;
}

.tq-next-name {
  font-size: 15px;
  color: #3f2205;
  line-height: 1.35;
}

.tq-next-go {
  font-size: 13px;
  font-weight: 600;
  color: var(--tq-accent-dark);
  margin-top: 2px;
}

/* Sidebar TOC List */
.tq-side-toc-list {
  list-style: decimal;
  padding-left: 20px;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.tq-side-toc-list li {
  border-bottom: 1px dashed var(--tq-border);
  padding: 7px 4px;
  font-size: 14px;
  line-height: 1.4;
}

.tq-side-toc-list li:last-child {
  border-bottom: 0;
}

.tq-side-toc-list li a {
  color: var(--tq-text);
  text-decoration: none;
  display: block;
}

.tq-side-toc-list li a:hover {
  color: var(--tq-accent);
}

.tq-side-toc-list li.is-current {
  background: #fdf6ea;
  border-radius: 6px;
  padding-left: 8px;
}

.tq-side-toc-list li.is-current a {
  font-weight: 700;
  color: var(--tq-accent-dark);
}

.tq-side-empty {
  margin: 0;
  font-size: 13px;
  color: var(--tq-muted);
  line-height: 1.5;
}

/* Related Topics & Books */
.tq-side-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tq-side-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tq-surface-soft);
  border: 1px solid var(--tq-border);
  color: var(--tq-text) !important;
  font-size: 12px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.tq-side-topic-pill:hover,
.tq-side-topic-pill.is-active {
  background: var(--tq-accent);
  color: #fff !important;
  border-color: var(--tq-accent);
}

.thn_post_wrap .tq-side-related-list,
.tq-side-related-list {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.thn_post_wrap .tq-side-related-list li,
.tq-side-related-list li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px dashed var(--tq-border);
}

.tq-side-related-list li::marker {
  content: "" !important;
}

.tq-side-related-list li:last-child {
  border-bottom: 0;
}

.tq-side-related-list a {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 0;
  text-decoration: none !important;
  color: var(--tq-text);
  font-size: 14px;
  line-height: 1.4;
}

.tq-side-related-list a:hover .tq-rel-title {
  color: var(--tq-accent);
}

.tq-rel-tags {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tq-mini-tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #b91c1c;
  color: #fff;
}

.tq-mini-audio {
  background: #0f766e;
}

/* Vietnamese Perpetual / Lunar Calendar (Lịch Vạn Niên) */
.tq-cal-summary {
  text-align: center;
  padding: 12px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, #fdf8ef 0%, #f3e4cc 100%);
  border: 1px solid #e3cba4;
  margin-bottom: 12px;
}

.tq-cal-weekday {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tq-accent);
  letter-spacing: 0.04em;
}

.tq-cal-big-solar {
  font-size: 22px;
  font-weight: 700;
  color: #4f2c07;
  margin: 2px 0 4px;
}

.tq-cal-lunar-line {
  font-size: 13px;
  color: #3d2e1e;
}

.tq-cal-canchi {
  font-size: 12px;
  color: var(--tq-muted);
  margin-top: 2px;
}

.tq-cal-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.tq-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tq-cal-month-title {
  font-size: 14px;
  font-weight: 700;
  color: #4f2c07;
}

.tq-cal-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--tq-border);
  background: #fff;
  color: var(--tq-text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.tq-cal-nav-btn:hover {
  background: var(--tq-accent);
  color: #fff;
  border-color: var(--tq-accent);
}

.tq-cal-weekdays,
.tq-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.tq-cal-weekdays {
  margin-bottom: 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--tq-muted);
}

.tq-cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 1px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  min-height: 36px;
  color: var(--tq-text);
}

.tq-cal-cell.is-empty {
  cursor: default;
  pointer-events: none;
}

.tq-cal-cell:hover:not(.is-empty) {
  background: var(--tq-surface-soft);
  border-color: var(--tq-border);
}

.tq-cal-solar {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
}

.tq-cal-lunar {
  font-size: 9px;
  color: var(--tq-muted);
  line-height: 1.1;
}

.tq-cal-cell.is-special .tq-cal-lunar {
  color: #b91c1c;
  font-weight: 700;
}

.tq-cal-cell.is-today {
  border-color: var(--tq-accent);
  background: #fdf6ea;
}

.tq-cal-cell.is-selected {
  background: var(--tq-accent) !important;
  color: #fff !important;
  border-color: var(--tq-accent) !important;
}

.tq-cal-cell.is-selected .tq-cal-lunar {
  color: #fde8c7 !important;
}

.tq-cal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--tq-border);
  font-size: 12px;
  color: var(--tq-muted);
}

.tq-cal-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tq-cal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b91c1c;
}

.tq-cal-today-btn {
  border: 1px solid var(--tq-border);
  background: #fff;
  color: var(--tq-accent-dark);
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.tq-cal-today-btn:hover {
  background: var(--tq-accent);
  color: #fff;
  border-color: var(--tq-accent);
}

body.single-book .single_wrap,
body.single-sr_playlist .single_wrap {
  width: 100% !important;
  float: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.single-book .single_post_content,
body.single-sr_playlist .single_post_content {
  width: 100% !important;
  box-sizing: border-box !important;
}

.tq-pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tq-pdf-header .tq-section-label {
  margin-bottom: 0;
}

.tq-pdf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tq-pdf-viewer {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.tq-wm-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tq-wm-overlay.is-hidden-cover {
  opacity: 0 !important;
  visibility: hidden;
}

.tq-wm-overlay span {
  display: inline-block;
  font-size: clamp(14px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  color: var(--tq-wm-color, #c9a66b);
  opacity: var(--tq-wm-opacity, 0.24);
  transform: rotate(-28deg);
  transform-origin: center center;
  user-select: none;
  white-space: nowrap;
  padding: 6px 14px;
}

.tq-pdf-viewer .df-container,
.tq-pdf-viewer ._df_book {
  width: 100% !important;
  max-width: 100% !important;
  height: var(--tq-pdf-height, clamp(620px, 86vh, 960px)) !important;
}

.tq-pdf-viewer .df-container.df-fullscreen,
.tq-pdf-viewer ._df_book.df-fullscreen,
.tq-pdf-viewer .df-container:fullscreen,
.tq-pdf-viewer ._df_book:fullscreen {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
}

.tq-pdf-viewer .df-container,
.tq-pdf-viewer .df-container .df-bg,
.tq-pdf-viewer .df-container > .df-book-stage,
.tq-pdf-viewer .df-container > .df-viewer,
.tq-pdf-viewer .pdfemb-viewer {
  transition: background-color 0.25s ease, filter 0.25s ease, height 0.2s ease;
}

/* Collapsible PDF bottom toolbar (slide down to expand reading area) */
.tq-pdf-viewer .df-container .df-ui-controls {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, visibility 0.22s ease;
}

.tq-pdf-viewer .df-container.tq-toolbar-collapsed .df-ui-controls {
  transform: translateY(calc(100% + 18px)) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.tq-pdf-viewer .df-container .df-ui-controls .tq-df-toolbar-hide {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 40px;
  padding: 0 !important;
  margin: 0;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  color: inherit;
  cursor: pointer;
  vertical-align: top;
  box-shadow: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tq-pdf-viewer .df-container .df-ui-controls .tq-df-toolbar-hide:hover,
.tq-pdf-viewer .df-container .df-ui-controls .tq-df-toolbar-hide:focus-visible {
  background-color: rgba(154, 91, 19, 0.12);
  color: var(--tq-accent-dark, #78440a);
  outline: none;
}

.tq-pdf-viewer .tq-df-chevron {
  display: block;
  flex-shrink: 0;
}

.tq-pdf-viewer .tq-df-toolbar-restore {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 14px 3px;
  border: 1px solid rgba(154, 91, 19, 0.28);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, 0.92);
  color: #4f2c07;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 100%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, visibility 0.2s ease, background-color 0.15s ease, color 0.15s ease;
}

.tq-pdf-viewer .df-container.tq-toolbar-collapsed .tq-df-toolbar-restore,
.tq-pdf-viewer .pdfemb-viewer.tq-toolbar-collapsed .tq-df-toolbar-restore {
  opacity: 0.88;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.tq-pdf-viewer .df-container.tq-toolbar-collapsed .tq-df-toolbar-restore:hover,
.tq-pdf-viewer .df-container.tq-toolbar-collapsed .tq-df-toolbar-restore:focus-visible,
.tq-pdf-viewer .pdfemb-viewer.tq-toolbar-collapsed .tq-df-toolbar-restore:hover,
.tq-pdf-viewer .pdfemb-viewer.tq-toolbar-collapsed .tq-df-toolbar-restore:focus-visible {
  opacity: 1;
  background: var(--tq-accent, #9a5b13);
  color: #ffffff;
  border-color: var(--tq-accent, #9a5b13);
  outline: none;
}

/* PDF Embedder fallback toolbar collapse */
.tq-pdf-viewer .pdfemb-viewer {
  position: relative;
}

.tq-pdf-viewer .pdfemb-viewer .pdfemb-toolbar {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, visibility 0.22s ease;
}

.tq-pdf-viewer .pdfemb-viewer.tq-toolbar-collapsed .pdfemb-toolbar {
  transform: translateY(100%) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.tq-pdf-viewer .tq-pe-toolbar-hide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  padding: 0;
  margin-left: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.tq-reading-body {
  padding: 26px 28px;
  border-radius: 12px;
  border: 1px solid var(--tq-border);
  background: #fff;
  line-height: 1.85;
  font-size: var(--tq-font-size, 17px) !important;
  margin-bottom: 24px;
  transition: background 0.2s ease, color 0.2s ease, font-size 0.15s ease;
}

.tq-reading-body p,
.tq-reading-body li,
.tq-reading-body blockquote {
  font-size: var(--tq-font-size, 17px) !important;
  line-height: 1.85 !important;
  color: inherit !important;
}

.tq-reading-body p span,
.tq-reading-body li span,
.tq-reading-body blockquote span {
  font-size: inherit !important;
}

.tq-reading-body h2 {
  font-size: calc(var(--tq-font-size, 17px) * 1.35) !important;
}

.tq-reading-body h3 {
  font-size: calc(var(--tq-font-size, 17px) * 1.18) !important;
}

/* Reader Theme: Light */
.tq-reader-shell.tq-theme-light .tq-pdf-viewer .df-container,
.tq-reader-shell.tq-theme-light .tq-pdf-viewer .df-container .df-bg {
  background-color: #f4f4f4 !important;
}

/* Reader Theme: Sepia (Vàng dịu) - applies to page, text, Audio Player, PDF Flipbook & Sidebar */
body.tq-theme-sepia,
body.tq-theme-sepia #content,
body.tq-theme-sepia .content_wrap,
body.tq-theme-sepia .single_wrap,
body.tq-theme-sepia .page_wrap {
  background-color: #efe3cc !important;
  color: #3d2e1e !important;
}

body.tq-theme-sepia .tq-book-meta-bar,
body.tq-theme-sepia .tq-pdf-box,
body.tq-theme-sepia .tq-audio-box,
body.tq-theme-sepia .tq-audio-card,
body.tq-theme-sepia .tq-card,
body.tq-theme-sepia .tq-filter-bar,
body.tq-theme-sepia .tq-chapters-box,
body.tq-theme-sepia .tq-reading-body,
body.tq-theme-sepia .tq-side-card,
.tq-reader-shell.tq-theme-sepia .tq-book-meta-bar,
.tq-reader-shell.tq-theme-sepia .tq-pdf-box,
.tq-reader-shell.tq-theme-sepia .tq-audio-box,
.tq-reader-shell.tq-theme-sepia .tq-chapters-box,
.tq-reader-shell.tq-theme-sepia .tq-reading-body,
.tq-reader-shell.tq-theme-sepia .tq-side-card {
  background: #f6ecda !important;
  color: #3d2e1e !important;
  border-color: #dfcca8 !important;
}

body.tq-theme-sepia .tq-reading-body p,
body.tq-theme-sepia .tq-reading-body li,
body.tq-theme-sepia .tq-reading-body span,
body.tq-theme-sepia .tq-reading-body strong,
body.tq-theme-sepia .tq-reading-body blockquote,
body.tq-theme-sepia .tq-audio-box .iron-audioplayer,
body.tq-theme-sepia .tq-audio-box .iron-audioplayer *,
body.tq-theme-sepia .tq-audio-card .iron-audioplayer,
body.tq-theme-sepia .tq-audio-card .iron-audioplayer * {
  color: #3d2e1e !important;
}

.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .df-container,
.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .df-container .df-bg {
  background-color: #eadbc0 !important;
}

.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .df-container > .df-book-stage,
.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .df-container > .df-viewer,
.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .pdfemb-viewer {
  filter: sepia(0.32) contrast(0.96) brightness(0.98);
}

.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .df-container .df-ui-controls,
.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .df-container .df-ui-controls .more-container {
  background-color: rgba(246, 236, 218, 0.96) !important;
  color: #3d2e1e !important;
  border-color: #dfcca8 !important;
}

.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .df-container .df-ui-controls {
  border-top: 1px solid #dfcca8;
}

.tq-reader-shell.tq-theme-sepia .tq-pdf-viewer .tq-df-toolbar-restore {
  background: rgba(246, 236, 218, 0.94);
  color: #3d2e1e;
  border-color: rgba(154, 91, 19, 0.36);
}

/* Reader Theme: Dark (Tối) - high-contrast light text across Content, Sonaar Audio Playlist, PDF & Sidebar */
body.tq-theme-dark,
body.tq-theme-dark #content,
body.tq-theme-dark .content_wrap,
body.tq-theme-dark .single_wrap,
body.tq-theme-dark .page_wrap,
body.tq-theme-dark .single_post {
  background-color: #141210 !important;
  color: #ece5da !important;
}

body.tq-theme-dark .postitle,
body.tq-theme-dark h1.entry-title,
body.tq-theme-dark .single_post .postitle,
body.tq-theme-dark .tq-hero h2,
body.tq-theme-dark .tq-section-head h3,
body.tq-theme-dark .tq-audio-card-head h1,
body.tq-theme-dark .tq-audio-card-head h3,
body.tq-theme-dark .tq-card-title a {
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-book-meta-bar,
body.tq-theme-dark .tq-pdf-box,
body.tq-theme-dark .tq-audio-box,
body.tq-theme-dark .tq-audio-card,
body.tq-theme-dark .tq-card,
body.tq-theme-dark .tq-filter-bar,
body.tq-theme-dark .tq-empty,
body.tq-theme-dark .tq-chapters-box,
body.tq-theme-dark .tq-reading-body,
body.tq-theme-dark .tq-side-card,
.tq-reader-shell.tq-theme-dark .tq-book-meta-bar,
.tq-reader-shell.tq-theme-dark .tq-pdf-box,
.tq-reader-shell.tq-theme-dark .tq-audio-box,
.tq-reader-shell.tq-theme-dark .tq-chapters-box,
.tq-reader-shell.tq-theme-dark .tq-reading-body,
.tq-reader-shell.tq-theme-dark .tq-side-card {
  background: #1e1c1a !important;
  color: #ece5da !important;
  border-color: #3a342e !important;
}

body.tq-theme-dark .tq-hero {
  background: linear-gradient(135deg, #25201b 0%, #1c1814 100%) !important;
  border-color: #3a342e !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-hero p,
body.tq-theme-dark .tq-card-author,
body.tq-theme-dark .tq-card-excerpt,
body.tq-theme-dark .tq-audio-meta,
body.tq-theme-dark .tq-side-subhead,
body.tq-theme-dark .tq-side-empty,
body.tq-theme-dark .tq-cal-weekdays span,
body.tq-theme-dark .tq-cal-lunar,
body.tq-theme-dark .tq-side-topic-pill small {
  color: #c5bbb0 !important;
}

/* Override any dark/black inline text colors inside reading content in Dark Mode */
body.tq-theme-dark .tq-reading-body,
body.tq-theme-dark .tq-reading-body p,
body.tq-theme-dark .tq-reading-body li,
body.tq-theme-dark .tq-reading-body div,
body.tq-theme-dark .tq-reading-body span,
body.tq-theme-dark .tq-reading-body strong,
body.tq-theme-dark .tq-reading-body b,
body.tq-theme-dark .tq-reading-body em,
body.tq-theme-dark .tq-reading-body blockquote,
body.tq-theme-dark .tq-reading-body td,
body.tq-theme-dark .tq-reading-body th,
body.tq-theme-dark .tq-reading-body figcaption,
body.tq-theme-dark .tq-meta-item,
body.tq-theme-dark .tq-meta-item strong,
.tq-reader-shell.tq-theme-dark .tq-reading-body,
.tq-reader-shell.tq-theme-dark .tq-reading-body p,
.tq-reader-shell.tq-theme-dark .tq-reading-body li,
.tq-reader-shell.tq-theme-dark .tq-reading-body div,
.tq-reader-shell.tq-theme-dark .tq-reading-body span,
.tq-reader-shell.tq-theme-dark .tq-reading-body strong,
.tq-reader-shell.tq-theme-dark .tq-reading-body b,
.tq-reader-shell.tq-theme-dark .tq-reading-body em,
.tq-reader-shell.tq-theme-dark .tq-reading-body blockquote,
.tq-reader-shell.tq-theme-dark .tq-reading-body td,
.tq-reader-shell.tq-theme-dark .tq-reading-body th,
.tq-reader-shell.tq-theme-dark .tq-reading-body figcaption {
  color: #ece5da !important;
  background-color: transparent !important;
}

body.tq-theme-dark .tq-reading-body blockquote {
  background-color: #26221e !important;
  border-left-color: #d4963a !important;
}

body.tq-theme-dark .tq-reading-body table,
body.tq-theme-dark .tq-reading-body td,
body.tq-theme-dark .tq-reading-body th,
body.tq-theme-dark .tq-chapters-list li {
  border-color: #3a342e !important;
}

body.tq-theme-dark .tq-side-title,
body.tq-theme-dark .tq-cal-month-title,
body.tq-theme-dark .tq-side-toc-list li a,
body.tq-theme-dark .tq-side-related-list a,
body.tq-theme-dark .tq-cal-cell,
body.tq-theme-dark .tq-section-label,
body.tq-theme-dark .tq-chapters-heading,
body.tq-theme-dark .tq-breadcrumb a,
body.tq-theme-dark .tq-meta-items a,
body.tq-theme-dark .tq-chapters-list a,
body.tq-theme-dark .tq-chapter-cta,
body.tq-theme-dark .tq-section-head a,
body.tq-theme-dark .tq-reading-body a,
body.tq-theme-dark .tq-reading-body h1,
body.tq-theme-dark .tq-reading-body h2,
body.tq-theme-dark .tq-reading-body h3,
body.tq-theme-dark .tq-reading-body h4,
body.tq-theme-dark .tq-reading-body h5,
body.tq-theme-dark .tq-reading-body h6 {
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-reading-body a:hover,
body.tq-theme-dark .tq-chapters-list a:hover,
body.tq-theme-dark .tq-side-toc-list li a:hover,
body.tq-theme-dark .tq-side-related-list a:hover {
  color: #ffa018 !important;
}

/* Sonaar MP3 Player & Audio Lists in Dark Mode (fixes unreadable black track text) */
body.tq-theme-dark .iron-audioplayer,
body.tq-theme-dark .iron_widget_radio,
body.tq-theme-dark .srp_player_wrapper,
body.tq-theme-dark .srp_player_boxed,
body.tq-theme-dark .srp_tracklist,
body.tq-theme-dark .srp_list,
body.tq-theme-dark .sonaar-Arp-list,
body.tq-theme-dark .iron-audioplayer .playlist,
body.tq-theme-dark .iron-audioplayer .sonaar-grid,
body.tq-theme-dark .iron-audioplayer .player,
body.tq-theme-dark .iron-audioplayer .album-player,
.tq-reader-shell.tq-theme-dark .iron-audioplayer,
.tq-reader-shell.tq-theme-dark .srp_player_wrapper,
.tq-reader-shell.tq-theme-dark .srp_player_boxed {
  background: transparent !important;
  background-color: transparent !important;
  color: #f0e9de !important;
  border-color: #3a342e !important;
}

body.tq-theme-dark .iron-audioplayer *,
body.tq-theme-dark .iron_widget_radio *,
body.tq-theme-dark .srp_player_wrapper *,
body.tq-theme-dark .srp_tracklist *,
body.tq-theme-dark .srp_list *,
body.tq-theme-dark .sonaar-Arp-list *,
body.tq-theme-dark .tq-audio-box .playlist li,
body.tq-theme-dark .tq-audio-box .playlist li *,
body.tq-theme-dark .tq-audio-card .playlist li,
body.tq-theme-dark .tq-audio-card .playlist li *,
.tq-reader-shell.tq-theme-dark .tq-audio-box .iron-audioplayer *,
.tq-reader-shell.tq-theme-dark .tq-audio-box .playlist li * {
  color: #f0e9de !important;
}

body.tq-theme-dark .iron-audioplayer .track-number,
body.tq-theme-dark .iron-audioplayer .tracklist-item-time,
body.tq-theme-dark .iron-audioplayer .sr_it-playlist-artists,
body.tq-theme-dark .iron-audioplayer .srp_track_description,
body.tq-theme-dark .iron-audioplayer .currentTime,
body.tq-theme-dark .iron-audioplayer .totalTime {
  color: #c2b8aa !important;
}

body.tq-theme-dark .iron-audioplayer .sr-playlist-item,
body.tq-theme-dark .iron-audioplayer .playlist li {
  background-color: transparent !important;
  border-color: #38322c !important;
}

body.tq-theme-dark .iron-audioplayer .sr-playlist-item:hover,
body.tq-theme-dark .iron-audioplayer .sr-playlist-item.current,
body.tq-theme-dark .iron-audioplayer .playlist li:hover,
body.tq-theme-dark .iron-audioplayer .playlist li.current {
  background-color: #2c2620 !important;
}

body.tq-theme-dark .iron-audioplayer .sr-playlist-item.current *,
body.tq-theme-dark .iron-audioplayer .playlist li.current *,
body.tq-theme-dark .iron-audioplayer .sr-playlist-item:hover .srp_track_title,
body.tq-theme-dark .iron-audioplayer .sr-playlist-item:hover .audio-track,
body.tq-theme-dark .iron-audioplayer .album-title,
body.tq-theme-dark .iron-audioplayer .sr_it-playlist-title {
  color: #ffd27d !important;
}

body.tq-theme-dark .iron-audioplayer svg,
body.tq-theme-dark .iron-audioplayer svg path,
body.tq-theme-dark .iron-audioplayer svg rect,
body.tq-theme-dark .iron-audioplayer svg polygon,
body.tq-theme-dark .iron-audioplayer svg circle {
  fill: #f0e9de !important;
}

body.tq-theme-dark .iron-audioplayer .play svg path,
body.tq-theme-dark .iron-audioplayer .sr-playlist-item.current svg path {
  fill: #ffa018 !important;
}

body.tq-theme-dark .tq-native-audio audio {
  color-scheme: dark;
}

body.tq-theme-dark .tq-meta-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.tq-theme-dark .tq-meta-item strong {
  color: #c5bbb0 !important;
}

body.tq-theme-dark .tq-meta-value {
  color: #ece5da !important;
}

body.tq-theme-dark .tq-next-highlight,
body.tq-theme-dark .tq-cal-summary {
  background: #2b251f !important;
  border-color: #4a3d2e !important;
}

body.tq-theme-dark .tq-next-name,
body.tq-theme-dark .tq-cal-big-solar,
body.tq-theme-dark .tq-cal-lunar-line {
  color: #f6e7cf !important;
}

body.tq-theme-dark .tq-side-toc-list li.is-current a {
  background: #2e261d !important;
  color: #ffd27d !important;
}

body.tq-theme-dark .tq-mini-tag {
  background: #2f2820 !important;
  color: #f5d393 !important;
  border-color: #544738 !important;
}

body.tq-theme-dark .tq-side-topic-pill,
body.tq-theme-dark .tq-topic-pills a,
body.tq-theme-dark .tq-cal-nav-btn,
body.tq-theme-dark .tq-cal-today-btn,
body.tq-theme-dark .tq-btn-outline {
  background: #2b2724 !important;
  color: #f3d299 !important;
  border-color: #4c443c !important;
}

body.tq-theme-dark .tq-btn-outline:hover,
body.tq-theme-dark .tq-topic-pills a:hover,
body.tq-theme-dark .tq-side-topic-pill:hover {
  background: var(--tq-accent) !important;
  color: #ffffff !important;
  border-color: var(--tq-accent) !important;
}

body.tq-theme-dark .tq-filter-bar input[type="text"],
body.tq-theme-dark .tq-filter-bar select,
body.tq-theme-dark .tq-hero-search input[type="text"] {
  background: #292521 !important;
  color: #ece5da !important;
  border-color: #4a4138 !important;
}

body.tq-theme-dark .tq-ctrl-btn {
  background: #2b2724;
  color: #ece5da;
  border-color: #4c443c;
}

body.tq-theme-dark .tq-ctrl-btn.is-active,
body.tq-theme-dark .tq-ctrl-btn:hover {
  background: var(--tq-accent);
  color: #fff;
  border-color: var(--tq-accent);
}

body.tq-theme-dark .tq-font-indicator {
  color: #f5d393;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-bg {
  background-color: #161412 !important;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container > .df-book-stage,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container > .df-viewer,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .pdfemb-viewer {
  filter: invert(0.88) hue-rotate(180deg) contrast(0.95);
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls .more-container {
  background-color: rgba(28, 25, 22, 0.96) !important;
  color: #ece5da !important;
  border-color: #3a342e !important;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls {
  border-top: 1px solid #3a342e;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls .df-ui-page input {
  background-color: #2b2724 !important;
  color: #ece5da !important;
  border-color: #4c443c !important;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls .df-ui-btn {
  color: #ece5da !important;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls .df-ui-btn:hover {
  color: #f5d393 !important;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls .tq-df-toolbar-hide {
  border-left-color: rgba(255, 255, 255, 0.16);
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls .tq-df-toolbar-hide:hover,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container .df-ui-controls .tq-df-toolbar-hide:focus-visible {
  background-color: rgba(245, 211, 147, 0.14);
  color: #f5d393 !important;
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .tq-df-toolbar-restore {
  background: rgba(30, 28, 26, 0.92);
  color: #f5d393;
  border-color: rgba(245, 211, 147, 0.32);
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.45);
}

.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container.tq-toolbar-collapsed .tq-df-toolbar-restore:hover,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .df-container.tq-toolbar-collapsed .tq-df-toolbar-restore:focus-visible,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .pdfemb-viewer.tq-toolbar-collapsed .tq-df-toolbar-restore:hover,
.tq-reader-shell.tq-theme-dark .tq-pdf-viewer .pdfemb-viewer.tq-toolbar-collapsed .tq-df-toolbar-restore:focus-visible {
  background: var(--tq-accent, #9a5b13);
  color: #ffffff;
  border-color: var(--tq-accent, #9a5b13);
}

/* Chapters List */
.tq-chapters-heading {
  margin: 0 0 14px;
  font-size: 19px;
  color: #4f2c07;
}

.tq-chapters-list {
  list-style: decimal;
  padding-left: 22px;
  margin: 0;
}

.tq-chapters-list li {
  border-bottom: 1px dashed var(--tq-border);
}

.tq-chapters-list li:last-child {
  border-bottom: 0;
}

.tq-chapters-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 6px;
  text-decoration: none;
  color: var(--tq-text);
}

.tq-chapters-list a:hover {
  color: var(--tq-accent);
}

.tq-chapter-cta {
  font-size: 13px;
  color: var(--tq-accent);
  white-space: nowrap;
}

.tq-chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.tq-empty {
  padding: 28px;
  text-align: center;
  background: var(--tq-surface-soft);
  border: 1px dashed var(--tq-border);
  border-radius: 10px;
  color: var(--tq-muted);
}

/* Responsive Breakpoints (Tablet & Mobile) */
@media (max-width: 1024px) {
  .tq-reader-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .tq-reader-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .tq-jump-sidebar-btn {
    display: inline-flex;
    align-items: center;
  }

  .tq-pdf-viewer .df-container:not(.df-fullscreen),
  .tq-pdf-viewer ._df_book:not(.df-fullscreen) {
    height: var(--tq-pdf-height, clamp(560px, 82vh, 860px)) !important;
  }

  .tq-book-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tq-reader-controls {
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed var(--tq-border);
  }
}

@media (max-width: 768px) {
  .tq-reader-sidebar {
    grid-template-columns: 1fr;
  }

  body.single-book #content .center,
  body.single-sr_playlist #content .center,
  body.single-tq_video #content .center {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .tq-pdf-viewer .df-container:not(.df-fullscreen),
  .tq-pdf-viewer ._df_book:not(.df-fullscreen) {
    height: var(--tq-pdf-height, clamp(500px, 78vh, 720px)) !important;
  }

  .tq-pdf-box,
  .tq-audio-box,
  .tq-chapters-box {
    padding: 12px;
    margin-bottom: 18px;
  }

  .tq-pdf-header {
    flex-direction: column;
    align-items: stretch;
  }

  .tq-pdf-actions {
    width: 100%;
  }

  .tq-pdf-actions .tq-btn-outline,
  .tq-pdf-actions .tq-btn-primary {
    flex: 1 1 auto;
    text-align: center;
  }

  .tq-reading-body {
    padding: 18px 14px;
  }

  .tq-hero {
    padding: 24px 16px;
  }

  .tq-hero h2 {
    font-size: 24px;
  }

  .tq-ctrl-btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
  }

  .tq-chapter-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .tq-chapter-nav > div,
  .tq-chapter-nav a {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .tq-pdf-viewer .df-container:not(.df-fullscreen),
  .tq-pdf-viewer ._df_book:not(.df-fullscreen) {
    height: var(--tq-pdf-height, clamp(480px, 76vh, 660px)) !important;
  }

  .tq-pdf-viewer .tq-df-toolbar-restore {
    min-height: 30px;
    padding: 4px 12px 3px;
    font-size: 11.5px;
  }

  .tq-grid {
    grid-template-columns: 1fr;
  }

  .tq-filter-bar input[type="text"],
  .tq-filter-bar select,
  .tq-filter-bar .tq-btn-primary,
  .tq-filter-bar .tq-btn-outline {
    width: 100%;
    flex: 1 1 100%;
  }

  .tq-book-meta-bar {
    padding: 12px 14px;
  }

  .tq-meta-items {
    gap: 7px;
    font-size: 13.5px;
  }

  .tq-meta-item {
    flex-wrap: wrap;
    gap: 2px 8px;
    padding-bottom: 7px;
  }

  .tq-meta-item strong {
    min-width: auto;
  }
}

/* Footer: Chùa Phật học Xá Lợi, Thời gian mở cửa & Liên kết trang (2/3-column layout) */
#footer.footer-type2 > .center,
#footer.footer-type3 > .center {
  padding-top: 36px;
}

#footer.footer-type2 .rowfooter {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding: 36px 40px;
  box-sizing: border-box;
}

#footer.footer-type3 .rowfooter {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 36px 40px;
  box-sizing: border-box;
}

#footer.footer-type2 .rowfooter > .clear,
#footer.footer-type2 .rowfooter::after,
#footer.footer-type3 .rowfooter > .clear,
#footer.footer-type3 .rowfooter::after {
  display: none;
}

#footer.footer-type2 .footercols2,
#footer.footer-type3 .footercols3 {
  float: none;
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  text-align: left;
  box-sizing: border-box;
}

#footer.footer-type2 .footercols2:last-of-type {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 36px;
}

#footer.footer-type3 .footercols3 + .footercols3 {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 32px;
}

#footer.footer-type2 .footercols2 h3,
#footer.footer-type3 .footercols3 h3 {
  margin: 0 0 18px;
  padding: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  letter-spacing: 0.2px;
  text-transform: none;
  position: relative;
}

#footer.footer-type2 .footercols2 h3::after,
#footer.footer-type3 .footercols3 h3::after {
  display: block;
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 2px;
  background-color: #ffa018;
}

.tq-footer-info p,
.tq-footer-hours p,
.tq-footer-links p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.65;
  color: #e2e2e2;
}

.tq-footer-info p:last-child,
.tq-footer-schedule p:last-child,
.tq-footer-links p:last-child {
  margin-bottom: 0;
}

.tq-footer-info i.fa,
.tq-footer-hours i.fa,
.tq-footer-links i.fa {
  flex: 0 0 18px;
  width: 18px;
  margin-top: 4px;
  text-align: center;
  color: #ffa018;
  font-size: 15px;
}

.tq-footer-info strong,
.tq-footer-hours strong {
  color: #ffffff;
  font-weight: 600;
}

.tq-footer-info a,
.tq-footer-links a,
#copyright .copytext a {
  color: #ffd28a !important;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tq-footer-info a:hover,
.tq-footer-links a:hover,
#copyright .copytext a:hover {
  color: #ffa018 !important;
  text-decoration: underline;
}

.tq-footer-hours .tq-footer-days {
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 12px;
}

.tq-footer-schedule {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tq-footer-schedule p {
  margin: 0;
}

@media (max-width: 960px) {
  #footer.footer-type3 .rowfooter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding: 30px 26px;
  }

  #footer.footer-type3 .footercols3 {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 24px;
  }

  #footer.footer-type3 .footercols3 + .footercols3 {
    grid-column: auto;
    border-bottom: none;
    padding-bottom: 0;
    border-left: none;
    padding-left: 0;
  }

  #footer.footer-type3 .footercols3 + .footercols3 + .footercols3 {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 28px;
  }
}

@media (max-width: 768px) {
  #footer.footer-type2 > .center,
  #footer.footer-type3 > .center {
    padding-top: 24px;
  }

  #footer.footer-type2 .rowfooter,
  #footer.footer-type3 .rowfooter {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 26px 20px;
  }

  #footer.footer-type3 .footercols3 {
    grid-column: auto;
    border-bottom: none;
    padding-bottom: 0;
  }

  #footer.footer-type2 .footercols2:last-of-type,
  #footer.footer-type3 .footercols3 + .footercols3,
  #footer.footer-type3 .footercols3 + .footercols3 + .footercols3 {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0;
    padding-top: 22px;
  }
}

/* Header Logo: Metallic Gold Circular Crest + "Từ Quang Media" wordmark */
.logo a.logoimga {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  text-decoration: none;
}

.logo a.logoimga::after {
  content: "Từ Quang Media";
  font-family: "Roboto", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.25px;
  color: #78440a;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.logo a.logoimga:hover::after {
  color: #b47818;
}

.has_trans_header .logo a.logoimga::after {
  color: #ffffff;
}

.logo a.logoimga img[src*="logo-tuquang"] {
  width: 72px !important;
  height: 72px !important;
  max-width: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  flex-shrink: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.logo a.logoimga:hover img[src*="logo-tuquang"] {
  transform: scale(1.03);
  filter: drop-shadow(0 2px 6px rgba(184, 134, 34, 0.28));
}

.tq-footer-info .tq-footer-org strong {
  color: #ffd28a;
  font-size: 16px;
}

@media (max-width: 768px) {
  .logo a.logoimga {
    gap: 9px;
    padding: 12px 0;
  }

  .logo a.logoimga::after {
    font-size: 18px;
  }

  .logo a.logoimga img[src*="logo-tuquang"] {
    width: 54px !important;
    height: 54px !important;
  }
}

@media (max-width: 420px) {
  .logo a.logoimga {
    gap: 8px;
  }

  .logo a.logoimga::after {
    font-size: 16px;
  }

  .logo a.logoimga img[src*="logo-tuquang"] {
    width: 46px !important;
    height: 46px !important;
  }
}

/* Hide empty meta bar on desktop when only mobile sidebar jump button exists */
.tq-book-meta-bar.tq-meta-only-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .tq-book-meta-bar.tq-meta-only-mobile {
    display: flex;
    justify-content: flex-end;
  }
}

/* Floating Display Settings Button & Popover (positioned cleanly beside .to_top) */
.tq-display-widget {
  position: fixed;
  bottom: 20px;
  right: 70px;
  z-index: 1000;
}

.tq-display-fab {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #9a5b13;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(42, 36, 30, 0.28);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.tq-display-fab:hover,
.tq-display-fab.is-open {
  background: #78440a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(42, 36, 30, 0.36);
}

.tq-display-fab .tq-fab-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1;
  color: #ffffff !important;
}

.tq-display-panel {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 276px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  color: #2a241e;
  border: 1px solid #e2d5c3;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 14px 16px 16px;
  z-index: 1001;
  box-sizing: border-box;
}

.tq-display-panel[hidden] {
  display: none !important;
}

.tq-display-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ede4d6;
  font-size: 14px;
  font-weight: 700;
  color: #4f2c07;
}

.tq-display-close {
  border: none;
  background: transparent;
  color: #7c6f63;
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 6px;
}

.tq-display-close:hover {
  background: #f5ede0;
  color: #2a241e;
}

.tq-display-group + .tq-display-group {
  margin-top: 14px;
}

.tq-display-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #5c5146;
  margin-bottom: 8px;
}

.tq-display-font-row,
.tq-display-theme-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tq-display-panel .tq-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  min-height: 34px;
}

.tq-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.tq-swatch-light {
  background: #ffffff;
}

.tq-swatch-sepia {
  background: #f6ecda;
}

.tq-swatch-dark {
  background: #1e1c1a;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Floating Panel adapts to Sepia & Dark mode */
body.tq-theme-sepia .tq-display-panel {
  background: #f6ecda;
  border-color: #dfcca8;
  color: #3d2e1e;
}

body.tq-theme-sepia .tq-display-panel-head {
  border-bottom-color: #e4d3b4;
  color: #4f2c07;
}

body.tq-theme-dark .tq-display-fab {
  background: #b8741e;
  border-color: rgba(255, 210, 125, 0.4);
}

body.tq-theme-dark .tq-display-fab:hover,
body.tq-theme-dark .tq-display-fab.is-open {
  background: #d48926;
}

body.tq-theme-dark .tq-display-panel {
  background: #221f1c;
  border-color: #3f3831;
  color: #ece5da;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

body.tq-theme-dark .tq-display-panel-head {
  border-bottom-color: #38322c;
  color: #f5d393;
}

body.tq-theme-dark .tq-display-label {
  color: #c5bbb0;
}

body.tq-theme-dark .tq-display-close {
  color: #c5bbb0;
}

body.tq-theme-dark .tq-display-close:hover {
  background: #332e29;
  color: #ffffff;
}

@media (max-width: 480px) {
  .tq-display-widget {
    bottom: 16px;
    right: 68px;
  }

  .tq-display-panel {
    bottom: 66px;
    right: 16px;
  }
}

/* Video Library Component (Homepage Grid, Archive Shortcode, Single Video & Lightbox Modal) */
.tq-video-grid {
  display: grid;
  grid-template-columns: repeat(var(--tq-video-cols, 3), minmax(0, 1fr));
  gap: 20px;
}

.tq-video-card {
  background: var(--tq-surface, #ffffff);
  border: 1px solid var(--tq-border, #e7ddd0);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tq-video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(79, 44, 7, 0.1);
  border-color: #d6be9c;
}

.tq-video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1b1714;
  overflow: hidden;
}

.tq-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.tq-video-card:hover .tq-video-thumb img {
  transform: scale(1.04);
  opacity: 0.92;
}

.tq-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3c2916 0%, #6e4519 100%);
  color: rgba(255, 224, 155, 0.85);
  font-size: 36px;
}

.tq-video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(24, 18, 12, 0.62);
  border: 2px solid rgba(255, 214, 128, 0.85);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-left: 3px;
  box-sizing: border-box;
  backdrop-filter: blur(2px);
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.tq-video-card:hover .tq-video-play-badge {
  background: #9a5b13;
  border-color: #ffd27d;
  transform: translate(-50%, -50%) scale(1.08);
}

.tq-video-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(20, 16, 12, 0.82);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.tq-video-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}

.tq-video-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.tq-video-title a {
  color: var(--tq-text, #2a241e);
  text-decoration: none;
}

.tq-video-title a:hover {
  color: var(--tq-accent, #9a5b13);
}

/* Single Video Page & Video Library List Page (Full-width, no theme sidebar) */
body.single-tq_video #sidebar,
body.single-tq_video .single_metainfo,
body.tq-video-list-page #sidebar,
body.tq-video-list-page .comments_template {
  display: none !important;
}

body.single-tq_video .single_wrap,
body.tq-video-list-page .single_wrap {
  width: 100% !important;
  float: none !important;
}

.tq-video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #141210;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.tq-video-stage iframe,
.tq-video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.tq-video-related {
  margin-top: 32px;
}

/* Video Lightbox Modal */
body.tq-modal-open {
  overflow: hidden;
}

.tq-video-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.tq-video-modal[hidden] {
  display: none !important;
}

.tq-video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 8, 0.82);
  backdrop-filter: blur(3px);
}

.tq-video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  background: #1c1917;
  border: 1px solid #3c342c;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.tq-video-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #322b24;
  color: #f5e9d6;
}

.tq-video-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #f5d393;
  line-height: 1.35;
}

.tq-video-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.tq-video-modal-link {
  font-size: 13px;
  color: #ffd28a !important;
  text-decoration: none;
  white-space: nowrap;
}

.tq-video-modal-link:hover {
  color: #ffa018 !important;
  text-decoration: underline;
}

.tq-video-modal-close {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tq-video-modal-close:hover {
  background: #9a5b13;
}

.tq-video-modal-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.tq-video-modal-stage iframe,
.tq-video-modal-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Video Cards Theme Overrides (Sepia & Dark) */
body.tq-theme-sepia .tq-video-card {
  background: #f6ecda !important;
  border-color: #dfcca8 !important;
}

body.tq-theme-dark .tq-video-card {
  background: #1e1c1a !important;
  border-color: #3a342e !important;
}

body.tq-theme-dark .tq-video-title a {
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-video-title a:hover {
  color: #ffa018 !important;
}

@media (max-width: 960px) {
  .tq-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .tq-video-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tq-video-modal {
    padding: 10px;
  }

  .tq-video-modal-head {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Site Pages: About (Giới thiệu), Contact (Liên hệ) & Donate (Ủng hộ duy trì)
   ========================================================================== */

.tq-site-page {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tq-page-hero {
  background: linear-gradient(135deg, #fdf8f0 0%, #f3e4cd 100%);
  border: 1px solid var(--tq-border, #e7ddd0);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
}

.tq-page-eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(154, 91, 19, 0.12);
  color: var(--tq-accent-dark, #78440a);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tq-page-hero h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.3;
  color: #4f2c07;
}

.tq-page-hero p {
  margin: 0 auto;
  max-width: 720px;
  color: var(--tq-muted, #6c6157);
  font-size: 16px;
  line-height: 1.7;
}

.tq-hero-cta-row {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* About Page */
.tq-about-crest {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e1c699;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: 0 6px 18px rgba(154, 91, 19, 0.14);
}

.tq-about-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tq-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tq-stat-card {
  background: var(--tq-surface, #ffffff);
  border: 1px solid var(--tq-border, #e7ddd0);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.tq-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--tq-accent, #9a5b13);
  box-shadow: 0 8px 20px rgba(79, 44, 7, 0.08);
}

.tq-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--tq-accent, #9a5b13);
  line-height: 1.2;
}

.tq-stat-label {
  font-size: 14px;
  color: var(--tq-muted, #6c6157);
  font-weight: 500;
}

.tq-about-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.tq-info-panel {
  background: var(--tq-surface, #ffffff);
  border: 1px solid var(--tq-border, #e7ddd0);
  border-radius: 14px;
  padding: 24px;
}

.tq-info-panel h3 {
  margin: 0 0 16px;
  font-size: 20px;
  color: #4f2c07;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tq-info-panel h3 .fa {
  color: var(--tq-accent, #9a5b13);
}

.tq-prose p {
  margin: 0 0 14px;
  line-height: 1.75;
  color: var(--tq-text, #2a241e);
}

.tq-prose p:last-child {
  margin-bottom: 0;
}

.tq-mission-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--tq-surface-soft, #faf6f0);
  border-left: 4px solid var(--tq-accent, #9a5b13);
}

.tq-mission-box h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #4f2c07;
}

.tq-mission-box p {
  margin: 0;
  line-height: 1.65;
  color: var(--tq-text, #2a241e);
}

.tq-org-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tq-org-list li {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--tq-border, #e7ddd0);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tq-org-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tq-org-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--tq-muted, #6c6157);
  display: block;
}

.tq-org-list strong {
  font-size: 15px;
  color: var(--tq-text, #2a241e);
  line-height: 1.5;
}

.tq-org-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Pillars (shared by About & Donate) */
.tq-donate-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tq-pillar-card {
  background: var(--tq-surface, #ffffff);
  border: 1px solid var(--tq-border, #e7ddd0);
  border-radius: 12px;
  padding: 22px 20px;
}

.tq-pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--tq-surface-soft, #faf6f0);
  border: 1px solid var(--tq-border, #e7ddd0);
  color: var(--tq-accent, #9a5b13);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 12px;
}

.tq-pillar-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #4f2c07;
}

.tq-pillar-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--tq-muted, #6c6157);
}

/* Compact Donate Banner (Home & About) */
.tq-donate-banner {
  margin-top: 8px;
  background: linear-gradient(135deg, #fdf6e8 0%, #f4e2c1 100%);
  border: 1px solid #e2cba5;
  border-radius: 14px;
  padding: 24px 26px;
}

.tq-donate-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.tq-donate-banner-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--tq-accent, #9a5b13);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(154, 91, 19, 0.22);
}

.tq-donate-banner-copy {
  flex: 1 1 320px;
}

.tq-donate-banner-copy h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #4f2c07;
}

.tq-donate-banner-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #5b4d3f;
}

.tq-donate-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

/* Full Donate Card */
.tq-donate-card {
  background: var(--tq-surface, #ffffff);
  border: 1px solid var(--tq-border, #e7ddd0);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 8px 24px rgba(79, 44, 7, 0.05);
}

.tq-donate-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--tq-border, #e7ddd0);
}

.tq-donate-card-head h3 {
  margin: 0;
  font-size: 21px;
  color: #4f2c07;
}

.tq-donate-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tq-surface-soft, #faf6f0);
  border: 1px solid var(--tq-border, #e7ddd0);
  color: var(--tq-accent-dark, #78440a);
  font-size: 12px;
  font-weight: 700;
}

.tq-donate-amounts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.tq-donate-amounts-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--tq-muted, #6c6157);
}

.tq-amount-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tq-amount-pill {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--tq-border, #e7ddd0);
  background: var(--tq-surface-soft, #faf6f0);
  color: var(--tq-text, #2a241e);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tq-amount-pill:hover,
.tq-amount-pill.is-active {
  background: var(--tq-accent, #9a5b13);
  border-color: var(--tq-accent, #9a5b13);
  color: #ffffff;
}

.tq-donate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 320px);
  gap: 26px;
  align-items: start;
}

.tq-bank-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tq-bank-row {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--tq-surface-soft, #faf6f0);
  border: 1px solid var(--tq-border, #e7ddd0);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tq-bank-row[hidden] {
  display: none !important;
}

.tq-bank-label {
  font-size: 12px;
  color: var(--tq-muted, #6c6157);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tq-bank-value {
  font-size: 16px;
  color: var(--tq-text, #2a241e);
  word-break: break-word;
}

.tq-bank-number {
  font-size: 20px;
  letter-spacing: 0.04em;
  color: #4f2c07;
}

.tq-amount-highlight {
  color: var(--tq-accent, #9a5b13);
  font-size: 18px;
}

.tq-bank-copy-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tq-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--tq-accent, #9a5b13);
  background: #ffffff;
  color: var(--tq-accent-dark, #78440a);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tq-copy-btn:hover,
.tq-copy-btn.is-copied {
  background: var(--tq-accent, #9a5b13);
  color: #ffffff;
}

.tq-donate-intl {
  margin-top: 6px;
}

.tq-qr-box {
  background: var(--tq-surface-soft, #faf6f0);
  border: 1px solid var(--tq-border, #e7ddd0);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.tq-qr-frame {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px;
  display: inline-block;
  border: 1px solid #eadcc9;
  max-width: 100%;
}

.tq-qr-frame img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.tq-qr-caption {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--tq-muted, #6c6157);
  line-height: 1.5;
}

.tq-donate-pending {
  padding: 18px;
  border-radius: 10px;
  background: var(--tq-surface-soft, #faf6f0);
  border: 1px dashed var(--tq-border, #e7ddd0);
}

.tq-donate-pending p {
  margin: 0 0 14px;
  line-height: 1.7;
}

.tq-donate-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tq-donate-thanks {
  margin: 22px 0 0;
  padding: 18px 22px;
  border-radius: 12px;
  background: var(--tq-surface-soft, #faf6f0);
  border-left: 4px solid var(--tq-accent, #9a5b13);
  font-style: italic;
  color: var(--tq-text, #2a241e);
}

.tq-donate-thanks p {
  margin: 0;
  line-height: 1.75;
}

/* Contact Page */
.tq-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 24px;
  align-items: start;
}

.tq-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tq-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tq-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--tq-surface-soft, #faf6f0);
  border: 1px solid var(--tq-border, #e7ddd0);
  color: var(--tq-accent, #9a5b13);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.tq-contact-list strong {
  display: block;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tq-text, #2a241e);
}

.tq-contact-list a {
  color: var(--tq-accent-dark, #78440a);
  text-decoration: none;
}

.tq-contact-list a:hover {
  text-decoration: underline;
}

.tq-contact-donate-note {
  margin-top: 22px;
  padding: 16px;
  border-radius: 12px;
  background: var(--tq-surface-soft, #faf6f0);
  border: 1px solid var(--tq-border, #e7ddd0);
}

.tq-contact-donate-note h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #4f2c07;
}

.tq-contact-donate-note h4 .fa {
  color: var(--tq-accent, #9a5b13);
}

.tq-contact-donate-note p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--tq-muted, #6c6157);
}

.tq-contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tq-hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.tq-form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tq-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tq-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--tq-text, #2a241e);
}

.tq-req {
  color: #b42318;
}

.tq-field input[type="text"],
.tq-field input[type="email"],
.tq-field select,
.tq-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid #d7c7b2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--tq-text, #2a241e);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tq-field input:focus,
.tq-field select:focus,
.tq-field textarea:focus {
  outline: none;
  border-color: var(--tq-accent, #9a5b13);
  box-shadow: 0 0 0 3px rgba(154, 91, 19, 0.14);
}

.tq-form-feedback,
.tq-form-alert {
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.tq-form-feedback[hidden] {
  display: none !important;
}

.tq-form-feedback.is-success,
.tq-form-alert.is-success {
  background: #ecfdf3;
  border: 1px solid #a6f4c5;
  color: #067647;
}

.tq-form-feedback.is-error,
.tq-form-alert.is-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}

.tq-recaptcha-note {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--tq-muted, #6c6157);
}

.tq-recaptcha-note a {
  color: var(--tq-accent-dark, #78440a);
  text-decoration: underline;
}

/* Tránh huy hiệu nổi của Google reCAPTCHA đè lên nút .to_top & .tq-display-fab (đã hiển thị chú thích bản quyền theo quy định Google trong form) */
.grecaptcha-badge {
  visibility: hidden !important;
  pointer-events: none !important;
}

.tq-map-section {
  margin-top: 4px;
}

.tq-map-section .tq-section-head span {
  font-size: 14px;
  color: var(--tq-muted, #6c6157);
}

.tq-map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--tq-border, #e7ddd0);
  background: var(--tq-surface-soft, #faf6f0);
}

.tq-map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Sepia Mode Overrides for Site Pages */
body.tq-theme-sepia .tq-page-hero,
body.tq-theme-sepia .tq-donate-banner {
  background: linear-gradient(135deg, #f6ead4 0%, #ebd7b7 100%) !important;
  border-color: #dfcca8 !important;
}

body.tq-theme-sepia .tq-stat-card,
body.tq-theme-sepia .tq-info-panel,
body.tq-theme-sepia .tq-pillar-card,
body.tq-theme-sepia .tq-donate-card {
  background: #f6ecda !important;
  border-color: #dfcca8 !important;
}

body.tq-theme-sepia .tq-mission-box,
body.tq-theme-sepia .tq-bank-row,
body.tq-theme-sepia .tq-qr-box,
body.tq-theme-sepia .tq-donate-thanks,
body.tq-theme-sepia .tq-contact-donate-note,
body.tq-theme-sepia .tq-donate-pending {
  background: #efe2c9 !important;
  border-color: #d9c29c !important;
}

body.tq-theme-sepia .tq-field input[type="text"],
body.tq-theme-sepia .tq-field input[type="email"],
body.tq-theme-sepia .tq-field select,
body.tq-theme-sepia .tq-field textarea {
  background: #fbf3e4 !important;
  border-color: #d4bc94 !important;
  color: #3d2e1e !important;
}

/* Dark Mode Overrides for Site Pages */
body.tq-theme-dark .tq-page-hero,
body.tq-theme-dark .tq-donate-banner {
  background: linear-gradient(135deg, #25201b 0%, #1d1916 100%) !important;
  border-color: #3f372e !important;
}

body.tq-theme-dark .tq-page-eyebrow,
body.tq-theme-dark .tq-donate-badge {
  background: rgba(245, 211, 147, 0.14) !important;
  border-color: #514334 !important;
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-page-hero h2,
body.tq-theme-dark .tq-info-panel h3,
body.tq-theme-dark .tq-pillar-card h3,
body.tq-theme-dark .tq-donate-banner-copy h3,
body.tq-theme-dark .tq-donate-card-head h3,
body.tq-theme-dark .tq-mission-box h4,
body.tq-theme-dark .tq-contact-donate-note h4,
body.tq-theme-dark .tq-bank-number {
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-page-hero p,
body.tq-theme-dark .tq-stat-label,
body.tq-theme-dark .tq-pillar-card p,
body.tq-theme-dark .tq-donate-banner-copy p,
body.tq-theme-dark .tq-org-label,
body.tq-theme-dark .tq-bank-label,
body.tq-theme-dark .tq-qr-caption,
body.tq-theme-dark .tq-donate-amounts-label,
body.tq-theme-dark .tq-contact-donate-note p,
body.tq-theme-dark .tq-map-section .tq-section-head span {
  color: #c5bbb0 !important;
}

body.tq-theme-dark .tq-stat-card,
body.tq-theme-dark .tq-info-panel,
body.tq-theme-dark .tq-pillar-card,
body.tq-theme-dark .tq-donate-card {
  background: #1e1c1a !important;
  border-color: #3a342e !important;
}

body.tq-theme-dark .tq-stat-num,
body.tq-theme-dark .tq-amount-highlight {
  color: #ffd27d !important;
}

body.tq-theme-dark .tq-prose p,
body.tq-theme-dark .tq-mission-box p,
body.tq-theme-dark .tq-org-list strong,
body.tq-theme-dark .tq-contact-list strong,
body.tq-theme-dark .tq-bank-value,
body.tq-theme-dark .tq-donate-thanks,
body.tq-theme-dark .tq-donate-pending p,
body.tq-theme-dark .tq-field label {
  color: #ece5da !important;
}

body.tq-theme-dark .tq-contact-list a,
body.tq-theme-dark .tq-donate-pending a,
body.tq-theme-dark .tq-recaptcha-note a {
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-recaptcha-note {
  color: #b4a99c !important;
}

body.tq-theme-dark .tq-mission-box,
body.tq-theme-dark .tq-bank-row,
body.tq-theme-dark .tq-qr-box,
body.tq-theme-dark .tq-donate-thanks,
body.tq-theme-dark .tq-contact-donate-note,
body.tq-theme-dark .tq-donate-pending,
body.tq-theme-dark .tq-pillar-icon,
body.tq-theme-dark .tq-contact-icon {
  background: #27231f !important;
  border-color: #423a32 !important;
}

body.tq-theme-dark .tq-org-list li,
body.tq-theme-dark .tq-donate-card-head {
  border-color: #3a342e !important;
}

body.tq-theme-dark .tq-amount-pill,
body.tq-theme-dark .tq-copy-btn {
  background: #2b2724 !important;
  border-color: #4c443c !important;
  color: #f3d299 !important;
}

body.tq-theme-dark .tq-amount-pill:hover,
body.tq-theme-dark .tq-amount-pill.is-active,
body.tq-theme-dark .tq-copy-btn:hover,
body.tq-theme-dark .tq-copy-btn.is-copied {
  background: var(--tq-accent, #9a5b13) !important;
  border-color: var(--tq-accent, #9a5b13) !important;
  color: #ffffff !important;
}

body.tq-theme-dark .tq-field input[type="text"],
body.tq-theme-dark .tq-field input[type="email"],
body.tq-theme-dark .tq-field select,
body.tq-theme-dark .tq-field textarea {
  background: #292521 !important;
  border-color: #4a4138 !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-form-feedback.is-success,
body.tq-theme-dark .tq-form-alert.is-success {
  background: #142c20 !important;
  border-color: #275c40 !important;
  color: #86efac !important;
}

body.tq-theme-dark .tq-form-feedback.is-error,
body.tq-theme-dark .tq-form-alert.is-error {
  background: #331919 !important;
  border-color: #6b2929 !important;
  color: #fca5a5 !important;
}

/* Responsive Breakpoints for Site Pages */
@media (max-width: 960px) {
  .tq-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tq-about-story-grid,
  .tq-contact-grid,
  .tq-donate-grid,
  .tq-donate-pillars {
    grid-template-columns: 1fr;
  }

  .tq-map-frame {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 600px) {
  .tq-page-hero {
    padding: 26px 18px;
  }

  .tq-page-hero h2 {
    font-size: 24px;
  }

  .tq-info-panel,
  .tq-donate-card,
  .tq-donate-banner {
    padding: 18px 16px;
  }

  .tq-form-row-2 {
    grid-template-columns: 1fr;
  }

  .tq-donate-banner-actions {
    width: 100%;
  }

  .tq-donate-banner-actions a {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* ============================================================================
 * Mobile & Tablet Bottom Navigation Bar + "Khác" Bottom Sheet (<= 1024px)
 * ========================================================================== */
.tq-mobile-nav,
.tq-msheet {
  display: none;
}

@media (max-width: 1024px) {
  /* Chuyển menu chính từ header xuống thanh điều hướng đáy */
  #topmenu,
  #simple-menu,
  .touchon #topmenu,
  .touchon #simple-menu,
  #sidr-main,
  .sidr {
    display: none !important;
  }

  /* Cân đối lại logo trên header khi nút hamburger đã ẩn */
  .header .head_inner {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header .logo {
    float: none !important;
    margin: 0 auto !important;
    text-align: center;
  }

  .header .header-content-right {
    display: none !important;
  }

  /* Đệm đáy cho vùng bản quyền cuối trang để không bị thanh menu cố định che khuất */
  #copyright {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Đẩy nút Aa (tùy chỉnh hiển thị) & nút lên đầu trang lên phía trên thanh menu đáy */
  .to_top {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1010 !important;
  }

  .tq-display-widget {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    right: 68px;
    z-index: 1015;
  }

  .tq-display-panel {
    bottom: calc(136px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 1020;
  }

  body.tq-msheet-open {
    overflow: hidden;
  }

  /* Thanh điều hướng cố định phía dưới */
  .tq-mobile-nav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: #ffffff;
    border-top: 1px solid rgba(231, 221, 208, 0.92);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 26px rgba(42, 36, 30, 0.09);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .tq-mobile-nav-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    max-width: 680px;
    margin: 0 auto;
    height: 66px;
    padding: 0 6px;
    position: relative;
  }

  .tq-mnav-item {
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0;
    padding: 6px 4px;
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none !important;
    color: #7c7369;
    cursor: pointer;
    position: relative;
    transition: color 0.18s ease, transform 0.15s ease;
  }

  .tq-mnav-item:active {
    transform: scale(0.94);
  }

  .tq-mnav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    line-height: 1;
  }

  .tq-mnav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  .tq-mnav-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .tq-mnav-item.is-active,
  .tq-mnav-item.is-sheet-open,
  .tq-mnav-item:hover {
    color: #78440a;
  }

  .tq-mnav-item.is-active .tq-mnav-label,
  .tq-mnav-item.is-sheet-open .tq-mnav-label {
    font-weight: 700;
  }

  .tq-mnav-item.is-active::before,
  .tq-mnav-item.is-sheet-open::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #b87c1e, #9a5b13);
  }

  /* Nút Logo Từ Quang tròn nổi ở chính giữa (Trang chủ) */
  .tq-mnav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    position: relative;
    height: 100%;
    cursor: pointer;
    z-index: 2;
  }

  .tq-mnav-crest {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    background: #ffffff;
    box-shadow:
      0 -3px 14px rgba(42, 36, 30, 0.1),
      0 6px 18px rgba(154, 91, 19, 0.24),
      inset 0 0 0 1px rgba(196, 146, 46, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-16px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  .tq-mnav-crest img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    display: block;
  }

  .tq-mnav-center:active .tq-mnav-crest {
    transform: translateY(-14px) scale(0.94);
  }

  .tq-mnav-center.is-active .tq-mnav-crest {
    box-shadow:
      0 0 0 3px rgba(196, 146, 46, 0.28),
      0 -3px 14px rgba(42, 36, 30, 0.1),
      0 8px 22px rgba(154, 91, 19, 0.34);
  }

  /* Bottom Sheet cho mục "Khác" */
  .tq-msheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1080;
    pointer-events: none;
  }

  .tq-msheet[hidden] {
    display: none !important;
  }

  .tq-msheet.is-open {
    pointer-events: auto;
  }

  .tq-msheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 19, 14, 0.48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.24s ease;
  }

  .tq-msheet.is-open .tq-msheet-backdrop {
    opacity: 1;
  }

  .tq-msheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 640px;
    margin: 0 auto;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: #2a241e;
    border-radius: 22px 22px 0 0;
    border-top: 1px solid #e7ddd0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
    transform: translateY(100%);
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }

  .tq-msheet.is-open .tq-msheet-panel {
    transform: translateY(0);
  }

  .tq-msheet-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
    flex-shrink: 0;
  }

  .tq-msheet-handle span {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #d7ccbe;
  }

  .tq-msheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 18px 12px;
    border-bottom: 1px solid #efe6da;
    flex-shrink: 0;
  }

  .tq-msheet-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .tq-msheet-brand img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
  }

  .tq-msheet-brand strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #4f2c07;
    line-height: 1.25;
  }

  .tq-msheet-brand span {
    display: block;
    font-size: 12px;
    color: #7c7166;
    line-height: 1.2;
  }

  .tq-msheet-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e7ddd0;
    background: #faf6f0;
    color: #5c5146;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }

  .tq-msheet-close:hover {
    background: #efe3d2;
    color: #2a241e;
  }

  .tq-msheet-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 18px 8px;
    padding: 4px 6px 4px 12px;
    background: #faf6f0;
    border: 1px solid #e2d5c3;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .tq-msheet-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #2a241e;
    padding: 7px 0;
    outline: none;
  }

  .tq-msheet-search button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #9a5b13;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .tq-msheet-search button svg {
    width: 17px;
    height: 17px;
  }

  .tq-msheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 14px 10px;
  }

  .tq-msheet-list,
  .tq-msheet-sublist {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tq-msheet-item {
    margin: 0 0 4px;
  }

  .tq-msheet-row {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 10px;
    transition: background 0.15s ease;
  }

  .tq-msheet-link {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none !important;
    color: #2a241e;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
  }

  .tq-msheet-row:hover,
  .tq-msheet-link:active {
    background: #faf6f0;
  }

  .tq-msheet-item.is-current > .tq-msheet-row {
    background: #f6ead8;
  }

  .tq-msheet-item.is-current > .tq-msheet-row .tq-msheet-link {
    color: #78440a;
    font-weight: 700;
  }

  .tq-msheet-chevron {
    width: 17px;
    height: 17px;
    color: #a69888;
    flex-shrink: 0;
  }

  .tq-msheet-subtoggle {
    width: 38px;
    height: 38px;
    margin-right: 4px;
    border: 1px solid #e7ddd0;
    border-radius: 9px;
    background: #faf6f0;
    color: #6c6157;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.15s ease;
  }

  .tq-msheet-subtoggle svg {
    width: 17px;
    height: 17px;
    transition: transform 0.2s ease;
  }

  .tq-msheet-item.is-expanded > .tq-msheet-row .tq-msheet-subtoggle svg {
    transform: rotate(180deg);
  }

  .tq-msheet-subwrap {
    padding: 2px 0 4px 16px;
    margin-left: 12px;
    border-left: 2px solid #efe3d2;
  }

  .tq-msheet-subwrap[hidden] {
    display: none !important;
  }

  .tq-msheet-sublist .tq-msheet-link {
    min-height: 40px;
    font-size: 14px;
    padding: 8px 10px;
  }

  /* Sepia Mode cho thanh điều hướng đáy & Bottom Sheet */
  body.tq-theme-sepia .tq-mobile-nav {
    background: #f6ecda;
    border-top-color: #dfcca8;
    box-shadow: 0 -6px 26px rgba(79, 44, 7, 0.12);
  }

  body.tq-theme-sepia .tq-mnav-crest {
    background: #f6ecda;
  }

  body.tq-theme-sepia .tq-mnav-item {
    color: #6c5944;
  }

  body.tq-theme-sepia .tq-mnav-item.is-active,
  body.tq-theme-sepia .tq-mnav-item.is-sheet-open,
  body.tq-theme-sepia .tq-mnav-item:hover {
    color: #78440a;
  }

  body.tq-theme-sepia .tq-msheet-panel {
    background: #f6ecda;
    color: #3d2e1e;
    border-top-color: #dfcca8;
  }

  body.tq-theme-sepia .tq-msheet-handle span {
    background: #cdb48d;
  }

  body.tq-theme-sepia .tq-msheet-head {
    border-bottom-color: #e4d3b4;
  }

  body.tq-theme-sepia .tq-msheet-close,
  body.tq-theme-sepia .tq-msheet-subtoggle {
    background: #efe2c9;
    border-color: #d9c29c;
    color: #5c462e;
  }

  body.tq-theme-sepia .tq-msheet-search {
    background: #fbf3e4;
    border-color: #d9c29c;
  }

  body.tq-theme-sepia .tq-msheet-search input[type="search"],
  body.tq-theme-sepia .tq-msheet-link {
    color: #3d2e1e;
  }

  body.tq-theme-sepia .tq-msheet-row:hover,
  body.tq-theme-sepia .tq-msheet-item.is-current > .tq-msheet-row {
    background: #ebd8b8;
  }

  body.tq-theme-sepia .tq-msheet-subwrap {
    border-left-color: #dec7a0;
  }

  /* Dark Mode cho thanh điều hướng đáy & Bottom Sheet */
  body.tq-theme-dark .tq-mobile-nav {
    background: #1d1a17;
    border-top-color: #38322b;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.52);
  }

  body.tq-theme-dark .tq-mnav-crest {
    background: #1d1a17;
    box-shadow:
      0 -3px 16px rgba(0, 0, 0, 0.55),
      0 6px 20px rgba(0, 0, 0, 0.5),
      inset 0 0 0 1px rgba(245, 211, 147, 0.32);
  }

  body.tq-theme-dark .tq-mnav-center.is-active .tq-mnav-crest {
    box-shadow:
      0 0 0 3px rgba(245, 211, 147, 0.3),
      0 -3px 16px rgba(0, 0, 0, 0.55),
      0 8px 22px rgba(212, 137, 38, 0.32);
  }

  body.tq-theme-dark .tq-mnav-item {
    color: #aba094;
  }

  body.tq-theme-dark .tq-mnav-item.is-active,
  body.tq-theme-dark .tq-mnav-item.is-sheet-open,
  body.tq-theme-dark .tq-mnav-item:hover {
    color: #f5d393;
  }

  body.tq-theme-dark .tq-mnav-item.is-active::before,
  body.tq-theme-dark .tq-mnav-item.is-sheet-open::before {
    background: linear-gradient(90deg, #f5d393, #d48926);
  }

  body.tq-theme-dark .tq-msheet-backdrop {
    background: rgba(0, 0, 0, 0.68);
  }

  body.tq-theme-dark .tq-msheet-panel {
    background: #221f1c;
    color: #ece5da;
    border-top-color: #3d362e;
    box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.65);
  }

  body.tq-theme-dark .tq-msheet-handle span {
    background: #524a41;
  }

  body.tq-theme-dark .tq-msheet-head {
    border-bottom-color: #38322c;
  }

  body.tq-theme-dark .tq-msheet-brand strong {
    color: #f5d393;
  }

  body.tq-theme-dark .tq-msheet-brand span {
    color: #a99f93;
  }

  body.tq-theme-dark .tq-msheet-close,
  body.tq-theme-dark .tq-msheet-subtoggle {
    background: #2c2824;
    border-color: #463f37;
    color: #d6ccc0;
  }

  body.tq-theme-dark .tq-msheet-search {
    background: #2b2723;
    border-color: #473f36;
  }

  body.tq-theme-dark .tq-msheet-search input[type="search"] {
    color: #ece5da;
  }

  body.tq-theme-dark .tq-msheet-search input[type="search"]::placeholder {
    color: #9e9387;
  }

  body.tq-theme-dark .tq-msheet-search button {
    background: #b8741e;
  }

  body.tq-theme-dark .tq-msheet-link {
    color: #ece5da;
  }

  body.tq-theme-dark .tq-msheet-row:hover {
    background: #2d2924;
  }

  body.tq-theme-dark .tq-msheet-item.is-current > .tq-msheet-row {
    background: rgba(245, 211, 147, 0.14);
  }

  body.tq-theme-dark .tq-msheet-item.is-current > .tq-msheet-row .tq-msheet-link {
    color: #f5d393;
  }

  body.tq-theme-dark .tq-msheet-chevron {
    color: #847a6f;
  }

  body.tq-theme-dark .tq-msheet-subwrap {
    border-left-color: #443d35;
  }
}

@media (max-width: 480px) {
  .tq-mobile-nav-bar {
    height: 62px;
    padding: 0 2px;
  }

  .tq-mnav-crest {
    width: 62px;
    height: 62px;
    transform: translateY(-15px);
  }

  .tq-mnav-icon svg {
    width: 21px;
    height: 21px;
  }

  .tq-mnav-label {
    font-size: 10.5px;
  }

  .tq-display-widget {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    right: 68px;
  }

  .tq-display-panel {
    bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    right: 16px;
  }
}

/* ==========================================================================
   Audio Library List Grid & Single Audio Detail Sidebar
   ========================================================================== */
.tq-audio-grid {
  display: grid;
  grid-template-columns: repeat(var(--tq-audio-cols, 3), minmax(0, 1fr));
  gap: 20px;
}

.tq-audio-item-card .tq-audio-card-cover {
  aspect-ratio: 16 / 10;
}

.tq-audio-item-card .tq-audio-card-cover img {
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.tq-audio-item-card:hover .tq-audio-card-cover img {
  transform: scale(1.04);
  opacity: 0.92;
}

.tq-audio-placeholder {
  background: linear-gradient(135deg, #134e4a 0%, #0f766e 52%, #874c12 100%);
  color: rgba(255, 244, 222, 0.9);
  font-size: 46px;
}

.tq-audio-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.82);
  border: 2px solid rgba(255, 224, 155, 0.9);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-left: 3px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.tq-audio-item-card:hover .tq-audio-play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Single Audio Detail: Right Sidebar Related Audios (Same Topic) */
.tq-audio-single-content {
  padding: 28px 0 44px;
}

.tq-audio-single-shell .tq-reading-body {
  margin-top: 20px;
}

.tq-audio-detail-box {
  margin-bottom: 22px;
}

.thn_post_wrap .tq-audio-side-list,
.tq-audio-side-list {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.thn_post_wrap .tq-audio-side-list li,
.tq-audio-side-list li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px dashed var(--tq-border);
}

.tq-audio-side-list li::marker {
  content: "" !important;
}

.tq-audio-side-list li:last-child {
  border-bottom: 0;
}

.tq-audio-side-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 4px;
  border-radius: 8px;
  text-decoration: none !important;
  color: var(--tq-text);
  transition: background 0.15s ease, color 0.15s ease;
}

.tq-audio-side-item:hover {
  background: var(--tq-surface-soft);
}

.tq-audio-side-thumb {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #fff6e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-top: 2px;
}

.tq-audio-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tq-video-side-thumb {
  flex: 0 0 68px;
  width: 68px;
  height: 44px;
  background: linear-gradient(135deg, #3c2916 0%, #6e4519 100%);
  color: rgba(255, 224, 155, 0.9);
  font-size: 16px;
}

.tq-mini-video {
  background: #6e4519;
}

.tq-audio-side-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tq-audio-side-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tq-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.tq-audio-side-item:hover .tq-audio-side-title {
  color: var(--tq-accent);
}

.tq-audio-side-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--tq-muted);
  line-height: 1.3;
}

.tq-audio-side-more {
  display: block;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--tq-border);
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tq-accent-dark) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.tq-audio-side-more:hover {
  color: var(--tq-accent) !important;
  text-decoration: underline !important;
}

/* Pagination for Library Listings */
.tq-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.tq-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--tq-border);
  background: var(--tq-surface);
  color: var(--tq-text) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tq-page-num:hover,
.tq-page-num.is-current {
  background: var(--tq-accent);
  border-color: var(--tq-accent);
  color: #ffffff !important;
}

/* Sepia & Dark Mode Overrides for Audio List & Detail Sidebar */
body.tq-theme-sepia .tq-audio-side-item:hover {
  background: #ede0c6 !important;
}

body.tq-theme-sepia .tq-audio-side-title {
  color: #3d2e1e !important;
}

body.tq-theme-sepia .tq-page-num {
  background: #f6ecda !important;
  border-color: #dfcca8 !important;
  color: #3d2e1e !important;
}

body.tq-theme-dark .tq-audio-side-list li {
  border-bottom-color: #3a342e !important;
}

body.tq-theme-dark .tq-audio-side-item:hover {
  background: #282420 !important;
}

body.tq-theme-dark .tq-audio-side-title {
  color: #f0e6d8 !important;
}

body.tq-theme-dark .tq-audio-side-item:hover .tq-audio-side-title {
  color: #f5c97a !important;
}

body.tq-theme-dark .tq-audio-side-meta {
  color: #b8aea2 !important;
}

body.tq-theme-dark .tq-audio-side-more {
  border-top-color: #3a342e !important;
  color: #f5c97a !important;
}

body.tq-theme-dark .tq-audio-side-more:hover {
  color: #ffd98e !important;
}

body.tq-theme-dark .tq-page-num {
  background: #1e1c1a !important;
  border-color: #3a342e !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-page-num:hover,
body.tq-theme-dark .tq-page-num.is-current {
  background: #c78b3b !important;
  border-color: #c78b3b !important;
  color: #141210 !important;
}

@media (max-width: 960px) {
  .tq-audio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .tq-audio-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ==========================================================================
   Học - Tu - Hành - Nguyện (chuẩn màu sắc & hiệu ứng xaloipagoda.com — tách riêng .tq-hthn-*)
   ========================================================================== */
@keyframes tqHthnFadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.tq-hthn-section {
  width: 100%;
  margin: 0 0 38px;
  animation: tqHthnFadeInUp 0.65s ease both;
}

.tq-hthn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  gap: 24px;
}

.tq-hthn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 215px;
  aspect-ratio: 1 / 1;
  padding: 24px;
  background-color: #ffac4b;
  color: #ffffff !important;
  text-decoration: none !important;
  text-align: center;
  border: 0;
  border-radius: 50%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.tq-hthn-card:hover,
.tq-hthn-card:focus-visible {
  background-color: #ffac4b;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(255, 172, 75, 0.35);
  outline: none;
}

.tq-hthn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  color: #ffffff;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.tq-hthn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.25s ease-out;
}

.tq-hthn-card:hover .tq-hthn-icon svg {
  transform: scale(1.1);
}

.tq-hthn-label {
  display: block;
  margin-top: 10px;
  font-family: "Roboto", serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  color: #ffffff;
  transition: all 0.25s ease;
}

.tq-hthn-card:hover .tq-hthn-label {
  transform: scale(0.95);
  transform-origin: center center;
}

/* Tương thích chế độ Sáng / Vàng dịu / Tối mà vẫn giữ đúng sắc cam vàng #ffac4b của xaloipagoda.com */
body.tq-theme-sepia .tq-hthn-card,
body.tq-theme-sepia .tq-hthn-card:hover {
  background-color: #ffac4b !important;
  color: #ffffff !important;
}

body.tq-theme-dark .tq-hthn-card,
body.tq-theme-dark .tq-hthn-card:hover {
  background-color: #e29336 !important;
  color: #ffffff !important;
}

body.tq-theme-dark .tq-hthn-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.tq-theme-dark .tq-hthn-icon,
body.tq-theme-dark .tq-hthn-label {
  color: #ffffff !important;
}

@media (max-width: 960px) {
  .tq-hthn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 460px;
    margin: 0 auto;
    gap: 20px;
  }

  .tq-hthn-card {
    max-width: 196px;
    padding: 20px;
  }

  .tq-hthn-icon {
    width: 72px;
    height: 72px;
  }

  .tq-hthn-label {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .tq-hthn-grid {
    gap: 14px;
  }

  .tq-hthn-card {
    max-width: 156px;
    padding: 16px;
  }

  .tq-hthn-icon {
    width: 56px;
    height: 56px;
  }

  .tq-hthn-label {
    margin-top: 8px;
    font-size: 17px;
  }
}


/* =========================================================================
   Thư viện Sách gom theo Thể loại, Danh sách File gọn & Multi-PDF Switcher
   ========================================================================= */

.tq-cat-overview-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tq-border);
}

.tq-cat-overview-title {
  margin: 0 !important;
  font-size: 21px !important;
  font-weight: 700;
  color: #4f2c07;
}

.tq-cat-overview-count {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tq-muted);
}

.tq-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 20px;
}

.tq-cat-card {
  display: flex;
  flex-direction: column;
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 13px;
  overflow: hidden;
  text-decoration: none !important;
  color: var(--tq-text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tq-cat-card:hover,
.tq-cat-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--tq-accent);
  box-shadow: 0 10px 26px rgba(79, 44, 7, 0.1);
  outline: none;
}

.tq-cat-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f4e3c8 0%, #dfc093 100%);
  overflow: hidden;
}

.tq-cat-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.tq-cat-card:hover .tq-cat-cover img {
  transform: scale(1.04);
}

.tq-cat-cover-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(25, 14, 4, 0.08) 0%, rgba(25, 14, 4, 0.42) 100%);
  pointer-events: none;
}

.tq-cat-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #b97a2d 0%, #7c440e 100%);
  color: #fff6e5;
}

.tq-cat-placeholder svg {
  width: 56px;
  height: 56px;
  opacity: 0.92;
}

.tq-cat-badges {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.tq-badge-cat-files {
  background: #9a5b13;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.tq-cat-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tq-cat-title {
  margin: 0 0 8px !important;
  font-size: 19px !important;
  line-height: 1.35;
  font-weight: 700;
  color: #4f2c07;
}

.tq-cat-card:hover .tq-cat-title {
  color: var(--tq-accent);
}

.tq-cat-desc {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--tq-muted);
}

.tq-cat-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--tq-border);
}

.tq-cat-cta {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tq-accent);
}

/* Header bar bên trong 1 Thể loại / Kết quả tìm kiếm */
.tq-cat-headbar {
  background: var(--tq-surface-soft);
  border: 1px solid var(--tq-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.tq-cat-headbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tq-back-cats-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--tq-border);
  color: var(--tq-accent-dark) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.tq-back-cats-btn:hover {
  background: var(--tq-accent);
  color: #ffffff !important;
  border-color: var(--tq-accent);
}

.tq-cat-file-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(154, 91, 19, 0.12);
  color: var(--tq-accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.tq-cat-active-title {
  margin: 0 0 6px !important;
  font-size: 24px !important;
  line-height: 1.3;
  color: #4f2c07;
}

.tq-cat-active-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--tq-muted);
}

.tq-cat-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--tq-border);
}

.tq-cat-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--tq-border);
  color: var(--tq-text) !important;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.tq-cat-quick-pill small {
  color: var(--tq-muted);
}

.tq-cat-quick-pill:hover,
.tq-cat-quick-pill.is-active {
  background: var(--tq-accent);
  color: #ffffff !important;
  border-color: var(--tq-accent);
}

.tq-cat-quick-pill:hover small,
.tq-cat-quick-pill.is-active small {
  color: #ffebd0;
}

/* Danh sách File gọn gàng */
.tq-file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tq-file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 11px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tq-file-row:hover {
  border-color: var(--tq-accent);
  box-shadow: 0 6px 18px rgba(79, 44, 7, 0.07);
}

.tq-file-lead {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tq-file-index {
  font-size: 13px;
  font-weight: 700;
  color: var(--tq-muted);
  min-width: 22px;
  text-align: center;
}

.tq-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  flex-shrink: 0;
}

.tq-file-icon-pdf {
  background: #fee2e2;
  color: #b91c1c !important;
  border: 1px solid #fecaca;
}

.tq-file-icon-audio {
  background: #ccfbf1;
  color: #0f766e !important;
  border: 1px solid #99f6e4;
  font-size: 17px;
}

.tq-file-icon-text {
  background: #fef3c7;
  color: #9a5b13 !important;
  border: 1px solid #fde68a;
  font-size: 16px;
}

.tq-file-info {
  flex: 1 1 auto;
  min-width: 0;
}

.tq-file-title {
  margin: 0 0 4px !important;
  font-size: 16.5px !important;
  line-height: 1.38;
  font-weight: 700;
}

.tq-file-title a {
  color: var(--tq-text);
  text-decoration: none;
}

.tq-file-title a:hover {
  color: var(--tq-accent);
}

.tq-file-series {
  font-size: 13px;
  color: var(--tq-muted);
  margin-bottom: 5px;
}

.tq-file-series strong {
  color: var(--tq-accent-dark);
  font-weight: 600;
}

.tq-file-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
  color: var(--tq-muted);
}

.tq-file-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tq-file-meta-item i {
  color: var(--tq-accent);
  font-size: 12px;
}

.tq-file-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}

.tq-chip-pdf {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.tq-chip-text {
  background: #faf3e8;
  color: #78440a;
  border: 1px solid #e7d4b8;
}

.tq-chip-audio {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.tq-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Multi-PDF Switcher trên trang đọc chi tiết Sách */
.tq-file-switcher {
  background: var(--tq-surface-soft);
  border: 1px solid var(--tq-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.tq-file-switcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #4f2c07;
}

.tq-file-switcher-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tq-file-switcher-nav a.tq-ctrl-btn {
  text-decoration: none;
}

.tq-file-switcher-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 168px;
  overflow-y: auto;
  padding-right: 4px;
}

.tq-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--tq-border);
  color: var(--tq-text) !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.15s ease;
  max-width: 100%;
}

.tq-file-pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tq-surface-soft);
  color: var(--tq-accent-dark);
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.tq-file-pill-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tq-file-pill-size {
  color: var(--tq-muted);
  font-size: 11.5px;
  flex-shrink: 0;
}

.tq-file-pill:hover {
  border-color: var(--tq-accent);
  color: var(--tq-accent-dark) !important;
}

.tq-file-pill.is-active {
  background: var(--tq-accent);
  border-color: var(--tq-accent);
  color: #ffffff !important;
}

.tq-file-pill.is-active .tq-file-pill-num {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.tq-file-pill.is-active .tq-file-pill-size {
  color: #ffebd0;
}

.tq-side-file-size {
  color: var(--tq-muted);
  font-size: 11.5px;
  margin-left: 4px;
}

/* Chế độ Vàng dịu (Sepia) */
body.tq-theme-sepia .tq-cat-card,
body.tq-theme-sepia .tq-cat-headbar,
body.tq-theme-sepia .tq-file-row,
body.tq-theme-sepia .tq-file-switcher {
  background: #f6ecda !important;
  border-color: #dfcca8 !important;
  color: #3d2e1e !important;
}

body.tq-theme-sepia .tq-back-cats-btn,
body.tq-theme-sepia .tq-cat-quick-pill,
body.tq-theme-sepia .tq-file-pill {
  background: #fbf3e4 !important;
  border-color: #d9c39b !important;
  color: #3d2e1e !important;
}

body.tq-theme-sepia .tq-cat-quick-pill.is-active,
body.tq-theme-sepia .tq-cat-quick-pill:hover,
body.tq-theme-sepia .tq-file-pill.is-active,
body.tq-theme-sepia .tq-back-cats-btn:hover {
  background: var(--tq-accent) !important;
  border-color: var(--tq-accent) !important;
  color: #ffffff !important;
}

/* Chế độ Tối (Dark Mode) */
body.tq-theme-dark .tq-cat-overview-title,
body.tq-theme-dark .tq-cat-title,
body.tq-theme-dark .tq-cat-active-title,
body.tq-theme-dark .tq-file-title a,
body.tq-theme-dark .tq-file-switcher-head {
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-cat-card,
body.tq-theme-dark .tq-cat-headbar,
body.tq-theme-dark .tq-file-row,
body.tq-theme-dark .tq-file-switcher {
  background: #1e1c1a !important;
  border-color: #3a342e !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-cat-card:hover,
body.tq-theme-dark .tq-file-row:hover {
  border-color: #d4963a !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

body.tq-theme-dark .tq-cat-overview-count,
body.tq-theme-dark .tq-cat-desc,
body.tq-theme-dark .tq-cat-active-desc,
body.tq-theme-dark .tq-file-index,
body.tq-theme-dark .tq-file-series,
body.tq-theme-dark .tq-file-meta,
body.tq-theme-dark .tq-file-pill-size,
body.tq-theme-dark .tq-side-file-size,
body.tq-theme-dark .tq-cat-quick-pill small {
  color: #c5bbb0 !important;
}

body.tq-theme-dark .tq-cat-cta,
body.tq-theme-dark .tq-file-series strong,
body.tq-theme-dark .tq-file-title a:hover {
  color: #ffbe5c !important;
}

body.tq-theme-dark .tq-cat-file-count {
  background: #2f261c !important;
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-back-cats-btn,
body.tq-theme-dark .tq-cat-quick-pill,
body.tq-theme-dark .tq-file-pill {
  background: #292521 !important;
  border-color: #4a4138 !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-file-pill-num {
  background: #3a3228 !important;
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-back-cats-btn:hover,
body.tq-theme-dark .tq-cat-quick-pill:hover,
body.tq-theme-dark .tq-cat-quick-pill.is-active,
body.tq-theme-dark .tq-file-pill.is-active {
  background: var(--tq-accent) !important;
  border-color: var(--tq-accent) !important;
  color: #ffffff !important;
}

body.tq-theme-dark .tq-file-pill.is-active .tq-file-pill-num {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

body.tq-theme-dark .tq-file-icon-pdf,
body.tq-theme-dark .tq-chip-pdf {
  background: #3b1919 !important;
  color: #fca5a5 !important;
  border-color: #6b2626 !important;
}

body.tq-theme-dark .tq-file-icon-text,
body.tq-theme-dark .tq-chip-text {
  background: #352818 !important;
  color: #f5d393 !important;
  border-color: #5b4426 !important;
}

body.tq-theme-dark .tq-file-icon-audio,
body.tq-theme-dark .tq-chip-audio {
  background: #14332f !important;
  color: #7ee8db !important;
  border-color: #21544d !important;
}

/* Responsive Mobile & Tablet */
@media (max-width: 768px) {
  .tq-cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
  }

  .tq-cat-headbar {
    padding: 14px 15px;
  }

  .tq-cat-active-title {
    font-size: 20px !important;
  }

  .tq-file-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .tq-file-lead {
    align-items: center;
  }

  .tq-file-actions {
    width: 100%;
    padding-top: 10px;
    border-top: 1px dashed var(--tq-border);
  }

  .tq-file-actions .tq-btn-primary,
  .tq-file-actions .tq-btn-outline {
    flex: 1 1 0;
  }
}

@media (max-width: 480px) {
  .tq-cat-grid {
    grid-template-columns: 1fr;
  }

  .tq-file-switcher-pills {
    max-height: 150px;
  }
}


/* =========================================================================
   Đăng nhập Độc giả (Google + Tài khoản ngoài), Modal & Lịch sử Đang đọc
   ========================================================================= */

/* Nút Đăng nhập / Tài khoản trên Menu chính */
#topmenu ul li.tq-nav-auth-item > a.tq-nav-login-btn,
#topmenu ul li.tq-nav-auth-item > a.tq-nav-account-link {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
}

.tq-nav-avatar,
.tq-msheet-avatar,
.tq-account-avatar-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #c78b3b 0%, #8a4e10 100%);
  color: #ffffff;
  font-weight: 700;
}

.tq-nav-avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.tq-msheet-avatar {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

.tq-account-avatar-lg {
  width: 60px;
  height: 60px;
  font-size: 24px;
}

.tq-user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tq-user-avatar-initial {
  line-height: 1;
}

/* Modal Đăng nhập / Đăng ký */
.tq-auth-modal[hidden] {
  display: none !important;
}

.tq-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.tq-auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 12, 6, 0.65);
  backdrop-filter: blur(3px);
}

.tq-auth-modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #ffffff;
  color: #2a241e;
  border: 1px solid #e7ddd0;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

.tq-auth-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #efe4d5;
  background: linear-gradient(135deg, #fdf8f0 0%, #f7ebda 100%);
}

.tq-auth-modal-head h3 {
  margin: 0 0 4px !important;
  font-size: 20px !important;
  color: #4f2c07;
}

.tq-auth-modal-head p {
  margin: 0;
  font-size: 13.5px;
  color: #6c6157;
}

.tq-auth-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e2d3be;
  background: #ffffff;
  color: #4f2c07;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tq-auth-modal-close:hover {
  background: #9a5b13;
  border-color: #9a5b13;
  color: #ffffff;
}

.tq-auth-modal-body {
  padding: 18px 22px 22px;
}

/* Auth Box & Tabs */
.tq-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: #f5ede2;
  margin-bottom: 16px;
}

.tq-auth-tab {
  border: 0;
  background: transparent;
  color: #6c6157;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tq-auth-tab.is-active {
  background: #ffffff;
  color: #4f2c07;
  box-shadow: 0 2px 6px rgba(79, 44, 7, 0.1);
}

.tq-auth-social {
  margin-bottom: 14px;
}

.tq-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid #dadce0;
  color: #202124 !important;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none !important;
  box-sizing: border-box;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.tq-google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tq-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 12px;
  color: #84776b;
}

.tq-auth-divider::before,
.tq-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e7ddd0;
}

.tq-auth-form[hidden] {
  display: none !important;
}

.tq-auth-field {
  margin-bottom: 12px;
}

.tq-auth-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: #4a3f35;
}

.tq-auth-field input[type="text"],
.tq-auth-field input[type="email"],
.tq-auth-field input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7c7b2;
  border-radius: 8px;
  background: #ffffff;
  color: #2a241e;
  font-size: 14.5px;
  box-sizing: border-box;
}

.tq-auth-field input:focus {
  outline: none;
  border-color: #9a5b13;
  box-shadow: 0 0 0 3px rgba(154, 91, 19, 0.14);
}

.tq-auth-field input:disabled {
  background: #f5efe6;
  color: #7d7267;
  cursor: not-allowed;
}

.tq-auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 14px;
  font-size: 13px;
}

.tq-auth-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #5c5045;
}

.tq-auth-forgot {
  color: #9a5b13;
  text-decoration: none;
  font-weight: 500;
}

.tq-auth-forgot:hover {
  text-decoration: underline;
}

.tq-auth-submit {
  width: 100%;
  padding: 11px 16px;
  font-size: 15px;
}

.tq-auth-feedback,
.tq-auth-banner {
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.tq-auth-feedback.is-error,
.tq-auth-banner.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.tq-auth-feedback.is-success,
.tq-auth-banner.is-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* Trang Tài khoản & Lịch sử đọc (/tai-khoan/) */
.tq-account-guest-card {
  max-width: 480px;
  margin: 12px auto 28px;
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 10px 30px rgba(79, 44, 7, 0.06);
}

.tq-account-guest-head {
  text-align: center;
  margin-bottom: 18px;
}

.tq-account-guest-head h2 {
  margin: 0 0 8px !important;
  font-size: 23px !important;
  color: #4f2c07;
}

.tq-account-guest-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--tq-muted);
}

.tq-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px;
  background: linear-gradient(135deg, #fdf8f0 0%, #f4e6d2 100%);
  border: 1px solid var(--tq-border);
  border-radius: 14px;
  margin-bottom: 24px;
}

.tq-account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tq-account-name {
  margin: 0 0 4px !important;
  font-size: 22px !important;
  color: #4f2c07;
}

.tq-account-email {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--tq-muted);
}

.tq-account-badge-google {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 11.5px;
  font-weight: 700;
}

.tq-account-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tq-btn-danger-outline {
  border-color: #dc2626 !important;
  color: #b91c1c !important;
}

.tq-btn-danger-outline:hover {
  background: #fef2f2 !important;
}

.tq-account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.tq-account-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tq-border);
}

.tq-account-sec-head h3 {
  margin: 0 !important;
  font-size: 20px !important;
  color: #4f2c07;
}

.tq-link-danger {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.tq-link-danger:hover {
  text-decoration: underline;
}

.tq-prof-sep {
  border: 0;
  border-top: 1px dashed var(--tq-border);
  margin: 14px 0 12px;
}

.tq-prof-subhead {
  font-size: 13px;
  font-weight: 700;
  color: var(--tq-muted);
  margin-bottom: 10px;
}

/* Danh sách Lịch sử Đang đọc */
.tq-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tq-history-list.tq-history-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 14px;
}

.tq-history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tq-history-item:hover {
  border-color: var(--tq-accent);
  box-shadow: 0 6px 18px rgba(79, 44, 7, 0.08);
}

.tq-history-compact .tq-history-item {
  flex-direction: column;
  align-items: stretch;
}

.tq-history-thumb {
  width: 60px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #efe3d2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

.tq-history-compact .tq-history-thumb {
  width: 100%;
  height: 112px;
}

.tq-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tq-history-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c78b3b 0%, #874c12 100%);
  color: #fff8ed;
  font-size: 26px;
  font-weight: 700;
}

.tq-history-body {
  flex: 1 1 auto;
  min-width: 0;
}

.tq-history-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

.tq-history-topic {
  color: var(--tq-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tq-history-time {
  color: var(--tq-muted);
}

.tq-history-title {
  margin: 0 0 4px !important;
  font-size: 16px !important;
  line-height: 1.35;
}

.tq-history-title a {
  color: var(--tq-text);
  text-decoration: none;
}

.tq-history-title a:hover {
  color: var(--tq-accent);
}

.tq-history-sub {
  font-size: 13px;
  color: var(--tq-muted);
  margin-bottom: 6px;
}

.tq-history-progress-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tq-accent-dark);
  margin-bottom: 5px;
}

.tq-history-bar {
  height: 6px;
  border-radius: 999px;
  background: #eee3d2;
  overflow: hidden;
}

.tq-history-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b87424 0%, #9a5b13 100%);
  border-radius: 999px;
}

.tq-history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tq-history-compact .tq-history-actions .tq-btn-primary {
  width: 100%;
}

.tq-history-del-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--tq-border);
  background: transparent;
  color: var(--tq-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.tq-history-del-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
}

/* Thanh Tiếp tục đọc trên trang đọc sách */
.tq-resume-banner[hidden] {
  display: none !important;
}

.tq-resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff9ee 0%, #f7e6c7 100%);
  border: 1px solid #e2c28d;
  color: #4f2c07;
}

.tq-resume-text {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  line-height: 1.45;
}

.tq-resume-text i {
  color: #9a5b13;
}

.tq-resume-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tq-resume-dismiss {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(154, 91, 19, 0.25);
  background: rgba(255, 255, 255, 0.7);
  color: #4f2c07;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* Sidebar Reading History Widget */
.tq-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tq-sync-pill::before {
  content: "\2713";
  font-weight: 800;
}

.tq-side-hist-prog {
  display: block;
  font-size: 12px;
  color: var(--tq-muted);
  margin-top: 2px;
}

/* Mobile Sheet Account Bar */
.tq-msheet-account {
  padding: 0 18px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tq-msheet-user-card {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #faf3e8;
  border: 1px solid #e7d4b8;
  text-decoration: none !important;
}

.tq-msheet-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tq-msheet-user-info strong {
  font-size: 14px;
  color: #4f2c07;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tq-msheet-user-info small {
  font-size: 12px;
  color: #9a5b13;
  font-weight: 600;
}

.tq-msheet-logout {
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid #e7d4b8;
  background: #ffffff;
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.tq-msheet-login-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid #9a5b13;
  background: #9a5b13;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Tương thích Chế độ Vàng dịu (Sepia) */
body.tq-theme-sepia .tq-auth-modal-dialog,
body.tq-theme-sepia .tq-account-guest-card,
body.tq-theme-sepia .tq-history-item {
  background: #f6ecda !important;
  border-color: #dfcca8 !important;
  color: #3d2e1e !important;
}

body.tq-theme-sepia .tq-auth-modal-head,
body.tq-theme-sepia .tq-account-header,
body.tq-theme-sepia .tq-resume-banner {
  background: #efe0c4 !important;
  border-color: #d9c39b !important;
}

/* Tương thích Chế độ Tối (Dark Mode) */
body.tq-theme-dark .tq-auth-modal-dialog,
body.tq-theme-dark .tq-account-guest-card,
body.tq-theme-dark .tq-history-item {
  background: #1e1c1a !important;
  border-color: #3a342e !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-auth-modal-head,
body.tq-theme-dark .tq-account-header,
body.tq-theme-dark .tq-resume-banner {
  background: linear-gradient(135deg, #2a241d 0%, #201c18 100%) !important;
  border-color: #463c31 !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-auth-modal-head h3,
body.tq-theme-dark .tq-account-guest-head h2,
body.tq-theme-dark .tq-account-name,
body.tq-theme-dark .tq-account-sec-head h3,
body.tq-theme-dark .tq-history-title a,
body.tq-theme-dark .tq-history-progress-label,
body.tq-theme-dark .tq-auth-forgot,
body.tq-theme-dark .tq-msheet-user-info strong {
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-auth-modal-head p,
body.tq-theme-dark .tq-account-guest-head p,
body.tq-theme-dark .tq-account-email,
body.tq-theme-dark .tq-auth-field label,
body.tq-theme-dark .tq-auth-check,
body.tq-theme-dark .tq-auth-divider,
body.tq-theme-dark .tq-history-time,
body.tq-theme-dark .tq-history-sub,
body.tq-theme-dark .tq-side-hist-prog {
  color: #c5bbb0 !important;
}

body.tq-theme-dark .tq-auth-tabs {
  background: #292521 !important;
}

body.tq-theme-dark .tq-auth-tab {
  color: #c5bbb0 !important;
}

body.tq-theme-dark .tq-auth-tab.is-active {
  background: #3a332b !important;
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-auth-field input[type="text"],
body.tq-theme-dark .tq-auth-field input[type="email"],
body.tq-theme-dark .tq-auth-field input[type="password"] {
  background: #292521 !important;
  color: #ece5da !important;
  border-color: #4a4138 !important;
}

body.tq-theme-dark .tq-auth-field input:disabled {
  background: #221f1c !important;
  color: #9e9488 !important;
}

body.tq-theme-dark .tq-google-btn {
  background: #2b2724 !important;
  border-color: #4c443c !important;
  color: #f5ede0 !important;
}

body.tq-theme-dark .tq-google-btn:hover {
  background: #36302a !important;
}

body.tq-theme-dark .tq-auth-modal-close,
body.tq-theme-dark .tq-resume-dismiss,
body.tq-theme-dark .tq-history-del-btn {
  background: #2b2724 !important;
  border-color: #4c443c !important;
  color: #f5d393 !important;
}

body.tq-theme-dark .tq-history-bar {
  background: #363029 !important;
}

body.tq-theme-dark .tq-sync-pill {
  background: #14332b !important;
  border-color: #1f5547 !important;
  color: #86efac !important;
}

body.tq-theme-dark .tq-msheet-user-card,
body.tq-theme-dark .tq-msheet-logout {
  background: #292521 !important;
  border-color: #4a4138 !important;
}

/* Responsive Mobile & Tablet */
@media (max-width: 900px) {
  .tq-account-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tq-account-guest-card {
    padding: 18px;
  }

  .tq-account-header {
    padding: 16px;
  }

  .tq-history-item {
    flex-wrap: wrap;
  }

  .tq-history-actions {
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed var(--tq-border);
  }

  .tq-history-actions .tq-btn-primary {
    flex: 1 1 auto;
  }

  .tq-resume-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .tq-resume-actions .tq-btn-primary {
    flex: 1 1 auto;
  }
}


/* =========================================================================
   Header Desktop 1 hàng gọn gàng: Logo + Menu xếp sát nhau cân đối (> 1024px)
   ========================================================================= */
@media (min-width: 1025px) {
  .header .head_inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px;
    float: none !important;
    min-height: 82px;
  }

  .header .logo {
    float: none !important;
    flex: 0 0 auto;
    padding-right: 6px !important;
    margin: 0 !important;
  }

  .header .logo a.logoimga {
    padding: 10px 0 !important;
    gap: 10px;
  }

  .header .logo a.logoimga img[src*="logo-tuquang"] {
    width: 62px !important;
    height: 62px !important;
    margin-top: 0 !important;
  }

  .header .logo a.logoimga::after {
    font-size: 19px;
  }

  .header .header-content-right {
    float: none !important;
    flex: 1 1 auto;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
  }

  .header #topmenu {
    float: none !important;
    width: auto !important;
    text-align: right;
  }

  .header #topmenu .menu-header > ul,
  .header #topmenu > ul {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 2px;
  }

  .header #topmenu ul > li {
    float: none !important;
    flex: 0 0 auto;
  }

  .header #topmenu ul > li > a {
    padding: 12px 10px !important;
    font-size: 14.5px !important;
    line-height: 1.35 !important;
    white-space: nowrap;
  }

  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-login-btn,
  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-account-link {
    padding: 7px 12px !important;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid rgba(154, 91, 19, 0.3);
    background: rgba(154, 91, 19, 0.06);
  }

  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-login-btn:hover,
  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-account-link:hover {
    background: #9a5b13 !important;
    border-color: #9a5b13 !important;
    color: #ffffff !important;
  }

  .header #topmenu ul > li.tq-nav-auth-item > a span {
    padding-left: 0 !important;
    font-size: inherit !important;
  }

  .header #topmenu ul li ul.sub-menu {
    top: 100%;
  }

  body.tq-theme-dark .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-login-btn,
  body.tq-theme-dark .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-account-link {
    background: rgba(245, 211, 147, 0.1);
    border-color: rgba(245, 211, 147, 0.32);
    color: #f5d393 !important;
  }
}

@media (min-width: 1025px) and (max-width: 1180px) {
  .header #topmenu ul > li > a {
    padding: 10px 7px !important;
    font-size: 14px !important;
  }

  .header .logo a.logoimga::after {
    font-size: 17px;
  }

  .header .logo a.logoimga img[src*="logo-tuquang"] {
    width: 54px !important;
    height: 54px !important;
  }
}


/* =========================================================================
   Thanh điều hướng khu vực Độc giả & Trang Thông tin tài khoản riêng
   ========================================================================= */
.tq-account-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--tq-border);
}

.tq-account-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  color: var(--tq-text) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.tq-account-nav-tab:hover {
  border-color: var(--tq-accent);
  color: var(--tq-accent-dark) !important;
}

.tq-account-nav-tab.is-active {
  background: var(--tq-accent);
  border-color: var(--tq-accent);
  color: #ffffff !important;
}

.tq-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.tq-profile-card,
.tq-profile-summary-card {
  padding: 22px;
}

.tq-profile-meta-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.tq-profile-meta-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--tq-border);
}

.tq-profile-meta-list li:last-child {
  border-bottom: 0;
}

.tq-profile-meta-list li span {
  font-size: 12.5px;
  color: var(--tq-muted);
}

.tq-profile-meta-list li strong {
  font-size: 14.5px;
  color: var(--tq-text);
  word-break: break-word;
}

.tq-profile-summary-actions {
  margin-top: 16px;
}

.tq-msheet-account-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.tq-msheet-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid #e7d4b8;
  background: #ffffff;
  color: #78440a !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
}

.tq-msheet-account-actions .tq-msheet-logout {
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 12px;
}

body.tq-theme-sepia .tq-account-nav-tab {
  background: #f6ecda !important;
  border-color: #dfcca8 !important;
  color: #3d2e1e !important;
}

body.tq-theme-sepia .tq-account-nav-tab.is-active {
  background: var(--tq-accent) !important;
  border-color: var(--tq-accent) !important;
  color: #ffffff !important;
}

body.tq-theme-dark .tq-account-nav-tab,
body.tq-theme-dark .tq-msheet-profile-link {
  background: #292521 !important;
  border-color: #4a4138 !important;
  color: #ece5da !important;
}

body.tq-theme-dark .tq-account-nav-tab.is-active {
  background: var(--tq-accent) !important;
  border-color: var(--tq-accent) !important;
  color: #ffffff !important;
}

body.tq-theme-dark .tq-profile-meta-list li span {
  color: #c5bbb0 !important;
}

body.tq-theme-dark .tq-profile-meta-list li strong {
  color: #f5d393 !important;
}

@media (max-width: 820px) {
  .tq-profile-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================================
   Header Avatar chỉ hiện ký tự tên (tròn gọn, đồng tâm chuẩn) & Nhãn Pháp danh
   ========================================================================= */
@media (min-width: 1025px) {
  .header .logo {
    display: inline-flex !important;
    align-items: center !important;
  }

  .header .logo .desc:empty {
    display: none !important;
  }

  .header #topmenu ul > li.tq-nav-auth-item {
    display: inline-flex !important;
    align-items: center !important;
  }

  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-avatar-only {
    box-sizing: border-box !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 0 0 8px !important;
    border: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    line-height: 1 !important;
  }

  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-avatar-only:hover {
    background: transparent !important;
    transform: translateY(-1px);
  }

  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-avatar-only .tq-nav-avatar {
    box-sizing: border-box !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(154, 91, 19, 0.36);
    transition: box-shadow 0.15s ease;
  }

  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-avatar-only:hover .tq-nav-avatar {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #9a5b13;
  }

  body.tq-theme-sepia .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-avatar-only .tq-nav-avatar {
    box-shadow: 0 0 0 2px #efe3cc, 0 0 0 4px rgba(154, 91, 19, 0.4);
  }

  body.tq-theme-dark .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-avatar-only .tq-nav-avatar {
    box-shadow: 0 0 0 2px #141210, 0 0 0 4px rgba(245, 211, 147, 0.45);
  }

  .header #topmenu ul > li.tq-nav-auth-item > a.tq-nav-avatar-only .tq-user-avatar-initial {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    color: #ffffff !important;
    display: block !important;
  }
}

.tq-prof-pwd-hint {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--tq-muted);
}

.tq-opt-label {
  font-weight: 400;
  color: var(--tq-muted);
  font-size: 12.5px;
}

.tq-account-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.tq-account-name-row .tq-account-name {
  margin-bottom: 0 !important;
}

.tq-account-badge-dharma[hidden] {
  display: none !important;
}

.tq-account-badge-dharma {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(154, 91, 19, 0.12);
  border: 1px solid rgba(154, 91, 19, 0.25);
  color: #78440a;
  font-size: 12.5px;
}

body.tq-theme-dark .tq-account-badge-dharma {
  background: #2f261c !important;
  border-color: #54432e !important;
  color: #f5d393 !important;
}


/* Ẩn hoàn toàn các nút Edit của theme (SKT Buddhism `.edit_wrap`) & WordPress đối với tài khoản Độc giả bên ngoài */
body.tq-reader-user .edit_wrap,
body.tq-reader-user .edit-link,
body.tq-reader-user .post-edit-link,
body.tq-reader-user .customize-partial-edit-shortcut,
.edit_wrap:has(> a[href=""]) {
  display: none !important;
}
