/* fun-llc.jp 共通スタイル（2026-10 第2案「制図エディトリアル」）。数値の正本は DESIGN.md */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@500;700;800&family=Fraunces:ital,opsz,wght@1,9..144,500&family=Zen+Kaku+Gothic+New:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --paper: #F3EFE6;
  --paper-2: #FBF9F4;
  --ink: #1C2433;
  --ink-2: #5C6472;
  --line: #C9C2B2;
  --accent: #C8401E;
  --accent-ink: #F3EFE6;
  --ok: #2B6E63;
  --band: #1C2433;
  --band-ink: #F3EFE6;
  --band-ink-2: #B9B3A5;
  --ff-head: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --ff-latin: 'Fraunces', 'Shippori Mincho B1', Georgia, serif;
  --ff-body: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --max: 1240px;
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --grid: linear-gradient(var(--line) .75px, transparent .75px), linear-gradient(90deg, var(--line) .75px, transparent .75px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--ff-body); font-size: 17px; line-height: 1.9; font-feature-settings: "palt"; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--ff-head); font-weight: 700; line-height: 1.35; margin: 0; text-wrap: balance; letter-spacing: .02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper-2); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

.mono { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.num { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; }

/* ── ヘッダー ── */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); border-bottom: 1.5px solid var(--ink); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 11; background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand__mark { font-family: var(--ff-latin); font-style: italic; font-size: 26px; letter-spacing: 0; }
.brand__mark b { font-weight: 500; color: var(--accent); }
.brand__sub { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; font-size: 14px; padding: 10px 12px; }
.nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -1.5px 0 var(--ink); }
.nav a:not(.btn):hover { color: var(--accent); }
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1.5px solid var(--ink); padding: 8px var(--gut-r) 20px var(--gut); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: .75px solid var(--line); font-size: 16px; }
  .nav .btn { margin-top: 16px; border-bottom: 0; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1.5px solid var(--ink); background: transparent; font: inherit; font-family: var(--ff-mono); font-size: 12px; letter-spacing: .1em; color: var(--ink); cursor: pointer; padding: 0 14px; }
}

/* ── ボタン（CTA は1種類） ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 10px 26px; background: var(--accent); color: var(--accent-ink); font-family: var(--ff-body); font-weight: 700; font-size: 16px; letter-spacing: .04em; text-decoration: none; border: 1.5px solid var(--accent); }
.nav .btn { min-height: 42px; font-size: 14px; padding: 6px 18px; }
.btn::after { content: "→"; font-family: var(--ff-mono); transition: transform .2s ease; }
.btn:hover::after { transform: translateX(4px); }
.btn:hover { background: #B1361A; border-color: #B1361A; }
.link { color: var(--ink); text-underline-offset: 5px; text-decoration-thickness: .75px; }
.link:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ── 図番（セクション見出しの印） ── */
.fig { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.fig__no { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .12em; white-space: nowrap; }
.fig__no::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--accent); margin-right: 10px; vertical-align: 1px; }
.fig__rule { flex: 1; height: .75px; background: var(--line); position: relative; }
.fig__rule::before, .fig__rule::after { content: ""; position: absolute; top: -4px; width: .75px; height: 9px; background: var(--ink); }
.fig__rule::before { left: 0; } .fig__rule::after { right: 0; }
.fig__cap { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 560px) { .fig__cap { display: none; } }

.section { padding-block: 96px; }
.section + .section { border-top: .75px solid var(--line); }
.section__head { display: grid; gap: 14px; margin-bottom: 48px; max-width: 46em; }
.section__head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section__head p { color: var(--ink-2); max-width: 40em; }
.lead { font-size: 18px; line-height: 1.95; max-width: 36em; }
@media (max-width: 640px) { .section { padding-block: 64px; } .section__head { margin-bottom: 32px; } }

