:root {
  --page-bg: #f5efe6;
  --surface: #fffaf2;
  --surface-strong: #fff;
  --surface-dark: #20201f;
  --text-main: #21201c;
  --text-muted: #625b4f;
  --line-soft: rgba(33, 32, 28, 0.12);
  --brand-accent: #c46f1a;
  --brand-gold: #d8b36a;
  --brand-green: #486c55;
  --shadow-soft: 0 20px 45px rgba(44, 34, 20, 0.08);
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

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

a:hover {
  color: var(--brand-accent);
}

img {
  max-width: 100%;
  display: block;
}

.announcement-bar {
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  padding: 0.7rem 0;
}

.announcement-meta {
  color: rgba(255, 255, 255, 0.62);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 239, 230, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.site-navbar {
  padding: 1rem 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.site-brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-dark);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}

.site-brand-title,
.site-brand-subtitle {
  display: block;
}

.site-brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.site-brand-subtitle {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.nav-link {
  color: var(--text-main);
  font-weight: 500;
}

.user-chip {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(72, 108, 85, 0.12);
  color: var(--brand-green);
  font-size: 0.9rem;
  font-weight: 600;
}

.site-action-button {
  min-width: 6.5rem;
}

.page-shell {
  min-height: calc(100vh - 220px);
}

.hero-shell,
.content-panel,
.auth-panel,
.dashboard-shell,
.metric-card,
.book-card,
.mini-card,
.path-card,
.table-shell,
.state-banner {
  background: var(--surface-strong);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.hero-shell {
  overflow: hidden;
}

.hero-copy {
  padding: 2rem;
}

.eyebrow,
.footer-eyebrow,
.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--brand-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title,
.page-title,
.footer-title,
.section-title {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
}

.hero-title {
  font-size: clamp(2.3rem, 4vw, 4.3rem);
  margin-bottom: 1rem;
}

.hero-copy p,
.section-description,
.meta-copy,
.muted-copy {
  color: var(--text-muted);
}

.hero-cta-group,
.panel-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-image-wrap {
  min-height: 100%;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.search-panel {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(33, 32, 28, 0.04);
  border-radius: 8px;
}

.pill-list,
.category-pill-list,
.detail-meta-list,
.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.category-pill,
.detail-meta,
.status-pill {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(196, 111, 26, 0.1);
  color: var(--text-main);
  font-weight: 600;
}

.content-panel,
.dashboard-shell,
.auth-panel {
  padding: 1.5rem;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.book-card {
  height: 100%;
  overflow: hidden;
}

.book-card-image,
.book-card-placeholder {
  aspect-ratio: 4 / 5;
  background: #e8dcc8;
}

.book-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card-placeholder {
  display: flex;
  align-items: end;
  justify-content: start;
  padding: 1rem;
  background-image: linear-gradient(135deg, rgba(196, 111, 26, 0.2), rgba(72, 108, 85, 0.14));
}

.book-card-placeholder span {
  display: inline-flex;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(32, 32, 31, 0.88);
  color: #fff;
  font-weight: 700;
}

.book-card-body {
  padding: 1.15rem;
}

.book-card-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.book-card-author,
.book-card-meta,
.table-shell,
.auth-hint,
.small-label {
  color: var(--text-muted);
}

.book-card-link {
  color: inherit;
}

.book-card-link:hover {
  color: var(--brand-accent);
}

.page-title {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 0.6rem;
}

.detail-cover {
  border-radius: 8px;
  overflow: hidden;
  background: #eadfce;
  min-height: 420px;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-cover-fallback {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  color: var(--text-muted);
}

.state-banner {
  padding: 1.2rem;
}

.metric-card {
  padding: 1.2rem;
}

.path-card {
  padding: 1.3rem;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.95), rgba(249, 241, 229, 0.95));
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.metric-card-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  margin: 0.35rem 0 0;
}

.auth-panel {
  max-width: 640px;
  margin: 0 auto;
}

.auth-panel form p {
  margin-bottom: 1rem;
}

.rating-form-stack p {
  margin-bottom: 1rem;
}

.rating-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.auth-panel label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.auth-panel input,
.auth-panel select,
.auth-panel textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(33, 32, 28, 0.16);
  border-radius: 8px;
  background: #fff;
}

.auth-panel ul.errorlist {
  padding-left: 1rem;
  color: #9e2f22;
}

.site-footer {
  margin-top: 3rem;
  padding: 3rem 0;
  background: #1f1b17;
  color: rgba(255, 255, 255, 0.86);
}

.footer-title {
  font-size: clamp(1.9rem, 2.5vw, 2.7rem);
}

.footer-heading {
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li + li {
  margin-top: 0.65rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
}

.footer-links a:hover {
  color: #fff;
}

.dashboard-shell {
  background: #ffffff;
}

.dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.table-shell table {
  margin-bottom: 0;
}

.empty-state {
  padding: 1rem 0;
  color: var(--text-muted);
}

.curve-card {
  padding: 1.25rem;
  border: 1px solid rgba(33, 32, 28, 0.1);
  border-radius: 8px;
  background: #fffdf9;
}

.curve-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

.curve-axis {
  stroke: rgba(33, 32, 28, 0.2);
  stroke-width: 1;
}

.curve-line {
  fill: none;
  stroke: #9e2f22;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.curve-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 991.98px) {
  .site-actions {
    margin-top: 1rem;
  }

  .hero-copy {
    padding: 1.5rem;
  }
}
