/* 仕事ごとの 静的な ページ(docs/criteria.md 25章。tools/pages.mjs が 使う)。色と 字は 3D の 本(styles.css の :root)と 同じ */
:root {
  --ink: #1f2a3d; --ink-soft: #4d5a70; --paper: #fbf5e9; --paper-2: #f1e6d1; --blue: #3a6ea5; --blue-deep: #243f66;
  --terra: #c8664a; --terra-deep: #a84a2f; --ochre: #d1a23c; --gold: #d9b25a; --cool: #e6edf4; --night: #16202f;
  --line: rgba(31, 42, 61, .16); --shadow: 0 1px 0 rgba(31, 42, 61, .10), 0 8px 24px rgba(12, 18, 28, .12);
  --font: "Zen Kaku Gothic New", "Yu Gothic", "Hiragino Sans", sans-serif;
  --font-display: "Shippori Mincho B1", "Zen Kaku Gothic New", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body.pg { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.8; font-feature-settings: "palt"; overflow-wrap: anywhere; }
.pg img { max-width: 100%; height: auto; display: block; }
.pg a { color: var(--blue-deep); text-underline-offset: 3px; }
.pg a:focus-visible, .pg-btn:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 6px; }
.pg-wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left)) 0 max(24px, env(safe-area-inset-right)); }
.pg-narrow { max-width: 800px; }
.pg-skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 16px; background: var(--paper); color: var(--ink); font-weight: 700; border-radius: 8px; }
.pg-skip:focus { top: 10px; }

/* 上の 帯 */
.pg-top { position: sticky; top: 0; z-index: 20; background: var(--blue-deep); color: #fff; box-shadow: 0 2px 10px rgba(12, 18, 28, .25); }
.pg-top-in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.pg-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; font-family: var(--font-display); font-size: 20px; letter-spacing: .06em; white-space: nowrap; min-height: 44px; }
.pg-brand img { border-radius: 6px; }
.pg-nav { display: flex; gap: 4px; margin-left: auto; }
.pg-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: #fff !important; font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 8px; }
.pg-nav a:hover { background: rgba(255, 255, 255, .12); }