/* ── 紙（トンボ付きの面） ── */
.sheet { position: relative; }
.sheet > .mark { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.sheet > .mark::before, .sheet > .mark::after { content: ""; position: absolute; background: var(--ink); }
.sheet > .mark::before { left: 0; right: 0; top: 50%; height: .75px; }
.sheet > .mark::after { top: 0; bottom: 0; left: 50%; width: .75px; }
.sheet > .mark.tl { left: 6px; top: 6px; } .sheet > .mark.tr { right: 6px; top: 6px; }
.sheet > .mark.bl { left: 6px; bottom: 6px; } .sheet > .mark.br { right: 6px; bottom: 6px; }

/* ── ヒーロー ── */
.hero { background-image: var(--grid); background-size: 32px 32px; border-bottom: 1.5px solid var(--ink); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: end; padding-block: 72px 64px; }
.hero__text { display: grid; gap: 28px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.22; letter-spacing: .01em; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent); }
.nb { display: inline-block; }
/* 日本語の文節で折り返す（対応ブラウザのみ。未対応では無視される） */
h1, h2, h3, .lead, .notice b, .faq summary, .dimline b, .bom td.name, .price th { word-break: auto-phrase; }
@media (max-width: 880px) { br.pc { display: none; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.dims { display: flex; flex-wrap: wrap; gap: 0 32px; margin: 0; padding: 0; list-style: none; border-top: .75px solid var(--ink); padding-top: 10px; }
.dims li { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-2); position: relative; padding-left: 12px; }
.dims li::before { content: ""; position: absolute; left: 0; top: -11px; width: .75px; height: 8px; background: var(--ink); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 48px 48px; align-items: start; } .dims { gap: 6px 24px; } .dims li { padding-left: 0; } .dims li::before { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  .hero__text > *:nth-child(2) { animation-delay: .07s; }
  .hero__text > *:nth-child(3) { animation-delay: .14s; }
  .hero__text > *:nth-child(4) { animation-delay: .21s; }
  .hero__text > *:nth-child(5) { animation-delay: .28s; }
  .dims { animation: draw .9s cubic-bezier(.2,.7,.2,1) .3s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
}

/* ── 表題欄（図面のタイトルブロック） ── */
.tblock { background: var(--paper-2); border: 1.5px solid var(--ink); display: grid; }
.tblock__head { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1.5px solid var(--ink); align-items: baseline; }
.tblock__head b { font-family: var(--ff-head); font-size: 17px; font-weight: 700; }
.tblock__meta { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: .75px solid var(--line); }
.tblock__meta div { padding: 8px 16px; border-right: .75px solid var(--line); display: grid; gap: 0; }
.tblock__meta div:last-child { border-right: 0; }
.tblock__meta span { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-2); text-transform: uppercase; }
.tblock__meta b { font-family: var(--ff-mono); font-weight: 500; font-size: 13px; }
.tblock__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: .75px solid var(--line); font-size: 14px; }
.tblock__row:last-of-type { border-bottom: 0; }
.tblock__row span:first-child { color: var(--ink-2); }
.tblock__row span:last-child { font-family: var(--ff-mono); font-size: 13px; }
.is-bad { color: var(--accent); }
.is-good { color: var(--ok); }
.tblock__foot { padding: 12px 16px; border-top: .75px solid var(--line); font-size: 13px; color: var(--ink-2); }
.tblock__foot a { color: var(--ink); }

