/* ユウゲンガイシャ めじゅ 販売・ご利用案内
   色は docs/共通デザインルール_v1.md の採用パレットに合わせています。
   装飾は増やさない（モリモリ禁止）。 */

/* 見出し用の書体 Klee One の @font-face は fonts/klee-one.css（node build.mjs が自動で作る）にあります */

:root {
  --bg: #F4EEE2;        /* ページ背景 */
  --panel: #EDE4D3;     /* カード・情報欄 */
  --text: #3B3127;      /* 本文 */
  --moss: #4E5B3F;      /* 見出し・主要ボタン */
  --line: #8C6F4A;      /* 罫線・控えめな装飾（小さな文字には使わない） */
  --alert: #8A4B3C;     /* 重要事項・注意書き */
  --line-soft: rgba(140, 111, 74, .35);
  --paper: #FAF6EE;     /* 表の偶数行などのわずかな明るさ */
  --card-paper: #FDEDDD;/* 入口カードの地：カード画像の背景色（実測）に合わせる */

  /* 見出しの書体：Klee One（ページタイトル・キャッチコピー・セクション見出し・入口カードのタイトル） */
  --font-head: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "BIZ UDPMincho", serif;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", sans-serif;

  --header-h: 64px;
  --wrap: 1040px;
  --text-wrap: 820px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "palt" 0;
}
@media (min-width: 900px) { body { font-size: 17px; } }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--moss); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--moss); line-height: 1.45; font-weight: 600; }
/* 小見出し（h4）と料金の数字は本文の書体で読みやすく */
h4, .plan-price { font-family: var(--font-body); }
strong { font-weight: 700; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 238, 226, .96);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 16px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; flex: none; border-radius: 50%; }  /* ロゴ画像の四隅（円の外）を表示しない */
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-name { font-size: 12px; letter-spacing: .04em; }
.brand-sub { font-family: var(--font-head); color: var(--moss); font-size: 16px; font-weight: 600; white-space: nowrap; }
.header-side { display: flex; align-items: center; gap: 14px; text-align: right; }
.updated { margin: 0; font-size: 13px; }
.toc-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px;
  background: var(--moss); color: #fff; text-decoration: none;
  border-radius: 999px; font-size: 14px; font-weight: 700;
}
@media (max-width: 599px) {
  .header-side { flex-direction: column-reverse; align-items: flex-end; gap: 2px; }
  .updated { font-size: 11px; line-height: 1.2; }
  .toc-button { min-height: 36px; padding: 0 14px; font-size: 13px; }
  .brand-logo { width: 38px; height: 38px; }
}

/* ---------- 公開前の印 ---------- */
.draft-banner {
  max-width: var(--wrap); margin: 12px auto 0; padding: 10px 16px;
  border: 2px dashed var(--alert); color: var(--alert); background: var(--paper);
  font-size: 14px; border-radius: var(--radius);
}
@media (max-width: 1071px) { .draft-banner { margin: 12px 16px 0; } }
.pending {
  display: inline-block; margin: 4px 0 0 4px; padding: 0 8px;
  border: 1px dashed var(--alert); color: var(--alert); background: var(--paper);
  font-size: 13px; line-height: 1.7; border-radius: 4px;
}
.pending::before { content: "！"; font-weight: 700; }

