/*
 * ホーム（/）だけで読む追加の CSS。
 * 土台は /assets/css/site.css。ここにはホームだけの組み（冒頭の詰め方、通報の例のホームの写真、受付と受理の写真 2 枚、
 * 使い始めるまでの 2 列、公開の予定の 2 列）だけを書く。色は site.css の変数（と site.css の帯の罫線と同じ値）だけを使い、赤紫（--mag）は使わない。
 * 文字の大きさの段・色の役割・新しい部品（.sec-title・.tag--ex・.signature）は site.css（見た目の担当）で決める。
 * 変えたら、index.html の読み込み（/assets/css/pages/home.css?v=…）の値を変える（/assets/* は 1 年キャッシュする）。
 */

/* ───────── 狭い画面の節の余白（375px で全長 13,000px 以下に収める） ───────── */

@media (max-width: 599px) {
  main > .sec { padding: 36px 0 40px; }
  main > .launch { padding-top: 48px; }
  .sec-head { margin-bottom: 20px; }
  main .sec-foot { margin-top: 24px; }
  main .split { gap: 28px; }
  main .doc-block { margin-top: 24px; }
  #ack .flow-head { margin-top: 32px; }
  .hf-lead { font-size: 15px; line-height: 1.8; }
  main .launch-word p { font-size: 15px; line-height: 1.85; }
  main .launch-contact { margin-top: 20px; }
}

/* ───────── 冒頭（375px の最初の画面に、航空図の上半分が入るように詰める） ───────── */

@media (max-width: 599px) {
  .hero-grid { gap: 10px; padding-top: 12px; }
  .hero-kicker { margin-bottom: 6px; font-size: 13.5px; }
  /* h1 は 2 つの .line を続けて流し、<wbr> の位置で折る（.line ごとに改行すると行が増える）。
     375×812 で航空図の上端を y≈540 より上に置くため、h1・リード・注記の行間と間の余白を詰める */
  .hero h1 { line-height: 1.24; }
  .hero h1 .line { display: inline; }
  .hero-lead { margin-top: 10px; font-size: 16px; line-height: 1.65; }
  .hero .actions { margin-top: 12px; gap: 4px 20px; }
  .hero .actions .btn { width: 100%; justify-content: center; }
  .hero-note { margin-top: 6px; font-size: 13px; line-height: 1.5; }
}
/* 幅 360px 未満（320×568 など）: h1 を 1 行減らし、航空図の上端を最初の画面に入れる */
@media (max-width: 359px) {
  .hero h1 { font-size: 28px; }
  .hero-lead { font-size: 15px; }
}

/* ───────── 通報の例（運航票 2 枚、アプリのホームの写真、時刻の目盛り） ───────── */

.brief-head { row-gap: 6px; }
.brief-date { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; color: var(--ink-2); }
.brief-head .brief-note { flex-basis: 100%; }
@media (max-width: 599px) { .brief-head .brief-note { font-size: 13px; line-height: 1.65; } }
/* 狭い画面: 運航票 → ホームの写真 → 時刻の目盛り。1024px 以上: 運航票と目盛りを左、写真を右に置く */
.brief-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "strips" "device" "ts"; column-gap: 48px; }
.brief-body > .strips { grid-area: strips; }
.brief-body > .brief-device { grid-area: device; justify-self: center; width: min(300px, 100%); margin-top: 32px; }
.brief-body > .timescale { grid-area: ts; }
.brief-device .fig-cap { text-align: left; }
/* ホームの写真の見える下端（写真は幅 750px）。枠（上と左右 7px、600px 未満は 6px）の分を足して比を決める。
   600px 以上は「作成の 2 つの面」の下（写真の y≈1210）と「飛行場の要点」の見出し（y≈1242）の間の y≈1226 で切る。その下の
   要点のカードは固定の台の裏で、見出しと空のカードの縁だけが写っていた（2026-10-31 の見直し F48）。幅 300px で 750 / 1185、280px でもほぼ同じ */
.brief-device .screen--full { aspect-ratio: 750 / 1185; }
/* 600px 未満は、写真を中央に 270px で出し、説明を下に置く。写真は次のフライトの紺のパネルの下（y≈1062）と作成の面の頭（y≈1085）の
   間の y≈1074 までにして、全長を抑える（前の 750 / 1100 は枠の分を数えておらず、作成の面の頭がのぞいた） */