/* ── お知らせ帯 ── */
.notice { border-bottom: .75px solid var(--line); }
.notice .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 32px; align-items: center; padding-block: 22px; }
.notice__date { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .1em; color: var(--accent); white-space: nowrap; }
.notice b { font-family: var(--ff-head); font-size: 18px; display: block; }
.notice p { color: var(--ink-2); font-size: 14px; max-width: 56em; }
@media (max-width: 880px) { .notice .wrap { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ── サービス（3列・罫線区切り） ── */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.svc { padding: 28px 28px 32px 0; display: grid; gap: 14px; align-content: start; }
.svc:nth-child(2n) { padding-left: 28px; border-left: .75px solid var(--line); }
.svc:nth-child(n+3) { border-top: .75px solid var(--line); }
.svc__no { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .12em; color: var(--ink-2); }
.svc h3 { font-size: 26px; }
.svc p { color: var(--ink-2); font-size: 15px; }
.svc ul { margin: 0; padding: 0; list-style: none; font-size: 15px; display: grid; gap: 4px; }
.svc li { padding-left: 16px; position: relative; }
.svc li::before { content: ""; position: absolute; left: 0; top: .85em; width: 8px; height: .75px; background: var(--ink); }
.svc__price { font-family: var(--ff-mono); font-size: 13px; letter-spacing: .02em; border-top: .75px solid var(--line); padding-top: 12px; }
@media (max-width: 880px) {
  .services { grid-template-columns: minmax(0, 1fr); }
  .svc { padding: 28px 0; }
  .svc:nth-child(2n) { padding-left: 0; border-left: 0; }
  .svc + .svc { border-top: .75px solid var(--line); }
}

/* ── 寸法線（手順） ── */
.dimline { position: relative; list-style: none; margin: 0; padding: 36px 0 0; counter-reset: st; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.dimline::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: .75px; background: var(--ink); }
.dimline::after { content: ""; position: absolute; right: 0; top: 8px; width: 6px; height: 6px; border-top: .75px solid var(--ink); border-right: .75px solid var(--ink); transform: rotate(45deg); }
.dimline li { counter-increment: st; position: relative; display: grid; gap: 8px; align-content: start; padding-right: 16px; }
.dimline li::before { content: ""; position: absolute; left: 0; top: -30px; width: .75px; height: 12px; background: var(--ink); }
.dimline li::after { content: "STEP " counter(st, decimal-leading-zero); position: absolute; left: 8px; top: -36px; font-family: var(--ff-mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-2); background: var(--paper); padding: 0 6px; }
.dimline b { font-family: var(--ff-head); font-size: 22px; font-weight: 700; }
.dimline p { font-size: 15px; color: var(--ink-2); }
@media (max-width: 880px) {
  .dimline { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 0 0 28px; }
  .dimline::before { left: 8px; right: auto; top: 0; bottom: 0; width: .75px; height: auto; }
  .dimline::after { right: auto; left: 5px; top: auto; bottom: 0; transform: rotate(135deg); }
  .dimline li { padding: 0 0 32px; }
  .dimline li::before { left: -20px; top: .9em; width: 12px; height: .75px; }
  .dimline li::after { position: static; padding: 0; background: none; order: -1; }
}

/* ── 部品表（実績・一覧の表） ── */
.bom { width: 100%; border-collapse: collapse; border-top: 1.5px solid var(--ink); font-size: 15px; }
.bom th { text-align: left; font-family: var(--ff-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; color: var(--ink-2); padding: 12px 16px 10px 0; border-bottom: .75px solid var(--ink); text-transform: uppercase; }
.bom td { padding: 18px 16px 18px 0; border-bottom: .75px solid var(--line); vertical-align: top; }
.bom td.no { font-family: var(--ff-mono); font-size: 13px; width: 5em; color: var(--ink-2); white-space: nowrap; }
.bom td.kind { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .08em; width: 9em; white-space: nowrap; }
.bom td.name { font-family: var(--ff-head); font-weight: 700; font-size: 19px; width: 30%; }
.bom td.spec { color: var(--ink-2); font-size: 15px; }
.bom td.price { font-family: var(--ff-mono); font-size: 14px; white-space: nowrap; text-align: right; }
.ended { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .1em; border: .75px solid var(--ink-2); color: var(--ink-2); padding: 1px 6px; margin-left: 8px; vertical-align: 3px; white-space: nowrap; }
.tbl { overflow-x: auto; }
@media (max-width: 720px) {
  .bom thead { display: none; }
  .bom tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; padding: 16px 0; border-bottom: .75px solid var(--line); }
  .bom td { display: block; padding: 0; border: 0; }
  .bom td.no { grid-row: 1; }
  .bom td.kind { grid-column: 2; grid-row: 1; width: auto; }
  .bom td.name, .bom td.spec, .bom td.price { grid-column: 1 / -1; width: auto; text-align: left; }
  .bom td.name { margin-top: 4px; }
}

/* ── 料金表 ── */
.price { width: 100%; border-collapse: collapse; border-top: 1.5px solid var(--ink); }
.price th, .price td { text-align: left; padding: 18px 16px 18px 0; border-bottom: .75px solid var(--line); vertical-align: top; font-size: 15px; }
.price th { font-family: var(--ff-head); font-weight: 700; font-size: 18px; width: 32%; }
.price td.amount { font-family: var(--ff-mono); font-size: 15px; white-space: nowrap; width: 1%; text-align: right; padding-right: 0; }
.price td small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 4px; font-family: var(--ff-mono); letter-spacing: .02em; }
@media (max-width: 720px) {
  .price tr { display: grid; grid-template-columns: 1fr auto; padding: 16px 0; border-bottom: .75px solid var(--line); gap: 6px 16px; }
  .price th, .price td { display: block; padding: 0; border: 0; width: auto; }
  .price td:nth-child(2) { grid-column: 1 / -1; }
  .price td.amount { grid-column: 2; grid-row: 1; }
}

/* ── 2列の項目 ── */
.list2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; border-top: 1.5px solid var(--ink); }
.item { padding: 24px 0; border-bottom: .75px solid var(--line); display: grid; gap: 6px; align-content: start; }
.item h3 { font-size: 21px; }
.item p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .list2 { grid-template-columns: minmax(0, 1fr); } }