/* ---------- ファーストビュー ---------- */
.hero { padding: 16px 16px 0; }
.hero-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; gap: 20px;
}
.hero h1 { font-size: clamp(30px, 6.4vw, 44px); margin: 0 0 4px; letter-spacing: .04em; word-break: keep-all; overflow-wrap: anywhere; }
.hero-sub { font-family: var(--font-head); color: var(--moss); margin: 0 0 14px; font-size: 1.05em; word-break: keep-all; overflow-wrap: anywhere; }
.hero-text p { margin: 0 0 10px; }
.hero-points { list-style: none; padding: 12px 16px; margin: 14px 0 0; background: var(--panel); border-radius: var(--radius); }
.hero-points li { padding-left: 1.1em; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: .8em; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.hero-media { width: 100%; border-radius: var(--radius); }
@media (max-width: 899px) {
  .hero-visual { order: -1; }   /* スマホ・タブレットでは絵を先に */
}
@media (min-width: 900px) {
  .hero { padding: 24px 16px 0; }
  /* 画像を上に寄せ、見出しの高さから始める（見出しと画像の重心をそろえる）。
     要点3つは画像の下に置き、左右の列の高さをそろえて余白を減らす */
  .hero-inner {
    grid-template-columns: 5fr 7fr; grid-template-areas: "text visual" "text points";
    grid-template-rows: auto 1fr; align-items: start; gap: 14px 32px;
  }
  .hero-text { grid-area: text; }
  .hero-visual { grid-area: visual; padding-top: 6px; }
  .hero-points { grid-area: points; margin: 0; }
}

/* ---------- 共通の見出し・本文幅 ---------- */
.entries, .product, .guide, .history {
  max-width: var(--text-wrap); margin: 0 auto; padding: 36px 16px 8px;
}
.entries { max-width: var(--wrap); }
.section-title { font-size: clamp(22px, 4.6vw, 28px); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.product-num { margin: 0; font-size: 13px; letter-spacing: .08em; color: var(--text); }
.sub-title { font-size: 19px; margin: 28px 0 10px; }
.lead { margin: 0 0 12px; }
.links a { margin-right: .6em; white-space: nowrap; }
.small, .small-list { font-size: 14.5px; }
.caution { color: var(--alert); font-weight: 700; }
.back { margin: 24px 0 0; text-align: right; font-size: 14px; }
.back a::before { content: "↑ "; }

/* ---------- 入口カード（2列×3段） ---------- */
.entries-lead { margin: 0 0 16px; }
/* 6枚を同じ大きさに（grid-auto-rows: 1fr で各段の高さをそろえる）。
   カードの地を画像の背景色に合わせ、画像の枠線や色の差を出さない */
.entry-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px;
}
.entry { display: flex; }
.entry-link {
  flex: 1; display: flex; flex-direction: column;
  background: var(--card-paper); border: 1px solid var(--line-soft); border-radius: var(--radius);
  color: var(--text); text-decoration: none; overflow: hidden;
}
.entry-link:hover { border-color: var(--line); }
.entry-media {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9; background: var(--card-paper); overflow: hidden; flex: none;
}
.entry-media img { width: 100%; height: 100%; object-fit: contain; }
.entry-text {
  display: flex; flex-direction: column; flex: 1; min-width: 0;
  padding: 2px 12px 12px; line-height: 1.5;
  word-break: keep-all; overflow-wrap: anywhere;  /* 単語の途中で切らない（区切りは <wbr> の位置） */
}
.entry-num { font-size: 12px; letter-spacing: .12em; color: var(--line); font-weight: 700; }
.entry-title { font-family: var(--font-head); color: var(--moss); font-weight: 600; font-size: 16px; line-height: 1.4; margin-top: 2px; }
.entry-desc { font-size: 13.5px; margin-top: 4px; line-height: 1.55; }
.entry-meta {
  font-size: 13.5px; font-weight: 700; margin-top: auto; padding-top: 8px;
}
@media (max-width: 599px) {
  .entry-desc { display: none; }  /* 狭い画面では番号・名前・価格だけ */
  .entry-title { font-size: 15.5px; }
}
@media (min-width: 700px) {
  .entry-grid { gap: 16px; }
  .entry-link { flex-direction: row; align-items: center; }
  .entry-media { flex: 0 0 42%; aspect-ratio: 16 / 9; align-self: center; }
  .entry-text { align-self: stretch; justify-content: center; padding: 14px 18px 14px 4px; }
  .entry-title { font-size: 19px; }
  .entry-meta { margin-top: 0; padding-top: 10px; }
}
/* タブレット幅：画像を少し大きく、文字をひとまわり小さく（カードを縦長にしない） */
@media (min-width: 700px) and (max-width: 899px) {
  .entry-media { flex-basis: 48%; }
  .entry-text { padding: 10px 14px 10px 2px; }
  .entry-title { font-size: 17px; }
  .entry-desc { font-size: 13px; }
  .entry-meta { font-size: 13px; padding-top: 6px; }
}

/* ---------- 要点（項目／内容） ---------- */
.facts { margin: 12px 0 16px; border-top: 1px solid var(--line-soft); }
.facts > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
@media (max-width: 599px) {
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .facts dt { font-size: 14px; color: var(--moss); }
}

/* ---------- 注意の囲み（返金の要点など：常に表示） ---------- */
.notice-box {
  margin: 16px 0; padding: 14px 18px;
  background: var(--paper); border: 1px solid var(--alert); border-left-width: 5px; border-radius: var(--radius);
}
.notice-box h3 { color: var(--alert); font-size: 17px; margin: 0 0 6px; }
.notice-box h3::before { content: "！ "; }
.notice-box ul { margin: 6px 0; padding-left: 1.3em; }
.to-table { margin: 6px 0 0; font-size: 14.5px; }
.to-table a::after { content: " →"; }

/* ---------- 折りたたみ ---------- */
details { margin: 10px 0; background: var(--panel); border-radius: var(--radius); }
summary {
  cursor: pointer; padding: 12px 16px; min-height: 44px;
  font-weight: 700; color: var(--moss); list-style: none; position: relative; padding-right: 40px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "＋"; position: absolute; right: 16px; top: 12px; }
details[open] summary::after { content: "－"; }
details > :not(summary) { margin-left: 16px; margin-right: 16px; }
details > :last-child { padding-bottom: 12px; margin-bottom: 0; }
details ul, details ol { padding-left: 1.3em; }

.two-col { display: grid; gap: 4px 24px; }
@media (min-width: 700px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col h4 { margin: 8px 0 0; font-size: 16px; }
.steps li { margin-bottom: 4px; }

/* ---------- プラン（2枚並び） ---------- */
.plans { display: grid; gap: 14px; margin: 14px 0; }
@media (min-width: 700px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--panel); border-radius: var(--radius); padding: 14px 18px; }
.plan h3 { margin: 0; font-size: 18px; }
.plan h4 { margin: 12px 0 2px; font-size: 15px; color: var(--text); }
.plan ul { margin: 4px 0; padding-left: 1.2em; }
.plan-price { margin: 4px 0 0; font-size: 22px; font-weight: 700; }
.plan-meta { margin: 0; font-size: 14px; }
.plan-link { margin: 8px 0 0; font-size: 14.5px; }

.cols { padding-left: 1.3em; }
@media (min-width: 700px) { .cols { columns: 2; column-gap: 32px; } .cols li { break-inside: avoid; } }

.rules > div { background: var(--panel); border-radius: var(--radius); padding: 10px 16px; }
.rules h4 { margin: 0; }
.rules ul { margin: 4px 0; padding-left: 1.2em; }
.rule-ng h4 { color: var(--alert); }

.status-off { display: inline-block; margin: 0; padding: 2px 12px; border: 1px solid var(--alert); color: var(--alert); border-radius: 999px; font-weight: 700; font-size: 14.5px; }

/* ---------- 共通のご利用案内 ---------- */
.guide-nav ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.guide-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  background: var(--panel); border-radius: 999px; text-decoration: none; font-size: 14.5px;
}
.block { padding-top: 20px; }
.block h3 { font-size: 20px; margin: 8px 0 8px; }
.block > ul { padding-left: 1.3em; }