@media (max-width: 599px) {
  .brief-body > .brief-device { width: min(270px, 100%); margin-top: 24px; }
  .brief-device .screen--full { aspect-ratio: 750 / 1043; }
  .brief-device .fig-cap { margin-top: 10px; }
}
@media (min-width: 1024px) {
  .brief-body { grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "strips device" "ts device"; align-items: start; }
  .brief-body > .strips { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .brief-body > .brief-device { margin-top: 0; width: 100%; }
}
@media (min-width: 1440px) {
  .brief-body { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 64px; }
}

/* ───────── 受付と受理（写真 2 枚は 600px 以上で 2 列。600px 未満は 1 列で、中央に 240px。下の「600px 未満の写真」） ───────── */

.ack-shots .placard { flex-wrap: wrap; gap: 0 8px; }
.ack-shots .fig-cap { margin-top: 8px; }
@media (min-width: 600px) { .ack-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
/* 写真は元の写真の 1,110px（VFR は状態のカードの下、IFR は「燃料」の札と値の間）で切る。枠の縁（7px）があると幅によって切れる所が動くので、
   高さは写真の側で決める。下の薄くする帯は短くし、経過の行を薄めない */
.ack-shots .screen--short { aspect-ratio: auto; }
.ack-shots .screen--short img { display: block; height: auto; aspect-ratio: 750 / 1110; }
.ack-shots .screen--short::after { height: 8%; }
/* 流れの 4 段は、360〜599px では 2 列 × 2 段にする（1024px 以上の 4 列の組みと同じく、印を段の上の線に置く） */
@media (min-width: 360px) and (max-width: 599px) {
  #ack .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 28px; margin-top: 16px; border-top: 0; }
  #ack .flow > li { padding: 24px 0 0; border-bottom: 0; border-top: 2px solid var(--ink-3); }
  #ack .flow > li.is-pending { border-top: 2px dashed var(--blue); }
  #ack .flow > li.is-ack { border-top-color: var(--ack); }
  #ack .flow .f-mark { top: -13px; }
  #ack .flow p { font-size: 14px; line-height: 1.65; }
}

/* ───────── 使い始めるまで（1024px 以上は、手順を横に 5 つ並べ、その下に注意と対象・端末・料金を 2 列で） ───────── */

.route .step-no a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.flow-side { margin-top: 12px; }
@media (max-width: 599px) {
  #flow .spec > div { grid-template-columns: 4em minmax(0, 1fr); gap: 12px; }
  .route > li { padding-bottom: 18px; }
  .route p { font-size: 14.5px; line-height: 1.75; }
  #flow .flow-side .spec { margin-top: 20px; }
  #flow .flow-side .spec > div { padding: 8px 0; font-size: 14.5px; }
}
.flow-side .spec { margin-top: 28px; }
@media (min-width: 1024px) {
  .flow-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 24px; }
  .flow-side .spec { margin-top: 0; }
}

/* ───────── IFR と VFR ───────── */

.table--compare caption .tag { margin-right: 8px; }
/* 狭い画面の対照表（行ごとに IFR・VFR を 2 列に積む組み）は、余白と注記の文字を詰める */
@media (max-width: 759px) {
  #plans .table--compare th, #plans .table--compare td { padding: 8px 10px 10px; }
  #plans .table--compare tbody th { padding-bottom: 0; }
  #plans .table--compare .g { font-size: 12.5px; line-height: 1.55; }
  #plans .table--compare .v { font-size: 14px; }
  #plans .table--compare caption { display: block; padding: 10px 0 4px; }
}
/* 600px 未満は、IFR・VFR の札を各欄に付けず、表の頭に 1 回だけ出す（左が IFR、右が VFR） */
@media (max-width: 599px) {
  #plans .table--compare thead { display: block; }
  #plans .table--compare thead tr { display: grid; grid-template-columns: 1fr 1fr; }
  #plans .table--compare thead th:first-child, #plans .table--compare thead .trip { display: none; }
  #plans .table--compare thead th { padding: 10px 10px 6px; border-bottom: 1px solid var(--rule); }
  #plans .table--compare .rulecode { font-size: 20px; }
  #plans .table--compare td::before { content: none; }
  #plans .table--compare td { padding-top: 2px; }
}

/* ───────── できること（.hf: 文・仕様の表・写真の 3 つを 1 枚の格子に置く） ───────── */
/* 狭い画面は、見出しと文の下に「写真（小さく）｜仕様の表」を横に並べ、縦の長さを抑える（375px で 2,200px 前後）。
   1024px 以上は、見出しの下に「文｜仕様の表（と入力した値と電文）｜写真」の 3 列（写真は見出しの行から）。.hf-text は display: contents にして中の部品を格子に直接置く */

.hf { display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 16px; align-items: start;
  grid-template-areas: "h h" "lead lead" "shot spec" "links links" "map map"; }
.hf-text { display: contents; }
.hf h3 { grid-area: h; margin-bottom: 12px; }
.hf-lead { grid-area: lead; margin: 0; }
.hf .spec { grid-area: spec; margin-top: 20px; }
.hf-shot { grid-area: shot; margin-top: 20px; }
.hf-links { grid-area: links; margin: 20px 0 0; font-size: 15px; line-height: 1.9; color: var(--ink-2); }
.hf-map { grid-area: map; margin-top: 28px; }
.hf-shot .placard { flex-wrap: wrap; gap: 0 8px; }
.hf .paper { transform: none; padding: 4px; }
.feature.hf + .feature.hf { margin-top: 48px; padding-top: 40px; }
.hf .spec > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
@media (max-width: 599px) {
  /* 入力した値と電文: 欄ごとに 1 行（欄の名前｜値 → 電文）。矢印だけの行を作らない。第 15 項の電文（表の第 15 項と同じ）は出さない */
  .hf-map .entry-rows li { display: grid; grid-template-columns: 5em minmax(0, 1fr); align-items: baseline; column-gap: 12px; padding: 8px 0; }
  .hf-map .entry-rows .v { margin-top: 0; flex-wrap: nowrap; white-space: nowrap; }
  .hf-map .telex { display: none; }
  .hf-map .fig-cap { margin-top: 8px; font-size: 12.5px; }
  .feature.hf + .feature.hf { margin-top: 36px; padding-top: 28px; }
  .hf-shot .fig-cap { font-size: 12.5px; line-height: 1.6; }
}
@media (min-width: 600px) {
  /* 写真の欄は 260px（写真は枠の内側で 246px）。220px だと 206px になり、600px 未満の 240px より小さかった */
  .hf { grid-template-columns: 260px minmax(0, 1fr); column-gap: 28px; }
  .hf-map { max-width: 480px; }
}
@media (min-width: 1024px) {
  .hf { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr) 260px; column-gap: 40px; grid-template-rows: auto auto 1fr;
    grid-template-areas: "h h shot" "lead spec shot" "links map shot"; }
  .hf--links { grid-template-areas: "h h shot" "lead spec shot" "links spec shot"; }   /* 空港: リンクを文のすぐ下に */
  .hf .spec { margin-top: 0; }
  .hf-shot { margin-top: 0; }
  .hf-map { margin-top: 24px; max-width: none; }
  .hf-links { margin-top: 16px; }
  .feature.hf + .feature.hf { margin-top: 56px; padding-top: 48px; }
}

