/* xerograv.Design — 海の星、地球の生命
   白・生成り・深い青を基調に、差し色として森の緑と土の色 */

:root {
  --bg: #f6f2ea;        /* 生成り */
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #4f5a66;
  --sea: #1f3a5f;       /* 深い青 */
  --sea-soft: #e3e9f0;
  --green: #45613c;     /* 森の緑 */
  --green-soft: #e6ece0;
  --earth: #8a5a3b;     /* 土の色 */
  --earth-soft: #f3e9df;
  --line: #ddd5c7;
  --error: #a02c2c;
  --radius: 4px;
  --gutter: 20px;
  --max: 720px;
  --font-sans: "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", Georgia, serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--green); }

:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.4; letter-spacing: 0.04em; }
h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.1rem; margin: 0 0 1rem; color: var(--sea); }
h3 { font-size: 1rem; margin: 0 0 0.5rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--sea); color: #fff; padding: 8px 12px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- header / footer ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter);
}
.brand { display: flex; align-items: flex-end; gap: 8px; text-decoration: none; color: var(--ink); }
.brand img { width: 128px; }
.brand-line { font-family: var(--font-serif); font-size: 0.85rem; letter-spacing: 0.15em; padding-bottom: 6px; }

.lang ul { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.lang a, .lang span { display: inline-block; padding: 8px 2px; min-height: 24px; }
.lang span[aria-current] { color: var(--muted); }

main { display: block; max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 48px; }
main:focus { outline: none; }

.site-footer {
  border-top: 1px solid var(--line);
  max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 40px;
  font-size: 0.85rem; color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { display: inline-block; padding: 6px 0; }
.footer-notice { margin: 16px 0 0; font-size: 0.8rem; }
.footer-notice p { margin: 0 0 4px; }
.site-footer .concept { font-family: var(--font-serif); margin: 16px 0 0; }
.site-footer .copyright { margin: 4px 0 0; }

/* ---------- common ---------- */
.eyebrow { font-family: var(--font-serif); color: var(--green); letter-spacing: 0.2em; margin: 0 0 8px; font-size: 0.9rem; }
.lead { font-size: 1.05rem; }
.hero { padding: 32px 0 16px; }
.prose, .lookup { margin: 40px 0; }
.note { color: var(--muted); font-size: 0.9rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px;
  background: var(--sea); color: #fff; border: 1px solid var(--sea); border-radius: var(--radius);
  font: inherit; font-size: 0.95rem; letter-spacing: 0.05em; text-decoration: none; cursor: pointer;
}
.button:hover { background: #172d4a; color: #fff; }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button-secondary { background: transparent; color: var(--sea); }
.button-secondary:hover { background: var(--sea-soft); color: var(--sea); }

.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }

/* ---------- lookup ---------- */
.lookup-form label { display: block; font-size: 0.9rem; margin-bottom: 4px; }
.lookup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lookup-row input { flex: 1 1 200px; }

input[type="text"], input[type="email"], textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid #9a9184; border-radius: var(--radius);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.9rem; margin: 4px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }

/* ---------- item ---------- */
.item-header { padding: 16px 0 20px; }
.item-id { margin: 0 0 4px; font-size: 0.85rem; color: var(--muted); }
.item-id .label { margin-right: 4px; }
.item-brand { margin: 0; color: var(--muted); }

.lang-hint { background: var(--sea-soft); border-radius: var(--radius); padding: 8px 14px; margin-bottom: 20px; font-size: 0.9rem; }
.lang-hint p { margin: 0; }

.gallery { margin: 0 calc(var(--gutter) * -1) 28px; }
.gallery-track {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  list-style: none; margin: 0; padding: 0 var(--gutter);
  scrollbar-width: thin;
}
.gallery-track li { flex: 0 0 88%; scroll-snap-align: center; }
.gallery-track li:only-child { flex-basis: 100%; }
.gallery-track img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  background: var(--surface); border-radius: var(--radius);
}

.card { background: var(--surface); border-radius: var(--radius); padding: 22px 20px; margin: 0 0 16px; }

.spec { margin: 0; }
.spec > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.spec > div:first-child { border-top: 0; padding-top: 0; }
.spec dt { color: var(--muted); font-size: 0.9rem; }
.spec dd { margin: 0; }

.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 0.9rem; margin: 0 0 12px; }
.badge-verified { background: var(--green-soft); color: var(--green); }
.badge-pending { background: var(--earth-soft); color: #74492d; }

.nfc { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--sea-soft); }
.event { position: relative; padding: 0 0 18px 4px; }
.event:last-child { padding-bottom: 0; }
.event::before {
  content: ""; position: absolute; left: -27px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--sea);
}
.event-sold::before, .event-resold::before { background: var(--sea); }
.event-repaired::before, .event-inspected::before { border-color: var(--green); }
.event time { font-size: 0.85rem; color: var(--muted); }
.event-type { margin: 0; font-weight: 600; }
.event-note { margin: 2px 0 0; font-size: 0.95rem; }

.nature { background: var(--green-soft); }
.nature h2 { color: var(--green); }
.nature p { font-family: var(--font-serif); margin: 0; }

.status { font-size: 1.05rem; margin: 0 0 12px; }
.status-in_stock { color: var(--green); }

.actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.actions .button { width: 100%; }

.notice { margin: 32px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.9rem; color: var(--muted); }
.notice h2 { font-size: 0.95rem; color: var(--ink); margin-bottom: 8px; }
.notice p { margin: 0 0 8px; }
.notice p:last-child { margin: 0; }

/* ---------- contact ---------- */
.form { margin-top: 24px; }
.field { margin: 0 0 22px; }
.field > label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--sea); flex: none; }
.req, .opt { font-size: 0.75rem; font-weight: 400; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.req { background: var(--earth-soft); color: #74492d; }
.opt { background: var(--sea-soft); color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 12px 0 0; }
.form-status.is-error { color: var(--error); }
.form-success { background: var(--green-soft); border-radius: var(--radius); padding: 24px 20px; margin-top: 24px; }
.form-success h2 { color: var(--green); }

@media (min-width: 640px) {
  :root { --gutter: 32px; }
  h1 { font-size: 2rem; }
  .brand img { width: 160px; }
  .gallery { margin-left: 0; margin-right: 0; }
  .gallery-track { padding: 0; }
  .card { padding: 28px 32px; }
  .actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .gallery-track { scroll-behavior: smooth; }
}
