:root {
  color-scheme: light dark;
  --bg: #f7f3ea;
  --paper: #fffdf8;
  --ink: #24302f;
  --muted: #66716d;
  --line: #d9d3c6;
  --teal: #26706d;
  --teal-dark: #18524f;
  --coral: #c85f4b;
  --gold: #a9791d;
  --green: #4d7b47;
  --blue: #426d9c;
  --shadow: 0 18px 42px rgba(36, 48, 47, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--teal);
  border-radius: var(--radius);
  font-weight: 800;
  box-shadow: inset -6px 0 0 rgba(0, 0, 0, 0.12);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a[aria-current="page"] {
  color: var(--ink);
  background: #eee5d6;
  outline: none;
}

main {
  padding: 24px clamp(16px, 4vw, 44px) 44px;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(360px, 1.25fr);
  gap: 24px;
  align-items: end;
  padding: 22px 0 18px;
}

.search-copy h1 {
  max-width: 13em;
  margin: 4px 0 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  text-wrap: balance;
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}

.search-box button,
.filter-heading button,
.mobile-filter-toggle,
.dialog-close,
.official-link {
  min-height: 42px;
  padding: 0 14px;
  color: #fff;
  background: var(--teal);
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
}

.search-box button:hover,
.filter-heading button:hover,
.mobile-filter-toggle:hover,
.dialog-close:hover,
.official-link:hover {
  background: var(--teal-dark);
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 90px;
  color: #7a6e5d;
  background:
    linear-gradient(90deg, rgba(38, 112, 109, 0.08), rgba(200, 95, 75, 0.08)),
    #f4ecdc;
  border: 1px dashed #bcae98;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}

.ad-slot-top {
  margin-bottom: 18px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.quick-stats div {
  display: grid;
  gap: 2px;
  min-height: 82px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quick-stats strong {
  color: var(--teal-dark);
  font-size: clamp(24px, 3vw, 28px);
  line-height: 1;
  white-space: nowrap;
}

.quick-stats span {
  color: var(--muted);
  font-size: 13px;
}

.method-band {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  background: #efe6d5;
  border-block: 1px solid var(--line);
}

.method-heading {
  display: grid;
  gap: 4px;
}

.method-heading h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.method-item {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px 0;
  border-top: 2px solid rgba(38, 112, 109, 0.26);
}

.method-item h3 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 16px;
}

.method-item p {
  margin: 0;
  color: #56615e;
  font-size: 14px;
}

.rating-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-scale span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  color: #5c4224;
  background: #fff7e7;
  border: 1px solid #e0cda9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.rating-scale strong {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--coral);
  border-radius: 6px;
}

.weekly-section {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(36, 48, 47, 0.06);
}

.platform-entry-section {
  display: grid;
  gap: 14px;
  margin: 0 clamp(-44px, -4vw, -16px) 20px;
  padding: 22px clamp(16px, 4vw, 44px);
  background: #efe6d5;
  border-block: 1px solid var(--line);
}

.weekly-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.weekly-heading h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
}

.weekly-controls {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.2fr);
  gap: 10px;
  min-width: min(520px, 100%);
}

.weekly-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.weekly-controls select {
  min-height: 42px;
  padding: 0 10px;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.weekly-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weekly-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: #5c4224;
  background: #fff3df;
  border: 1px solid #e5caa0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.weekly-description {
  margin: 0;
  color: #475350;
  font-size: 14px;
}

.platform-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.platform-entry-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 164px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(36, 48, 47, 0.06);
}

.platform-entry-card:hover,
.platform-entry-card:focus-visible {
  border-color: rgba(38, 112, 109, 0.42);
  outline: none;
}

.platform-entry-card.pending {
  background: #f8f0e3;
}

.platform-entry-card h3 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 20px;
}

.platform-entry-card p {
  margin: 0;
  color: #56615e;
  font-size: 14px;
}

.platform-entry-card strong {
  align-self: end;
  color: var(--teal);
}

.weekly-list {
  display: grid;
  gap: 10px;
}

.weekly-item,
.weekly-empty {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #f9f3e8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.weekly-item {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
}

.weekly-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--teal);
  border-radius: var(--radius);
  font-size: 16px;
}

.weekly-book {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.weekly-book-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.weekly-book h3,
.weekly-empty h3 {
  margin: 0;
  font-size: 17px;
}

.weekly-book p,
.weekly-empty p {
  margin: 0;
  color: #56615e;
  font-size: 13px;
}

.weekly-movement {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 8px;
  color: #fff;
  background: var(--coral);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.weekly-tags,
.weekly-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.weekly-actions {
  justify-content: flex-end;
}

.ranking-page-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 18px 0 22px;
}

.ranking-page-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}

.ranking-page-hero p {
  max-width: 58em;
  margin: 0;
  color: #475350;
}

.ranking-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ranking-page-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.platform-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.platform-nav h2 {
  margin: 0;
  font-size: 20px;
}

.platform-tabs {
  display: grid;
  gap: 8px;
}

.platform-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  color: #34504e;
  background: #e7f0eb;
  border: 1px solid #c5ddd6;
  border-radius: var(--radius);
  font-weight: 800;
}

.platform-tab::after {
  content: ">";
  color: var(--muted);
  font-weight: 900;
}

.platform-tab small {
  margin-left: auto;
  color: inherit;
  font-size: 12px;
  opacity: 0.74;
  white-space: nowrap;
}

.platform-tab:hover,
.platform-tab:focus-visible,
.platform-tab.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  outline: none;
}