/* ───────── 600px 未満の写真: 受付と受理の 2 枚と、できることの 3 枚を 1 列にし、中央に 240px で出す ─────────
   2 列や文の横に置くと 1 枚 128〜151px になり、写真の中の字が読めなかった。全長を抑えるため、写真は要る所まで（入力は経路の欄、空港は磁気偏差）で切る */
@media (max-width: 599px) {
  .ack-shots { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  #ack .ack-shots > .figure { justify-self: center; width: min(240px, 100%); }
  .hf { grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "lead" "shot" "spec" "links" "map"; }
  #features .hf > .hf-shot { justify-self: center; width: min(240px, 100%); }
  .hf-shot .screen { aspect-ratio: 750 / 1300; }
  .hf--links .hf-shot .screen { aspect-ratio: 750 / 1000; }
}

/* ───────── コラム（狭い画面では、各行の副題と説明の文を出さない。分類・題・読む時間だけ） ───────── */

@media (max-width: 599px) { #columns .col-d, #columns .col-s { display: none; } }

@media (max-width: 599px) {
  #trust .ledger > div { padding: 14px 0 16px; }
  #trust .ledger dd { font-size: 14.5px; line-height: 1.8; }
  #trust .legs-map--v { max-width: 290px; margin-inline: auto; }
}

/* ───────── 公開の予定（1024px 以上は、文を左、フォームを右。帯の下にも余白を取る） ───────── */

.launch--home { padding-bottom: clamp(64px, 8vw, 104px); }
.launch--home .launch-main { padding-bottom: 0; }
.launch-word { margin-top: 20px; max-width: 40em; }
.launch-word p { margin: 0; font-size: 16px; line-height: 1.95; }
.launch-word .signature { margin-top: 12px; }
.launch-word .signature a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.launch--home .signup--on-ink { margin-top: 0; }
.launch-contact { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(232, 237, 244, .25); font-size: 14.5px; line-height: 1.9; max-width: 560px; }
.launch-feed { display: block; margin-top: 4px; }
.launch-feed .link-more { white-space: nowrap; }
@media (min-width: 1024px) {
  .launch--home .launch-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
  .launch-form { padding-top: 6px; }
}
