/* 小箱町 共通スタイル（2026-10-30 作り直し）。各お店はこれを読み込み、必要なら自分の CSS を足す。
   --shop はお店の色（layout.mjs が body に入れる）。無いときは町の色（--accent） */
:root {
  --bg: #f7f3ea;
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --ink: #23201c;
  --muted: #6b635a;
  --line: #e6dece;
  --accent: #b5532f;
  --accent-ink: #fff;
  --shop: var(--accent);
  --roof-1: #b5532f;
  --roof-2: #2f7a66;
  --roof-3: #c9962e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 4px 16px rgba(40, 30, 20, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181614;
    --surface: #221f1b;
    --surface-2: #1d1a17;
    --ink: #eee8de;
    --muted: #a9a194;
    --line: #37322b;
    --accent: #e8875f;
    --accent-ink: #181614;
    --roof-1: #e8875f;
    --roof-2: #7fc0aa;
    --roof-3: #e6bb62;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.85; }
a { color: var(--shop); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 6px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--shop) 55%, transparent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 20px; padding-bottom: 56px; min-height: 60vh; }
main.narrow { max-width: 800px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .05em; white-space: nowrap; }
.brand-sep { color: var(--muted); }
.brand-service { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 700; text-decoration: none; min-width: 0; }
.brand-service span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-service .icon { color: var(--shop); }
.logo-mark { width: 34px; height: 21px; flex: none; }
.logo-mark path:nth-child(1) { fill: var(--roof-1); }
.logo-mark path:nth-child(2) { fill: var(--roof-2); }
.logo-mark path:nth-child(3) { fill: var(--roof-3); }
.icon { width: 22px; height: 22px; flex: none; }
.shopnav { margin-left: auto; position: relative; }
.shopnav summary { list-style: none; cursor: pointer; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 700; background: var(--surface); }
.shopnav summary::-webkit-details-marker { display: none; }
.shopnav summary::after { content: " ▾"; color: var(--muted); }
.shopnav nav { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 90vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.shopnav ul { list-style: none; margin: 0; padding: 0; }
.shopnav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.shopnav a:hover, .shopnav a[aria-current] { background: var(--surface-2); }
.shopnav a .icon { color: var(--shop); width: 28px; height: 28px; }
.shopnav b { display: block; font-size: .95rem; }
.shopnav small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }

/* パンくず・目次・更新日 */
.crumbs { font-size: .82rem; color: var(--muted); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--shop); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin: 0 0 28px; font-size: .93rem; }
.toc p { margin: 0 0 4px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--shop); }
.meta { font-size: .82rem; color: var(--muted); margin: -8px 0 16px; }

/* 文字 */
h1 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); line-height: 1.35; margin: 0 0 14px; letter-spacing: .01em; }
h2 { font-size: 1.3rem; line-height: 1.5; margin: 44px 0 14px; padding-left: 12px; border-left: 4px solid var(--shop); scroll-margin-top: 80px; }
h3 { font-size: 1.08rem; margin: 26px 0 8px; }
p, ul, ol, dl { margin: 0 0 16px; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 2px; }
.lead { color: var(--muted); font-size: 1.05rem; }
.note { font-size: .88rem; color: var(--muted); }
strong { font-weight: 700; }

/* カード・グリッド */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding: 0; list-style: none; margin: 0 0 24px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .12s, border-color .12s; }
a.tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--shop) 50%, var(--line)); }
.tile .icon { width: 30px; height: 30px; color: var(--shop); }
.tile b { font-size: 1.05rem; }
.tile span { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.tile .go { margin-top: auto; color: var(--shop); font-weight: 700; font-size: .9rem; }

/* ヒーロー（お店のトップの見出し部分） */
.hero { position: relative; overflow: hidden; border-radius: calc(var(--radius) + 6px); padding: 32px clamp(20px, 4vw, 44px); margin: 0 0 28px; background: linear-gradient(135deg, color-mix(in srgb, var(--shop) 14%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); }
.hero h1 { margin-bottom: 10px; }
.hero .lead { max-width: 46em; color: var(--ink); opacity: .85; }
.hero .hero-icon { position: absolute; right: -10px; bottom: -18px; width: 160px; height: 160px; color: var(--shop); opacity: .12; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips a, .chips span { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--shop); color: var(--shop); }

/* 入力・ボタン（道具で共通） */
input[type=text], input[type=number], input[type=date], input:not([type]), select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 44px; }
input:focus, select:focus, textarea:focus { border-color: var(--shop); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop) 22%, transparent); }
input[type=checkbox], input[type=radio] { width: 19px; height: 19px; accent-color: var(--shop); }
button, .btn { font: inherit; font-weight: 700; padding: 9px 18px; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--shop); background: var(--shop); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button[type=reset], .btn-ghost { background: transparent; color: var(--shop); }
button:hover, .btn:hover { filter: brightness(1.06); }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }

/* 表 */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: 0; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover td { background: color-mix(in srgb, var(--shop) 5%, transparent); }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 強調の箱・よくある質問 */
.point { background: color-mix(in srgb, var(--shop) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--shop) 25%, var(--line)); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 20px; }
.point p:last-child { margin: 0; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; }

dl.info { display: grid; grid-template-columns: 8em 1fr; gap: 8px 16px; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { dl.info { grid-template-columns: 1fr; gap: 0; } dl.info dd { margin-bottom: 12px; } }
.badge-ad { display: inline-block; font-size: .75rem; padding: 0 6px; border: 1px solid var(--muted); border-radius: 4px; color: var(--muted); }

/* フッター */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .9rem; padding: 36px 0 24px; margin-top: 24px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title { display: flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--ink); margin: 0 0 10px; padding: 0; border: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-shops a { display: inline-flex; align-items: center; gap: 8px; }
.footer-shops .icon { width: 18px; height: 18px; }
.site-footer .copy { margin: 24px auto 0; font-size: .8rem; }

/* 広告枠（layout.mjs の adBlock）。読み込み前後でページがずれないよう高さを確保する */
.ad { margin: 32px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); min-height: 280px; }
.ad-label { margin: 0 0 6px; font-size: .75rem; color: var(--muted); }

/* アフィリエイトの「PR」の箱（_shared/affiliate.mjs）。本文の途中に置き、AdSense の枠から離す */
.pr { margin: 24px 0; padding: 14px 18px; border: 1px dashed color-mix(in srgb, var(--muted) 50%, var(--line)); border-radius: var(--radius); font-size: .93rem; background: var(--surface-2); }
.pr-head { margin: 0 0 4px; font-weight: 700; }
.pr-label { display: inline-block; font-size: .72rem; font-weight: 400; padding: 0 6px; margin-right: 8px; border: 1px solid var(--muted); border-radius: 4px; color: var(--muted); vertical-align: 1px; }
.pr-lead { margin: 0 0 6px; color: var(--muted); }
.pr ul { margin: 0; padding-left: 1.2em; }
.pr img[width="1"] { position: absolute; width: 1px; height: 1px; }

@media print { .site-header, .site-footer, .crumbs, .toc, .ad, .pr { display: none !important; } body { background: #fff; } }
