:root {
  --ink: #1c2023;
  --accent: #3b5776;
  --muted: #4b5359;
  --gray: #6b6b6b;
  --line: #c9cdd1;
  --line-soft: #dddddd;
  --bg: #ffffff;
  --bg-soft: #f3f3f3;
  --bg-blue: #e2edf5;
  --warn: #c0763a;
  --sold: #9a3b3b;
  --max: 1080px;
  --font: -apple-system, system-ui, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.8;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { opacity: .8; }
h1, h2, h3 { line-height: 1.45; margin: 0; font-weight: 700; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- ヘッダー ---------- */
.site-header { border-bottom: 2px solid var(--ink); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 0 14px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; background: var(--ink); display: grid; place-items: center; flex: none; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .02em; display: block; line-height: 1.3; }
.brand-sub { font-size: 10px; color: var(--muted); display: block; line-height: 1.4; }
.gnav { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.gnav::-webkit-scrollbar { display: none; }
.gnav a {
  flex: 1 0 auto; text-align: center; padding: 12px 14px; font-size: 13px; font-weight: 700;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.gnav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
.gnav a.gnav-cta { background: var(--ink); color: #fff; margin: 4px 0 6px; padding: 8px 20px; }

/* ---------- 共通パーツ ---------- */
.label {
  display: inline-block; border-left: 4px solid var(--accent); padding: 0 0 0 8px;
  font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--ink); margin-bottom: 14px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 22px; font: inherit; font-size: 14px; font-weight: 700;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  border-radius: 0;
}
.btn:hover { opacity: .85; }
.btn-outline { background: #fff; color: var(--ink); }
.btn-small { min-height: 34px; padding: 4px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: wait; }
.more-link { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.notice {
  border-left: 3px solid var(--warn); padding: 2px 0 2px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.8;
}
.section { padding: 56px 0; }
.section-rule { border-top: 2px solid var(--ink); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(22px, 3.2vw, 30px); }
.lead { color: var(--muted); }
.muted { color: var(--gray); font-size: 13px; }
.box { border: 1px solid var(--line); padding: 28px; background: #fff; }
.box-top { border-top: 3px solid var(--ink); }
.empty { padding: 32px; text-align: center; color: var(--gray); border: 1px dashed var(--line); }

/* ---------- ヒーロー ---------- */
.hero { padding: 48px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 40px); margin-bottom: 22px; }
.hero p { color: var(--muted); margin: 0 0 24px; font-size: 15.5px; line-height: 2; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-figure { background: var(--bg-blue); border: 1px solid var(--line); }

/* ---------- 番号つきナビ ---------- */
.numnav { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.numnav a { padding: 16px 18px 18px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); }
.numnav a:last-child { border-right: 0; }
.numnav small { display: block; color: var(--gray); font-size: 12px; }
.numnav b { font-size: 14px; }

/* ---------- 症状チェック ---------- */
.checker { border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: 36px 32px; }
.checker h2 { font-size: clamp(22px, 3.2vw, 30px); margin-bottom: 10px; }
.checker-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin: 24px 0 18px; }
.checker-fields .full { grid-column: 1 / -1; max-width: calc(50% - 10px); }
.field-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
select, input[type="text"], input[type="number"], input[type="password"], input[type="search"], textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; min-height: 46px;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.checker-result { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.checker-result h3 { font-size: 17px; margin-bottom: 10px; }
.checker-result ol { padding-left: 1.3em; margin: 0 0 12px; }
.checker-result li { margin-bottom: 8px; }
.quick-links { margin-top: 18px; display: grid; gap: 8px; font-size: 13px; }

/* ---------- カード ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; }
.card-media { aspect-ratio: 4 / 3; background: var(--bg-blue); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-kicker { font-size: 12px; color: var(--accent); font-weight: 700; }
.card h3 { font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; flex: 1; }
.card-link { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ---------- 実例ブロック ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.feature-media { background: var(--bg-blue); min-height: 280px; }
.feature-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.feature-body h2 { font-size: 24px; }
.feature-body p { margin: 0; color: var(--muted); font-size: 14px; }
.feature-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 28px; flex-wrap: wrap; font-size: 13px; }

/* ---------- 一覧リンク（2列） ---------- */
.linkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.linkgrid a { border: 1px solid var(--line); padding: 18px 20px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
.linkgrid a::after { content: "→"; color: var(--accent); }

/* ---------- 運営者・相談 ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.about h2 { font-size: clamp(22px, 3.2vw, 30px); margin-bottom: 14px; }
.cta-box { background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 28px; }
.cta-box h3 { font-size: 20px; margin-bottom: 8px; }
.cta-box p { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }

/* ---------- フッター ---------- */
.site-footer { background: var(--ink); color: #fff; margin-top: 64px; padding: 44px 0 24px; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.site-footer h3 { font-size: 15px; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: #fff; text-decoration: none; opacity: .85; }
.site-footer p { margin: 0; opacity: .8; line-height: 1.9; }
.copyright { margin-top: 36px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .2); opacity: .6; font-size: 12px; }

/* ---------- ページ見出し ---------- */
.page-head { padding: 40px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.page-head h1 { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: 8px; }
.page-head p { margin: 0; color: var(--muted); }
.crumbs { font-size: 12px; color: var(--gray); margin-bottom: 14px; }
.crumbs a { color: var(--gray); }

/* ---------- 掲示板 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar input[type="search"] { flex: 1 1 220px; width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.thread-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.thread-list li { border-bottom: 1px solid var(--line); }
.thread-list li:not(.empty) > a { display: grid; grid-template-columns: 36px 1fr auto; gap: 4px 12px; padding: 14px 6px; text-decoration: none; color: var(--ink); align-items: baseline; }
.thread-list .no { color: var(--gray); font-size: 13px; }
.thread-list .ttl { font-weight: 700; }
.thread-list .ttl .cnt { color: var(--accent); font-weight: 700; margin-left: 4px; }
.thread-list .meta { grid-column: 2 / 3; font-size: 12px; color: var(--gray); }
.thread-list .cat { font-size: 11px; border: 1px solid var(--line); padding: 1px 6px; white-space: nowrap; color: var(--muted); }
.posts { border-top: 2px solid var(--ink); }
.post { padding: 14px 4px 16px; border-bottom: 1px solid var(--line-soft); }
.post-head { font-size: 13px; color: var(--gray); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.post-num { color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); }
.post-name { color: #2f7a3b; font-weight: 700; }
.post-name.op::after { content: "（質問者）"; color: var(--accent); font-weight: 400; font-size: 12px; }
.post-del { margin-left: auto; font-size: 12px; color: var(--gray); background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0; }
.post-body { margin-top: 6px; white-space: normal; word-break: break-word; font-size: 15px; }
.post-body .anchor { color: var(--accent); }
.post.deleted .post-body { color: var(--gray); }
.post.flash { background: #fff8e1; }
.anchor-pop { position: absolute; z-index: 30; max-width: min(520px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--ink); padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: 14px; }

/* ---------- フォーム ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req { color: var(--sold); font-size: 11px; margin-left: 6px; font-weight: 700; }
.hint { font-size: 12px; color: var(--gray); margin-top: 4px; line-height: 1.6; }
.form-msg { font-size: 14px; padding: 10px 14px; border-left: 3px solid var(--sold); background: #fbf1f1; display: none; }
.form-msg.ok { border-color: #2f7a3b; background: #eff7f0; }
.form-msg.show { display: block; }
.details-box summary { cursor: pointer; font-weight: 700; font-size: 14px; }

/* ---------- 販売所 ---------- */
.items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.item-card { border: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; background: #fff; position: relative; }
.item-card .thumb { aspect-ratio: 1; background: var(--bg-soft); overflow: hidden; }
.item-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-card .info { padding: 10px 12px 14px; display: grid; gap: 2px; }
.item-card .name { font-size: 14px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-card .price { font-size: 17px; font-weight: 700; }
.item-card .sub { font-size: 12px; color: var(--gray); }
.sold-badge { position: absolute; top: 0; left: 0; background: var(--sold); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; }
.item-card.is-sold .thumb img { opacity: .55; }

.item-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.gallery-main { aspect-ratio: 1; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.gallery-thumbs button { padding: 0; border: 1px solid var(--line); background: none; aspect-ratio: 1; cursor: pointer; overflow: hidden; }
.gallery-thumbs button[aria-current="true"] { outline: 2px solid var(--ink); outline-offset: -2px; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.item-title { font-size: clamp(22px, 3vw, 28px); margin-bottom: 8px; }
.item-price { font-size: 30px; font-weight: 700; margin: 6px 0 16px; }
.item-price small { font-size: 14px; font-weight: 400; color: var(--gray); margin-left: 4px; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 20px; }
.spec th, .spec td { border-top: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--line); }
.spec th { width: 34%; color: var(--muted); font-weight: 700; background: var(--bg-soft); }
.item-body { white-space: pre-wrap; word-break: break-word; }
.seller-badge { font-size: 11px; background: var(--accent); color: #fff; padding: 1px 6px; margin-left: 4px; font-weight: 700; }

/* 写真えらび */
.photo-picker { border: 1px dashed var(--line); padding: 14px; background: var(--bg-soft); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.photo-grid:empty { display: none; }
.photo-grid figure { margin: 0; position: relative; aspect-ratio: 1; border: 1px solid var(--line); background: #fff; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .rm { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; background: rgba(28,32,35,.85); color: #fff; font-size: 16px; cursor: pointer; }
.photo-grid .cover { position: absolute; left: 0; bottom: 0; background: var(--ink); color: #fff; font-size: 11px; padding: 2px 6px; }
.photo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-buttons label { cursor: pointer; }
.photo-buttons input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.sticky-sell { display: none; }

/* ---------- スマホ ---------- */
@media (max-width: 860px) {
  .items { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .brand { padding: 14px 0 10px; }
  .brand-name { font-size: 17px; }
  .gnav { margin: 0 -16px; padding: 0 8px; }
  .gnav a { flex: 0 0 auto; padding: 10px 10px; }
  .hero { padding: 28px 0 32px; }
  .hero-grid, .about, .feature, .item-layout { grid-template-columns: 1fr; gap: 28px; }
  .feature-media { min-height: 200px; }
  .feature-body { padding: 22px; }
  .numnav { grid-template-columns: 1fr 1fr; }
  .numnav a:nth-child(2) { border-right: 0; }
  .numnav a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .checker { padding: 24px 18px; }
  .checker-fields { grid-template-columns: 1fr; }
  .checker-fields .full { max-width: none; }
  .cards, .linkgrid, .footer-grid, .form-row { grid-template-columns: 1fr; }
  .items { grid-template-columns: 1fr 1fr; gap: 10px; }
  .section { padding: 40px 0; }
  .box { padding: 20px 16px; }
  .thread-list li:not(.empty) > a { grid-template-columns: 28px 1fr; }
  .thread-list .cat { grid-column: 2; justify-self: start; }
  .gallery-main, .item-layout > :first-child { margin: 0 -16px; }
  .gallery-main { border-left: 0; border-right: 0; }
  .gallery-thumbs { padding: 0 16px; }
  .sticky-sell {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  }
  .has-sticky { padding-bottom: 80px; }
}

/* ---------- 最近のめだか ---------- */
.tip-list { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.tip-card { display: flex; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: flex-start; }
.tip-thumb { width: 120px; flex: none; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.tip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tip-text { display: grid; gap: 4px; min-width: 0; }
.tip-meta { font-size: 12px; color: var(--accent); font-weight: 700; }
.tip-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.tip-excerpt { font-size: 13px; color: var(--muted); line-height: 1.7; }
.today-tip { display: grid; grid-template-columns: 1fr 1.3fr; border: 1px solid var(--line); border-top: 3px solid var(--ink); background: #fff; }
.today-tip.no-photo { grid-template-columns: 1fr; }
.today-tip .media { background: var(--bg-blue); min-height: 220px; }
.today-tip .media img { width: 100%; height: 100%; object-fit: cover; }
.today-tip .text { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.today-tip h3 { font-size: 22px; }
.today-tip p { margin: 0; color: var(--muted); font-size: 14.5px; }
.article { max-width: 760px; }
.article-body { white-space: normal; word-break: break-word; font-size: 16px; line-height: 2; margin: 24px 0; }
.article-photos { display: grid; gap: 12px; margin: 24px 0; }
.article-photos img { width: 100%; border: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; }
.owner-bar { background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 14px 16px; margin-top: 28px; }
@media (max-width: 720px) {
  .tip-thumb { width: 96px; }
  .today-tip { grid-template-columns: 1fr; }
  .today-tip .media { min-height: 0; aspect-ratio: 4 / 3; }
  .today-tip .text { padding: 20px; }
}

/* ---------- 動画 ---------- */
.item-card .thumb video, .tip-thumb video, .today-tip .media video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tip-thumb, .today-tip .media { position: relative; }
.video-badge { position: absolute; right: 6px; bottom: 6px; z-index: 1; background: rgba(28,32,35,.85); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; }
.item-card .video-badge { top: 6px; bottom: auto; }
.article-photos video, .item-videos video { width: 100%; max-height: 70vh; background: #000; border: 1px solid var(--line); display: block; }
.item-videos { display: grid; gap: 12px; margin-top: 12px; }
.contact-box { border: 2px solid var(--ink); padding: 16px 18px; margin-top: 4px; background: var(--bg-soft); }
.contact-value { font-size: 18px; font-weight: 700; word-break: break-all; margin: 4px 0 10px; }
