/* 飛行機のモバイルバッテリー早見：紙の搭乗券の色（生成り・紺のインク・青緑の 1 色）。判定は色だけにせず ○△× の記号と文字を並べる */
:root {
  --paper: #f4efe4; --ink: #1b2433; --muted: #566074; --line: #cdc4b0; --accent: #0d5c63; --accent-soft: #dcebe6;
  --warn: #b3261e;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Times New Roman", serif;
  --sans: "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif;
  --r-s: 4px; --r-m: 12px; --r-pill: 999px;
  --t-fast: 150ms; --t-stamp: 280ms; --t-print: 700ms;
}
[hidden] { display: none !important; }
html { background: var(--paper); color-scheme: light; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.7; }
a { color: var(--accent); text-underline-offset: 3px; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--ink); }
.site-name { color: var(--ink); font-family: var(--serif); font-weight: 700; letter-spacing: 0.06em; }
.site-name::before { content: "✈ "; color: var(--accent); }
.pr-notice, .site-footer, .note, .hint { color: var(--muted); }
.site-footer { border-top-color: var(--line); }
.site-footer a { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.4; color: var(--ink); }
h1 { font-size: 1.5rem; margin-bottom: 8px; }
h2 { font-size: 1.25rem; border-left: 0; padding-left: 0; padding-top: 12px; border-top: 1px solid var(--ink); margin: 48px 0 16px; }
h3 { font-size: 1rem; }
.lead { margin: 0 0 16px; }
.stamps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; font-size: 0.8125rem; }
.stamps li { border: 1px solid var(--ink); border-radius: var(--r-pill); padding: 4px 12px; background: transparent; }
table { font-variant-numeric: tabular-nums; }
th, td { border-color: var(--line); }
th { background: var(--accent-soft); color: var(--ink); }
caption { text-align: left; font-size: 0.8125rem; color: var(--muted); padding: 4px 0; }
button { font-family: var(--sans); min-height: 44px; border-radius: var(--r-s); border: 1px solid var(--ink); background: var(--accent); color: var(--paper); transition: transform var(--t-fast), background-color var(--t-fast); }
button:active { transform: scale(0.97); }
button.secondary { background: transparent; color: var(--ink); }
input[type="text"] { min-height: 44px; border-radius: var(--r-s); border: 1px solid var(--ink); background: #fffdf7; color: var(--ink); font-size: 1rem; padding: 0 12px; }
input[aria-invalid="true"] { border: 2px solid var(--warn); }
.err { color: var(--warn); font-size: 0.8125rem; min-height: 1.2em; margin: 4px 0 0; font-weight: 700; }
.msg { font-size: 0.8125rem; min-height: 1.2em; margin: 8px 0 0; overflow-wrap: anywhere; }

/* 搭乗券：左が入力と結果、右（PC）か下（スマホ）の半券に判定の件数 */
.pass { position: relative; border: 1px solid var(--ink); border-radius: var(--r-m); background: #fffdf7; box-shadow: 0 2px 8px rgba(27, 36, 51, 0.08); margin: 16px 0 24px; overflow: hidden; animation: print var(--t-print) cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.pass-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; background: var(--ink); color: var(--paper); padding: 8px 16px; font-size: 0.8125rem; letter-spacing: 0.1em; }
.pass-head b { font-family: var(--serif); font-size: 1rem; letter-spacing: 0.12em; }
.pass-body { padding: 16px; }
.field { margin: 0 0 16px; }
.field label, .field .lab { display: block; font-size: 0.8125rem; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.04em; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row input[type="text"] { flex: 1; min-width: 8em; }
.chip { min-width: 44px; padding: 0 12px; background: transparent; color: var(--ink); border-radius: var(--r-pill); border-color: var(--line); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 700; }
.unit { color: var(--muted); font-size: 0.875rem; }
.out { border-top: 1px dashed var(--ink); padding-top: 16px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.out-label { font-size: 0.8125rem; letter-spacing: 0.1em; color: var(--muted); }
.out-wh { font-family: var(--serif); font-size: 3.5rem; line-height: 1.1; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.out-wh small { font-size: 1.25rem; margin-left: 4px; }
.out-sub { font-size: 0.875rem; color: var(--muted); min-height: 1.5em; }
.tally { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tally li { border: 1px solid var(--ink); border-radius: var(--r-s); padding: 4px 12px; font-size: 0.875rem; }
.tally b { font-size: 1.25rem; font-family: var(--serif); margin: 0 2px; }
.tally .ok { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.tally .cond { background: var(--accent-soft); border-style: dashed; }
.tally .ng { color: var(--warn); border-color: var(--warn); }
.stamp { display: none; justify-self: start; border: 3px solid var(--accent); color: var(--accent); border-radius: var(--r-s); padding: 0 12px; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.16em; transform: rotate(-4deg); }
.stamp.show { display: inline-block; }
.stamp.cond { border-style: dashed; }
.stamp.ng { color: var(--warn); border-color: var(--warn); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* 大事な注意（結果の表の前に置く） */
.notice { border: 2px solid var(--ink); border-radius: var(--r-s); background: var(--accent-soft); padding: 12px 16px; margin: 0 0 24px; }
.notice h2 { border: 0; padding: 0; margin: 0 0 8px; font-size: 1rem; }
.notice ul { margin: 0; padding-left: 1.2em; }
.notice li { margin-bottom: 4px; }

/* 各社の判定の表 */
.board { margin: 0 0 24px; }
.board h3 { margin: 24px 0 8px; font-size: 1rem; }
.air { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.air li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.air .nm { font-family: var(--serif); font-weight: 700; font-size: 1rem; line-height: 1.5; }
.air .nt { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--muted); line-height: 1.6; }
.air .use { grid-column: 1 / -1; font-size: 0.8125rem; line-height: 1.6; }
.air .use b { font-weight: 700; }
.air .more { font-size: 0.8125rem; }
.badge { display: inline-flex; align-items: center; gap: 4px; min-width: 7.5em; justify-content: center; border: 1px solid var(--ink); border-radius: var(--r-s); padding: 0 8px; min-height: 32px; font-size: 0.875rem; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.badge.cond { background: var(--accent-soft); border-style: dashed; }
.badge.ng { color: var(--warn); border-color: var(--warn); background: transparent; }
.air li.ng .nm { color: var(--muted); }
.empty { text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-s); padding: 24px 16px; margin: 0; }

/* このサイトのページへの入口 */
.site-pages { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 48px 0 0; }
.site-pages a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--r-pill); text-decoration: none; color: var(--ink); }
.site-pages a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* 分布：横の帯の長さが社の数 */
.dist th, .dist td { padding: 8px; vertical-align: middle; }
.dist thead th { font-size: 0.8125rem; line-height: 1.4; }
.dist tbody th { white-space: nowrap; font-family: var(--serif); }
.stack { display: flex; height: 24px; min-width: 140px; border: 1px solid var(--ink); border-radius: var(--r-s); overflow: hidden; background: #fffdf7; }
.stack span { display: block; min-width: 0; height: 100%; }
.stack .ok { background: var(--accent); }
.stack .cond { background: repeating-linear-gradient(135deg, var(--accent-soft) 0 4px, #fffdf7 4px 8px); border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.stack .ng { background: var(--warn); }
.nums { font-size: 0.8125rem; margin-top: 4px; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; margin: 8px 0 16px; font-size: 0.8125rem; }
.sw { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--ink); border-radius: var(--r-s); vertical-align: -2px; margin-right: 4px; }
.sw.ok { background: var(--accent); }
.sw.cond { background: repeating-linear-gradient(135deg, var(--accent-soft) 0 3px, #fffdf7 3px 6px); }
.sw.ng { background: var(--warn); }
.cls { list-style: none; padding: 0; margin: 0 0 16px; }
.cls li { border-top: 1px solid var(--line); padding: 12px 0; }
.cls .cn { font-weight: 700; }
.cls .cc { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; margin-left: 8px; }
.cls .cm { display: block; font-size: 0.8125rem; color: var(--muted); }
.bar { display: block; height: 8px; margin-top: 4px; background: var(--line); border-radius: var(--r-pill); overflow: hidden; }
.bar::before { content: ""; display: block; height: 100%; width: var(--p); background: var(--accent); }
.facts dt { font-family: var(--serif); }

/* 各社の規定（出どころの一覧） */
.sources { padding-left: 0; list-style: none; font-size: 0.875rem; }
.sources li { margin-bottom: 24px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: #fffdf7; overflow-wrap: anywhere; }
.sources h3 { margin: 0 0 4px; font-size: 1rem; }
.sources q { quotes: "「" "」"; }
.sources .kv { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; margin: 8px 0; font-size: 0.8125rem; }
.sources .kv dt { color: var(--muted); }
.sources .kv dd { margin: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; }
.jump a { display: inline-flex; min-height: 44px; align-items: center; }
.wh-table td, .wh-table th { white-space: nowrap; }
.limits th[scope="row"] { font-family: var(--serif); font-weight: 700; }
.limits td { text-align: right; white-space: nowrap; }
.limits .none { color: var(--muted); }
.limits .area { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.75rem; color: var(--muted); }

@media (min-width: 720px) {
  .pass-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .out { border-top: 0; border-left: 1px dashed var(--ink); padding: 0 0 0 32px; align-content: start; }
}

/* 入口の見せ場：搭乗券が 1 回だけ出てくる（0.7 秒）。手ざわり：判定の印が押される（0.28 秒）。動きを減らす設定では全部止める */
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-8px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes press { from { transform: rotate(-4deg) scale(1.35); } to { transform: rotate(-4deg) scale(1); } }
.stamp.pop { animation: press var(--t-stamp) ease-out both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pass { clip-path: none; transform: none; }
}