.platform-tab:hover::after,
.platform-tab:focus-visible::after,
.platform-tab.active::after {
  color: rgba(255, 255, 255, 0.78);
}

.ranking-page-content,
.platform-board-list,
.ranking-board {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ranking-board {
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(36, 48, 47, 0.06);
}

.ranking-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.ranking-board-head h2 {
  margin: 2px 0 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.2;
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-heading,
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-heading h2,
.results-toolbar h2 {
  margin: 0;
  font-size: 21px;
}

.filter-heading-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-heading button {
  min-height: 34px;
  padding-inline: 10px;
  color: var(--teal);
  background: #e7f0eb;
}

.filter-close {
  display: none;
}

.filter-group {
  display: grid;
  gap: 7px;
}

.filter-group label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-group select {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-group select option {
  color: var(--ink);
  background: #fffaf0;
}

.policy-note {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.policy-note h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.policy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.results {
  min-width: 0;
}

.mobile-filter-toggle {
  display: none;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  margin: 12px 0;
}

.filter-chip,
.tag,
.metric,
.sentiment,
.data-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.filter-chip {
  color: var(--teal-dark);
  background: #dfefea;
}

.shelf-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.shelf-view-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--teal-dark);
  background: #ecf5f1;
  border: 1px solid #c5ddd6;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.shelf-view-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  padding: 2px 7px;
  color: #fff;
  background: var(--teal);
  border-radius: 999px;
  font-size: 12px;
}

.shelf-view-button:hover,
.shelf-view-button:focus-visible,
.shelf-view-button.active {
  color: #fff;
  background: var(--teal-dark);
  outline: none;
}

.shelf-view-button.active strong,
.shelf-view-button:hover strong,
.shelf-view-button:focus-visible strong {
  color: var(--teal-dark);
  background: #fff;
}

.rank-strip {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #fff3df;
  border: 1px solid #e5caa0;
  border-radius: var(--radius);
}

.rank-strip p {
  margin: 0;
  color: #775f36;
  font-size: 14px;
}

.rank-label {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.rank-strip strong {
  display: block;
  font-size: 16px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.book-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 360px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(36, 48, 47, 0.07);
}

.book-card.is-seen {
  border-color: rgba(38, 112, 109, 0.34);
}

.book-card.is-favorite {
  border-color: rgba(240, 191, 106, 0.48);
}

.book-card.is-dismissed {
  border-color: rgba(200, 95, 75, 0.34);
}

.book-cover {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: end;
  min-height: 120px;
  padding: 14px;
  color: #fff;
}

.cover-book {
  display: grid;
  place-items: center;
  width: 58px;
  height: 88px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  box-shadow: inset -8px 0 0 rgba(0, 0, 0, 0.12);
  font-weight: 900;
}

.cover-book small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
}

.book-cover h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.book-cover p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.book-body {
  display: grid;
  grid-template-rows: auto;
  gap: 12px;
  padding: 14px;
}

.card-meta,
.metric-row,
.tag-row,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.data-status {
  color: #5c4b1f;
  background: #f5e7bd;
}

.data-status.ready {
  color: #27582a;
  background: #dff0d9;
}

.data-status.metadata {
  color: #315875;
  background: #dfeaf3;
}

.data-status.draft {
  color: #5c4b1f;
  background: #f5e7bd;
}

.data-status.curated {
  color: #5a3511;
  background: #f8d9a2;
}

.data-status.premium {
  color: #17312d;
  background: #f0bf6a;
}

.data-status.standard {
  color: #22504b;
  background: #d8efe8;
}

.personal-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--teal-dark);
  background: #d8efe8;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.personal-status.favorite {
  color: #5c4b1f;
  background: #f5e7bd;
}

.personal-status.dismissed {
  color: #7e3428;
  background: #f3d7d1;
}

.rating {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: #fff;
  background: var(--coral);
  border-radius: var(--radius);
  font-weight: 900;
}

.tag {
  color: #34504e;
  background: #e4efec;
}

.sentiment {
  color: #214d48;
  background: #d4ede3;
}

.metric {
  color: #674b25;
  background: #f4e7d1;
}

.intro {
  margin: 0;
  color: #475350;
  font-size: 14px;
}

.chapter-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chapter-strip span {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 9px 10px;
  color: var(--muted);
  background: #f9f3e8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
}

.chapter-strip strong {
  color: var(--ink);
  font-size: 14px;
}

.source-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.reader-buzz {
  display: grid;
  gap: 7px;
  padding: 10px;
  color: #5d4b2d;
  background: #fff6e5;
  border: 1px solid #ead4a7;
  border-radius: var(--radius);
  font-size: 13px;
}

.reader-buzz span {
  display: block;
}

.reader-buzz strong {
  color: var(--ink);
}

.story-line,
.recommend-line,
.poison-line {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #475350;
  font-size: 14px;
  line-height: 1.55;
}

.story-line span,
.recommend-line span,
.poison-line span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.card-actions {
  justify-content: space-between;
  padding-top: 4px;
}

.shelf-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.shelf-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--muted);
  background: #f6efe4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.shelf-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
}

.shelf-check.active {
  color: var(--teal-dark);
  background: #dff0ea;
  border-color: rgba(38, 112, 109, 0.3);
}

.shelf-check.favorite.active {
  color: #5c4b1f;
  background: #f5e7bd;
  border-color: rgba(240, 191, 106, 0.46);
}

.shelf-check:has(input[data-shelf-toggle="dismissed"]:checked) {
  color: #7e3428;
  background: #f5ded8;
  border-color: rgba(200, 95, 75, 0.32);
}

