/* =====================================================================
   tomarin LP — スマホの見え方（2026-11）
   1. ヒーローの画面イラストは、パソコンの幅で描いて縮小する（崩れ防止）
   2. 余白を詰め、強みのイラストを小さく
   3. 解決のカードのグレーの箱を低く
   4. AI Buddy の例文は1列に
   5. スクロールでふわっと出る効果を止める
   ===================================================================== */
@media (max-width: 640px) {
  /* 1. ヒーローの画面イラスト */
  .product-mock { width: 1000px !important; max-width: none !important; zoom: .32; }

  /* 2. 余白 */
  .hero { padding-bottom: 56px !important; }
  .section { padding-top: 56px !important; padding-bottom: 56px !important; }
  #highlights { padding-bottom: 24px !important; }
  .shl-block { padding: 28px 0 !important; }
  .shl-inline-visual { margin-top: 20px !important; zoom: .86; }

  /* 3. 解決のカード */
  .solx-card { padding: 16px 16px 22px !important; }
  .solx-visual { min-height: 0 !important; padding: 16px !important; margin-bottom: 16px !important; }

  /* 4. AI Buddy の例文 */
  .aib-right { height: 220px !important; }
  .aib-right .aim-col:nth-child(2) { display: none; }
  .aib-right .aim-body { font-size: 14px !important; line-height: 1.7 !important; }

  /* 5. ふわっと出る効果を止める */
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}
/* 画面の幅に合わせて、ヒーローのイラストの縮小率を変える（左右 20px の余白を残す） */
@media (min-width: 375px) and (max-width: 640px) { .product-mock { zoom: .335; } }
@media (min-width: 390px) and (max-width: 640px) { .product-mock { zoom: .35; } }
@media (min-width: 414px) and (max-width: 640px) { .product-mock { zoom: .374; } }
@media (min-width: 430px) and (max-width: 640px) { .product-mock { zoom: .39; } }
@media (min-width: 480px) and (max-width: 640px) { .product-mock { zoom: .44; } }
@media (min-width: 560px) and (max-width: 640px) { .product-mock { zoom: .52; } }

/* ---------- 「ほかにも、宿の運営を支える機能を。」：横スクロールをやめて折り返して並べる（全幅） ---------- */
.sg-featlist {
  flex-wrap: wrap !important; justify-content: center; overflow: visible !important;
  -webkit-mask-image: none !important; mask-image: none !important;
  max-width: 760px !important; padding: 2px 0 0 !important;
}
@media (max-width: 640px) {
  /* スマホも PC と同じ角の丸い札にして、中央そろえで折り返す（札の中では改行しない）。上のカードと重なる4つは出さない */
  .sg-featlist { display: flex !important; flex-wrap: wrap !important; justify-content: center; gap: 8px !important; }
  .sg-feat { white-space: nowrap !important; border-radius: 999px !important; padding: 7px 14px !important; align-items: center !important; }
  .sg-feat-pc { display: none !important; }
}