/* ── 会社概要（表題欄式） ── */
.profile { width: 100%; border-collapse: collapse; border: 1.5px solid var(--ink); background: var(--paper-2); }
.profile th, .profile td { text-align: left; padding: 16px 20px; border-bottom: .75px solid var(--line); vertical-align: top; font-size: 15px; }
.profile th { width: 10em; font-family: var(--ff-mono); font-weight: 500; font-size: 12px; letter-spacing: .1em; color: var(--ink-2); border-right: .75px solid var(--line); white-space: nowrap; }
.profile tr:last-child th, .profile tr:last-child td { border-bottom: 0; }
@media (max-width: 560px) { .profile th, .profile td { display: block; border-right: 0; } .profile th { padding-bottom: 2px; } .profile td { padding-top: 0; } }

/* ── FAQ ── */
.faq { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: .75px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-family: var(--ff-head); font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-family: var(--ff-mono); font-size: 20px; color: var(--ink-2); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 46em; font-size: 15px; }

/* ── フォーム ── */
.form { display: grid; gap: 22px; max-width: 760px; }
.form .row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 640px) { .form .row2 { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .1em; color: var(--ink-2); }
.field .req { color: var(--accent); margin-left: 8px; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper-2); border: .75px solid var(--ink); border-radius: 0; padding: 12px 14px; width: 100%; }
.field textarea { min-height: 200px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.form button.btn { cursor: pointer; justify-self: start; }
.hint { font-size: 13px; color: var(--ink-2); }

/* ── 本文 ── */
.prose { max-width: 44em; display: grid; gap: 16px; }
.prose h2 { font-size: 22px; margin-top: 28px; }
.prose ul { margin: 0; padding-left: 1.3em; }

/* ── ページ見出し ── */
.page-head { background-image: var(--grid); background-size: 32px 32px; border-bottom: 1.5px solid var(--ink); }
.page-head .wrap { display: grid; gap: 18px; padding-block: 64px 48px; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.25; }

/* ── 締めの CTA ── */
.cta { background: var(--band); color: var(--band-ink); }
.cta .wrap { padding-block: 88px; display: grid; gap: 22px; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.3; }
.cta p { color: var(--band-ink-2); max-width: 40em; }
.cta .row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.cta .mail { font-family: var(--ff-mono); color: var(--band-ink); font-size: 15px; user-select: all; }

/* ── フッター（図面枠） ── */
.site-footer { padding-block: 40px 32px; font-size: 14px; }
.site-footer .frame { border: 1.5px solid var(--ink); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.site-footer .cell { padding: 20px 24px; border-right: .75px solid var(--line); display: grid; gap: 8px; align-content: start; }
.site-footer .cell:last-child { border-right: 0; }
.site-footer h2 { font-family: var(--ff-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; color: var(--ink-2); text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer address { font-style: normal; color: var(--ink-2); line-height: 1.7; }
.site-footer .rev { grid-column: 1 / -1; border-top: 1.5px solid var(--ink); display: grid; grid-template-columns: repeat(4, 1fr); }
.site-footer .rev div { padding: 10px 24px; border-right: .75px solid var(--line); font-family: var(--ff-mono); font-size: 11px; letter-spacing: .08em; color: var(--ink-2); }
.site-footer .rev div:last-child { border-right: 0; }
.site-footer .rev b { display: block; color: var(--ink); font-weight: 500; font-size: 12px; }
@media (max-width: 760px) {
  .site-footer .frame { grid-template-columns: minmax(0, 1fr); }
  .site-footer .cell { border-right: 0; border-bottom: .75px solid var(--line); }
  .site-footer .rev { grid-template-columns: 1fr 1fr; }
  .site-footer .rev div:nth-child(2) { border-right: 0; }
}

/* ── お問い合わせフォームの補助 ── */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-note { border: 1.5px solid var(--accent); color: var(--ink); padding: 12px 16px; font-size: 15px; margin-bottom: 20px; max-width: 760px; }
