/* 排出権トレーサビリティ：PC・スマホ共通のスタイル（レスポンシブ） */
:root {
  --green-700: #1f7a2e;
  --green-600: #2a8f3b;
  --green-500: #3aa64a;
  --green-100: #e6f4e8;
  --green-50: #f3faf4;
  --ink: #1d2a20;
  --muted: #5b6b5f;
  --line: #dbe6dd;
  --card: #ffffff;
  --bg: #f4f8f4;
  --field-line: #b9c9bd;
  --placeholder: #94a69a;
  --warn-bg: #fff4f2;
  --warn-line: #f2c4bd;
  --warn-ink: #a1261a;
  --blue-bg: #eaf3fb;
  --blue-ink: #1b5e96;
  --amber-bg: #fff6e0;
  --amber-ink: #8a5a00;
  --gray-bg: #eef1ee;
  --gray-ink: #4a574d;
  --pdf-hover: #d3ebd7;
  --shadow: 0 1px 2px rgba(20, 50, 25, .06), 0 8px 24px rgba(20, 50, 25, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --green-100: #1d3a24; --green-50: #16261a; --ink: #e8f0ea; --muted: #9db0a2;
    --line: #2c4032; --card: #18231c; --bg: #101811; --field-line: #4a6552; --placeholder: #7f9387;
    --warn-bg: #3a1d1a; --warn-line: #6b332d; --warn-ink: #ffb4aa;
    --blue-bg: #17283a; --blue-ink: #9ccaf2; --amber-bg: #3a2f12; --amber-ink: #f0c869;
    --gray-bg: #232e26; --gray-ink: #b5c4b9; --pdf-hover: #26482e;
    --green-700: #7fd08d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.7;
}
img { border: 0; }

.topbar { height: 6px; background: linear-gradient(90deg, #1f7a2e, var(--green-500)); }
.header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-in { max-width: 860px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand .logo { background: #fff; border-radius: 6px; padding: 2px 6px; display: block; height: 36px; width: auto; }
.cert { color: var(--muted); font-size: 12px; white-space: nowrap; }
.cert-s { display: none; text-align: right; margin: 0 0 4px; font-size: 10.5px; }

.hero { max-width: 860px; margin: 0 auto; padding: 28px 20px 8px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.35; letter-spacing: .02em; }
.hero h1 .eco { color: var(--green-600); font-weight: 800; }
.title-img { display: block; max-width: 100%; height: auto; margin: 4px 0 10px; border-radius: 6px; background: #fff; }
main { max-width: 860px; margin: 0 auto; padding: 16px 20px 32px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 24px; }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card .sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* 検索フォーム */
.field-row { display: grid; grid-template-columns: 270px auto 130px auto; gap: 8px 10px; align-items: end; justify-content: start; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.dash { padding-bottom: 12px; color: var(--muted); font-weight: 700; }
input[type="text"] {
  width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 17px; letter-spacing: .06em;
  color: var(--ink); background: var(--card); border: 1.5px solid var(--field-line); border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
input[type="text"]::placeholder { color: var(--placeholder); letter-spacing: 0; font-size: 14px; }
input[type="text"]:focus { outline: 3px solid rgba(58, 166, 74, .35); border-color: var(--green-600); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 28px; font: inherit; font-size: 16px; font-weight: 700; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
}
.btn-primary { background: linear-gradient(180deg, var(--green-500), var(--green-600)); color: #fff; box-shadow: 0 2px 0 #1f7a2e, 0 6px 14px rgba(42, 143, 59, .28); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 0 #1f7a2e; }
.btn-ghost { background: var(--card); color: var(--green-700); border: 1.5px solid var(--green-600); }
.btn:focus-visible { outline: 3px solid rgba(58, 166, 74, .45); outline-offset: 2px; }
/* 検索ボタンと枝番の間隔 ≒ 証明番号欄と枝番欄の間隔 */
.field-row .btn { height: 48px; padding: 0 26px; margin-left: 26px; }
.actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.actions.center { justify-content: center; }
form.actions { margin-bottom: 0; }
.note { margin: 18px 0 0; padding: 12px 14px; background: var(--green-50); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--muted); }

/* 検索結果 */
.result-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.num-label { font-size: 12px; color: var(--muted); font-weight: 700; }
.num { font-size: 22px; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; word-break: break-all; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.done { background: var(--green-100); color: var(--green-700); }
.badge.progress { background: var(--amber-bg); color: var(--amber-ink); }
.badge.bought { background: var(--blue-bg); color: var(--blue-ink); }
.badge.neutral { background: var(--gray-bg); color: var(--gray-ink); }

.steps { list-style: none; display: flex; margin: 22px 0 6px; padding: 0; }
.steps li { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--muted); }
.steps li::before { content: ""; display: block; width: 14px; height: 14px; margin: 0 auto 6px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.steps li:first-child::after { display: none; }
.steps li.on { color: var(--ink); font-weight: 700; }
.steps li.on::before { background: var(--green-600); border-color: var(--green-600); }
.steps li.on::after { background: var(--green-600); }

dl.info { margin: 22px 0 0; display: grid; grid-template-columns: 11em 1fr; border-top: 1px solid var(--line); }
dl.info dt, dl.info dd { margin: 0; padding: 13px 4px; border-bottom: 1px solid var(--line); }
dl.info dt { color: var(--muted); font-size: 13px; font-weight: 700; }
dl.info dd { font-size: 15px; word-break: break-word; }
.pdfs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pdf { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--green-600); color: var(--green-700); font-weight: 700; font-size: 14px; text-decoration: none; background: var(--green-100); }
.pdf:hover { background: var(--pdf-hover); }
.pdf:focus-visible { outline: 3px solid rgba(58, 166, 74, .45); outline-offset: 2px; }
.textblock { margin-top: 18px; padding: 16px 18px; background: var(--green-50); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.textblock h3 { margin: 0 0 6px; font-size: 13px; color: var(--green-700); }

/* 検索エラー */
.alert { border: 1.5px solid var(--warn-line); background: var(--warn-bg); border-radius: 16px; padding: 22px; display: flex; gap: 14px; }
.alert .ico { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--warn-ink); color: var(--card); display: grid; place-items: center; font-weight: 800; }
.alert h2 { margin: 0 0 6px; font-size: 18px; color: var(--warn-ink); }
.alert p { margin: 0 0 8px; font-size: 14px; }
.alert ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 14px; }
.alert li { white-space: nowrap; }

/* フッター */
.footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 8px; }
.footer-in { max-width: 860px; margin: 0 auto; padding: 18px 20px 26px; text-align: center; color: var(--muted); font-size: 13px; }

/* スマホ */
@media (max-width: 560px) {
  .hero { padding-top: 20px; }
  .hero h1 { font-size: 21px; }
  main, .header-in, .hero { padding-left: 14px; padding-right: 14px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .field-row { grid-template-columns: 1fr; gap: 12px; }
  .dash { display: none; }
  .btn-primary { width: 100%; }
  .field-row .btn { margin-left: 0; }
  .cert-h { display: none; }
  .cert-s { display: block; }
  .alert { flex-direction: column; gap: 10px; padding: 18px 16px; }
  .alert li { font-size: 13px; }
  .num { font-size: 18px; }
  dl.info { grid-template-columns: 1fr; }
  dl.info dt { border-bottom: 0; padding-bottom: 0; }
  dl.info dd { padding-top: 2px; }
  .brand .logo { height: 30px; }
}
