/* Fubako 紹介ページ。配色・書体・レイアウトは docs/design-site.md に従う */

@font-face { font-family: 'Shippori Mincho'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/shippori-mincho-600.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho'; font-weight: 800; font-style: normal; font-display: swap; src: url('/fonts/shippori-mincho-800.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans JP'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/noto-sans-jp-400.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans JP'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/noto-sans-jp-500.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans JP'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/noto-sans-jp-700.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --washi: #F7F3EC;       /* 地の色 */
  --urushi: #1E1915;      /* 文字・漆の面 */
  --sumi: #5C524A;        /* 補助の文字 */
  --shu: #A8361F;         /* 朱：押せるものと、ごく一部の強調 */
  --shu-deep: #8E2C18;    /* 深朱 */
  --kinari: #EFE7DC;      /* 区切りの面・カード */
  --gofun: #DDD2C4;       /* 線 */
  --on-urushi: #F3EDE4;   /* 漆の面の上の文字 */
  --aka-shu: #D97A5A;     /* 漆の面の上の朱 */
  --radius-btn: 8px;
  --radius-card: 12px;
  --font-head: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', serif;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', Meiryo, system-ui, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;
  --pad-y: clamp(64px, 9vw, 104px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--washi);
  color: var(--urushi);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.85;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
  text-align: left;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.5; margin: 0; }
h1 { font-weight: 800; font-size: clamp(36px, 5.2vw, 60px); line-height: 1.35; letter-spacing: .01em; }
h2 { font-weight: 800; font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 19px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--shu); text-underline-offset: 3px; }
a:hover { color: var(--shu-deep); }
img { max-width: 100%; height: auto; display: block; }
code, pre { font-family: var(--font-mono); }

/* キーボードで操作するときの、フォーカスの位置（朱の輪郭線） */
:focus-visible { outline: 3px solid var(--shu); outline-offset: 3px; border-radius: 4px; }
.lacquer :focus-visible { outline-color: var(--aka-shu); }

