:root {
  --theme-bg: #e9e1d0;
  --theme-surface: #f7f0e4;
  --theme-surface-soft: #efe6d6;
  --theme-border: #c9bba5;
  --theme-text: #2e2a24;
  --theme-muted: #746b5d;
  --theme-accent: #59644d;
  --theme-accent-dark: #3f4b38;
  --theme-terracotta: #a45c45;
  --theme-shadow: 0 10px 24px rgba(78, 62, 43, 0.11);
  --theme-shadow-hover: 0 16px 30px rgba(78, 62, 43, 0.19);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  background-color: var(--theme-bg) !important;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.25), transparent 35%, rgba(109, 83, 52, 0.06));
  color: var(--theme-text) !important;
  font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif !important;
  line-height: 1.65 !important;
}

html body {
  margin: 0 !important;
  padding: 0 !important;
}

body > .nav:first-child {
  margin: 0 !important;
  padding: 0 !important;
  top: 0 !important;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body::after {
  opacity: 0.18;
  background-image: radial-gradient(circle at 15% 20%, #fff 0 1px, transparent 2px), radial-gradient(circle at 73% 34%, #fff 0 1px, transparent 2px), radial-gradient(circle at 42% 82%, #6f634f 0 1px, transparent 2px);
  background-size: 180px 220px, 260px 300px, 320px 260px;
  animation: dustDrift 24s linear infinite alternate;
}

@keyframes dustDrift {
  from { transform: translate3d(-8px, -5px, 0); }
  to { transform: translate3d(10px, 8px, 0); }
}

.nav {
  height: 72px !important;
  min-height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(247, 240, 228, 0.94) !important;
  border-bottom: 3px double var(--theme-border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex !important;
  align-items: center !important;
  max-width: 1160px !important;
  width: 100% !important;
  height: 72px !important;
  margin: 0 auto !important;
  min-height: 72px !important;
  padding: 0 1.25rem !important;
  gap: 0 !important;
  justify-content: flex-start !important;
}

.content-wrapper,
.animated-bg {
  margin: 0 !important;
  padding: 0 !important;
}

.logo {
  color: var(--theme-text) !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.nav .logo {
  display: none !important;
}

.nav-links,
.nav ul {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  height: 32px !important;
  gap: 1.35rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.nav-links li,
.nav ul li {
  display: flex !important;
  align-items: center !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.nav-links a,
.nav ul a {
  display: flex !important;
  align-items: center !important;
  height: 32px !important;
  color: var(--theme-muted) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif !important;
  letter-spacing: 0.04em;
  line-height: 1 !important;
  padding: 0 0.05rem !important;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active,
.nav ul a:hover {
  color: var(--theme-terracotta) !important;
}

.nav-links li:nth-child(2) a {
  color: var(--theme-accent-dark) !important;
  font-weight: 700 !important;
}

.nav-links a::after {
  bottom: 0 !important;
  height: 2px !important;
  background: var(--theme-terracotta) !important;
}

.page-header,
.hero {
  padding-top: 4rem !important;
  padding-bottom: 2.5rem !important;
}

.page-header h1,
.hero h1,
h1 {
  color: var(--theme-text) !important;
  letter-spacing: 0.01em;
  font-family: Georgia, "Times New Roman", "Songti SC", serif !important;
}

.highlight,
.hero h1 .highlight {
  color: var(--theme-terracotta) !important;
}

.container,
.wrap,
.article-container {
  max-width: 1160px !important;
}

.review-card,
.ranking-card,
.article-card,
.category-card,
.category,
.article,
.card,
.trust-card,
.comparison-table-wrapper,
.section > div[style*="overflow-x"] {
  background: var(--theme-surface) !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: 3px !important;
  box-shadow: var(--theme-shadow) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease !important;
}

.review-card:hover,
.ranking-card:hover,
.article-card:hover,
.category-card:hover,
.category:hover,
.article:hover,
.card:hover,
.trust-card:hover,
.comparison-table-wrapper:hover {
  border-color: var(--theme-terracotta) !important;
  box-shadow: var(--theme-shadow-hover) !important;
  transform: translateY(-3px);
}

.ranking-card {
  margin-bottom: 1rem !important;
  padding: 1.25rem 1.4rem !important;
  gap: 1.25rem !important;
}

.review-card,
.article-card,
.category-card,
.category,
.article,
.card {
  padding: 1.35rem !important;
}

.review-card h3,
.ranking-info h3,
.article-card h3,
.card h2,
.article h2,
.category strong {
  color: var(--theme-text) !important;
}

.review-summary,
.ranking-info p,
.article-excerpt,
.article-card p,
.card p,
.article p,
.category p,
.section-desc,
.lead {
  color: var(--theme-muted) !important;
}

.btn,
.btn-primary,
.back-link,
.review-link {
  border-radius: 9px !important;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease !important;
}

.btn-primary,
.review-link,
.back-link {
  background: var(--theme-accent) !important;
  color: #f7f0e4 !important;
  border: 1px solid var(--theme-accent-dark) !important;
}

.btn-primary:hover,
.review-link:hover,
.back-link:hover {
  background: var(--theme-terracotta) !important;
  box-shadow: 0 8px 18px rgba(164, 92, 69, 0.25) !important;
  transform: translateY(-2px);
}

.category-badge,
.article-category,
.tag,
.meta-chip,
.update-badge {
  border-radius: 999px !important;
}

.article-container {
  padding-top: 2.5rem !important;
}

.article-header {
  margin-bottom: 2rem !important;
  padding-bottom: 1.5rem !important;
  border-bottom: 1px solid var(--theme-border) !important;
}

.article-content h2 {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 2rem !important;
  color: var(--theme-text) !important;
}

.article-content p,
.article-content li {
  color: var(--theme-muted) !important;
}

table {
  border-color: var(--theme-border) !important;
}

th {
  background: var(--theme-surface-soft) !important;
}

footer {
  background: var(--theme-surface) !important;
  border-top: 1px solid var(--theme-border) !important;
}

/* Vintage Japanese editorial treatment */
body:has(.hero) .hero {
  background: var(--theme-surface) !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: 2px !important;
  box-shadow: 8px 8px 0 rgba(89, 100, 77, 0.14) !important;
}

body:has(.hero) .hero-panel {
  background: var(--theme-surface-soft) !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  justify-content: flex-start;
}

.hero-illustration {
  display: block;
  width: 100%;
  height: 180px;
  margin-bottom: 1rem;
  object-fit: contain;
  object-position: center center;
  background: #e8dcc7;
  border: 1px solid var(--theme-border);
  filter: sepia(0.15) contrast(0.96);
}

body:has(.hero) .hero-panel-head strong,
.hero-panel-link,
.quick-links span {
  color: var(--theme-terracotta) !important;
}

body:has(.hero) .hero-stats div {
  border-radius: 2px;
  background: #e5dccb;
  border: 1px solid rgba(156, 141, 118, 0.38);
}

.quick-links a {
  border-radius: 2px !important;
  background: var(--theme-surface) !important;
}

.quick-links a:hover {
  border-color: var(--theme-terracotta) !important;
}

.eyebrow,
.update-badge {
  background: #e5dccb !important;
  color: var(--theme-accent-dark) !important;
  border: 1px solid var(--theme-border) !important;
}

body:has(.hero) .section-header h2 {
  font-family: Georgia, "Times New Roman", "Songti SC", serif !important;
  letter-spacing: 0.04em;
}

/* Homepage: compact editorial layout */
body:has(.hero) .hero {
  max-width: 1160px !important;
  margin: 1.5rem auto 0.75rem !important;
  padding: 1.5rem !important;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  gap: 2rem;
  align-items: stretch;
  text-align: left !important;
  background: linear-gradient(135deg, #ffffff 0%, #f1fbf7 100%);
  border: 1px solid var(--theme-border);
  border-radius: 22px;
  box-shadow: var(--theme-shadow);
}

body:has(.hero) .hero-copy {
  grid-column: 1;
}

body:has(.hero) .hero-copy .eyebrow {
  justify-self: start;
  margin: 0 0 1rem !important;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  animation: none;
}

body:has(.hero) .hero-copy h1 {
  margin-bottom: 1rem !important;
  max-width: 700px;
  font-size: clamp(2.25rem, 3.25vw, 3.6rem) !important;
  line-height: 1.08;
}

body:has(.hero) .hero-copy .lead {
  max-width: 680px;
  margin: 0 0 1.5rem !important;
  font-size: 1rem;
  line-height: 1.75;
}

body:has(.hero) .hero-copy .cta-group {
  justify-content: flex-start;
}

body:has(.hero) .hero .btn {
  padding: 0.8rem 1.25rem;
  font-size: 0.9rem;
}

.hero-panel {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  height: 100%;
  padding: 1.35rem;
  border: 1px solid #ccefe0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.hero-panel-head,
.hero-stats,
.hero-panel-link {
  display: flex;
  align-items: center;
}

.hero-panel-head {
  justify-content: space-between;
  color: var(--theme-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-panel-head strong {
  color: var(--theme-accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-stats {
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.hero-stats div {
  flex: 1;
  padding: 0.8rem 0.65rem;
  border-radius: 12px;
  background: #f5fbf8;
  text-align: center;
}

.hero-stats b,
.hero-stats span {
  display: block;
}

.hero-stats b {
  color: var(--theme-text);
  font-size: 1.35rem;
  line-height: 1.2;
}

.hero-stats span {
  margin-top: 0.25rem;
  color: var(--theme-muted);
  font-size: 0.7rem;
}

.hero-panel-link {
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--theme-border);
  color: var(--theme-accent-dark);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.hero-panel-link span {
  font-size: 1.1rem;
}

.hero-panel-note {
  margin: auto 0 0;
  padding-top: 0.8rem;
  color: var(--theme-muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-align: center;
}

/* Category hub */
.category-hub {
  max-width: 1160px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

.category-hub-intro {
  max-width: 720px;
  margin-bottom: 2.5rem;
  padding-left: 1.25rem;
  border-left: 4px solid var(--theme-terracotta);
}

.category-hub-intro h1 {
  margin: 0.45rem 0 0.8rem;
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.category-hub-intro h1 span {
  color: var(--theme-terracotta);
}

.category-hub-intro > p:last-child {
  margin: 0;
  color: var(--theme-muted);
  font-size: 1.05rem;
}

.category-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.category-hub-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.35rem;
  border: 1px solid var(--theme-border);
  border-radius: 2px;
  background: var(--theme-surface);
  box-shadow: 5px 5px 0 rgba(89, 100, 77, 0.1);
  color: var(--theme-text);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-hub-card:hover {
  border-color: var(--theme-terracotta);
  box-shadow: 8px 8px 0 rgba(164, 92, 69, 0.14);
  transform: translate(-2px, -3px);
}

.category-hub-card > span {
  color: var(--theme-terracotta);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.category-hub-card strong {
  margin-top: 1.2rem;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 1.4rem;
}

.category-hub-card small {
  margin-top: 0.45rem;
  color: var(--theme-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.category-hub-card b {
  margin-top: 1.2rem;
  color: var(--theme-accent-dark);
  font-size: 0.82rem;
}

body:has(.hero) .container > .section:first-child {
  padding-top: 1.25rem;
}

body:has(.hero) .section {
  padding: 2.5rem 0;
}

body:has(.hero) .section-header {
  margin-bottom: 1.5rem;
  text-align: left;
}

body:has(.hero) .section-header h2 {
  margin-bottom: 0.35rem;
  font-size: 2rem;
}

body:has(.hero) .section-desc {
  margin: 0;
  max-width: 720px;
  font-size: 0.9rem;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.quick-links a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.7rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  background: var(--theme-surface);
  color: var(--theme-text);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quick-links a:hover {
  border-color: #b7e8d4;
  box-shadow: var(--theme-shadow-hover);
  transform: translateY(-2px);
}

.quick-links span {
  grid-row: span 2;
  color: var(--theme-accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.quick-links strong {
  font-size: 0.9rem;
}

.quick-links small {
  color: var(--theme-muted);
  font-size: 0.72rem;
}

@media (max-width: 1060px) {
  .nav-inner {
    align-items: center !important;
  }

  .nav-links,
  .nav ul {
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 100%;
    padding-bottom: 0 !important;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar,
  .nav ul::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) {
  .nav {
    height: 72px !important;
    min-height: 72px !important;
  }

  .nav-inner {
    flex-direction: row !important;
    align-items: center !important;
    height: 72px !important;
    min-height: 72px !important;
    padding: 0 1rem !important;
  }

  .nav-links,
  .nav ul {
    width: 100%;
    gap: 1rem !important;
  }

  .page-header,
  .hero {
    padding-top: 2.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  .page-header h1,
  .hero h1,
  h1 {
    font-size: 2.2rem !important;
  }

  .ranking-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ranking-info {
    min-width: calc(100% - 76px);
  }

  .ranking-price {
    margin-left: 76px;
  }

  body:has(.hero) .hero {
    display: block;
    margin: 1rem auto 0 !important;
    padding: 1.5rem 1rem !important;
    border-radius: 16px;
  }

  body:has(.hero) .hero h1 {
    font-size: 2.25rem !important;
  }

  body:has(.hero) .hero .lead {
    font-size: 0.92rem;
  }

  body:has(.hero) .hero .cta-group {
    justify-content: flex-start;
  }

  .hero-panel {
    height: auto;
    margin-top: 1.25rem;
  }

  .hero-illustration {
    height: 155px;
  }

  body:has(.hero) .section-header {
    text-align: left;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .category-hub {
    padding-top: 2.75rem;
  }

  .category-hub-grid {
    grid-template-columns: 1fr;
  }
}
