/* 制作見本「紙面から探せる一覧へ」の見た目。色と字は公開ずみの見本「月刊みほんタウンWEB」に合わせる（青が主役・黄色の差し色）。 */
:root {
  --gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --bg: #f3f8fc;
  --paper: #fff;
  --ink: #14253a;
  --sub: #566779;
  --line: #d5e1eb;
  --main: #0f6fc6;
  --main-dk: #0a569c;
  --second: #0b8068;
  --accent: #ffc928;
  --warn: #d1343f;
  --zebra: #eef5fb;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 16px;
  line-height: 1.75;
  line-break: strict;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--main-dk); }
button, input { font: inherit; color: inherit; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.small { font-size: 14px; color: var(--sub); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* いちばん上の「制作見本です」の帯（公開ずみの見本と同じ書き方） */
.sample-bar { margin: 0; background: var(--ink); color: #f5eee2; font-size: 13px; line-height: 1.6; padding: 8px 16px; text-align: center; }
.sample-bar b { display: inline-block; background: var(--accent); color: var(--ink); border-radius: 3px; padding: 0 8px; margin-right: 8px; font-weight: 700; }
.sample-bar a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 700; padding: 0 4px; margin-left: 8px; }

/* 頭 */
.hero {
  background: linear-gradient(160deg, var(--main) 0%, var(--main-dk) 100%);
  color: #fff;
  padding: 32px 0 24px;
}
.hero-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 13px;
}
.hero h1 { font-family: var(--head); font-weight: 900; font-size: 26px; line-height: 1.45; margin: 0 0 12px; }
.hero-lead { margin: 0 0 20px; font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.steps a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 56px; padding: 6px 2px;
  border-radius: 10px; background: rgba(255, 255, 255, .14);
  color: #fff; text-decoration: none; font-size: 11px; line-height: 1.3; text-align: center;
}
.steps a span {
  display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 3px;
  border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 12px;
}

/* 節 */
.sec { padding: 36px 0 32px; border-bottom: 1px solid var(--line); }
.sec-no {
  display: grid; place-items: center; width: 36px; height: 36px; margin: 0 0 8px;
  border-radius: 50%; background: var(--main); color: #fff; font-weight: 700;
}
.sec h2 { font-family: var(--head); font-weight: 700; font-size: 21px; line-height: 1.45; margin: 0 0 12px; }
.sec h3 { font-family: var(--head); font-size: 17px; margin: 28px 0 10px; }
.sec p { margin: 0 0 12px; }
.sec-main { background: #e4eff9; }
.hint { font-size: 14px; color: var(--sub); }

/* 1. 紙面（写真に見立てた絵） */
.pages { list-style: none; margin: 16px 0 8px; padding: 8px 4px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 10px; overflow: hidden; }
.pages li { min-width: 0; }
.page-btn {
  width: 100%; padding: 4px; border: 0; border-radius: 10px;
  background: transparent; cursor: zoom-in; text-align: center;
}
.page-btn > span { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; padding: 8px 0 2px; color: var(--main-dk); }
.page-btn:focus-visible, .chip:focus-visible, .btn-sub:focus-visible, .tel:focus-visible, .btn-more:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.photo {
  position: relative; overflow: hidden; margin: 0 auto;
  background: #f7f9fb; border-radius: 3px;
  box-shadow: 0 6px 16px rgba(20, 37, 58, .22), 0 1px 3px rgba(20, 37, 58, .2);
}
.photo .paper { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
/* スマホで撮ったように少しかたむける */
.tilt0 { transform: rotate(-1.4deg); }
.tilt1 { transform: rotate(1deg); }
.tilt2 { transform: rotate(.8deg); }
.tilt3 { transform: rotate(-1.1deg); }
/* 写真全体にうっすら影と照り返し（右上の角） */
.photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 38% 22% at 82% 10%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%),
    linear-gradient(115deg, rgba(20, 37, 58, .06), rgba(20, 37, 58, 0) 40%, rgba(20, 37, 58, .08));
}

/* 紙面の中身。字の大きさはすべて em で書き、.paper の font-size だけで全体の大きさが変わる */
.paper {
  width: 480px; padding: 16px 16px 20px; background: #fdfdfd; color: #1d2733;
  font-family: var(--gothic); font-size: 10px; line-height: 1.5; text-align: left;
}
.p-head { display: flex; align-items: center; gap: 8px; border-bottom: 3px solid var(--main); padding-bottom: 4px; }
.p-mag { font-family: var(--head); font-weight: 900; font-size: 1.5em; color: var(--main-dk); }
.p-sec { background: var(--main); color: #fff; font-weight: 700; font-size: 1.2em; padding: .1em .8em; border-radius: 2px; }
.p-no { margin-left: auto; font-family: var(--head); font-weight: 900; font-size: 2em; line-height: 1; color: var(--main); }
.p-issue { margin: .4em 0 .8em; font-size: .8em; color: #5c6a78; }
.p-cols { column-count: 2; column-gap: 14px; column-rule: 1px solid #d9e1e8; }
.p-band {
  margin: 0 0 .5em; padding: .15em .7em; font-size: 1.1em; font-weight: 700; color: #fff;
  break-inside: avoid; break-after: avoid; border-radius: 2px;
}
.pc0 { background: #0f6fc6; } .pc1 { background: #0b8068; } .pc2 { background: #6b57b0; }
.pc3 { background: #b3600f; } .pc4 { background: #b83a62; } .pc5 { background: #3d5a80; }
.pc6 { background: #c2410c; } .pc7 { background: #2f7d32; } .pc8 { background: #8a5a12; }
.p-item { position: relative; break-inside: avoid; margin: 0 0 .9em; padding-bottom: .7em; border-bottom: 1px dotted #b9c5d0; }
.paper p { margin: 0; }
.p-title { font-weight: 700; font-size: 1.2em; line-height: 1.4; margin-bottom: .2em !important; }
.p-row { font-size: .95em; }
.p-row b { font-weight: 700; margin-right: .3em; color: #33475b; }
.p-body { font-size: .9em; color: #3e4c5a; margin-top: .2em !important; }
/* 照り返しで薄い行とその上の光 */
.faint { position: relative; color: rgba(29, 39, 51, .5); }
.faint b { color: inherit; }
.faint::after {
  content: ""; position: absolute; pointer-events: none;
  left: -12%; right: -12%; top: -70%; bottom: -70%; border-radius: 50%;
  background: radial-gradient(ellipse at 45% 50%, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, .5) 38%, rgba(255, 255, 255, 0) 70%);
}
/* 読めない字のかすれ */
.smudge {
  display: inline-block; width: .9em; height: 1em; vertical-align: -.12em; margin: 0 .05em;
  background: radial-gradient(ellipse at 40% 50%, rgba(60, 72, 86, .35), rgba(60, 72, 86, .08) 60%, transparent 75%);
  filter: blur(1px);
}

/* 切り出し */
.crop { background: #eef1f4; padding: 10px; border-radius: 8px; overflow: hidden; }
.paper-crop { width: auto; font-size: 15px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(20, 37, 58, .15); transform: rotate(-.6deg); }
.paper-crop .p-item { margin: 0; padding: 0; border: 0; }
.crop-line .paper-crop { font-size: 19px; }
.crop-cap { margin: 8px 0 0 !important; font-size: 13px; color: var(--sub); }

/* 2. AIが読む */
.read-demo { display: grid; gap: 10px; margin: 16px 0 12px; }
.read-photo { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.read-photo figcaption { font-size: 13px; color: var(--sub); padding-top: 6px; }
.read-arrow {
  justify-self: center; padding: 4px 14px; border-radius: 999px;
  background: var(--accent); font-weight: 700; font-size: 14px; position: relative;
}
.read-arrow::after { content: "↓"; margin-left: 6px; }
.read-fields { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.read-head { font-weight: 700; color: var(--second); margin: 0 0 8px !important; }
.read-fields dl { margin: 0; display: grid; grid-template-columns: 6.5em 1fr; }
.read-fields dt, .read-fields dd { padding: 6px 8px; margin: 0; border-top: 1px solid var(--line); font-size: 15px; }
.read-fields dt { color: var(--sub); font-size: 13px; }
.read-fields dt:nth-of-type(even), .read-fields dd:nth-of-type(even) { background: var(--zebra); }

/* 3. 人が確かめる */
.diffs { display: grid; gap: 14px; margin: 18px 0; }
.diff { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.diff .crop { border-radius: 0; }
.diff-kind { margin: 0 !important; padding: 8px 14px; font-weight: 700; font-size: 14px; background: var(--zebra); color: var(--main-dk); border-bottom: 1px solid var(--line); }
.diff-left { border: 2px solid var(--warn); }
.diff-left .diff-kind { background: #fff6f6; color: var(--warn); }
.diff-body { padding: 12px 14px 4px; }
.diff-where { font-weight: 700; margin-bottom: 8px !important; }
.vs { display: flex; align-items: center; gap: 10px; margin: 0 0 6px !important; font-size: 17px; }
.ai { flex: none; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; color: #fff; }
.ai1 { background: var(--main); }
.ai2 { background: var(--second); }
mark.ng { background: #fde3e5; color: var(--warn); font-weight: 700; padding: 0 2px; border-radius: 3px; }
.judge { margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed var(--line); }
.judge b { color: var(--main-dk); }
.note-box { background: var(--paper); border-left: 5px solid var(--accent); padding: 10px 14px; border-radius: 6px; margin-top: 14px !important; }

/* 4. 一覧 */
.btn-sub {
  min-height: 44px; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--main);
  background: #fff; color: var(--main-dk); font-weight: 700; cursor: pointer;
}
.finder { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; }
.finder input[type="search"] {
  width: 100%; min-height: 48px; padding: 8px 12px; border: 2px solid var(--main); border-radius: 10px; background: #fff; font-size: 16px;
}
.filter-label { font-size: 13px; color: var(--sub); margin: 12px 0 6px !important; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 14px; line-height: 1.3;
}
.chip small { color: var(--sub); margin-left: 3px; }
.chip[aria-pressed="true"] { background: var(--main); border-color: var(--main); color: #fff; font-weight: 700; }
.chip[aria-pressed="true"] small { color: #dbeafa; }
.chip[data-flag][aria-pressed="true"] { background: var(--second); border-color: var(--second); }
#flagNote { margin: 8px 0 0 !important; }
.count { font-weight: 700; margin: 16px 0 10px !important; font-size: 17px; }
.count b { font-family: var(--head); color: var(--main-dk); font-size: 22px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.when { font-weight: 700; color: var(--main-dk); font-size: 15px; margin-right: auto; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--zebra); color: var(--ink); white-space: nowrap; }
.tag-page { background: var(--ink); color: #fff; }
.tag-free { background: #e2f4ef; color: var(--second); font-weight: 700; }
.tag-now { background: var(--accent); color: var(--ink); font-weight: 700; }
.card h3 { font-family: var(--head); font-size: 17px; line-height: 1.5; margin: 2px 0 8px; }
.card dl { margin: 0; display: grid; grid-template-columns: 4em 1fr; font-size: 14px; }
.card dt { color: var(--sub); padding: 3px 0; }
.card dd { margin: 0; padding: 3px 0; }
.card .body { font-size: 14px; color: var(--sub); margin: 8px 0 0 !important; }
.check {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px;
  background: #fde3e5; color: var(--warn); font-weight: 700; font-size: 12px;
}
.unsure { margin-top: 8px; font-size: 13px; color: var(--sub); }
.unsure summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.unsure ul { margin: 4px 0 0; padding-left: 1.2em; }
.tel {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; min-height: 48px; border-radius: 10px;
  background: var(--main); color: #fff; font-weight: 700; text-decoration: none; font-size: 17px;
}
.tel:active { background: var(--main-dk); }
.no-tel { margin-top: 10px !important; font-size: 13px; color: var(--sub); }
mark.hit { background: #fff1b8; color: inherit; padding: 0; }

.empty { background: var(--paper); border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px 16px; text-align: center; }
.empty-head { font-weight: 700; font-size: 17px; }

/* はじめは6件だけ出し、残りはこのボタンで開く */
.btn-more {
  display: block; width: 100%; min-height: 52px; margin-top: 12px; padding: 8px 14px;
  border: 2px solid var(--main); border-radius: 10px; background: #fff;
  color: var(--main-dk); font-weight: 700; font-size: 16px; cursor: pointer;
}
.btn-more:active { background: var(--zebra); }

/* 5. 人がすること */
.roles { display: grid; gap: 12px; margin-top: 16px; }
.role { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--main); border-radius: var(--radius); padding: 4px 16px 6px; }
.role-human { border-top-color: var(--second); }
.role h3 { margin: 12px 0 6px; color: var(--main-dk); }
.role-human h3 { color: var(--second); }
.role ul, .caution ul { list-style: none; margin: 0 0 8px; padding: 0; }
.role li, .caution li { padding: 6px 8px; border-top: 1px solid var(--line); }
.role li:nth-child(even), .caution li:nth-child(even) { background: var(--zebra); }
.caution { background: #fff; border: 2px solid var(--accent); border-radius: var(--radius); padding: 4px 16px 6px; margin-top: 20px; }
.caution h3 { margin-top: 12px; }
.trial { margin-top: 20px !important; background: var(--paper); border-left: 5px solid var(--main); border-radius: 6px; padding: 12px 16px; font-weight: 700; }

.foot { background: var(--ink); color: #e9dfd0; padding: 24px 0 40px; font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot .small { color: #c9d3dd; }
.foot-maker { font-family: var(--head); font-weight: 700; font-size: 16px; color: #fff; }

/* 大きく見る */
.viewer { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: rgba(10, 22, 36, .94); color: #fff; }
.viewer::backdrop { background: rgba(10, 22, 36, .8); }
.viewer-bar { position: sticky; top: 0; left: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: rgba(10, 22, 36, .96); }
.viewer-bar p { margin: 0; font-weight: 700; }
.btn-close { min-height: 44px; min-width: 88px; border-radius: 8px; border: 0; background: var(--accent); color: var(--ink); font-weight: 700; cursor: pointer; }
.viewer-img { padding: 20px; overflow: auto; }
.photo-big { margin: 0 auto; }

/* 広い画面 */
@media (min-width: 720px) {
  .sample-bar { font-size: 14px; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 34px; }
  .steps a { font-size: 13px; flex-direction: row; gap: 6px; }
  .steps a span { margin-bottom: 0; }
  .sec h2 { font-size: 25px; }
  .pages { grid-template-columns: repeat(4, 1fr); }
  .read-demo { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .read-arrow::after { content: "→"; }
  .diffs { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .roles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .sample-bar { font-size: 12px; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