.details-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--teal);
  background: #ecf5f1;
  border: 1px solid #c5ddd6;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.details-button:hover,
.details-button:focus-visible {
  background: #dceee8;
  outline: none;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.load-more-results,
.shuffle-results {
  width: 100%;
  min-height: 46px;
  color: var(--teal);
  background: #ecf5f1;
  border: 1px solid #c5ddd6;
  border-radius: var(--radius);
  font-weight: 900;
}

.load-more-results:hover,
.load-more-results:focus-visible,
.shuffle-results:hover,
.shuffle-results:focus-visible {
  background: #dceee8;
  outline: none;
}

.official-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding-inline: 12px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.official-link.disabled {
  color: #665f52;
  background: #e6dfd2;
  cursor: not-allowed;
}

.official-link.disabled:hover {
  background: #e6dfd2;
}

.card-feedback-button,
.empty-feedback-button,
.secondary-action,
.feedback-chip-row button {
  min-height: 40px;
  padding: 0 12px;
  color: var(--teal-dark);
  background: #eef7f4;
  border: 1px solid rgba(38, 112, 109, 0.22);
  border-radius: var(--radius);
  font-weight: 800;
}

.card-feedback-button:hover,
.card-feedback-button:focus-visible,
.empty-feedback-button:hover,
.empty-feedback-button:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible,
.feedback-chip-row button:hover,
.feedback-chip-row button:focus-visible {
  color: #fff;
  background: var(--teal-dark);
  outline: none;
}

.card-feedback-button {
  flex: 0 0 auto;
}

.empty-feedback-button {
  margin-top: 18px;
}

.feedback-fab {
  position: fixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  background: var(--coral);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.feedback-fab:hover,
.feedback-fab:focus-visible {
  background: #a94939;
  outline: none;
}

.side-ads {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.ad-slot-side:first-child {
  min-height: 250px;
}

.ad-slot-side:last-child {
  min-height: 600px;
}

.empty-state {
  min-height: 240px;
  padding: 34px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 auto;
  max-width: 34em;
  color: var(--muted);
}

.book-dialog,
.feedback-dialog {
  width: min(840px, calc(100vw - 28px));
  max-height: min(86vh, 900px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.book-dialog::backdrop,
.feedback-dialog::backdrop {
  background: rgba(26, 34, 33, 0.48);
}

.dialog-hero {
  display: grid;
  gap: 12px;
  padding: 22px;
  color: #fff;
}

.dialog-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.dialog-topline h2 {
  margin: 0;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.1;
}

.dialog-close {
  align-self: start;
  min-width: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.dialog-content {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.dialog-section {
  display: grid;
  gap: 8px;
}

.dialog-section h3 {
  margin: 0;
  font-size: 17px;
}

.dialog-section p,
.dialog-section ul {
  margin: 0;
  color: #475350;
}

.dialog-section ul {
  padding-left: 1.2em;
}

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

.dialog-meta {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f9f3e8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dialog-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dialog-ad {
  min-height: 120px;
}

.feedback-dialog {
  width: min(680px, calc(100vw - 28px));
}

.feedback-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.feedback-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.feedback-head h2 {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.12;
}

.feedback-lead,
.feedback-status {
  margin: 0;
  color: var(--muted);
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feedback-panel label,
.feedback-message-label {
  display: grid;
  gap: 7px;
}

.feedback-panel label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.feedback-panel input,
.feedback-panel select,
.feedback-panel textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feedback-panel textarea {
  min-height: 148px;
  resize: vertical;
}

.feedback-context {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: var(--muted);
  background: #f6efe3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.feedback-actions,
.feedback-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-actions > * {
  flex: 1;
  justify-content: center;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(16px, 4vw, 44px) 34px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-size: 13px;
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1180px) {
  .layout,
  .ranking-page-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .side-ads {
    display: none;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    gap: 10px;
  }

  .top-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 50vw;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  main {
    padding-top: 14px;
  }

  .search-band {
    grid-template-columns: 1fr;
  }

  .search-copy h1 {
    max-width: none;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-page-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .ranking-page-layout {
    grid-template-columns: 1fr;
  }

  .platform-nav {
    position: static;
  }

  .platform-tabs {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .filters {
    position: static;
    display: none;
  }

  body.filters-open .filters {
    display: grid;
  }

  .mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
  }

  .shelf-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-strip {
    grid-template-columns: 1fr;
  }

  .weekly-heading,
  .ranking-board-head,
  .weekly-book-top,
  .weekly-item {
    grid-template-columns: 1fr;
  }

  .weekly-heading,
  .ranking-board-head {
    flex-direction: column;
    align-items: stretch;
  }

  .weekly-book-top {
    flex-direction: column;
  }

  .weekly-controls {
    min-width: 0;
  }

  .weekly-item {
    align-items: start;
  }

  .weekly-actions {
    justify-content: flex-start;
  }

  .book-grid,
  .dialog-grid,
  .platform-entry-grid,
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .feedback-fab {
    position: static;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
  }
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav {
    max-width: 100%;
    padding-bottom: 2px;
  }

  .top-nav .nav-optional {
    display: none;
  }

  .book-card {
    min-height: 0;
  }

  .book-cover {
    grid-template-columns: 48px 1fr;
  }

  .cover-book {
    width: 48px;
    height: 74px;
  }

  .quick-stats div {
    min-height: 74px;
    padding: 12px;
  }

  .method-band {
    padding: 16px;
  }

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

  .weekly-controls {
    grid-template-columns: 1fr;
  }

  .platform-tabs {
    grid-template-columns: 1fr;
  }

  .shelf-switcher {
    grid-template-columns: 1fr;
  }
}

.home-page {
  color-scheme: dark;
  --bg: #0c1110;
  --paper: #151b1a;
  --ink: #f6f1e8;
  --muted: #aeb9b3;
  --line: rgba(238, 229, 214, 0.14);
  --teal: #31b8a6;
  --teal-dark: #209181;
  --coral: #e06b56;
  --gold: #f0bf6a;
  --green: #78a96d;
  --blue: #74a1d6;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
  background: #0c1110;
}

.home-page .site-header {
  background: rgba(12, 17, 16, 0.88);
  border-bottom-color: rgba(238, 229, 214, 0.1);
}

.home-page .brand-mark {
  color: #07100f;
  background: var(--teal);
  box-shadow: inset -6px 0 0 rgba(0, 0, 0, 0.2);
}

.home-page .brand small,
.home-page .top-nav a {
  color: #aeb9b3;
}

.home-page .top-nav a:hover,
.home-page .top-nav a:focus-visible {
  color: #f6f1e8;
  background: rgba(238, 229, 214, 0.08);
}

.home-page main {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.home-page .hero-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  min-height: auto;
  padding: 22px 0 8px;
}

.home-page .search-copy {
  display: grid;
  gap: 12px;
}

.home-page .search-copy h1 {
  max-width: 10em;
  margin: 0;
  color: #fffaf0;
  font-size: 36px;
  line-height: 1.08;
}

.home-page .hero-lead {
  max-width: 42em;
  margin: 0;
  color: #c8d2cc;
  font-size: 16px;
}

.home-page .hero-compass {
  display: none;
}

.home-page .eyebrow {
  color: var(--gold);
}

.home-page .hero-panel,
.home-page .nav-section,
.home-page .quick-stats div,
.home-page .filters,
.home-page .book-card,
.home-page .platform-entry-card,
.home-page .method-band,
.home-page .empty-state {
  background: rgba(21, 27, 26, 0.92);
  border: 1px solid rgba(238, 229, 214, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-page .hero-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.home-page .search-box {
  grid-template-columns: 1fr auto;
  background: #f6f1e8;
  border: 0;
  box-shadow: none;
}

.home-page .search-box input {
  color: #111816;
}

  .home-page .search-box button,
  .home-page .official-link,
  .home-page .mobile-filter-toggle,
  .home-page .details-button {
  color: #06110f;
  background: var(--teal);
  border: 0;
}

.home-page .search-box button:hover,
.home-page .official-link:hover,
.home-page .mobile-filter-toggle:hover,
.home-page .details-button:hover,
.home-page .details-button:focus-visible {
  background: #53d3c1;
}

.home-page .hero-suggestions,
.home-page .quick-category-grid,
.home-page .craving-grid,
.home-page .topic-entry-grid {
  display: grid;
  gap: 10px;
}

.home-page .hero-suggestions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-page .hero-suggestions button,
.home-page .quick-category-grid button,
.home-page .quick-category-grid a,
.home-page .craving-card,
.home-page .topic-entry-card {
  color: #f6f1e8;
  background: rgba(246, 241, 232, 0.06);
  border: 1px solid rgba(238, 229, 214, 0.12);
  border-radius: 8px;
}

.home-page .hero-suggestions button {
  min-height: 38px;
  padding: 0 10px;
  font-weight: 800;
}

.home-page .home-dice-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(240, 191, 106, 0.3);
  border-radius: 8px;
  background: rgba(240, 191, 106, 0.08);
}

.home-page .home-dice-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.home-page .home-dice-copy span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.home-page .home-dice-copy strong {
  overflow-wrap: anywhere;
  color: #fffaf0;
  font-size: 20px;
  line-height: 1.25;
}

.home-page .home-dice-copy small {
  color: #aeb9b3;
  font-size: 13px;
  line-height: 1.45;
}

.home-page .home-dice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-page .home-dice-actions button,
.home-page .home-dice-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  color: #f6f1e8;
  text-align: center;
  text-decoration: none;
  border: 1px solid rgba(238, 229, 214, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 900;
}

.home-page .home-dice-actions a {
  color: #06110f;
  background: var(--teal);
  border-color: rgba(46, 196, 182, 0.46);
}

.home-page .hero-suggestions button:hover,
.home-page .quick-category-grid button:hover,
.home-page .quick-category-grid a:hover,
.home-page .craving-card:hover,
.home-page .topic-entry-card:hover,
.home-page .hero-suggestions button:focus-visible,
.home-page .quick-category-grid button:focus-visible,
.home-page .quick-category-grid a:focus-visible,
.home-page .craving-card:focus-visible,
.home-page .topic-entry-card:focus-visible {
  background: rgba(49, 184, 166, 0.16);
  border-color: rgba(49, 184, 166, 0.5);
  outline: none;
}

.home-page .home-dice-actions button:hover,
.home-page .home-dice-actions button:focus-visible {
  color: #07100f;
  background: var(--gold);
  outline: none;
}

.home-page .home-dice-actions a:hover,
.home-page .home-dice-actions a:focus-visible {
  background: #53d3c1;
  outline: none;
}

.home-page .nav-section {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.home-page .section-heading {
  display: grid;
  gap: 4px;
}

.home-page .section-heading h2 {
  margin: 0;
  color: #fffaf0;
  font-size: 23px;
  line-height: 1.2;
}

.home-page .quick-category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-page .quick-category-grid button,
.home-page .quick-category-grid a {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 12px;
  text-decoration: none;
  text-align: left;
}

.home-page .quick-category-grid span,
.home-page .craving-card strong,
.home-page .topic-entry-card strong {
  color: #fffaf0;
  font-size: 17px;
  font-weight: 900;
}

.home-page .quick-category-grid small,
.home-page .craving-card small,
.home-page .topic-entry-card span {
  color: #aeb9b3;
  font-size: 12px;
  line-height: 1.4;
}

.home-page .craving-card,
.home-page .topic-entry-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  text-decoration: none;
  text-align: left;
}

.home-page .topic-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-page .craving-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.home-page .intent-group-list {
  display: grid;
  gap: 12px;
}

.home-page .intent-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(246, 241, 232, 0.04);
  border: 1px solid rgba(238, 229, 214, 0.1);
  border-radius: 8px;
}

.home-page .intent-group h3 {
  margin: 0;
  color: #fffaf0;
  font-size: 15px;
}

.home-page .intent-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-page .intent-chip-grid button {
  min-height: 34px;
  padding: 5px 10px;
  color: #d9fff7;
  background: rgba(49, 184, 166, 0.1);
  border: 1px solid rgba(49, 184, 166, 0.24);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.home-page .intent-chip-grid button:hover,
.home-page .intent-chip-grid button:focus-visible {
  color: #06110f;
  background: var(--teal);
  outline: none;
}

.home-page .ad-slot {
  color: #9f927c;
  background: rgba(246, 241, 232, 0.04);
  border-color: rgba(240, 191, 106, 0.34);
}

.home-page .quick-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.home-page .quick-stats div {
  min-height: 78px;
}

.home-page .quick-stats strong {
  color: var(--gold);
}

.home-page .quick-stats span,
.home-page .policy-note p,
.home-page .method-item p,
.home-page .rank-strip p,
.home-page .intro,
.home-page .source-note {
  color: #aeb9b3;
}

.home-page .method-band,
.home-page .platform-entry-section {
  margin: 0;
  padding: 16px;
  background: rgba(21, 27, 26, 0.92);
  border: 1px solid rgba(238, 229, 214, 0.12);
  border-radius: 8px;
}

.home-page .method-heading h2,
.home-page .weekly-heading h2,
.home-page .filter-heading h2,
.home-page .results-toolbar h2,
.home-page .method-item h3,
.home-page .policy-note h3 {
  color: #fffaf0;
}

.home-page .method-grid {
  grid-template-columns: 1fr;
}

.home-page .method-item {
  padding: 12px 0;
  border-top-color: rgba(49, 184, 166, 0.32);
}

.home-page .rating-scale span,
.home-page .weekly-meta span,
.home-page .filter-chip {
  color: #ffe0a4;
  background: rgba(240, 191, 106, 0.12);
  border-color: rgba(240, 191, 106, 0.22);
}

.home-page .shelf-switcher {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-page .shelf-view-button {
  color: #d9fff7;
  background: rgba(49, 184, 166, 0.1);
  border-color: rgba(49, 184, 166, 0.24);
}

.home-page .shelf-view-button strong {
  color: #07100f;
  background: var(--teal);
}

.home-page .shelf-view-button:hover,
.home-page .shelf-view-button:focus-visible,
.home-page .shelf-view-button.active {
  color: #07100f;
  background: var(--gold);
}

.home-page .shelf-view-button:hover strong,
.home-page .shelf-view-button:focus-visible strong,
.home-page .shelf-view-button.active strong {
  color: #fffaf0;
  background: rgba(7, 16, 15, 0.78);
}

.home-page .platform-entry-grid {
  grid-template-columns: 1fr;
}

.home-page .platform-entry-card.pending,
.home-page .rank-strip,
.home-page .weekly-item,
.home-page .weekly-empty,
.home-page .chapter-strip span,
.home-page .reader-buzz,
.home-page .dialog-meta {
  background: rgba(246, 241, 232, 0.06);
  border-color: rgba(238, 229, 214, 0.12);
}

.home-page .platform-entry-card h3,
.home-page .platform-entry-card strong {
  color: var(--teal);
}

.home-page .weekly-description,
.home-page .platform-entry-card p {
  color: #c8d2cc;
}

.home-page .layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.home-page .filters {
  position: static;
  display: none;
  padding: 16px;
}

.home-page.filters-open .filters {
  display: grid;
}

.home-page .filter-heading button {
  color: #06110f;
  background: var(--gold);
}

.home-page .filter-group label {
  color: #c8d2cc;
}

.home-page .filter-group select {
  color: #f6f1e8;
  background: rgba(246, 241, 232, 0.06);
  border-color: rgba(238, 229, 214, 0.12);
}

.home-page .filter-group select option {
  color: #f6f1e8;
  background: #151b1a;
}

.home-page .filter-group select option:checked {
  color: #07100f;
  background: #2ec4b6;
}

.home-page .mobile-filter-toggle {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 779px) {
  .home-page.filters-open {
    overflow: hidden;
  }

  .home-page.filters-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(3, 8, 7, 0.68);
    backdrop-filter: blur(4px);
  }

  .home-page .filters {
    position: fixed;
    inset: auto 10px 10px;
    z-index: 60;
    display: grid;
    max-height: min(78vh, 680px);
    gap: 10px;
    padding: 14px;
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 24px));
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .home-page.filters-open .filters {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .home-page .filter-heading {
    position: sticky;
    top: -14px;
    z-index: 1;
    margin: -14px -14px 2px;
    padding: 14px;
    background: rgba(21, 27, 26, 0.96);
    border-bottom: 1px solid rgba(238, 229, 214, 0.1);
  }

  .home-page .filter-heading h2 {
    font-size: 18px;
  }

  .home-page .filter-close {
    display: inline-flex;
    color: #06110f;
    background: var(--teal);
  }

  .home-page .filter-group {
    gap: 5px;
  }

  .home-page .filter-group select {
    min-height: 40px;
  }

  .home-page .filters .policy-note {
    display: none;
  }

  .home-page .active-filters {
    flex-wrap: nowrap;
    min-height: 32px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .home-page .active-filters::-webkit-scrollbar {
    display: none;
  }

  .home-page .filter-chip {
    flex: 0 0 auto;
  }
}

.home-page .rank-strip {
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.home-page .rank-strip strong {
  color: #fffaf0;
}

.home-page .book-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-page .book-card {
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
}

.home-page .book-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 14px 0;
}

.home-page .book-body {
  gap: 12px;
}

.home-page .book-body h3 {
  margin: 0;
  color: #fffaf0;
  font-size: 21px;
  line-height: 1.25;
}

.home-page .book-subline,
.home-page .card-footnote {
  margin: 5px 0 0;
  color: #aeb9b3;
  font-size: 13px;
}

.home-page .tag {
  color: #d9fff7;
  background: rgba(49, 184, 166, 0.14);
}

.home-page .rating {
  color: #07100f;
  background: var(--gold);
}

.home-page .data-status {
  color: #ffe0a4;
  background: rgba(240, 191, 106, 0.12);
}

.home-page .data-status.ready {
  color: #caffe0;
  background: rgba(120, 169, 109, 0.18);
}

.home-page .data-status.metadata {
  color: #cde6ff;
  background: rgba(116, 161, 214, 0.16);
}

.home-page .data-status.curated {
  color: #ffe2a6;
  background: rgba(242, 167, 72, 0.16);
}

.home-page .data-status.premium {
  color: #07100f;
  background: var(--gold);
}

.home-page .data-status.standard {
  color: #bff6ed;
  background: rgba(49, 184, 166, 0.14);
}

.home-page .story-line,
.home-page .recommend-line,
.home-page .poison-line {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #d8e0dc;
  font-size: 14px;
}

.home-page .story-line span,
.home-page .recommend-line span,
.home-page .poison-line span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.home-page .story-line {
  color: #f3efe6;
  padding-left: 10px;
  border-left: 3px solid rgba(240, 191, 106, 0.78);
}

.home-page .poison-line {
  padding: 10px;
  color: #ffd5ce;
  background: rgba(224, 107, 86, 0.12);
  border: 1px solid rgba(224, 107, 86, 0.22);
  border-radius: 8px;
}

.home-page .card-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-page .card-footnote span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 8px;
  background: rgba(246, 241, 232, 0.06);
  border-radius: 999px;
}

.home-page .card-footnote .length-note {
  color: #aeb9b3;
  background: rgba(246, 241, 232, 0.04);
}

.home-page .personal-status {
  color: #07100f;
  background: #2ec4b6;
}

.home-page .personal-status.favorite {
  color: #07100f;
  background: var(--gold);
}

.home-page .personal-status.dismissed {
  color: #fffaf0;
  background: #9b4c3d;
}

.home-page .shelf-markers {
  gap: 8px;
}

.home-page .shelf-check {
  color: #c8d2cc;
  background: rgba(246, 241, 232, 0.06);
  border-color: rgba(238, 229, 214, 0.12);
}

.home-page .shelf-check input {
  accent-color: var(--gold);
}

.home-page .shelf-check.active {
  color: #07100f;
  background: var(--gold);
  border-color: rgba(240, 191, 106, 0.56);
}

.home-page .shelf-check.favorite.active {
  color: #07100f;
  background: #ffd27a;
  border-color: rgba(240, 191, 106, 0.68);
}

.home-page .shelf-check:has(input[data-shelf-toggle="dismissed"]:checked) {
  color: #fffaf0;
  background: rgba(200, 95, 75, 0.32);
  border-color: rgba(200, 95, 75, 0.5);
}

.home-page .card-actions {
  gap: 10px;
}

.home-page .card-actions .official-link,
.home-page .card-actions .details-button {
  flex: 1 1 96px;
  justify-content: center;
}

.home-page .result-actions {
  grid-template-columns: 1fr;
}

.home-page .load-more-results,
.home-page .shuffle-results {
  color: #07100f;
  background: #2ec4b6;
  border-color: rgba(46, 196, 182, 0.4);
}

.home-page .load-more-results:hover,
.home-page .load-more-results:focus-visible,
.home-page .shuffle-results:hover,
.home-page .shuffle-results:focus-visible {
  background: #67dfd3;
}

.home-page .shuffle-results {
  color: #fffaf0;
  background: rgba(240, 191, 106, 0.16);
  border-color: rgba(240, 191, 106, 0.34);
}

.home-page .shuffle-results:hover,
.home-page .shuffle-results:focus-visible {
  color: #07100f;
  background: var(--gold);
}

.home-page .empty-state {
  color: #f6f1e8;
}

.home-page .book-dialog {
  color: #f6f1e8;
  background: #151b1a;
  border-color: rgba(238, 229, 214, 0.14);
}

.home-page .feedback-dialog {
  color: #f6f1e8;
  background: #151b1a;
  border-color: rgba(238, 229, 214, 0.14);
}

.home-page .dialog-section p,
.home-page .dialog-section ul,
.home-page .dialog-meta span,
.home-page .feedback-lead,
.home-page .feedback-status,
.home-page .feedback-panel label span {
  color: #c8d2cc;
}

.home-page .dialog-close {
  color: #06110f;
  background: #f6f1e8;
}

.home-page .card-feedback-button,
.home-page .empty-feedback-button,
.home-page .secondary-action,
.home-page .feedback-chip-row button {
  color: #d9fff7;
  background: rgba(49, 184, 166, 0.1);
  border-color: rgba(49, 184, 166, 0.24);
}

.home-page .card-feedback-button:hover,
.home-page .card-feedback-button:focus-visible,
.home-page .empty-feedback-button:hover,
.home-page .empty-feedback-button:focus-visible,
.home-page .secondary-action:hover,
.home-page .secondary-action:focus-visible,
.home-page .feedback-chip-row button:hover,
.home-page .feedback-chip-row button:focus-visible {
  color: #06110f;
  background: var(--teal);
}

.home-page .feedback-fab {
  color: #07100f;
  background: var(--gold);
}

.home-page .feedback-fab:hover,
.home-page .feedback-fab:focus-visible {
  background: #ffd27a;
}

.home-page .feedback-panel input,
.home-page .feedback-panel select,
.home-page .feedback-panel textarea {
  color: #f6f1e8;
  background: rgba(246, 241, 232, 0.06);
  border-color: rgba(238, 229, 214, 0.14);
}

.home-page .feedback-panel select option {
  color: #f6f1e8;
  background: #151b1a;
}

.home-page .feedback-context {
  color: #c8d2cc;
  background: rgba(246, 241, 232, 0.06);
  border-color: rgba(238, 229, 214, 0.12);
}

.home-page .site-footer {
  color: #aeb9b3;
  border-top-color: rgba(238, 229, 214, 0.1);
}

@media (min-width: 760px) {
  .home-page main {
    gap: 22px;
  }

  .home-page .hero-nav {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 24px;
    align-items: start;
    padding-top: 34px;
  }

  .home-page .hero-compass {
    position: relative;
    display: grid;
    gap: 14px;
    max-width: 690px;
    min-height: 168px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(238, 229, 214, 0.12);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(46, 196, 182, 0.14), rgba(240, 191, 106, 0.08)),
      rgba(21, 27, 26, 0.78);
  }

  .home-page .hero-compass::before {
    content: "";
    position: absolute;
    inset: 14px 18px auto auto;
    width: 168px;
    height: 92px;
    opacity: 0.28;
    background:
      linear-gradient(#f6f1e8, #f6f1e8) 0 0 / 100% 1px no-repeat,
      linear-gradient(#f6f1e8, #f6f1e8) 0 30px / 100% 1px no-repeat,
      linear-gradient(#f6f1e8, #f6f1e8) 0 60px / 100% 1px no-repeat;
  }

  .home-page .hero-compass-head {
    display: grid;
    gap: 6px;
  }

  .home-page .hero-compass-head span {
    color: #f0bf6a;
    font-size: 12px;
    font-weight: 900;
  }

  .home-page .hero-compass-head strong {
    color: #fffaf0;
    font-size: 22px;
    line-height: 1.25;
  }

  .home-page .hero-compass-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .home-page .hero-compass-steps div {
    display: grid;
    gap: 5px;
    min-height: 82px;
    align-content: start;
    padding: 10px;
    color: #d9fff7;
    background: rgba(7, 16, 15, 0.42);
    border: 1px solid rgba(46, 196, 182, 0.28);
    border-radius: 8px;
  }

  .home-page .hero-compass-steps span {
    color: #f0bf6a;
    font-size: 11px;
    font-weight: 900;
  }

  .home-page .hero-compass-steps strong {
    color: #fffaf0;
    font-size: 16px;
    line-height: 1.2;
  }

  .home-page .hero-compass-steps small {
    color: #aeb9b3;
    font-size: 12px;
    line-height: 1.35;
  }

  .home-page .hero-compass p {
    max-width: 34em;
    margin: 0;
    color: #aeb9b3;
    font-size: 14px;
    line-height: 1.55;
  }

  .home-page .search-copy h1 {
    font-size: 52px;
  }

  .home-page .quick-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-page .craving-grid,
  .home-page .platform-entry-grid,
  .home-page .topic-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .intent-group-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .intent-group-wide {
    grid-column: 1 / -1;
  }

  .home-page .quick-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-page .method-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-page .layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .home-page .filters {
    position: sticky;
    top: 92px;
    display: grid;
  }

  .home-page .mobile-filter-toggle {
    display: none;
  }

  .home-page .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .home-page .layout {
    grid-template-columns: 250px minmax(0, 1fr) 300px;
  }

  .home-page .side-ads {
    display: grid;
  }

  .home-page .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.book-seo-page {
  color: #f6f1e8;
  background:
    radial-gradient(circle at top left, rgba(46, 196, 182, 0.16), transparent 34%),
    #07100f;
}

.book-seo-page .site-header {
  background: rgba(7, 16, 15, 0.92);
  border-bottom-color: rgba(238, 229, 214, 0.1);
}

.book-seo-page .brand strong {
  color: #fff7ea;
}

.book-seo-page .brand small,
.book-seo-page .top-nav a {
  color: #aeb9b3;
}

.book-seo-page .top-nav a:hover,
.book-seo-page .top-nav a:focus-visible {
  color: #f6f1e8;
  background: rgba(238, 229, 214, 0.08);
}

.book-seo-page main {
  display: grid;
  gap: 22px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 46px;
}

.book-seo-shell {
  display: grid;
  gap: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #aeb9b3;
  font-size: 14px;
}

.breadcrumb a {
  color: #86ddd2;
}

.book-seo-hero,
.book-seo-content,
.book-seo-columns > .dialog-section,
.book-seo-grid .dialog-meta {
  border: 1px solid rgba(238, 229, 214, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.book-seo-hero,
.book-seo-content {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 8px;
}

.book-seo-hero h1 {
  max-width: 860px;
  margin: 0;
  color: #fff7ea;
  font-size: 34px;
  line-height: 1.18;
}

.book-seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.book-dice-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(240, 191, 106, 0.26);
  border-radius: 8px;
  background: rgba(240, 191, 106, 0.08);
}

.book-dice-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.book-dice-copy span {
  color: #f0bf6a;
  font-size: 13px;
  font-weight: 900;
}

.book-dice-copy strong {
  overflow-wrap: anywhere;
  color: #fff7ea;
  font-size: 20px;
  line-height: 1.25;
}

.book-dice-copy small {
  color: #aeb9b3;
  font-size: 13px;
  line-height: 1.5;
}

.book-dice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.book-dice-reroll,
.book-dice-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  color: #f6f1e8;
  text-align: center;
  text-decoration: none;
  border: 1px solid rgba(238, 229, 214, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 900;
}

.book-dice-link {
  color: #07100f;
  background: #2ec4b6;
  border-color: rgba(46, 196, 182, 0.46);
}

.book-dice-reroll:hover,
.book-dice-reroll:focus-visible {
  color: #07100f;
  background: #f0bf6a;
  outline: none;
}

.book-dice-link:hover,
.book-dice-link:focus-visible {
  background: #67dfd3;
  outline: none;
}

.book-seo-grid,
.book-seo-columns {
  display: grid;
  gap: 12px;
}

.book-seo-content h2,
.book-seo-columns h2 {
  margin: 0;
  color: #fff7ea;
  font-size: 22px;
}

.book-seo-content p,
.book-seo-content li,
.book-seo-columns li {
  color: #c8d2cc;
  line-height: 1.75;
}

.book-index-grid {
  display: grid;
  gap: 10px;
}

.book-index-link {
  display: grid;
  gap: 6px;
  padding: 14px;
  color: #f6f1e8;
  text-decoration: none;
  border: 1px solid rgba(238, 229, 214, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.book-index-link span {
  color: #aeb9b3;
  font-size: 14px;
  line-height: 1.55;
}

.book-index-link:hover,
.book-index-link:focus-visible {
  border-color: rgba(46, 196, 182, 0.48);
  background: rgba(46, 196, 182, 0.1);
}

.topic-hero {
  background:
    linear-gradient(135deg, rgba(46, 196, 182, 0.12), rgba(240, 191, 106, 0.1)),
    rgba(255, 255, 255, 0.045);
}

.topic-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chip-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  color: #d9fff7;
  text-decoration: none;
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid rgba(46, 196, 182, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.topic-chip-link:hover,
.topic-chip-link:focus-visible {
  color: #07100f;
  background: #2ec4b6;
  outline: none;
}

.topic-guide p {
  margin: 0;
}

.topic-book-grid {
  display: grid;
  gap: 12px;
}

.topic-book-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(238, 229, 214, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.topic-book-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-book-head span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  color: #07100f;
  background: #f0bf6a;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.topic-book-head span + span {
  color: #caffe0;
  background: rgba(120, 169, 109, 0.18);
}

.topic-book-card h3 {
  margin: 0;
  color: #fff7ea;
  font-size: 23px;
  line-height: 1.25;
}

.topic-book-meta {
  margin: -4px 0 0;
  color: #aeb9b3;
  font-size: 13px;
  line-height: 1.5;
}

.topic-book-reason,
.topic-book-warning {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #d8e0dc;
  line-height: 1.65;
}

.topic-book-reason span,
.topic-book-warning span {
  color: #f0bf6a;
  font-size: 12px;
  font-weight: 900;
}

.topic-book-warning {
  padding: 10px;
  color: #ffd5ce;
  background: rgba(224, 107, 86, 0.1);
  border: 1px solid rgba(224, 107, 86, 0.2);
  border-radius: 8px;
}

.legal-page .book-seo-hero {
  background:
    linear-gradient(135deg, rgba(46, 196, 182, 0.12), rgba(240, 191, 106, 0.08)),
    rgba(255, 255, 255, 0.045);
}

.legal-page .book-seo-content a,
.legal-page .dialog-section a {
  color: #86ddd2;
  text-underline-offset: 3px;
}

.legal-page .dialog-section {
  padding: 20px;
  border-radius: 8px;
}

.legal-page .dialog-section ul {
  margin: 0;
  padding-left: 20px;
}

.legal-page .dialog-section p {
  margin: 0;
  color: #c8d2cc;
  line-height: 1.75;
}

@media (min-width: 760px) {
  .book-seo-page main {
    padding-top: 34px;
  }

  .book-seo-hero h1 {
    font-size: 46px;
  }

  .book-seo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .book-seo-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-dice-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .book-dice-actions {
    grid-template-columns: auto auto;
  }

  .book-dice-reroll,
  .book-dice-link {
    min-width: 112px;
  }

  .book-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .book-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topic-book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
