/* =====================================================================
   tomarin LP — 文字サイズを4段階にそろえる（2026-11）
   見出し / タイトル / 本文 / 補足。補足より小さい文字は使わない。
   例外は、冒頭の大見出し・最後の CTA 見出し・大きな数字（+43%、¥0 など）と、
   管理画面のモック（.pms / .pc-window / .solx-visual の中の絵）だけ。
   既存の CSS が !important でサイズを決めている箇所があるので、
   この層は最後に読み込み、!important で上書きする。
   ===================================================================== */
:root {
  --fs-h: 40px;      /* 見出し */
  --fs-title: 20px;  /* タイトル */
  --fs-body: 16px;   /* 本文 */
  --fs-note: 14px;   /* 補足 */
  /* 小さく薄い文字が重なって読みにくいので、グレーを少し濃く */
  --text-dim: rgba(0, 0, 0, 0.68);
  --text-dimmer: rgba(0, 0, 0, 0.66);
  --text-quiet: rgba(0, 0, 0, 0.62);
}
@media (max-width: 640px) {
  :root { --fs-h: 28px; --fs-title: 18px; --fs-body: 15px; }
}

/* ---------- 見出し ---------- */
.section-title,
.aib-title {
  font-size: var(--fs-h) !important;
  line-height: 1.3 !important;
}

/* ---------- タイトル ---------- */
/* 強みの3つの見出しは、セクションの見出しより目立たないようタイトルの大きさに */
.shl-block h2, .highlight h2,
.hero-sub,
.strength-card h3,
.problem-closer .serif,
.solx-title,
.screen-card .pc-title,
.sg-more-title,
.pp-t,
.fs-t,
.pv2-name,
.ramps-lead,
.pm-text, .pm-text span {
  font-size: var(--fs-title) !important;
  line-height: 1.5 !important;
}
.hero-sub { line-height: 1.9 !important; }
.pm-text, .pm-text span { line-height: 1.7 !important; }

/* ---------- 本文 ---------- */
.section-sub, .section-sub span, .section-sub .mark-soft,
.strength-card p,
.problem-closer,
.solx-body,
.highlight-body,
.check-item span,
.pc-cap,
.pp-b,
.fs-b,
.flow-after,
.faq-q, .faq-q span,
.faq-a,
.final-cta > p, .final-cta p,
.pv2-blurb,
.pv2-features li, .pv2-features li a,
.pv2-price2, .pv2-pct,
.aib-sub,
.rb-body p,
.rf-v,
.btn {
  font-size: var(--fs-body) !important;
}
.section-sub, .strength-card p, .solx-body, .highlight-body, .pc-cap, .pp-b, .fs-b,
.flow-after, .faq-a, .final-cta p, .pv2-blurb, .aib-sub, .rb-body p {
  line-height: 1.8 !important;
}
.pc-cap { min-height: 0 !important; }

/* ---------- 補足（これより小さくしない） ---------- */
.tb-badge, .tb-text, .tb-text strong, .tb-arrow,
.site-nav a, .site-nav .btn,
.hero-clients-label,
.problem-num, .num.problem-num, .problem-cat,
.solx-cat,
.solx-visual > p, .solx-visual > p a,
.highlight-label .text,
.sg-tabs button,
.sg-feat,
.sg-more-note,
.marquee-label, .marquee-foot, .marquee-soon, .marquee-new,
.proof-label, .proof-note, .proof-note span, .proof-source,
.pp-num, .fs-num,
.pv2-badge, .pv2-unit, .pv2-caption, .pv2-incl, .pv2-more a,
.aib-label, .aib-soon,
.pricing-note, .pricing-note a, .pricing-more,
.rb-role, .rb-cat, .rb-proof, .rb-ext,
.ramps-loop span, .ramps-loop i, .loop-back, .ramps-sub,
.rf-k,
.pm-label,
.cta-foot, .cta-foot a,
.foot-brand p, .foot-col h5, .foot-col a, .foot-base, .foot-base .meta, .foot-base span {
  font-size: var(--fs-note) !important;
  letter-spacing: 0.02em;
}
.proof-note, .proof-source, .marquee-foot, .solx-visual > p, .pricing-note, .sg-more-note,
.ramps-sub, .cta-foot {
  line-height: 1.7 !important;
}
/* 小さなバッジは文字に合わせて余白を少し広げる */
.marquee-soon, .marquee-new, .pv2-badge, .aib-soon, .rb-role { padding: 3px 9px !important; }