/* ---------- 料金ページ：比較表の機能名を折り返し、i マークを名前の後ろに続ける ---------- */
@media (max-width: 640px) {
  .cmp-feature { display: block !important; line-height: 1.6 !important; }
  .cmp-feature .cmp-info { display: inline-flex !important; vertical-align: -2px; margin-left: 4px; }
  .cmp-fname { word-break: keep-all !important; }
  /* 吹き出しは機能名のマスの左下に出す（i マークの位置だと画面の右へはみ出し、上だと固定の見出しに隠れるため） */
  .cmp-feature { position: relative; }
  .cmp-feature .cmp-info { position: static !important; }
  .cmp-feature .cmp-tip { left: 8px !important; bottom: auto !important; top: calc(100% - 6px) !important; width: min(240px, calc(100vw - 56px)) !important; transform: translateY(3px) !important; }
  .cmp-info:hover .cmp-tip, .cmp-info:focus .cmp-tip { transform: none !important; }
  .cmp-feature .cmp-tip::after { display: none; }
  /* 「準備中」が折れないよう、マスの左右の余白を詰める */
  .cmp-cell { padding-left: 2px !important; padding-right: 2px !important; }
  .cmp-opt { white-space: nowrap; }
}
@media (max-width: 640px) {
  .cmp-head, .cmp-row { grid-template-columns: minmax(0,1.85fr) repeat(3,minmax(0,.72fr)) !important; }
  /* 見出しの下に表の文字が透けないよう、白で塗る */
  .cmp-head { background: #fff !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .cmp-plan-name { white-space: normal !important; word-break: keep-all !important; text-align: center; line-height: 1.35 !important; }
  .cmp-plan { padding-left: 4px !important; padding-right: 4px !important; }
  /* 料金の目安：チェック付きの短い一覧にする（枠の中で折り返さない） */
  .psim-chips { flex-direction: column; gap: 6px !important; }
  .psim-chip { border: 0 !important; background: none !important; padding: 0 !important; border-radius: 0 !important; align-items: flex-start !important; line-height: 1.6; }
  .psim-chip svg { flex: none; margin-top: 5px; }
}

/* ---------- 強み（デスクトップ）：各ブロックの高さを、右の画面イラスト（408px）が収まる分まで詰める ---------- */
@media (min-width: 901px) {
  .shl-block { min-height: 440px !important; padding: 32px 0 !important; }
  .shl-sticky { height: 440px !important; top: calc(50vh - 220px) !important; }
}

/* ---------- ヒーローの紹介動画（管理画面のイラストの代わり） ---------- */
.hero-video {
  position: relative; max-width: 1008px; margin: 0 auto; aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden; background: #F3F3F0;
  border: 0.5px solid var(--border-subtle);
  box-shadow: 0 2px 4px rgba(17,17,17,0.03), 0 20px 50px -20px rgba(17,17,17,0.12);
}
.hero-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 全画面では動画全体を見せる（16:10 などの画面で上下左右が切れないように） */
.hero-video video:fullscreen { object-fit: contain; background: #F3F3F0; }
.hero-video video:-webkit-full-screen { object-fit: contain; background: #F3F3F0; }
.hero-video-full {
  position: absolute; right: 12px; bottom: 12px; border: 0; border-radius: 999px;
  padding: 8px 14px; background: rgba(17,17,17,0.72); color: #fff;
  font: 500 var(--fs-note) / 1 var(--font-body); cursor: pointer;
}
.hero-video-full:hover { background: rgba(17,17,17,0.86); }
@media (max-width: 640px) {
  .hero-video { border-radius: 12px; }
  /* 字幕（下の中央）に重ならないよう、スマホでは右上に置く */
  .hero-video-full { top: 8px; right: 8px; bottom: auto; padding: 6px 10px; }
}

/* ---------- 導入の流れ：番号の丸を線でつないだ1枚のパネル（PCは横、スマホは縦） ---------- */
.flow2 {
  max-width: 1040px; margin: 0 auto; background: #fff; border-radius: 20px;
  padding: 44px 44px 32px; box-shadow: 0 1px 2px rgba(17,17,17,0.03);
}
.flow2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.flow2-step { position: relative; }
/* 次の丸までの線 */
.flow2-step:not(:last-child)::after {
  content: ""; position: absolute; top: 19px; left: 52px; right: -16px; height: 2px;
  background: #DCEBC9; border-radius: 2px;
}
.flow2-dot {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #EEF6E4; color: #3E6E12; font: 600 16px/1 var(--font-body); margin-bottom: 18px;
}
.flow2-step.is-goal .flow2-dot { background: #66b212; }
.flow2-t { font-size: var(--fs-body); font-weight: 600; line-height: 1.5; color: var(--black, #111); margin-bottom: 6px; }
.flow2-b { margin: 0; font-size: var(--fs-note); line-height: 1.8; color: var(--text-dim); word-break: auto-phrase; text-wrap: pretty; }
.flow2-after {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 36px 0 0; padding-top: 24px; border-top: 1px solid #EEEEEA;
  font-size: var(--fs-note); line-height: 1.7; color: var(--black, #111); word-break: auto-phrase; text-wrap: pretty;
}
.flow2-after svg { flex: none; }
@media (max-width: 900px) {
  .flow2 { padding: 28px 22px 22px; border-radius: 16px; }
  .flow2-steps { grid-template-columns: 1fr; gap: 0; }
  .flow2-step { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; padding-bottom: 24px; }
  .flow2-step:last-child { padding-bottom: 0; }
  .flow2-step:not(:last-child)::after { top: 48px; bottom: 8px; left: 19px; right: auto; width: 2px; height: auto; }
  .flow2-dot { margin-bottom: 0; }
  .flow2-text { padding-top: 8px; }
  .flow2-after { justify-content: flex-start; align-items: flex-start; margin-top: 24px; padding-top: 20px; }
  .flow2-after svg { margin-top: 3px; }
}

/* ---------- tomarin をつくる会社：チームと東川町の写真 ---------- */
.about-photos { max-width: 1040px; margin: 0 auto; }
.about-photos figure { margin: 0; }
.about-photos img { display: block; width: 100%; border-radius: 16px; background: #F3F3F0; }
.ap-team img { aspect-ratio: 2988 / 648; object-fit: cover; }
.about-photos figcaption { margin-top: 10px; font-size: var(--fs-note); line-height: 1.6; color: var(--text-dim); }
@media (max-width: 640px) {
  .about-photos img { border-radius: 12px; }
  .about-photos figcaption { margin-top: 6px; }
}
.section-sub .nw, .section-title .nw, .pc-cap .nw, .flow2-b .nw, .flow2-after .nw { display: inline-block; }
.about-more { display: flex; justify-content: center; margin-top: 36px; }
/* 料金セクションの「プラン比較・料金の詳細はこちら →」と同じ見た目 */
.about-link { font-size: var(--fs-note); font-weight: 600; letter-spacing: .02em; color: var(--green-text, #3E6E12); text-decoration: none; text-underline-offset: 3px; }
.about-link:hover { text-decoration: underline; }
@media (max-width: 640px) { .about-more { margin-top: 28px; } }
/* 会社概要：スマホは「項目名｜内容」の1列にして、住所や資本金が途中で折れないように */
@media (max-width: 640px) {
  .ramps-facts { grid-template-columns: 1fr !important; gap: 0 !important; padding-top: 8px !important; }
  .rf-item { display: grid; grid-template-columns: 72px 1fr; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEEEEA; }
  .rf-item:last-child { border-bottom: 0; }
  .rf-k { margin: 0 !important; padding-top: 1px; }
  .rf-v { word-break: auto-phrase; text-wrap: pretty; }
}
.proof-note .nw, .proof-source .nw { display: inline-block; }
/* ボタン：スマホで幅いっぱいになったとき、文字を中央に */
.btn { justify-content: center; }
.foot-brand .nw, .pfoot-brand .nw { display: inline-block; }

/* ---------- 宿泊税のお知らせ（ページ最上部）：スマホは1行の短い文に ---------- */
.tax-banner .tb-short { display: none; }
@media (max-width: 640px) {
  .tax-banner { flex-wrap: nowrap !important; gap: 8px !important; padding: 9px 12px !important; white-space: nowrap; }
  .tax-banner .tb-long { display: none; }
  .tax-banner .tb-short { display: inline; }
  .tax-banner .tb-badge { padding: 2px 9px !important; }
}
.p-sub .nw { display: inline-block; }

/* LP：「何度も戻ってくる人」の一文を句ごとに折る */
.problem-closer .nw { display: inline-block; }
/* LP：よくある質問はスマホで左右の余白をなくし、答えを幅いっぱいに */
@media (max-width: 640px) {
  .faq-wrap { padding-left: 0 !important; padding-right: 0 !important; }
}

/* ---------- ヒーロー：導入施設のロゴの上の1行に、導入事例の数字（押すと導入事例へ） ---------- */
/* ヒーローの説明文と同じ色の、下線つき文字リンク。押すと導入事例へ */
a.hcl-proof { display: block; width: fit-content; margin-left: auto; margin-right: auto; color: var(--text-dim, rgba(0,0,0,0.68)) !important; font-weight: 600; letter-spacing: .02em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(0,0,0,0.3); }
a.hcl-proof strong { font-family: var(--font-en); font-weight: 700; color: inherit; }
a.hcl-proof:hover { color: var(--black, #111) !important; text-decoration-color: currentColor; }
/* ---------- 料金カード：Starter に計算例を足したぶん、3枚のボタンの高さをそろえる ---------- */
@media (min-width: 901px) {
  .pv2-caption { min-height: calc(2 * 1.7em); }
  .pv2-blurb { min-height: 58px !important; }
}
/* よくある質問：質問の文と「＋」がくっつかないように */
.faq-q { gap: 16px; }
.faq-q .plus { flex-shrink: 0; }
/* ヒーローの導入施設ロゴ：PC は1列に並べ、2組目（流す用）は出さない */
.hcl-dup { display: none !important; }
/* スマホ：右から左へ流れる帯。ロゴの高さは px で決める（% だと iPhone の Safari で原寸に広がるため） */
@media (max-width: 640px) {
  .hero-clients { overflow: hidden; margin-left: -20px; margin-right: -20px; }
  .hero-clients-label { padding: 0 20px; }
  .hero-clients-row {
    display: flex !important; flex-wrap: nowrap !important; justify-content: flex-start !important;
    gap: 0 !important; width: max-content; animation: hcl-flow 22s linear infinite;
  }
  .hcl-dup { display: flex !important; }
  .hero-clients-row .hcl-box { height: 44px; margin: 0 !important; padding-right: 40px; flex: 0 0 auto; }
  .hero-clients-row .hcl-box img { max-width: none !important; max-height: none !important; width: auto !important; }
  /* 見た目の大きさをそろえる：横長の文字ロゴは低く、縦長のマークは高く */
  .hero-clients-row img.hcl-kitoushi { height: 34px !important; }
  .hero-clients-row img.hcl-town { height: 44px !important; }
  .hero-clients-row img.hcl-mizuniwa { height: 34px !important; }
  .hero-clients-row img.hcl-ja { height: 24px !important; }
  .hero-clients-row img.hcl-ensembles { height: 19px !important; }
}
@keyframes hcl-flow { to { transform: translateX(-50%); } }
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .hero-clients { overflow-x: auto; }
  .hero-clients-row { animation: none; }
  .hcl-dup { display: none !important; }
}
a.hcl-proof .nw { display: inline-block; }
a.hcl-proof { text-align: center; }
/* 句ごとのまとまり（inline-block）には親の下線が届かないので、まとまりごとに引く */
a.hcl-proof .nw { text-decoration: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(0,0,0,0.3); }
a.hcl-proof:hover .nw { text-decoration-color: currentColor; }

/* ---------- ヒーロー：ボタンの下の「乗り換えも安心」 ---------- */
.hero-buttons { margin-bottom: 0 !important; }
.hero-switch { display: block; margin: 18px auto 64px; font-size: var(--fs-note); line-height: 1.6; color: var(--text-dim); text-align: center; word-break: auto-phrase; text-wrap: pretty; }
.hero-switch svg { display: inline-block; vertical-align: -2px; margin-right: 6px; }
@media (max-width: 640px) { .hero-switch { margin-bottom: 44px; } }
/* ---------- 導入事例の下：地域で、データがめぐる（東川町の観光DMP） ---------- */
/* 上の余白は、下（次のセクションの見出しまで）と同じにする：PC 224px／スマホ 112px */
.region-block { max-width: 1040px; margin: 224px auto 0; display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; }
.rg-label { font-size: var(--fs-note); font-weight: 600; color: #3E6E12; letter-spacing: .04em; margin-bottom: 10px; }
.rg-title { margin: 0 0 14px; font-size: var(--fs-h); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--black, #111); }
.rg-body { margin: 0 0 18px; font-size: var(--fs-body); line-height: 1.9; color: var(--text-dim); word-break: auto-phrase; text-wrap: pretty; }
.rg-proof { margin: 0 0 18px; font-size: var(--fs-note); line-height: 1.8; color: var(--text-quiet, rgba(0,0,0,0.55)); word-break: auto-phrase; text-wrap: pretty; }
/* 意味の切れ目でだけ改行する（「地域」などが途中で割れないように） */
.rg-proof .nw, .rg-title .nw { display: inline-block; }
.region-block .pricing-more { margin-top: 0; }
.rg-cycle { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto; }
.rg-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.rg-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; display: flex; flex-direction: column; gap: 2px; }
.rg-center strong { font-size: var(--fs-title); font-weight: 600; color: var(--black, #111); }
.rg-center span { font-size: var(--fs-note); color: var(--text-dim); }
.rg-node { position: absolute; width: 46%; transform: translate(-50%, -50%); background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 14px; padding: 10px 12px 11px; text-align: center; box-shadow: 0 8px 24px -16px rgba(17,17,17,0.18); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rg-node i { font-style: normal; font-family: var(--font-en); font-size: 12px; font-weight: 600; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #EEF6E4; color: #3E6E12; margin-bottom: 4px; }
.rg-node strong { font-size: var(--fs-note); font-weight: 600; color: var(--black, #111); line-height: 1.5; }
.rg-node span { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.rg-node.n1 { left: 50%; top: 15.5%; }
.rg-node.n2 { left: 84.5%; top: 50%; width: 34%; }
.rg-node.n3 { left: 50%; top: 84.5%; }
.rg-node.n4 { left: 15.5%; top: 50%; width: 34%; }
/* 矢印：円の線の上に、進む向き（時計回り）で置く */
.rg-chev { fill: none; stroke: #66b212; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* 動き：緑の光が時計回りに一周し、着いた順に枠が光る（1周 6秒） */
.rg-comet { stroke-dashoffset: 0; animation: rg-spin 6s linear infinite; }
@keyframes rg-spin { to { stroke-dashoffset: -1000; } }
.rg-node { transition: border-color 300ms ease, box-shadow 300ms ease; animation: rg-glow 6s ease-in-out infinite; }
/* 光の先頭が着く瞬間に光らせる（先頭は 2 の位置に 5.46 秒で着く → 0.9 秒前倒し） */
.rg-node.n2 { animation-delay: -0.9s; }
.rg-node.n3 { animation-delay: 0.6s; }
.rg-node.n4 { animation-delay: 2.1s; }
.rg-node.n1 { animation-delay: 3.6s; }
@keyframes rg-glow {
  0%, 22%, 100% { border-color: rgba(0,0,0,0.08); box-shadow: 0 8px 24px -16px rgba(17,17,17,0.18); }
  6%, 14% { border-color: #66b212; box-shadow: 0 0 0 3px rgba(102,178,18,0.14), 0 10px 26px -16px rgba(17,17,17,0.22); }
}
@media (prefers-reduced-motion: reduce) {
  .rg-comet, .rg-node { animation: none; }
  .rg-comet { display: none; }
}
@media (max-width: 900px) {
  .region-block { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .region-block { margin-top: 112px; }
  .rg-node { padding: 8px 8px 9px; border-radius: 12px; }
  .rg-node.n2, .rg-node.n4 { width: 36%; }
  .rg-node strong { font-size: 13px; }
  .rg-node span { font-size: 11px; }
}

/* 機能一覧のカード：説明文と画面の中の文字も、Chrome で文節の切れ目で折り返す（「選択／可」「会員／料金」にしない）。
   iPhone は type.css の代わりの指定と phrase-break.js で同じように折り返す */
.sg-set { word-break: auto-phrase; }
