/* 記事（ねりにし だより）と、つながりのあるお店・イベントのページの見た目。
   色や字はトップページ（public/index.html）とそろえている。 */
:root {
  --ink:#20264a; --tomato:#e8432a; --leaf:#17995a; --sun:#ffd23f;
  --sky:#dff0ff; --peach:#ffe6dc; --cream:#fff6cf; --mint:#dff3e6; --paper:#fffdf6; --muted:#5b6080;
  --display:"Dela Gothic One","Zen Maru Gothic","Hiragino Maru Gothic ProN",sans-serif;
  --body:"Zen Maru Gothic","Hiragino Maru Gothic ProN","Yu Gothic","Meiryo",sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-weight: 500; font-size: 16px; line-height: 1.9;
  background: var(--sun);
  background-image: radial-gradient(rgba(32,38,74,.13) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.outer { padding: 24px 16px 56px; display: flex; justify-content: center; }
.sheet {
  --pad: clamp(16px, 4vw, 44px);
  width: calc(100% - 8px); max-width: 760px; background: var(--paper);
  border: 3px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink);
  padding: var(--pad); display: flex; flex-direction: column; gap: 28px;
}

/* 上の帯 */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.brand { font-family: var(--display); font-size: 1.05rem; text-decoration: none; border-bottom: 4px solid var(--sun); }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; font-weight: 900; }
.site-nav a { text-decoration: none; border-bottom: 2px dotted var(--ink); }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--tomato); color: var(--tomato); }
.crumbs { font-size: .82rem; font-weight: 700; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; }

h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.45rem, 5.6vw, 2.3rem); line-height: 1.4; }
h2 { font-size: 1.2rem; font-weight: 900; display: flex; align-items: center; gap: 10px; }
h2::after { content: ""; flex: 1; border-top: 3px dotted var(--ink); }
/* 見出しは1行に収める：組み立てのときに付けた文字の幅（--len）と、枠の幅（cqi）から文字の大きさを決める。
   とても長い見出しで小さくなりすぎるときだけ、折り返す。 */