/* ---------- 冒頭の大見出し：スマホで「ファンと、」を割らない ---------- */
.hero h1 .nw { display: inline-block; }

/* ---------- 機能カード：中の画面を中央に置き、両側にグレーを残す ---------- */
.screen-card.pc-card .pc-window {
  margin: 0 16px 16px !important;
  border-radius: 12px !important;
}
.screen-card.pc-card:hover .pc-window { transform: translateY(-4px) !important; }

/* ---------- 改行：文の途中や文末1文字で折り返さない（Chrome 系で有効） ---------- */
.section-title, .section-sub, .hero-sub, .strength-card h3, .strength-card p, .problem-closer,
.solx-title, .solx-body, .highlight h2, .shl-block h2, .highlight-body, .check-item span,
.screen-card .pc-title, .pc-cap, .pp-t, .pp-b, .fs-t, .fs-b, .flow-after, .faq-q, .faq-a,
.final-cta p, .pv2-blurb, .aib-title, .aib-sub, .ramps-lead, .rb-body p, .ramps-sub, .pm-text,
.proof-note, .proof-source, .marquee-foot, .pricing-note, .sg-more-note, .solx-visual > p,
.pv2-features li, .pv2-price2, .cta-foot, .sg-more-title {
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* 観光庁採択の札：文字を大きくしたので、折り返してカードに収める */
.rb-proof {
  max-width: calc(100% - 32px); white-space: normal; text-align: center;
  line-height: 1.5 !important; border-radius: 12px !important; padding: 4px 12px !important;
}

/* フッターのリンクは1語なので、途中で折り返さない */
.foot-col a { letter-spacing: 0 !important; white-space: nowrap; }

.rb-proof .nw { display: inline-block; }

/* ヒーローの説明文：デスクトップでは2行に収める */
@media (min-width: 900px) { .hero-sub { max-width: 720px !important; } }

/* ---------- ヒーロー：余白を広げる ---------- */
.hero h1 { line-height: 1.2 !important; margin-bottom: 44px !important; }
.hero-sub { line-height: 2.05 !important; margin-bottom: 56px !important; }
.hero-buttons { margin-bottom: 24px; }
@media (max-width: 640px) {
  .hero h1 { line-height: 1.25 !important; margin-bottom: 32px !important; }
  /* スマホでは説明文を本文サイズにして軽く */
  .hero-sub { font-size: var(--fs-body) !important; line-height: 2.1 !important; margin-bottom: 44px !important; padding: 0 8px; }
}

/* 見出しの中のロゴ：スマホでは少し小さくして1行に収める */
@media (max-width: 640px) { .section-title .sol-logo { height: 22px !important; width: auto !important; } }

/* ---------- 機能カード：カードの中は1段階下げ、余白を広げる ---------- */
.screen-card.pc-card .pc-head { padding: 24px 24px 18px !important; }
.screen-card.pc-card .pc-title { font-size: var(--fs-body) !important; font-weight: 600 !important; line-height: 1.5 !important; margin-bottom: 6px !important; }
.screen-card.pc-card .pc-cap { font-size: var(--fs-note) !important; line-height: 1.7 !important; }
.screen-card.pc-card .pc-window { margin: 0 16px 16px !important; }

/* =====================================================================
   料金ページ（/tomarin/pricing/）
   ===================================================================== */
/* 見出し */
.p-title, .p-h2, .pfoot-cta h2, .pfoot-cta h2 .nw {
  font-size: var(--fs-h) !important;
  line-height: 1.3 !important;
}
/* タイトル */
.psim-title, .cmp-plan-name { font-size: var(--fs-title) !important; }
/* 本文 */
.p-sub, .faq2-q, .faq2-q span, .faq2-a, .faq2-note, .faq2-note a, .pfoot-cta p,
.cmp-group, .cmp-feature, .psim-slider-value {
  font-size: var(--fs-body) !important;
}
.p-sub, .faq2-a, .pfoot-cta p { line-height: 1.8 !important; }
/* 補足 */
.pnav-menu a, .pnav .btn,
.cmp-plan-price, .cmp-pop, .cmp-tip, .cmp-opt, .cmp-head .btn,
.psim-slider-label, .psim-plan, .psim-fee span, .psim-detail, .psim-win-tag, .psim-note, .psim-chip {
  font-size: var(--fs-note) !important;
}
.cmp-pop, .psim-win-tag { padding: 3px 9px !important; }
/* スマホ：比較表は列が細いので、表の中だけ1段階下げる */
@media (max-width: 640px) {
  .cmp-plan-name, .cmp-feature { font-size: var(--fs-note) !important; }
  .cmp-group { font-size: var(--fs-body) !important; }
  /* 上に固定される見出し行が高くなるので、料金は上のプランカードに任せる */
  .cmp-plan-price { display: none !important; }
}

/* =====================================================================
   資料請求ページ（/tomarin/shiryou-seikyuu/）
   ===================================================================== */
/* 見出し */
.req-title { font-size: var(--fs-h) !important; line-height: 1.35 !important; }
/* 本文 */
.req-lead, .req-lead a, .req-doc-list li, .req-points li strong, .rc-mail,
.form-label {
  font-size: var(--fs-body) !important;
}
.req-lead, .req-doc-list li { line-height: 1.8 !important; }
/* 入力欄：iPhone が拡大しないよう、スマホでも 16px を下回らない */
.form-input, .form-textarea, .form-select { font-size: 16px !important; }
/* 補足 */
.nav-back, .req-eyebrow, .req-doc-title, .req-points li span,
.rc-label, .rc-org, .req-time, .req-time-note,
.form-label .req, .form-hint, .select-chip, .form-agree, .form-agree a, .form-agree span,
.req-trust, .req-trust span, .rf-copy {
  font-size: var(--fs-note) !important;
}
.req-points li span, .form-hint, .req-time-note { line-height: 1.7 !important; }
.form-label .req { padding: 2px 8px !important; }
/* 説明文の高さを2行分にそろえ、中の画面の上端を全カードで同じ位置に */
.screen-card.pc-card .pc-cap { min-height: calc(2 * 1.7em) !important; }

/* =====================================================================
   デモ予約ページ（/tomarin/demo-yoyaku/、booking-preview.css の上に重ねる）
   このページだけに効くよう、body[data-booking-mode] で絞る
   ===================================================================== */
/* 見出し */
body[data-booking-mode] h1 { font-size: var(--fs-h) !important; line-height: 1.45 !important; }
/* タイトル */
body[data-booking-mode] h2 { font-size: var(--fs-title) !important; }
/* 本文 */
body[data-booking-mode] .intro, body[data-booking-mode] .agenda,
body[data-booking-mode] h3, body[data-booking-mode] .days button, body[data-booking-mode] .times button,
body[data-booking-mode] .primary, body[data-booking-mode] .recap, body[data-booking-mode] dl > div,
body[data-booking-mode] #booking-notice, body[data-booking-mode] #complete-message,
body[data-booking-mode] main label {
  font-size: var(--fs-body) !important;
}
body[data-booking-mode] .intro { line-height: 1.9 !important; }
body[data-booking-mode] .agenda { line-height: 2.2 !important; }
/* 入力欄：iPhone が拡大しないよう 16px（プレースホルダーも同じ大きさに） */
body[data-booking-mode] input:not([type=checkbox]), body[data-booking-mode] textarea,
body[data-booking-mode] input::placeholder, body[data-booking-mode] textarea::placeholder {
  font-size: 16px !important;
}
/* 補足 */
body[data-booking-mode] header > a:last-child, body[data-booking-mode] .preview-note,
body[data-booking-mode] .eyebrow, body[data-booking-mode] .meeting-meta span,
body[data-booking-mode] .aside-note, body[data-booking-mode] .steps, body[data-booking-mode] .steps span,
body[data-booking-mode] .section-heading > span, body[data-booking-mode] .weekdays,
body[data-booking-mode] .calendar-note, body[data-booking-mode] .times p,
body[data-booking-mode] .step-footer p, body[data-booking-mode] .text-button,
body[data-booking-mode] .required, body[data-booking-mode] .optional, body[data-booking-mode] .form-note,
body[data-booking-mode] .review-note, body[data-booking-mode] .alt-request,
body[data-booking-mode] main label.consent, body[data-booking-mode] footer {
  font-size: var(--fs-note) !important;
}
body[data-booking-mode] .eyebrow { letter-spacing: .08em !important; }
body[data-booking-mode] .steps span { width: 26px !important; height: 26px !important; }
body[data-booking-mode] .intro, body[data-booking-mode] .agenda li, body[data-booking-mode] .aside-note,
body[data-booking-mode] .alt-request, body[data-booking-mode] .review-note, body[data-booking-mode] #complete-message {
  word-break: auto-phrase; text-wrap: pretty;
}

