/* 化粧水評価基準ページ CSS */
:root {
  --ink: #0b1025;
  --muted: #4b5563;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --accent: #0ea5e9;
  --maxw: 980px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1rem;
  font-size: 0.95rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

thead th {
  background: #f3f4f6;
  font-weight: 600;
  padding: 0.8rem;
  text-align: center;
}

tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  vertical-align: middle;
}

.criterion-header td {
  background-color: var(--ink);
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.8rem;
}

.score-cell {
  font-weight: bold;
  text-align: center;
  width: 80px;
}

/* ===== Product References (商品分析ロジック参考文献) ===== */
#product-references{
  --bg: #fafafa;
  --fg: #222;
  --muted:#555;
  --rule:#e5e5e5;
  --link:#0b63c7;
  --link-hover:#084a95;

  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans JP", system-ui, -apple-system, Segoe UI, Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  line-height: 1.75;
}

#product-references h2{
  font-size: clamp(1.4rem, 1.6vw + 1rem, 1.9rem);
  margin: 0 0 1.2rem 0;
  padding-bottom: .6rem;
  border-bottom: 2px solid #444;
  letter-spacing: .02em;
}

/* 番号付きリストを読みやすく（ハンギングインデント＋区切り） */
#product-references ul{
  list-style: decimal;
  padding-left: 1.6rem;    /* マーカーと本文の距離 */
  margin: 0;
}

#product-references li{
  padding: .85rem 0;
  border-bottom: 1px dashed var(--rule);
}

#product-references li:last-child{
  border-bottom: none;
}

/* 1行あたりの可読性を上げる */
#product-references li i{
  font-style: italic;
  color: var(--muted);
}

/* リンク：下線＋ホバーで色変化。長いURLは気持ち控えめ色・等幅で視認性UP */
#product-references a{
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;      /* どこでも折り返し */
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .96em;
}

#product-references a:hover{
  color: var(--link-hover);
  text-decoration: none;
}

/* 英文と和文の間に少し呼吸（<br>後の詰まりを緩和） */
#product-references li br{
  line-height: 2.1;
}

/* URLが連続しても横スクロールが出ないように */
#product-references{
  overflow-wrap: anywhere;
}

/* スモール画面最適化 */
@media (max-width: 560px){
  #product-references{
    padding: 1.25rem 1rem;
  }
  #product-references h2{
    font-size: 1.35rem;
  }
  #product-references ul{
    padding-left: 1.2rem;
  }
}

/* ダークモード（OS追従） */
@media (prefers-color-scheme: dark){
  #product-references{
    --bg:#121212;
    --fg:#e7e7e7;
    --muted:#b8b8b8;
    --rule:#2b2b2b;
    --link:#7bb1ff;
    --link-hover:#a9c9ff;
    background: var(--bg);
    color: var(--fg);
    border-color: var(--rule);
  }
  #product-references h2{
    border-bottom-color:#888;
  }
  #product-references li{
    border-bottom-color: var(--rule);
  }
}

/* 印刷最適化：背景や罫線は控えめ、リンクURLを後ろに表示 */
@media print{
  #product-references{
    background: #fff !important;
    border: none;
    box-shadow: none;
    color: #000;
  }
  #product-references a{
    color: #000;
    text-decoration: none;
  }
  #product-references a::after{
    content: " (" attr(href) ")";
    font-size: .9em;
  }
}