.skip { position: absolute; left: -9999px; top: 0; z-index: 20; background: var(--urushi); color: var(--on-urushi); padding: 10px 16px; }
.skip:focus { left: 8px; top: 8px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.top { position: sticky; top: 0; z-index: 10; background: rgba(247, 243, 236, .94); border-bottom: 1px solid var(--gofun); backdrop-filter: blur(6px); }
.top-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--urushi); text-decoration: none; margin-right: auto; }
.logo:hover { color: var(--urushi); }
.logo .mark { color: var(--urushi); flex: none; }
.logo-text { font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.top-nav { display: flex; gap: 22px; }
.top-nav a { color: var(--urushi); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 0; }
.top-nav a:hover { color: var(--shu); text-decoration: underline; text-underline-offset: 6px; }

/* ボタン：高さは最低 48px。主なボタンは朱の背景に白い文字 */
.btn {
  appearance: none; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-btn);
  display: inline-flex; align-items: center; justify-content: center; line-height: 1.3; text-align: center;
  border: 1px solid var(--gofun); background: var(--washi); color: var(--urushi);
}
.btn:hover { border-color: var(--sumi); color: var(--urushi); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--shu); border-color: var(--shu); color: #fff; }
.btn-primary:hover { background: var(--shu-deep); border-color: var(--shu-deep); color: #fff; }
.btn-sm { font-size: 14px; padding: 0 16px; }

/* ヒーロー */
.hero { padding: clamp(36px, 6vw, 72px) 0 var(--pad-y); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1.6; padding: 1px 12px; border: 1px solid var(--sumi); border-radius: 999px; color: var(--sumi); letter-spacing: .12em; }
.hl { color: var(--shu); }
.ph { display: inline-block; }
.lead { font-size: 17.5px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.note { font-size: 14px; color: var(--sumi); max-width: 32em; line-height: 1.75; }
.hero-art { min-width: 0; }
.hako { width: 112%; margin-left: -6%; height: auto; display: block; overflow: visible; }
.hako-shadow { fill: rgba(30, 25, 21, .10); }

/* 文箱の絵：ふだんは、蓋が少し開いた状態。動きを減らす設定のときは、そのまま止める */
.lid { transform: translate(0, -56px) rotate(-3deg); transform-origin: 506px 208px; }
.ledger { transform: translate(0, 0); }
@media (prefers-reduced-motion: no-preference) {
  .lid { animation: lid-open .9s cubic-bezier(.2, .7, .2, 1) .25s both; }
  .ledger { animation: ledger-rise .9s cubic-bezier(.2, .7, .2, 1) .25s both; }
}
@keyframes lid-open { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(0, -56px) rotate(-3deg); } }
@keyframes ledger-rise { from { transform: translate(0, 56px); } to { transform: translate(0, 0); } }

/* 節 */
.block { padding: var(--pad-y) 0; }
.block.alt { background: var(--kinari); }
.block-title { margin-bottom: 20px; }
.block-lead { max-width: 40em; color: var(--sumi); margin-bottom: 36px; }
.block-narrow .prose { max-width: 760px; font-size: 18px; }
.prose-wide { max-width: 760px; }
.prose-wide + .prose-wide, .prose-wide + .sub { margin-top: 18px; }
.small { font-size: 14px; color: var(--sumi); }
.sub { margin: 36px 0 14px; }

/* カード */
.cards { list-style: none; display: grid; gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--washi); border: 1px solid var(--gofun); border-radius: var(--radius-card); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.block.alt .card { background: var(--washi); }
.block:not(.alt) .card { background: var(--kinari); }
.tag { font-size: 14px; font-weight: 700; color: var(--sumi); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dots { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.dots li { position: relative; padding-left: 1.2em; }
.dots li::before { content: ''; position: absolute; left: .25em; top: .85em; width: 6px; height: 6px; border-radius: 50%; background: var(--sumi); }

/* 漆の面：1 ページに 2 か所まで（ヒーローの文箱と、この暗号文の帯） */
.lacquer { margin-top: 28px; background: var(--urushi); color: var(--on-urushi); border-radius: var(--radius-card); padding: 26px; }
.lacquer-caption { font-size: 14px; opacity: .88; margin-bottom: 12px; }
.cipher { margin: 0; font-size: clamp(13px, 1.9vw, 17px); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--on-urushi); }
.cipher-mark, .cipher-ver { color: var(--aka-shu); }
.more { margin-top: 20px; max-width: 760px; }
.more summary, .faq summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.more p { margin-top: 8px; color: var(--sumi); font-size: 15px; }

/* 表 */
.table-wrap { max-width: 900px; overflow-x: auto; }
.roles { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--washi); border: 1px solid var(--gofun); border-radius: var(--radius-card); overflow: hidden; }
.roles th, .roles td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--gofun); vertical-align: top; }
.roles tbody tr:last-child th, .roles tbody tr:last-child td { border-bottom: 0; }
.roles thead th { font-size: 14px; color: var(--sumi); background: var(--kinari); }
.roles tbody th { width: 11em; font-weight: 700; white-space: nowrap; }

