:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #26231f;
  --muted: #6b655c;
  --line: #e1dcd1;
  --accent: #6b3f23;
  --accent-ink: #ffffff;
  --ok: #2f6b3a;
  --warn-bg: #fbeeea;
  --warn-ink: #8a2f1c;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1916;
    --surface: #26231f;
    --text: #f1ede5;
    --muted: #b3ab9d;
    --line: #3b362f;
    --accent: #d99b6c;
    --accent-ink: #1b1916;
    --ok: #7cc58a;
    --warn-bg: #3a2420;
    --warn-ink: #f0b3a4;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.top { padding: 28px 0 8px; }
.headrow { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.mark { width: 84px; height: auto; flex: none; background: #fff; border-radius: 8px; padding: 4px; }
h1 { margin: 2px 0 8px; font-size: 26px; line-height: 1.3; }
.lead { margin: 0; color: var(--muted); font-size: 15px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}
#form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.field.grow { flex: 1 1 180px; }
label { font-size: 13px; color: var(--muted); font-weight: 600; }
select, input {
  font: inherit;
  font-size: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
select:disabled { opacity: .5; }
button {
  font: inherit;
  font-weight: 700;
  padding: 11px 22px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  min-height: 46px;
}
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }

.message { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; }

.idhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 4px; }
.idhead .num { font-size: 30px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.idhead .yr { color: var(--muted); }

h2 { font-size: 15px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); color: var(--accent); }
dl { margin: 0; display: grid; grid-template-columns: minmax(8em, 11em) 1fr; gap: 0; }
dt, dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); font-size: 14px; padding-right: 12px; }
dd { font-weight: 600; }
dd small { font-weight: 400; color: var(--muted); }
dl > :nth-last-child(-n+2) { border-bottom: 0; }
.ok { color: var(--ok); }

.sum { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; white-space: nowrap; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line); }
.tag.stock { color: var(--ok); border-color: var(--ok); }

.note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.foot { margin-top: 28px; padding: 20px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot p { margin: 0 0 4px; }
.foot strong { color: var(--text); }

@media (max-width: 480px) {
  h1 { font-size: 22px; }
  dl { grid-template-columns: 1fr; }
  dt { padding-bottom: 0; border-bottom: 0; }
  dd { padding-top: 0; }
  dl > :nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  dl > :last-child { border-bottom: 0; }
  button { width: 100%; }
}
