/*
 * 自鯖缶フリマのスタイル。トークンの値は jisaba.sh/src/styles/global.css と同じ。
 * jisaba.sh 側の値が変わったら、ここも合わせる（Tailwind は入れていないので素の CSS で持つ）。
 */
:root {
  --navy-900: #071527;
  --navy: #0e223d;
  --navy-600: #2a4670;
  --navy-300: #8c9bb0;
  --navy-100: #dce2ea;
  --red: #c73b2e;
  --red-600: #b23328;
  --red-300: #e28c84;
  --cream-100: #fbf6ef;
  --cream-200: #f2e6d6;
  --cream-300: #e3d2bc;
  --gray-700: #6b6b6b;
  --gray-500: #b7b7b7;
  --white: #fff;
  --font: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream-100);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 900; line-height: 1.35; letter-spacing: 0.02em; margin: 0; text-wrap: pretty; }
img { max-width: 100%; display: block; }
a { color: var(--red-600); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color 120ms var(--ease); }
a:hover { color: var(--navy); }
a.plain { text-decoration: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: var(--cream-200); }
.mono { font-family: var(--mono); }
.strong { font-weight: 700; }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }
.stack { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar { width: 56px; height: 3px; background: var(--red); }

/* ---- ヘッダー・フッター ---- */
.site-header { border-bottom: 2px solid var(--navy); background: var(--cream-100); }
.header-row { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { height: 32px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }
.nav a { color: var(--navy); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.site-footer { border-top: 2px solid var(--navy); padding: 48px 0; margin-top: 64px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-row p { margin: 4px 0 0; font-size: 14px; }
.footer-lead { font-size: 22px !important; font-weight: 900; margin: 0 !important; }

/* ---- ボタン（押すと沈む。ホバーは暗くする） ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border: 2px solid var(--navy); border-radius: 4px;
  font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  box-shadow: 3px 3px 0 var(--navy);
  transition: translate 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease), color 120ms var(--ease);
}
@media (hover: hover) {
  .btn:not(:disabled):hover { translate: -2px -2px; box-shadow: 5px 5px 0 var(--navy); }
}
.btn:not(:disabled):active { translate: 2px 2px; box-shadow: none; }
.btn-primary { background: var(--red); color: var(--cream-100); }
.btn-primary:hover { background: var(--red-600); color: var(--cream-100); }
.btn-outline { background: var(--white); color: var(--navy); }
.btn-outline:hover { background: var(--cream-200); color: var(--navy); }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 17px; }

/* 気になる！ JS がない間は押せない見た目にせず、数だけ見せる（like.js が html.js-like を付ける） */
.like { background: var(--white); color: var(--navy); padding: 0 14px; }
html:not(.js-like) .like { pointer-events: none; box-shadow: none; }
.like[aria-pressed="true"] { background: var(--red); color: var(--cream-100); }
.like[aria-pressed="true"] svg { fill: currentColor; }
.like:disabled { cursor: default; box-shadow: none; background: var(--cream-200); color: var(--gray-700); border-color: var(--gray-500); }
.like-big { min-height: 56px; width: 100%; font-size: 17px; }

/* ---- 小物 ---- */
.chip { display: inline-block; border: 1px solid var(--navy); background: var(--cream-200); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge { display: inline-block; border-radius: 2px; padding: 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.badge-muted { background: var(--gray-500); color: var(--navy-900); }
.stamp { background: var(--red); color: var(--cream-100); border: 2px solid var(--navy); box-shadow: 3px 3px 0 var(--navy); border-radius: 2px; padding: 4px 14px; font-size: 14px; font-weight: 900; letter-spacing: 0.12em; }
.ph { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- 一覧 ---- */
.hero { padding: 56px 0 40px; border-bottom: 2px solid var(--navy); }
.display { font-size: clamp(40px, 7vw, 64px); line-height: 1.15; letter-spacing: 0.04em; }
.lead { margin: 0; max-width: 720px; line-height: 1.9; }
.cat-bar { background: var(--navy); }
.cat-row { display: flex; flex-wrap: wrap; }
.cat { min-height: 48px; display: inline-flex; align-items: center; padding: 0 18px; border-bottom: 4px solid transparent; color: var(--cream-200); font-size: 14px; font-weight: 700; text-decoration: none; }
.cat:hover { color: var(--white); border-bottom-color: var(--navy-600); }
.cat[aria-current="page"] { border-bottom-color: var(--red); color: var(--white); }
.list { padding-top: 32px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; font-size: 14px; font-weight: 700; }
.sorts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sorts a { color: var(--navy); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.sorts a[aria-current] { color: var(--red-600); text-decoration: underline; }
.toggle { min-height: 44px; display: inline-flex; align-items: center; }
.empty { padding: 48px 0; text-align: center; color: var(--gray-700); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 32px 24px; }
.card { background: var(--white); border: 2px solid var(--navy); border-radius: 8px; box-shadow: 3px 3px 0 var(--navy); overflow: hidden; display: flex; flex-direction: column; }
.card-photo { display: block; color: inherit; position: relative; aspect-ratio: 1; border-bottom: 2px solid var(--navy); background: var(--cream-200); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.price-tag { position: absolute; right: -2px; bottom: 20px; background: var(--red); color: var(--cream-100); border: 2px solid var(--navy); border-radius: 4px 0 0 4px; padding: 6px 20px 6px 16px; display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; line-height: 1.2; }
.price-tag-off { background: var(--gray-700); }
.hole { width: 10px; height: 10px; border-radius: 999px; background: var(--cream-100); border: 2px solid var(--navy); }
.chip-on-photo { position: absolute; left: 12px; top: 12px; background: var(--cream-100); }
.card-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.meta { font-size: 12px; color: var(--gray-700); }
.card-title { font-size: 20px; }
.spec-lines { margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--navy-600); overflow-wrap: anywhere; }
.card-actions { margin-top: auto; display: flex; gap: 8px; }
.card-actions .btn-outline { flex: 1 1 auto; }

/* ---- 詳細（1 枚の大きな値札） ---- */
.detail-band { background: var(--navy); padding: 32px 0 64px; }
.crumb { color: var(--cream-200); font-size: 13px; margin: 0 0 16px; }
.crumb a { color: var(--red-300); }
.label { background: var(--cream-100); border: 2px solid var(--cream-200); border-radius: 8px; box-shadow: 8px 8px 0 var(--red); display: flex; flex-wrap: wrap; overflow: hidden; }
.label-photos { flex: 1 1 380px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 10px; border-right: 2px solid var(--navy); }
.label-photos > .ph { aspect-ratio: 1; border: 2px solid var(--navy); border-radius: 4px; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border: 2px solid var(--navy); border-radius: 4px; background: var(--white); }
.gallery img { flex: 0 0 100%; aspect-ratio: 1; object-fit: contain; scroll-snap-align: start; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.thumbs img { aspect-ratio: 1; object-fit: cover; border: 2px solid var(--navy); border-radius: 4px; }
.label-body { flex: 1 1 380px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 480px) { .label-photos, .label-body { padding: 16px; } }
.detail-title { font-size: clamp(28px, 4vw, 36px); }
.big-tag { align-self: flex-start; background: var(--red); color: var(--cream-100); border: 2px solid var(--navy); box-shadow: 3px 3px 0 var(--navy); border-radius: 4px; padding: 8px 24px; font-size: 32px; font-weight: 700; line-height: 1.3; }
.big-tag-off { background: var(--gray-700); }
.notice { margin: 0; padding: 12px 16px; background: var(--navy-100); border-radius: 4px; font-size: 14px; font-weight: 700; }
.specs { border-top: 2px solid var(--navy); border-bottom: 1px dashed var(--navy-300); padding: 12px 0; font-size: 13px; line-height: 1.8; }
.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.facts th, .facts td { padding: 8px 0; border-bottom: 1px dashed var(--navy-300); text-align: left; vertical-align: top; }
.facts th { width: 120px; }

/* ---- 案内 ---- */
.prose { max-width: 768px; padding-top: 56px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 22px; margin-top: 16px; }
.prose p, .prose ol { margin: 0; }
.page-title { font-size: clamp(32px, 5vw, 48px); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