.sheet { container-type: inline-size; }
h2 { font-size: clamp(.74rem, calc(100cqi / (var(--len, 12) + 1.6)), 1.2rem); text-wrap: balance; }
.lead { font-weight: 700; }
.chip { display: inline-block; font-size: .8rem; font-weight: 900; background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; padding: 0 10px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .88rem; font-weight: 700; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font: inherit; font-weight: 900; text-decoration: none; cursor: pointer;
  padding: 8px 20px; border-radius: 999px; border: 3px solid var(--ink);
  background: var(--tomato); color: #fff; box-shadow: 4px 4px 0 var(--ink);
}
.btn.line { background: #06c755; }
.btn.plain { background: #fff; color: var(--ink); }
.btn.small { padding: 4px 14px; font-size: .88rem; box-shadow: 3px 3px 0 var(--ink); }
.btn:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--tomato); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* 記事 */
article { display: flex; flex-direction: column; gap: 18px; }
.cover img, .body figure img { border: 3px solid var(--ink); border-radius: 16px; width: 100%; }
.body { display: flex; flex-direction: column; gap: 16px; font-size: 1.02rem; }
.body h2 { margin-top: 10px; }
.body h3 { font-size: 1.05rem; font-weight: 900; }
.body ul, .body ol { padding-left: 1.4em; }
.body figure { display: flex; flex-direction: column; gap: 6px; }
.body figcaption { font-size: .85rem; font-weight: 700; color: var(--muted); }
.body blockquote { margin: 0; padding: 10px 16px; background: var(--cream); border-left: 6px solid var(--sun); border-radius: 10px; }
.body a { font-weight: 700; }
.share { font-size: .88rem; font-weight: 700; }

/* お店・イベントの紹介の枠 */
.places { display: flex; flex-direction: column; gap: 12px; }
.place { border: 2.5px solid var(--ink); border-radius: 16px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.place .name { font-size: 1.1rem; font-weight: 900; }
.place .area { font-size: .85rem; font-weight: 700; color: var(--muted); }
.place .links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; font-weight: 900; }
.place .related { font-size: .88rem; }
.place .related ul { padding-left: 1.2em; }

/* 記事の一覧 */
.cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { border: 2.5px solid var(--ink); border-radius: 16px; background: #fff; overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.card a { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-bottom: 2.5px solid var(--ink); }
.card .txt { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.card .title { font-weight: 900; line-height: 1.5; }
.card .desc { font-size: .88rem; line-height: 1.7; }
.empty { text-align: center; font-weight: 700; color: var(--muted); padding: 16px 0; }

/* 相談への案内 */
.cta { border: 2.5px solid var(--ink); border-radius: 18px; padding: 16px 18px; background: var(--cream); display: flex; flex-direction: column; gap: 10px; }
.cta strong { font-family: var(--display); font-weight: 400; font-size: 1.1rem; }

footer { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; font-size: .85rem; font-weight: 700; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }

@media (max-width: 560px) {
  .outer { padding: 12px 8px 40px; }
  .sheet { width: calc(100% - 5px); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .card, .btn { transition: none; } .card:hover, .btn:hover { transform: none; } }
/* SNS のアイコン */
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; vertical-align: -0.2em; }
.btn .icon { margin-right: 6px; }
.sns-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.sns-foot a { display: inline-flex; align-items: center; gap: 4px; }
/* ひとまとまりで折り返さない言葉 */
.nobr { white-space: nowrap; }

/* ---------------------------------------------------------------- デモ（触ってみる） */
.demo-note { border: 2.5px dashed var(--ink); border-radius: 14px; padding: 10px 14px; background: #fff; font-size: .9rem; font-weight: 700; }
.demo { display: flex; flex-direction: column; gap: 18px; }
.panel { border: 2.5px solid var(--ink); border-radius: 16px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2 { font-size: 1.05rem; }
.panel h2::after { display: none; }
.panel.mint { background: var(--mint); }
.panel.cream { background: var(--cream); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f > label, .f > span.lab { font-size: .85rem; font-weight: 900; }
.demo input[type="text"], .demo input[type="number"], .demo input[type="date"], .demo input[type="time"], .demo select, .demo textarea {
  font: inherit; color: var(--ink); width: 100%; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; min-width: 0;
}
.demo textarea { min-height: 70px; resize: vertical; }
.demo input:focus-visible, .demo select:focus-visible, .demo textarea:focus-visible, .demo button:focus-visible { outline: 3px solid var(--tomato); outline-offset: 2px; }
.demo button { font: inherit; cursor: pointer; }
.demo .btn { border: 3px solid var(--ink); }
.demo .btn.small { padding: 4px 14px; }
.demo .btn.mini { padding: 1px 10px; font-size: .82rem; box-shadow: 2px 2px 0 var(--ink); }
.out { white-space: pre-wrap; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 10px 12px; font-size: .9rem; line-height: 1.7; overflow-wrap: anywhere; margin: 0; font-family: inherit; }
.canvas-wrap { display: flex; flex-direction: column; gap: 8px; }
.canvas-wrap canvas { width: 100%; max-width: 420px; height: auto; border: 2px solid var(--ink); border-radius: 12px; align-self: center; background: #fff; }
.two { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; align-items: start; } }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { border: 2.5px solid var(--ink); border-radius: 999px; padding: 4px 16px; background: #fff; font-weight: 900; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs .badge { display: inline-block; min-width: 1.4em; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--tomato); color: #fff; font-size: .8rem; }
.table-wrap { overflow-x: auto; }
.demo table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.demo th, .demo td { border-bottom: 1.5px solid #c9cbd8; padding: 6px 8px; text-align: left; vertical-align: top; }
.demo th { font-weight: 900; white-space: nowrap; }
.demo td.num, .demo th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo tr.done td { color: #7a7f99; text-decoration: line-through; }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; }
.chips2 span { font-size: .8rem; font-weight: 900; border: 2px solid var(--ink); border-radius: 999px; padding: 0 10px; background: #fff; }
.veg-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.veg-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) 5em 4em; gap: 6px; align-items: center; }
.veg-list input[type="text"], .veg-list input[type="number"] { padding: 6px 6px; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 700; }
label.check input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--leaf); }
.veg-list input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--leaf); }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--ink); background: #fff; font-weight: 900; color: var(--ink); }
.stepper output { min-width: 1.6em; text-align: center; font-weight: 900; font-variant-numeric: tabular-nums; }
.items { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.items li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; border-bottom: 1.5px dotted var(--ink); padding-bottom: 6px; }
.msg-ok { background: var(--mint); border: 2px solid var(--leaf); border-radius: 10px; padding: 8px 12px; font-weight: 900; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.summary div { background: var(--cream); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.summary b { font-family: var(--display); font-weight: 400; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.summary span { font-size: .8rem; font-weight: 700; }
.map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.map .slot { border: 2px solid var(--ink); border-radius: 10px; min-height: 64px; padding: 4px 6px; font-size: .78rem; font-weight: 900; background: #fff; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.map .slot small { font-weight: 700; color: #5b6080; }
.map .slot.power { background: var(--sky); }
.map .slot.empty { border-style: dashed; color: #9a9db0; font-weight: 700; }
.map .label { grid-column: 1 / -1; font-size: .8rem; font-weight: 900; margin-top: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { text-align: center; font-size: .78rem; font-weight: 900; }
.cal .dow.sun, .cal .day.sun .n { color: var(--tomato); }
.cal .dow.sat, .cal .day.sat .n { color: #2b6cb0; }
.cal button.day { min-height: 58px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; padding: 2px 4px; text-align: left; display: flex; flex-direction: column; gap: 1px; color: var(--ink); overflow: hidden; }
.cal button.day .n { font-weight: 900; font-size: .85rem; }
.cal button.day small { font-size: .66rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cal button.day.has { background: var(--sun); }
.cal button.day[aria-pressed="true"] { outline: 3px solid var(--tomato); outline-offset: 1px; }
.cal .blank { min-height: 58px; }
.demo-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.demo-cards a { display: flex; flex-direction: column; gap: 6px; height: 100%; text-decoration: none; background: #fff; border: 2.5px solid var(--ink); border-radius: 16px; padding: 14px 16px; box-shadow: 4px 4px 0 var(--ink); }
.demo-cards a:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.demo-cards b { font-size: 1.05rem; font-weight: 900; line-height: 1.5; }
.demo-cards .for { align-self: flex-start; }
.demo-cards .go { margin-top: auto; font-weight: 900; color: var(--tomato); }
@media (prefers-reduced-motion: reduce) { .demo-cards a:hover { transform: none; } }

/* スマホでは、表を1件ずつのカードの形にする（td に data-label を付ける） */
@media (max-width: 560px) {
  .demo table.rows-sm thead { display: none; }
  .demo table.rows-sm tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1.5px solid #c9cbd8; }
  .demo table.rows-sm td { border: 0; padding: 0; }
  .demo table.rows-sm td[data-label]::before { content: attr(data-label) "："; font-weight: 900; font-size: .78rem; color: #5b6080; }
  .demo table.rows-sm td.main { grid-column: 1; font-weight: 900; font-size: .95rem; }
  .demo table.rows-sm td.main::before { content: none; }
  .demo table.rows-sm td.act { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .demo table.rows-sm td.num { text-align: left; }
  .demo table.rows-sm td:not(.main):not(.act) { grid-column: 1; font-size: .85rem; }
}
.demo .btn.mini { white-space: nowrap; }

/* ---- PC（画面の幅が1000px以上）だけ。スマホ・タブレットの見た目は変えない ----
   一覧のページは横に広く使い、記事の本文は読みやすい幅のまま、写真だけ大きく見せる。 */
@media (min-width: 1000px) {
  .outer { padding: 40px 32px 80px; }
  .sheet { max-width: 1120px; --pad: 56px; gap: 36px; border-radius: 28px; box-shadow: 12px 12px 0 var(--ink); }
  h1 { font-size: 2.4rem; }
  /* 記事：見出しの写真は横いっぱい、本文は 720px の幅で真ん中に */
  article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); row-gap: 22px; }
  article > * { grid-column: 2; }
  article > .cover { grid-column: 1 / -1; }
  article > .cover img { max-height: 560px; object-fit: cover; border-radius: 22px; }
  .body { font-size: 1.06rem; line-height: 2; gap: 20px; }
  .body figure { margin-block: 6px; }
  .cta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 22px 28px; }
  .cta > strong { flex-basis: 100%; }
  .cta > p { flex: 1 1 420px; }
  /* 一覧 */
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .places > h2, .places > p { grid-column: 1 / -1; }
  article .places { display: flex; }
  /* 記事が1本だけのときは、写真と文を横に並べた大きなカードに */
  .cards:has(> li:only-child) { grid-template-columns: minmax(0, 1fr); }
  .cards > li:only-child a { flex-direction: row; }
  .cards > li:only-child img { width: 48%; flex: none; aspect-ratio: 4 / 3; border-bottom: 0; border-right: 2.5px solid var(--ink); }
  .cards > li:only-child .txt { justify-content: center; padding: 24px 32px; gap: 10px; }
  .cards > li:only-child .title { font-size: 1.35rem; }
  .cards > li:only-child .desc { font-size: .98rem; line-height: 1.9; }
  /* デモの一覧は2列で、説明を読みやすく */
  .demo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .demo-cards a { padding: 20px 24px; gap: 8px; }
  .demo-cards b { font-size: 1.2rem; }
  .place { padding: 18px 22px; }
}

/* 一覧の下の「ほかのページへ」の案内（カードから少し離して、真ん中に置く） */
.more-link { margin-top: 22px; text-align: center; }
.lead + .cards, .lead + .empty { margin-top: 16px; }

/* デザインの見直し 第2弾：見出しを大きく、長いときは2行に。下に点線。 */
.sheet > section > h2, .places > h2, .body h2 { display: block; font-size: clamp(1.2rem, 5.2vw, 1.45rem); line-height: 1.45; padding-bottom: 8px; border-bottom: 3px dotted var(--ink); text-wrap: balance; word-break: auto-phrase; }
.sheet > section > h2::after, .places > h2::after, .body h2::after { display: none; }
.body h2 { margin-top: 22px; }
.place { border-width: 2px; }