/* 使い方 */
.cases { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 28px; max-width: 760px; }
.cases li { border-left: 3px solid var(--gofun); padding-left: 16px; }
.shots { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 24px; align-items: end; }
.shot img { border: 1px solid var(--gofun); border-radius: var(--radius-card); background: #fff; }
.shots figcaption { grid-column: 1 / -1; font-size: 14px; color: var(--sumi); }

/* はじめかた：番号は、ここだけに使う */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li { counter-increment: step; position: relative; background: var(--washi); border: 1px solid var(--gofun); border-radius: var(--radius-card); padding: 26px 26px 26px; display: flex; flex-direction: column; gap: 10px; }
.steps li::before { content: counter(step); font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; color: var(--shu); }

/* アンケート */
.survey { margin-top: 28px; max-width: 760px; display: flex; flex-direction: column; gap: 26px; }
.q { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.q legend, .q-label { font-weight: 700; font-size: 16px; padding: 0; margin-bottom: 6px; }
.opt { display: flex; gap: 12px; align-items: center; min-height: 48px; cursor: pointer; }
.opt input { width: 22px; height: 22px; flex: none; accent-color: var(--shu); margin: 0; }
.opt-strong { font-weight: 700; }
.hint { font-size: 14px; color: var(--sumi); line-height: 1.75; margin-top: 4px; }
select, input[type=email] { font: inherit; width: 100%; max-width: 440px; min-height: 48px; padding: 10px 14px; color: var(--urushi); background: #fff; border: 1px solid var(--gofun); border-radius: var(--radius-btn); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { border: 1px solid var(--shu); background: #fbeee9; border-radius: var(--radius-btn); padding: 12px 14px; }
.survey-done { margin-top: 24px; max-width: 760px; background: var(--kinari); border: 1px solid var(--gofun); border-radius: var(--radius-card); padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.survey-done[hidden], .form-error[hidden], .survey[hidden] { display: none; }
.mail-text { font-family: var(--font-mono); font-size: .95em; }

/* よくある質問 */
.faq { max-width: 760px; display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--gofun); padding: 4px 0; }
.faq details:first-child { border-top: 1px solid var(--gofun); }
.faq details p { padding: 4px 0 18px; }

/* フッター */
.site-footer { border-top: 1px solid var(--gofun); padding: 40px 0 56px; color: var(--sumi); font-size: 14px; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--sumi); }

/* 文書のページ（プライバシーポリシー・お礼） */
.doc { padding: clamp(40px, 6vw, 80px) 0 var(--pad-y); }
.doc .wrap { max-width: 800px; display: flex; flex-direction: column; gap: 18px; }
.doc h2 { font-size: 24px; margin-top: 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--gofun); padding: 10px 12px; vertical-align: top; }
.doc thead th { background: var(--kinari); }
.doc .meta { font-size: 14px; color: var(--sumi); }

/* タブレット・スマホ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .hako { width: 100%; margin-left: 0; }
  .cards-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top-nav { display: none; }
  .cards-2, .two { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shot-phone { max-width: 260px; }
  .card, .steps li { padding: 20px; }
  .lacquer { padding: 20px; }
  .roles tbody th { width: auto; white-space: normal; }
  .roles th, .roles td { padding: 12px; }
  body { font-size: 16px; }
}
@media (max-width: 420px) {
  .top-inner .btn-sm { padding: 0 12px; font-size: 13px; }
  .logo-text { font-size: 20px; }
}

/* なぜ作ったか：もやもやの吹き出し（文字だけの、静かな吹き出し。左右にずらして並べる） */
.bubbles { list-style: none; display: flex; flex-direction: column; gap: 30px; max-width: 880px; margin: 0 0 44px; }
.bubble { position: relative; align-self: flex-start; max-width: min(34em, 86%); background: var(--kinari); border: 1px solid var(--gofun); border-radius: 28px; padding: 16px 26px; }
.bubble p { font-size: 17px; line-height: 1.75; }
.bubble::before, .bubble::after { content: ''; position: absolute; border-radius: 50%; background: var(--kinari); border: 1px solid var(--gofun); }
.bubble::after { width: 15px; height: 15px; left: 26px; bottom: -17px; }
.bubble::before { width: 8px; height: 8px; left: 14px; bottom: -28px; }
.bubble-r { align-self: flex-end; }
.bubble-r::after { left: auto; right: 26px; }
.bubble-r::before { left: auto; right: 14px; }
.bubble-key { border-color: var(--sumi); background: var(--washi); border-width: 2px; }
.bubble-key::before, .bubble-key::after { background: var(--washi); border-color: var(--sumi); border-width: 1px; }
.why-answer { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 760px) {
  .bubble { max-width: 94%; padding: 14px 20px; }
  .bubble p { font-size: 16px; }
  .bubbles { gap: 28px; }
}
