/* 木材データベース - CalorieSlism風 */
:root {
  --bg: #faf9f6;
  --card: #ffffff;
  --text: #2c2c2c;
  --text-sub: #6b6b6b;
  --accent: #8b5e3c;
  --accent-light: #d4a76a;
  --accent-dark: #5c3a1e;
  --border: #e8e4df;
  --bar-bg: #f0ebe4;
  --density-color: #8b5e3c;
  --hardness-color: #c0392b;
  --mor-color: #2980b9;
  --green: #27ae60;
  --orange: #e67e22;
  --red: #c0392b;
  --font-head: "Noto Serif JP", "Georgia", serif;
  --font-body: "Noto Sans JP", "Helvetica Neue", sans-serif;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 10px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--accent-dark);
  color: #fff;
  padding: 12px 0;
  font-size: 13px;
}
.site-header .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-header a { color: #e8d5c0; }
.site-header a:hover { color: #fff; }
.site-header .logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

/* Breadcrumb */
.breadcrumb {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  font-size: 12px;
  color: var(--text-sub);
}
.breadcrumb a { color: var(--text-sub); }

/* Container */
.container { max-width: 960px; margin: 0 auto; padding: 0 20px 60px; }

/* Hero section - CalorieSlism style */
.hero {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
.hero-name h1 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-dark);
}
.hero-name .sci-name {
  font-style: italic;
  color: var(--text-sub);
  font-size: 14px;
  margin-top: 4px;
}
.hero-name .family-badge {
  display: inline-block;
  background: var(--bar-bg);
  color: var(--accent);
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  margin-top: 8px;
}
.hero-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.hero-tags span {
  font-size: 11px;
  background: var(--accent-dark);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Density/Hardness gauges - the CalorieSlism signature */
.gauge-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.gauge-card {
  background: var(--bar-bg);
  border-radius: 8px;
  padding: 20px;
}
.gauge-card .gauge-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
  font-weight: 500;
}
.gauge-card .gauge-value {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.gauge-card .gauge-unit {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 400;
}
.gauge-bar {
  height: 10px;
  background: #ddd;
  border-radius: 5px;
  margin-top: 10px;
  overflow: hidden;
}
.gauge-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s;
}
.density-fill { background: linear-gradient(90deg, var(--accent-light), var(--accent)); }
.hardness-fill { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.gauge-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 4px;
}
.gauge-comparison {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 8px;
}

/* Data table - CalorieSlism style */
.data-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.data-section h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.prop-table {
  width: 100%;
  border-collapse: collapse;
}
.prop-table tr { border-bottom: 1px solid var(--border); }
.prop-table tr:last-child { border-bottom: none; }
.prop-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-sub);
  width: 40%;
  vertical-align: top;
}
.prop-table td {
  padding: 10px 12px;
  font-size: 14px;
}
.prop-table td .val {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
}
.prop-table td .unit {
  font-size: 12px;
  color: var(--text-sub);
  margin-left: 2px;
}

/* Description section */
.desc-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.desc-section h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.desc-text { font-size: 15px; line-height: 1.9; color: var(--text); }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.detail-item {
  background: var(--bar-bg);
  border-radius: 8px;
  padding: 16px;
}
.detail-item .detail-label {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
  margin-bottom: 4px;
}
.detail-item .detail-value {
  font-size: 14px;
  line-height: 1.6;
}

/* Durability badge */
.dur-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.dur-very-high { background: #1a7a3a; }
.dur-high { background: var(--green); }
.dur-medium { background: var(--orange); }
.dur-low { background: #e67e22; }
.dur-very-low { background: var(--red); }

/* Related / links */
.related-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.related-section h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.related-card {
  display: block;
  background: var(--bar-bg);
  border-radius: 8px;
  padding: 14px;
  transition: transform 0.15s;
}
.related-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.related-card .rc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
}
.related-card .rc-sci {
  font-size: 11px;
  color: var(--text-sub);
  font-style: italic;
}
.related-card .rc-density {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* Footer */
.site-footer {
  background: var(--accent-dark);
  color: #c0a882;
  text-align: center;
  padding: 24px;
  font-size: 12px;
  margin-top: 40px;
}

/* Category page */
.cat-header {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}
.cat-header h1 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-dark);
}
.cat-header p { color: var(--text-sub); margin-top: 8px; }
.species-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.species-row {
  display: grid;
  grid-template-columns: 1fr 100px 80px;
  align-items: center;
  background: var(--card);
  border-radius: 6px;
  padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: background 0.15s;
}
.species-row:hover { background: var(--bar-bg); }
.species-row a { font-weight: 600; font-size: 14px; }
.species-row .sr-sci { font-size: 11px; color: var(--text-sub); font-style: italic; }
.species-row .sr-density { font-size: 13px; text-align: right; }
.species-row .sr-janka { font-size: 13px; text-align: right; color: var(--text-sub); }

/* Top page */
.top-hero {
  background: linear-gradient(135deg, var(--accent-dark), #3e2210);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px 40px;
  margin-bottom: 32px;
  text-align: center;
}
.top-hero h1 {
  font-family: var(--font-head);
  font-size: 32px;
  letter-spacing: 0.08em;
}
.top-hero p { color: #c0a882; margin-top: 12px; font-size: 15px; }
.top-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.top-stat {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 16px;
}
.top-stat .num {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
}
.top-stat .label { font-size: 12px; color: #c0a882; }
.use-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.use-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform 0.15s;
}
.use-card:hover { transform: translateY(-3px); text-decoration: none; }
.use-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.use-card p { font-size: 13px; color: var(--text-sub); }
.use-card .count {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 640px) {
  .hero-top { flex-direction: column; }
  .gauge-section { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .hero-name h1 { font-size: 22px; }
  .gauge-card .gauge-value { font-size: 28px; }
  .species-row { grid-template-columns: 1fr 70px; }
  .species-row .sr-janka { display: none; }
  .top-stats { grid-template-columns: 1fr; }
}

/* JS placeholder */
#js-search-box, #js-compare-tool, #js-ad-slot-1 { }