/* ボタン(本の 見積もりの ボタンと 同じ 色) */
.pg-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.pg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 26px; font-weight: 700; font-size: 16px; letter-spacing: .04em; text-decoration: none; background: #fff; color: var(--blue-deep) !important; border: 2px solid var(--blue-deep); white-space: nowrap; }
.pg-btn:hover { background: var(--cool); }
.pg-btn-main { background: var(--terra-deep); border-color: var(--terra-deep); color: var(--paper) !important; box-shadow: var(--shadow); }
.pg-btn-main:hover { background: #9e4329; }
.pg-btn .pg-ico { width: 20px; height: 20px; }
.pg-top-cta { min-height: 44px; padding: 0 18px; font-size: 15px; border-color: var(--terra-deep); }
.pg-ico { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* 現在地 */
.pg-crumb ol { list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); }
.pg-crumb li { display: inline-flex; align-items: center; }
.pg-crumb li + li::before { content: "›"; margin: 0 8px; color: var(--ink-soft); }
.pg-crumb a { display: inline-flex; align-items: center; min-height: 44px; }

/* 最初の 画面 */
.pg-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 40px; align-items: center; padding: 18px 0 8px; }
.pg-kicker { margin: 0; color: var(--terra-deep); font-weight: 700; letter-spacing: .12em; font-size: 15px; }
.pg h1 { margin: 6px 0 0; font-family: var(--font-display); font-size: 42px; line-height: 1.25; letter-spacing: .04em; color: var(--blue-deep); word-break: auto-phrase; text-wrap: balance; }
.pg-h1sub { display: block; margin-top: 10px; font-family: var(--font); font-size: 18px; letter-spacing: .04em; color: var(--ink-soft); }
.pg-lead { margin: 18px 0 0; font-size: 19px; line-height: 1.85; }
.pg-badge { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 22px 0 0; padding: 10px 18px; background: #fff; border-radius: 14px; box-shadow: inset 4px 0 0 var(--ochre), var(--shadow); }
.pg-badge-l { display: inline-flex; gap: 10px; align-items: baseline; }
.pg-badge-v { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.pg-badge-plan { font-weight: 700; color: var(--ink-soft); font-size: 15px; }
.pg-badge-per { font-size: 15px; color: var(--ink-soft); }
.pg-badge strong { font-size: 30px; line-height: 1.2; color: var(--blue-deep); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pg-tax { font-size: 14px; color: var(--ink-soft); }
.pg-hero-fig { margin: 0; }
.pg-hero-fig img { width: 100%; border-radius: 16px; box-shadow: var(--shadow); background: var(--paper-2); }
.pg-hero-fig figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-soft); text-align: center; }
.pg-hero-hub { grid-template-columns: 1fr; padding-bottom: 0; }

/* 節 */
.pg-sec { margin-top: 64px; }
.pg h2 { margin: 0 0 20px; font-family: var(--font-display); font-size: 30px; line-height: 1.35; letter-spacing: .05em; color: var(--blue-deep); display: flex; align-items: center; gap: 14px; }
.pg h2::before { content: ""; width: 6px; height: 1.05em; border-radius: 3px; background: var(--ochre); flex: none; }

/* 流れ(図: アイコン と 矢印。段の 字は flow.js) */
.pg-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 28px; }
.pg-flow-3 { --n: 3; } .pg-flow-4 { --n: 4; } .pg-flow-5 { --n: 5; }
.pg-flow li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 14px 18px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.pg-flow li:not(:last-child)::after { content: ""; position: absolute; right: -22px; top: 50%; width: 16px; height: 16px; border-top: 3px solid var(--ochre); border-right: 3px solid var(--ochre); transform: translateY(-50%) rotate(45deg); }
.pg-flow-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--cool); color: var(--blue-deep); }
.pg-flow-ico .pg-ico { width: 34px; height: 34px; }
.pg-flow-n { margin-top: 10px; font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--terra-deep); }
.pg-flow-n::before { content: "STEP "; }
.pg-flow-t { margin-top: 2px; font-weight: 700; font-size: 18px; line-height: 1.5; }
.pg-flow-note { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* 料金(段の カード。違う 項目だけ カードに、同じ 項目は 下に 1回) */
.pg-asof { margin: -8px 0 16px; font-size: 15px; color: var(--ink-soft); }
.pg-plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 20px; }
.pg-plans-1 { --n: 1; max-width: 720px; } .pg-plans-2 { --n: 2; max-width: 820px; } .pg-plans-3 { --n: 3; }
.pg-plan { padding: 22px 22px 18px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); border-top: 6px solid var(--blue); }
.pg-plan:nth-child(2) { border-top-color: var(--terra); } .pg-plan:nth-child(3) { border-top-color: var(--sage, #5a9b7e); }
.pg-plan h3 { margin: 0; font-size: 20px; line-height: 1.5; }
.pg-plan-price { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.pg-plan-price strong { font-size: 32px; line-height: 1.2; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.pg-per { font-size: 16px; color: var(--ink-soft); font-weight: 700; }
.pg-plan-min { display: inline-block; margin: 8px 0 0; padding: 2px 12px; border-radius: 999px; background: var(--paper-2); font-size: 14px; font-weight: 700; }
.pg-plan-cells { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.pg-plan-cells li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.pg-k { color: var(--ink-soft); font-size: 14px; font-weight: 700; margin-right: 8px; }
.pg-plan-notes { margin: 10px 0 0; padding-left: 1.2em; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.pg-common { margin: 18px 0 0; padding: 10px 16px; background: var(--paper-2); border-radius: 10px; font-size: 16px; }
.pg-include { margin: 14px 0 0; font-size: 16px; }
.pg-notes { margin: 14px 0 0; padding-left: 1.3em; font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.pg-yearly { margin: 10px 0 0; font-size: 15px; color: var(--ink-soft); }
.pg-cancel { margin: 14px 0 0; padding: 10px 16px; border-radius: 10px; background: var(--paper-2); font-size: 16px; line-height: 1.75; box-shadow: inset 4px 0 0 var(--ochre); }

/* 当日の 時間割(帯の 長さ と 位置は 分。合計 180) */
.pg-tt { list-style: none; margin: 0; padding: 18px 20px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.pg-tt li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 3.5em; align-items: center; gap: 14px; }
.pg-tt-what { font-size: 16px; line-height: 1.5; }
.pg-tt-track { position: relative; height: 22px; background: var(--paper); border-radius: 6px; }
.pg-tt-bar { position: absolute; top: 0; bottom: 0; left: calc(var(--s) / var(--total) * 100%); width: calc(var(--m) / var(--total) * 100%); background: var(--blue); border-radius: 6px; }
.pg-tt-break .pg-tt-bar { background: #b9c1cc; }
.pg-tt-break .pg-tt-what { color: var(--ink-soft); }
.pg-tt-min { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.pg-tt-sum { margin: 10px 0 0; text-align: right; font-weight: 700; }

/* 作品 */
.pg-works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.pg-work { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.pg-work-pic { background: var(--night); display: grid; place-items: center; aspect-ratio: 16 / 9; min-height: 0; overflow: hidden; }
.pg-work-pic img { width: 100%; height: 100%; object-fit: cover; }
.pg-work-pic img.pg-tall { width: auto; max-width: 100%; height: 100%; object-fit: contain; }
.pg-work-text { padding: 16px 20px 18px; }
.pg-work h3 { margin: 0; font-size: 18px; line-height: 1.55; }
.pg-work ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 15px; line-height: 1.7; color: var(--ink-soft); }

/* 見積もりの 帯 */
.pg-band { margin-top: 72px; padding: 36px 32px; border-radius: 20px; background: var(--blue-deep); color: #fff; text-align: center; }
.pg-band h2 { color: #fff; justify-content: center; margin-bottom: 10px; }
.pg-band h2::before { display: none; }
.pg-band p { margin: 0 auto; max-width: 40em; }
.pg-band .pg-btns { justify-content: center; }
.pg-band .pg-btn:not(.pg-btn-main) { background: transparent; color: #fff !important; border-color: #fff; }
.pg-band .pg-btn:not(.pg-btn-main):hover { background: rgba(255, 255, 255, .12); }

/* ほかの 仕事(表紙の 8つの 入口と 同じ 写真) */
.pg-others { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pg-others a { position: relative; display: grid; grid-template-rows: auto auto 1fr; height: 100%; background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--ink) !important; }
.pg-others a:hover .pg-o-name { color: var(--terra-deep); }
.pg-others img { width: 100%; aspect-ratio: 480 / 375; object-fit: cover; }
.pg-o-no { position: absolute; left: 10px; top: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-deep); color: #fff; font-weight: 700; font-size: 15px; }
.pg-o-name { padding: 10px 14px 0; font-weight: 700; font-size: 17px; line-height: 1.5; }
.pg-o-price { padding: 2px 14px 14px; font-size: 15px; color: var(--ink-soft); }
.pg-o-price small { font-size: 14px; }
.pg-hub-asof { margin-top: 18px; }
.pg-tile-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); }

/* 取引の 条件などの ページ(legal.js の 文) */
.pg-legal { margin-top: 18px; padding: 28px 32px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.pg-legal h1 { font-size: 36px; margin-bottom: 18px; }
.pg-legal h3 { margin: 24px 0 6px; font-size: 18px; line-height: 1.6; }
.pg-legal p, .pg-legal dt, .pg-legal dd { margin: 0; font-size: 16px; line-height: 1.8; }
.pg-legal p + p { margin-top: 8px; }
.pg-legal .lead, .pg-legal dt { font-weight: 700; }
.pg-legal dl { margin: 10px 0; display: grid; gap: 10px; }
.pg-legal dl > div { padding: 10px 14px; background: var(--paper); border-radius: 10px; }
.pg-legal .pg-asof { margin-top: 16px; }
.pg-legal-nav { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 16px; }
.pg-legal-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* 下 */
.pg-foot { margin-top: 72px; padding: 32px 0 40px; background: var(--night); color: #dfe5ee; }
.pg-foot-brand { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; color: #fff; }
.pg-foot-brand img { border-radius: 5px; }
.pg-foot-note { margin: 10px 0 0; font-size: 15px; }
.pg-foot-nav { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 10px; }
.pg-foot-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #fff !important; font-weight: 700; font-size: 15px; }
.pg-sticky { display: none; }

@media (max-width: 960px) {
  /* 1列: 題 → 値段 → 絵 → できること → ボタン(最初の 画面に 題と 値段と 絵) */
  .pg-hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .pg-hero-text { display: contents; }
  .pg-kicker { order: 1; } .pg-hero h1 { order: 2; } .pg-badge { order: 3; align-self: flex-start; } .pg-hero-fig { order: 4; margin-top: 20px; } .pg-lead { order: 5; } .pg-hero .pg-btns { order: 6; }
  .pg-hero-hub .pg-hero-text { display: block; }
  .pg-flow { grid-template-columns: 1fr; gap: 26px; max-width: 560px; }
  .pg-flow li { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; column-gap: 14px; padding: 14px 18px; }
  .pg-flow li:not(:last-child)::after { right: auto; left: 50px; top: auto; bottom: -21px; transform: rotate(135deg); }
  .pg-flow-ico { width: 54px; height: 54px; flex: none; }
  .pg-flow-ico .pg-ico { width: 28px; height: 28px; }
  .pg-flow-n { margin-top: 0; }
  .pg-flow-t { flex: 1 1 8em; margin-top: 0; }
  .pg-flow-note { flex-basis: 100%; margin: 4px 0 0 68px; }
  .pg-plans-3 { --n: 1; max-width: 560px; } .pg-plans-2 { --n: 1; max-width: 560px; }
  .pg-others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body.pg { font-size: 16px; padding-bottom: 76px; }
  .pg-wrap { padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }
  .pg-top-in { min-height: 56px; gap: 8px; }
  .pg-brand { font-size: 17px; }
  .pg-nav a { padding: 0 8px; font-size: 14px; }
  .pg-top-cta { display: none; }
  .pg h1 { font-size: 32px; }
  .pg-h1sub { font-size: 16px; }
  .pg-lead { font-size: 17px; }
  .pg-badge strong { font-size: 26px; }
  .pg-btns .pg-btn { flex: 1 1 100%; }
  .pg-hero .pg-btns { display: none; } /* 下の 帯(.pg-sticky)に 同じ 2つ */
  .pg-badge { margin-top: 14px; padding: 8px 14px; }
  .pg h2 { font-size: 24px; }
  .pg-sec { margin-top: 48px; }
  .pg-plan-price strong { font-size: 28px; }
  .pg-tt { padding: 14px; }
  .pg-tt li { grid-template-columns: minmax(0, 1fr) 3.5em; row-gap: 4px; }
  .pg-tt-track { grid-column: 1 / -1; grid-row: 2; height: 16px; }
  .pg-works { grid-template-columns: 1fr; }
  .pg-others { gap: 12px; }
  .pg-o-name { font-size: 15px; padding: 8px 10px 0; }
  .pg-o-price { padding: 0 10px 10px; font-size: 14px; }
  .pg-band { padding: 28px 18px; }
  .pg-legal { padding: 20px 16px; }
  .pg-legal h1 { font-size: 28px; }
  .pg-sticky { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(251, 245, 233, .96); box-shadow: 0 -2px 12px rgba(12, 18, 28, .18); }
  .pg-sticky .pg-btn { flex: 1 1 0; min-height: 50px; padding: 0 10px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