/* 強み：ラベル（顧客台帳など）を見出しに近づける */
.shl-block .highlight-label, .highlight .highlight-label { margin-bottom: 8px !important; }

/* =====================================================================
   主なボタン（デモを予約・送信）：ロゴの緑（tomarin DS brand-green #66b212）に白い太字
   ※ 白い文字とのコントラストは 2.6（WCAG AA の 4.5 に届かない）。ユーザーの判断でロゴの色を優先
   ===================================================================== */
a[href*="demo-yoyaku"].btn-dark, a[href*="demo-yoyaku"].btn-primary,
.site-nav a[href*="demo-yoyaku"].btn, .pnav a[href*="demo-yoyaku"].btn,
.btn-primary {
  background: #66b212 !important; border-color: #66b212 !important; color: #fff !important;
  font-weight: 600 !important;
}
a[href*="demo-yoyaku"].btn-dark:hover, a[href*="demo-yoyaku"].btn-primary:hover,
.site-nav a[href*="demo-yoyaku"].btn:hover, .pnav a[href*="demo-yoyaku"].btn:hover,
.btn-primary:hover {
  background: #4d8a0d !important; border-color: #4d8a0d !important;
}

/* ---------- フッターのロゴ：ヘッダーと同じ公式のロゴ画像 ---------- */
.foot-logo { display: block; height: 22px; width: auto; }

