:root {
  --pilot-bg: #f3f6fa;
  --pilot-surface: #ffffff;
  --pilot-ink: #172033;
  --pilot-muted: #6f7d91;
  --pilot-line: #dce3ed;
  --pilot-navy: #0b1a30;
  --pilot-navy-2: #142846;
  --pilot-gold: #c9a961;
  --pilot-green: #0f9d58;
  --pilot-amber: #b7791f;
  --pilot-red: #d23b3b;
  --pilot-blue: #2563eb;
}
body { background: var(--pilot-bg); color: var(--pilot-ink); }
button { -webkit-tap-highlight-color: transparent; }
.p-head { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(220,227,237,.9); }
.p-head-inner { display: flex; justify-content: space-between; align-items: center; max-width: 430px; margin: 0 auto; padding: 10px 14px; gap: 10px; }
.brandline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brandmark { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--pilot-navy); color: var(--pilot-gold); box-shadow: 0 8px 22px rgba(11,26,48,.18); }
.p-title { min-width: 0; }
.p-title b { display: block; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-title small { display: block; margin-top: 1px; font-size: 10px; color: var(--pilot-muted); letter-spacing: .08em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-head-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.clock-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 9px; border-radius: 999px; background: #ebf7f0; color: #167346; border: 1px solid #c7ead6; font-size: 11px; font-weight: 800; }
.clock-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(15,157,88,.45); animation: live-ring 1.4s ease-out infinite; }
.p-logout { min-height: 32px; padding: 5px 9px; border: 1px solid #c7d0dd; border-radius: 8px; background: #fff; color: var(--pilot-navy); cursor: pointer; font-family: inherit; font-size: 10.5px; font-weight: 900; }
.p-logout:hover { background: #f4f6f9; border-color: #9eacbf; }
.p-logout:focus-visible { outline: 2px solid var(--pilot-blue); outline-offset: 2px; }
.p-logout:disabled { cursor: wait; opacity: .55; }
.wrap { max-width: 430px; margin: 0 auto; padding: 12px 12px calc(72px + env(safe-area-inset-bottom)); }
.pos-card { background: linear-gradient(135deg, var(--pilot-navy), var(--pilot-navy-2)); color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 14px; box-shadow: 0 12px 28px rgba(11,26,48,.18); }
.pos-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pos-label { display: flex; align-items: center; gap: 6px; color: #c5d0df; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.pos-value { margin-top: 2px; font-size: 22px; line-height: 1.25; font-weight: 900; color: var(--pilot-gold); }
.pos-meta { margin-top: 2px; color: #a8b7cc; font-size: 11px; }
.pos-card .help { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #d8e3f2; }
.pos-card .help:hover, .pos-card .help:focus-visible, .pos-card .help.is-open { background: rgba(255,255,255,.16); color: #fff; }
.pos-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.pos-seg button { min-height: 42px; border: 0; border-radius: 6px; background: transparent; color: #b8c6d9; font-size: 13px; font-weight: 900; cursor: pointer; transition: background .15s, color .15s, opacity .15s; }
.pos-seg button.on, .pos-seg button[aria-pressed="true"] { background: #fff; color: var(--pilot-navy); box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.pos-seg button:disabled { cursor: not-allowed; opacity: .55; }
.pos-seg button.on:disabled, .pos-seg button[aria-pressed="true"]:disabled { cursor: default; opacity: 1; }
.pos-seg button.is-loading { position: relative; color: transparent !important; opacity: 1; cursor: progress; }
.pos-seg button.is-loading::after { content: ""; position: absolute; width: 1.1em; height: 1.1em; top: calc(50% - .55em); left: calc(50% - .55em); border: 2px solid currentColor; border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; color: var(--pilot-navy); animation: btn-spin .7s linear infinite; }
.brief { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--pilot-line); color: var(--pilot-muted); font-size: 12px; line-height: 1.6; }
.brief .ic { margin-top: 3px; color: var(--pilot-blue); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 2px 8px; }
.section-head h1 { display: flex; align-items: center; gap: 7px; font-size: 14px; line-height: 1.3; letter-spacing: 0; }
.section-head span { color: var(--pilot-muted); font-size: 11px; font-weight: 700; }
.fl-card { position: relative; background: var(--pilot-surface); border: 1px solid var(--pilot-line); border-radius: 8px; margin-top: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(17,32,55,.04), 0 8px 22px rgba(17,32,55,.07); }
.fl-card.is-processing::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.42); pointer-events: none; }
.fl-head { padding: 13px 14px 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border-bottom: 1px solid #edf1f6; }
.flight-main { min-width: 0; }
.flight-time { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.flight-time .tm { font-size: 25px; line-height: 1; font-weight: 900; letter-spacing: 0; color: var(--pilot-navy); }
.flight-time .dir { font-size: 12px; color: var(--pilot-muted); font-weight: 800; }
.flight-sub { margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--pilot-muted); font-size: 11px; font-weight: 700; }
.status-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.processing-label { display: none; align-items: center; gap: 5px; color: var(--pilot-blue); font-size: 10.5px; font-weight: 800; }
.is-processing .processing-label { display: inline-flex; }
.processing-label::before { content: ""; width: 9px; height: 9px; border: 2px solid currentColor; border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; animation: btn-spin .7s linear infinite; }
.badge-dark { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-dark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bd-green { background: #e6f4ea; color: var(--pilot-green); }
.bd-amber { background: #fff4df; color: var(--pilot-amber); }
.bd-red { background: #fdecec; color: var(--pilot-red); }
.bd-gray { background: #eef1f5; color: #738197; }
.bd-blue { background: #e8f0fe; color: var(--pilot-blue); }
.bd-navy { background: #e9eef6; color: var(--pilot-navy-2); }
.fl-body { padding: 12px 14px 14px; }
.flight-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.flight-step { position: relative; min-height: 46px; padding: 8px 7px; border-radius: 7px; background: #f6f8fb; border: 1px solid #e8edf4; color: var(--pilot-muted); }
.flight-step b { display: block; font-size: 11px; line-height: 1.25; }
.flight-step span { display: block; margin-top: 2px; font-size: 10px; line-height: 1.25; font-weight: 700; }
.flight-step.done { background: #edf8f2; border-color: #cdebd9; color: var(--pilot-green); }
.flight-step.now { background: #fff6e8; border-color: #f4d39a; color: var(--pilot-amber); }
.flight-step.stop { background: #fff0f0; border-color: #f5caca; color: var(--pilot-red); }
.ops-note { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border: 1px solid #e9eef5; border-radius: 8px; background: #f8fafc; color: var(--pilot-muted); font-size: 11.5px; line-height: 1.55; margin-bottom: 10px; }
.ops-note .ic { margin-top: 2px; color: var(--pilot-blue); }
.ops-note.warn { background: #fff8ec; border-color: #f3d7a7; color: #8a5a12; }
.ops-note.warn .ic { color: var(--pilot-amber); }
.ops-note.danger { background: #fff1f1; border-color: #f3c6c6; color: #9f2727; }
.ops-note.danger .ic { color: var(--pilot-red); }
.wb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--pilot-line); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.wb-item { min-width: 0; padding: 10px 8px; background: #fff; border-right: 1px solid var(--pilot-line); }
.wb-item:last-child { border-right: 0; }
.wb-item .k { display: flex; align-items: center; gap: 4px; min-height: 18px; font-size: 10px; color: var(--pilot-muted); font-weight: 900; letter-spacing: .04em; }
.wb-item .v { margin-top: 2px; font-size: 17px; line-height: 1.2; font-weight: 900; color: var(--pilot-navy); overflow-wrap: anywhere; }
.wb-item .v.warn { color: var(--pilot-amber); }
.wb-item .v.red { color: var(--pilot-red); }
.pax-list { margin: 4px 0 10px; border-top: 1px solid #edf1f6; }
.pax-line { min-height: 34px; padding: 7px 0; border-bottom: 1px solid #edf1f6; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: #3f4b5f; }
.pax-line span:last-child { flex: none; color: var(--pilot-muted); font-weight: 800; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.panel-head b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--pilot-navy); }
.decision-panel, .report-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf1f6; }
.decision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.btn-decision { position: relative; min-width: 0; min-height: 58px; border: 1.5px solid var(--pilot-line); border-radius: 8px; background: #fff; color: var(--pilot-ink); cursor: pointer; font-weight: 900; transition: transform .15s, border-color .15s, box-shadow .15s, opacity .15s, background .15s; }
.btn-decision:hover:not(:disabled):not(.is-loading) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(17,32,55,.08); }
.btn-decision:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-decision:disabled { cursor: not-allowed; opacity: .58; filter: grayscale(.18); }
.btn-decision .main { display: flex; justify-content: center; align-items: center; gap: 4px; font-size: 13px; line-height: 1.2; }
.btn-decision .sub { display: block; margin-top: 4px; color: var(--pilot-muted); font-size: 10px; line-height: 1.2; }
.btn-decision.go { border-color: rgba(15,157,88,.35); }
.btn-decision.hold { border-color: rgba(183,121,31,.35); }
.btn-decision.nogo { border-color: rgba(210,59,59,.35); }
.btn-decision.go:not(:disabled) .main { color: var(--pilot-green); }
.btn-decision.hold:not(:disabled) .main { color: var(--pilot-amber); }
.btn-decision.nogo:not(:disabled) .main { color: var(--pilot-red); }
.btn-decision.is-selected.go { background: #eaf8f0; border-color: var(--pilot-green); color: var(--pilot-green); box-shadow: inset 0 0 0 1px var(--pilot-green); }
.btn-decision.is-selected.hold { background: #fff4df; border-color: var(--pilot-amber); color: var(--pilot-amber); box-shadow: inset 0 0 0 1px var(--pilot-amber); }
.btn-decision.is-selected.nogo { background: #fdecec; border-color: var(--pilot-red); color: var(--pilot-red); box-shadow: inset 0 0 0 1px var(--pilot-red); }
.state-text { display: inline-flex; align-items: center; justify-content: center; min-height: 17px; margin-top: 5px; padding: 2px 5px; border-radius: 999px; background: #f1f4f8; color: var(--pilot-muted); font-size: 9.5px; line-height: 1; font-weight: 900; }
.is-selected .state-text { background: rgba(255,255,255,.72); color: currentColor; }
.btn-decision.is-loading { color: transparent !important; pointer-events: none; opacity: 1; }
.btn-decision.is-loading .main, .btn-decision.is-loading .sub, .btn-decision.is-loading .state-text { opacity: 0; }
.btn-decision.is-loading::after, .p-btn.is-loading::after { content: ""; position: absolute; width: 1.1em; height: 1.1em; top: calc(50% - .55em); left: calc(50% - .55em); border: 2px solid var(--pilot-navy); border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; animation: btn-spin .7s linear infinite; }
.decision-readonly { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 10px 0 0; color: var(--pilot-muted); font-size: 12px; border-top: 1px solid #edf1f6; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-btn { position: relative; min-height: 44px; border: 1px solid var(--pilot-line); border-radius: 8px; background: #fff; color: var(--pilot-ink); cursor: pointer; font-size: 12px; line-height: 1.3; font-weight: 900; display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 9px 10px; transition: transform .15s, box-shadow .15s, opacity .15s, background .15s, border-color .15s; }
.p-btn:hover:not(:disabled):not(.is-loading) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(17,32,55,.08); }
.p-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.p-btn:disabled { cursor: not-allowed; opacity: .48; filter: grayscale(.24); }
.p-btn.primary { background: var(--pilot-navy); border-color: var(--pilot-navy); color: #fff; }
.p-btn.success { background: var(--pilot-green); border-color: var(--pilot-green); color: #fff; }
.p-btn.warn { background: #fff8ec; border-color: #e7bc71; color: #8a5a12; }
.p-btn.danger { background: #fff1f1; border-color: #ecb1b1; color: var(--pilot-red); }
.p-btn.is-selected { background: #edf8f2; border-color: #bfe6cf; color: var(--pilot-green); box-shadow: inset 0 0 0 1px #bfe6cf; }
.p-btn.is-loading { color: transparent !important; pointer-events: none; opacity: 1; }
.p-btn.is-loading .ic { opacity: 0; }
.p-btn.primary.is-loading::after, .p-btn.success.is-loading::after { border-color: rgba(255,255,255,.9); border-right-color: transparent; border-bottom-color: transparent; }
.action-hint { margin-top: 7px; color: var(--pilot-muted); font-size: 11px; line-height: 1.45; }
.atb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.empty-dark { text-align: center; color: var(--pilot-muted); background: #fff; border: 1px dashed #cfd8e5; border-radius: 8px; padding: 38px 18px; font-size: 13px; line-height: 1.7; }
.load-error { margin-top: 12px; padding: 14px; border-radius: 8px; background: #fff1f1; border: 1px solid #f1c6c6; color: #9f2727; font-size: 13px; line-height: 1.7; }
/* ---------------- ヘッダーナビ（運航判断 / スケジュール） ---------------- */
.p-nav { display: flex; gap: 6px; max-width: 430px; margin: 0 auto; padding: 0 14px 8px; }
.p-nav a { flex: 1; text-align: center; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--pilot-line); background: #fff; color: var(--pilot-muted); font-size: 12px; font-weight: 900; text-decoration: none; transition: background .15s, color .15s; }
.p-nav a.on { background: var(--pilot-navy); border-color: var(--pilot-navy); color: #fff; }

/* ---------------- スケジュール画面 ---------------- */
.sched-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.sched-tab { min-height: 52px; padding: 6px 4px; border: 1.5px solid var(--pilot-line); border-radius: 8px; background: #fff; color: var(--pilot-ink); cursor: pointer; font-weight: 900; transition: transform .15s, border-color .15s, background .15s; }
.sched-tab b { display: block; font-size: 13px; line-height: 1.2; }
.sched-tab span { display: block; margin-top: 3px; font-size: 9.5px; line-height: 1.2; color: var(--pilot-muted); font-weight: 800; }
.sched-tab:hover:not(.on) { transform: translateY(-1px); border-color: #b9c6d8; }
.sched-tab.on { background: var(--pilot-navy); border-color: var(--pilot-navy); color: #fff; }
.sched-tab.on span { color: #c5d0df; }
.sched-tab.cal b .ic { margin-right: 2px; }
.sched-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.sched-summary { display: flex; gap: 12px; flex-wrap: wrap; min-width: 0; }
.sched-summary-item small { display: block; color: var(--pilot-muted); font-size: 9.5px; font-weight: 800; letter-spacing: .04em; }
.sched-summary-item b { display: block; margin-top: 1px; font-size: 12px; color: var(--pilot-navy); }
.dummy-toggle { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 10px 4px 5px; border-radius: 999px; border: 1.5px solid var(--pilot-line); background: #fff; color: var(--pilot-muted); font-size: 11px; font-weight: 900; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.dummy-toggle .dt-knob { width: 22px; height: 22px; border-radius: 50%; background: #cfd8e5; transition: background .15s; }
.dummy-toggle.on { background: #fff4df; border-color: var(--pilot-amber); color: var(--pilot-amber); }
.dummy-toggle.on .dt-knob { background: var(--pilot-amber); }
.sched-card .fl-body { padding-top: 10px; }
.wb-item .v .unit { font-size: 11px; font-weight: 800; color: var(--pilot-muted); margin-left: 1px; }
.rsv-list { border-top: 1px solid #edf1f6; }
.rsv-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 8px 2px; border: 0; border-bottom: 1px solid #edf1f6; background: transparent; cursor: pointer; text-align: left; transition: background .15s; }
.rsv-row:hover { background: #f6f8fb; }
.rsv-main { min-width: 0; }
.rsv-main b { display: block; font-size: 13px; color: var(--pilot-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsv-main small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--pilot-muted); font-weight: 700; }
.rsv-side { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.rsv-side .chev { color: #b3c0d2; font-size: 18px; font-weight: 900; }
.drill-status { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.drill-section { margin-top: 14px; }
.drill-section h4 { font-size: 12px; color: var(--pilot-navy); margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #edf1f6; }
.drill-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; font-size: 12.5px; }
.drill-kv span { flex: none; color: var(--pilot-muted); font-weight: 700; }
.drill-kv b { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.drill-pax { padding: 7px 0; border-bottom: 1px solid #f2f5f9; }
.drill-pax-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.drill-pax-head span { color: var(--pilot-muted); font-weight: 800; }
.drill-pax-meta { margin-top: 2px; font-size: 11px; color: var(--pilot-muted); }

@media (max-width: 360px) {
  .wrap { padding-left: 10px; padding-right: 10px; }
  .p-head-inner { padding-left: 10px; padding-right: 10px; }
  .p-head-actions { gap: 4px; }
  .clock-pill { padding-left: 7px; padding-right: 7px; }
  .p-logout { width: 32px; overflow: hidden; padding: 0; color: transparent; position: relative; }
  .p-logout::before { content: "\21AA"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--pilot-navy); font-size: 15px; }
  .flight-time .tm { font-size: 22px; }
  .btn-decision .main { font-size: 12px; }
  .p-btn { font-size: 11.5px; padding-left: 7px; padding-right: 7px; }
}
