/* DIPS Viewer マニュアル共通スタイル。
   配色は dashboard.css のブランド変数に揃える。
   アプリが UIUserInterfaceStyle: Light の固定配色なので、この頁群もライト固定。
   和文Webフォントは数MBあるため読み込まず、システムスタックを使う。 */

:root {
  --bg:#f8faff; --card:#ffffff; --sunken:#eef3fa;
  --border:#e0e0e0; --text:#222222; --muted:#666666;
  --navy1:#1a3a52; --navy2:#2d5a7b;
  --brand:#0F8FDF;     /* 離陸ボタン・リンク */
  --landing:#1A7F4E;   /* 着陸ボタン */
  --pending:#C97A14;   /* 未完了・注意 */
  --danger:#C0392B;    /* 通報など取り消せない操作 */
  --shadow:0 1px 2px rgba(26,58,82,.06), 0 8px 24px rgba(26,58,82,.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
               "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
}

/* ---------- メニューバー ----------
   全ページ共通。スクロールしても上端に残るので、記事の途中からでも索引に戻れる。 */

.manualbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.manualbar-inner {
  max-width: 780px; margin: 0 auto;
  padding: 11px 24px;
  display: flex; align-items: center; gap: 16px;
  font-size: 14px;
}
.manualbar a { color: var(--brand); text-decoration: none; font-weight: 700; }
.manualbar a:hover { text-decoration: underline; }
.manualbar a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.manualbar .sub { font-weight: 400; color: var(--muted); }
.manualbar .sub:hover { color: var(--text); }
.manualbar .spacer { flex: 1; }

/* ---------- ヘッダー ---------- */

.masthead {
  background: linear-gradient(135deg, var(--navy1), var(--navy2));
  color: #fff;
  padding: 52px 24px 48px;
}
.masthead-inner { max-width: 780px; margin: 0 auto; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.eyebrow a:hover { color: #fff; }

.masthead h1 {
  margin: 0 0 18px;
  font-size: clamp(26px, 5.2vw, 38px);
  line-height: 1.4; font-weight: 800;
  letter-spacing: -.01em; text-wrap: balance;
}
.masthead p { margin: 0; max-width: 34em; font-size: 16px; color: rgba(255,255,255,.9); }

.store {
  display: inline-block; margin-top: 20px;
  background: #fff; color: var(--navy1);
  font-size: 14px; font-weight: 700; text-decoration: none;
  padding: 9px 20px; border-radius: 999px;
  transition: opacity .15s ease;
}
.store:hover { opacity: .85; }
.store:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- 本文 ---------- */

.wrap { max-width: 780px; margin: 0 auto; padding: 48px 24px 88px; }

h2 { font-size: 22px; font-weight: 700; line-height: 1.6; letter-spacing: -.005em; text-wrap: balance; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.7; }
h4 { font-size: 16px; font-weight: 700; line-height: 1.7; margin: 28px 0 8px; }
p  { margin: 0 0 14px; }
strong { font-weight: 700; }

a { color: var(--brand); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li { margin-bottom: 6px; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .9em; font-variant-numeric: tabular-nums;
  background: var(--sunken); border-radius: 5px; padding: 1px 6px;
}

/* ---------- 呼び出し（この記事でいちばん誤解されやすい一点） ---------- */

.keyrule {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px 26px;
  margin: 0 0 48px;
}
.keyrule h2 { margin: 0; font-size: 18px; line-height: 1.65; }
.keyrule p  { margin: 0; font-size: 15px; color: var(--muted); }

/* 取り消せない操作の警告 */
.warn {
  border-left: 3px solid var(--danger);
  background: rgba(192,57,43,.05);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 28px;
}
.warn p:last-child { margin-bottom: 0; }
.warn strong { color: var(--danger); }

/* ---------- 手順 ---------- */

.steps { display: flex; flex-direction: column; gap: 48px; margin: 0 0 64px; }

.step { display: flex; flex-direction: column; gap: 12px; }
.step h2 { margin: 0; }
.step p  { margin: 0; }

.step-num {
  display: flex; align-items: baseline; gap: 12px; margin: 0;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
}
.step-num .n {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 26px; line-height: 1; letter-spacing: 0;
}
.step--takeoff .step-num { color: var(--brand); }
.step--landing .step-num { color: var(--landing); }
.step--pending .step-num { color: var(--pending); }

/* ---------- 画像 ---------- */

.shot {
  width: 100%; height: auto; display: block; margin-top: 6px;
  border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.shot--tall { max-width: 420px; }     /* 縦長のスクリーンショット */
.shot--crop { max-width: 620px; }     /* 画面の一部を切り出したもの（等倍で置く） */
.caption { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* 画面全体を横に添える段組み */
.orient { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; margin: 0 0 56px; }
.orient img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.orient h2 { margin: 0 0 10px; font-size: 20px; }
@media (max-width: 700px) {
  .orient { grid-template-columns: 1fr; gap: 20px; }
  .orient img { max-width: 260px; margin: 0 auto; }
}

/* まだ画像が無い場所の目印。差し込んだら削除する。 */
.shot-todo {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  background: var(--card);
}

/* ---------- 表 ---------- */

.table-wrap { overflow-x: auto; margin: 0 0 28px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 700; white-space: nowrap; background: var(--sunken); }
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 700; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 定義リスト（覚えておくこと） ---------- */

.notes { margin-top: 64px; }
.notes h2 {
  margin: 0 0 20px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.notes dl { margin: 0; display: grid; grid-template-columns: 210px 1fr; border-top: 1px solid var(--border); }
.notes dt { font-weight: 700; padding: 18px 24px 18px 0; border-bottom: 1px solid var(--border); }
.notes dd { margin: 0; padding: 18px 0; color: var(--muted); border-bottom: 1px solid var(--border); }
@media (max-width: 620px) {
  .notes dl { grid-template-columns: 1fr; }
  .notes dt { padding-bottom: 2px; border-bottom: none; }
  .notes dd { padding-top: 0; }

  /* th と td:first-child の nowrap は、PC では見出し・ラベル列を
     きれいに1行へ収めるための指定だが、本文が長い見出しやラベル
     （「地図で飛行範囲を登録した許可（個別申請）」等）ではスマホ幅を
     超えて表ごと横スクロールが必要になってしまう。狭い画面では折り返す。 */
  th, td:first-child { white-space: normal; }
  table { font-size: 14px; }
  th, td { padding: 9px 10px; }
}

/* ---------- 画面上のボタンの見本 ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 2px 12px;
  font-size: 14px; font-weight: 700; color: #fff;
  white-space: nowrap; line-height: 1.7;
}
.btn--takeoff { background: var(--brand); }
.btn--landing { background: var(--landing); }
.btn--danger  { background: var(--danger); }

/* ---------- 索引のカード ---------- */

.cards { display: flex; flex-direction: column; gap: 14px; }
.card {
  display: block; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  padding: 22px 24px; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(26,58,82,.08), 0 14px 32px rgba(26,58,82,.12); }
.card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.card h2 { margin: 0 0 6px; font-size: 19px; color: var(--brand); }
.card p  { margin: 0; font-size: 15px; color: var(--muted); }

.group-title {
  margin: 40px 0 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.group-title:first-of-type { margin-top: 0; }

/* ---------- 記事送り ---------- */

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; font-size: 15px; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager .spacer { flex: 1; }

/* 記事タイトルが長いと、狭い画面では前後のリンクが1行に収まりきらず
   互いに詰まって読みにくい。前後関係が分かればよいので、
   スマホでは素直に縦に積む（前後どちらか片方しか無いページも
   flex-direction: column なら特別扱いせずそのまま自然に並ぶ）。 */
@media (max-width: 480px) {
  .pager { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pager .spacer { display: none; }
}

/* ---------- フッター ---------- */

footer {
  margin-top: 64px; padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px; line-height: 1.8;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