/* 返金一覧：横スクロールなし。狭い画面では縦積み */
.refund-table, .history-table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--paper); }
.refund-table caption { text-align: left; font-size: 14px; padding-bottom: 6px; }
.refund-table th, .refund-table td, .history-table th, .history-table td {
  border: 1px solid var(--line-soft); padding: 10px 12px; vertical-align: top; text-align: left;
}
.refund-table thead th, .history-table thead th { background: var(--panel); color: var(--moss); }
.refund-table tbody th { width: 26%; }
@media (max-width: 699px) {
  .refund-table thead { display: none; }
  .refund-table, .refund-table tbody, .refund-table tr, .refund-table th, .refund-table td { display: block; width: 100%; }
  .refund-table tr { margin-bottom: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
  .refund-table th, .refund-table td { border: 0; border-top: 1px solid var(--line-soft); }
  .refund-table tbody th { background: var(--panel); border-top: 0; width: 100%; }
  .refund-table caption { display: block; width: 100%; }
  .refund-table td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--moss); }
}

.contact-card { background: var(--paper); padding: 0 14px; border-radius: var(--radius); border-top: 0; }
.contact-card > div:last-child { border-bottom: 0; }
.contact-card a { word-break: break-all; }
.small a { word-break: break-all; }
.tokusho dd { font-size: 15px; }

/* ---------- フッター ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line-soft); background: var(--panel); padding-bottom: 32px; }
.history h2 { font-size: 22px; margin: 0 0 8px; }
.history-table td:first-child { white-space: nowrap; width: 9em; }
@media (max-width: 599px) { .history-table td:first-child { white-space: normal; width: 6.5em; } }
.footer-bottom { max-width: var(--text-wrap); margin: 28px auto 0; padding: 0 16px; text-align: center; font-size: 14px; }
.footer-logo { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 8px; border-radius: 50%; }
.footer-bottom p { margin: 4px 0; }
.copyright { font-size: 13px; }
.font-credit { font-size: 12px; }

/* ---------- 画像がまだ届いていないときの仮枠 ---------- */
.img-missing {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; height: 100%; min-height: 80px;
  border: 2px dashed var(--line); color: var(--text); font-size: 12px; line-height: 1.5; background: var(--paper);
}
.hero-media.img-missing { aspect-ratio: 16 / 9; font-size: 14px; }
.brand-logo.img-missing, .footer-logo.img-missing { min-height: 0; font-size: 10px; border-radius: 50%; }

/* ---------- 印刷：すべて開いた状態で印刷 ---------- */
@media print {
  .site-header { position: static; }
  .toc-button, .skip, .back, .guide-nav, .draft-banner { display: none; }
  details { background: none; }
  details > * { display: block; }
  summary::after { content: ""; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}