/* ---------- 資料請求フォーム：任意の札と、選んだ選択肢の色 ---------- */
.form-label .req.opt { background: #F2F2F0 !important; color: rgba(0,0,0,0.62) !important; }
/* form-upgrade.css が黒に上書きしていたのを、ロゴの緑の薄い背景＋緑の文字に戻す */
.select-chip.active, .req-card .select-chip.active {
  background: var(--green-bg) !important; border-color: #66b212 !important;
  color: #3E6E12 !important; font-weight: 600 !important;
}
.req-lead .nw { display: inline-block; }

/* ---------- デモ予約ページ：ほかのページとそろえる ---------- */
/* 塗りのボタン・選んだ日付と時間・今のステップは、ロゴの緑（サイト共通の主ボタンの色） */
body[data-booking-mode] .primary:not(:disabled),
body[data-booking-mode] [aria-pressed=true],
body[data-booking-mode] .days button[aria-pressed=true],
body[data-booking-mode] .times button[aria-pressed=true],
body[data-booking-mode] .steps [aria-current] span {
  background: #66b212 !important; border-color: #66b212 !important; color: #fff !important;
}
body[data-booking-mode] .primary:not(:disabled):hover { background: #4d8a0d !important; border-color: #4d8a0d !important; }
/* 「必須」「任意」は資料請求ページと同じ札に */
body[data-booking-mode] .required, body[data-booking-mode] .optional {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px;
  font-size: var(--fs-note) !important; font-weight: 500; line-height: 1.5; letter-spacing: .04em; vertical-align: 1px;
}
body[data-booking-mode] .required { background: #F5FBEE; color: #3E6E12; }
body[data-booking-mode] .optional { background: #F2F2F0; color: rgba(0,0,0,0.62); }
/* 右上の「← トップへ戻る」 */
body[data-booking-mode] header > a.nav-back { color: rgba(0,0,0,0.68); font-weight: 500; }
body[data-booking-mode] header > a.nav-back:hover { color: #111; }

/* ---------- ヘッダーのロゴ：全ページを、デモ予約ページと同じ大きさにそろえる ---------- */
.nav-logo-img, .pnav-brand img, .lnav-inner > a > img, body[data-booking-mode] header > a > img {
  width: 144px !important; height: auto !important; max-height: none !important;
}
@media (max-width: 900px) {
  .nav-logo-img, .pnav-brand img, .lnav-inner > a > img, body[data-booking-mode] header > a > img { width: 125px !important; }
}

/* ---------- 改行：iPhone（Safari・iPhone の Chrome）向けの代わり ----------
   上の word-break: auto-phrase（文節で折り返す）は Chrome 系だけが対応で、iPhone のブラウザは無視して
   文の途中でも折り返してしまう。対応していないブラウザでは、句読点やスペースのところでだけ折り返し、
   それでも1行に入りきらないときだけ途中で折り返す。対象は auto-phrase を指定している要素と同じ。 */
@supports not (word-break: auto-phrase) {
  .section-title,
  .section-sub,
  .hero-sub,
  .strength-card h3,
  .strength-card p,
  .problem-closer,
  .solx-title,
  .solx-body,
  .highlight h2,
  .shl-block h2,
  .highlight-body,
  .check-item span,
  .screen-card .pc-title,
  .pc-cap,
  .pp-t,
  .pp-b,
  .fs-t,
  .fs-b,
  .flow-after,
  .faq-q,
  .faq-a,
  .final-cta p,
  .pv2-blurb,
  .aib-title,
  .aib-sub,
  .ramps-lead,
  .rb-body p,
  .ramps-sub,
  .pm-text,
  .proof-note,
  .proof-source,
  .marquee-foot,
  .pricing-note,
  .sg-more-note,
  .solx-visual > p,
  .pv2-features li,
  .pv2-price2,
  .cta-foot,
  .sg-more-title,
  body[data-booking-mode] .intro,
  body[data-booking-mode] .agenda li,
  body[data-booking-mode] .aside-note,
  body[data-booking-mode] .alt-request,
  body[data-booking-mode] .review-note,
  body[data-booking-mode] #complete-message,
  .flow2-b,
  .flow2-after,
  .rf-v,
  .hero-switch,
  .rg-body,
  .rg-proof,
  .flow-step .fs-t,
  .flow-step .fs-b,
  #pricing .section-sub,
  .pv2-caption,
  .aim-body,
  #case .section-sub,
  .p-title,
  .p-sub,
  .psim-note,
  .cmp-feature,
  .cmp-plan-price,
  .faq2-q,
  .faq2-a,
  .faq2-note,
  .pfoot-cta p,
  .req-lead,
  .req-points li span,
  .form-hint,
  .req-time-note,
  .cmp-nb .cmp-tip, .cmp-fname .cmp-tip {
    word-break: keep-all !important;
    overflow-wrap: anywhere;
  }
}
@supports not (word-break: auto-phrase) {
  /* 料金ページの比較表の機能名は、Chrome と同じく語の途中で切らない（「サイトコントローラ／ー連携」にしない） */
  .cmp-feature .cmp-fname { overflow-wrap: normal; }
  .cmp-feature .cmp-fname .cmp-tip { overflow-wrap: anywhere; }
}
@supports not (word-break: auto-phrase) {
  /* iPhone では、上で挙げた要素に限らず、ページ内のすべての文を同じように折り返す
     （phrase-break.js がページ全体の文に文節の区切りを入れる） */
  body { word-break: keep-all; overflow-wrap: anywhere; }
}
