:root {
  --bg: #07090c;
  --panel: #0f1216;
  --row-alt: #12161b;
  --tile: #1c2026;
  --line: #262b32;
  --amber: #ffc83d;
  --text: #f1f3f5;
  --muted: #8b939e;
  --green: #3ddc84;
  --red: #ff5a5a;
  --blue: #5ab0ff;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --jp: 'Noto Sans JP', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 500px at 50% -200px, #1a2130 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--jp);
  min-height: 100vh;
  padding-bottom: 32px;
}
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
small { font-size: .7em; }
[hidden] { display: none !important; }

/* ---------- アイコン（icons.js。絵文字のかわりの、1 色のシンプルなアイコン） ---------- */
.ic { display: inline-block; width: 1.08em; height: 1.08em; vertical-align: -.18em; fill: currentColor; flex: none; }
.ic .s { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic .t { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.icon-btn .ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.logo .ic { width: 28px; height: 28px; vertical-align: 0; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--amber); color: #000; border-radius: 10px; font-size: 26px;
}
.brand-en { font-family: var(--mono); font-weight: 800; letter-spacing: .08em; font-size: 18px; }
.brand-jp { color: var(--muted); font-size: 12px; margin-top: 2px; }
.clock { text-align: right; font-family: var(--mono); }
#clock-time { font-size: 30px; font-weight: 800; color: var(--amber); letter-spacing: .05em; }
#clock-date { color: var(--muted); font-size: 12px; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; align-items: center; gap: 8px; padding: 12px 24px;
  max-width: 1320px; margin: 0 auto;
}
.tab {
  background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 8px;
  border: 1px solid transparent; font-weight: 500;
}
.tab small { font-family: var(--mono); margin-left: 4px; opacity: .7; }
.tab.active { color: var(--amber); border-color: var(--line); background: var(--panel); }
.spacer { flex: 1; }
.icon-btn {
  background: var(--panel); border: 1px solid var(--line); width: 38px; height: 38px;
  border-radius: 8px; font-size: 16px;
}
.primary {
  background: var(--amber); color: #111; font-weight: 700; padding: 9px 16px; border-radius: 8px;
}
.primary:hover { filter: brightness(1.08); }
.ghost {
  background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px;
}
.ghost:hover, .icon-btn:hover { border-color: #3a414b; }
.danger { background: transparent; color: var(--red); border: 1px solid #5a2a2a; padding: 8px 14px; border-radius: 8px; }
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

main { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
/* ページの下：このサイトについて（お断り・出典） */
.site-foot { max-width: 1320px; margin: 40px auto 0; padding: 22px 24px 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }
.site-foot p { margin: 0 0 6px; }
.site-credit { font-size: 11px; opacity: .85; }
.site-copy { margin-top: 10px !important; opacity: .7; }

/* ---------- welcome ---------- */
.welcome { margin: 4px 0 12px; font-size: 20px; font-weight: 700; }
.welcome small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.dlg-lead { color: var(--muted); font-size: 14px; line-height: 1.7; margin: -4px 0 16px; }

/* ---------- announce ---------- */
.announce {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: #10151d; border: 1px solid var(--amber); color: var(--text);
  padding: 12px 18px; border-radius: 10px; max-width: min(640px, calc(100% - 32px));
  display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 10px 40px rgba(0,0,0,.6);
  animation: drop .35s ease-out;
}
@keyframes drop { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- board（反転フラップ式案内表示機） ---------- */
.board-head { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.board-date { font-size: 18px; font-weight: 700; min-width: 220px; text-align: center; }

.fids-frame {
  background: linear-gradient(180deg, #7a7d82, #45484d 30%, #34363a);
  padding: 12px; border-radius: 6px;
  box-shadow: 0 30px 70px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.35);
}
.fids {
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  background: #0b0b0c; border-radius: 2px; overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,0,0,.9);
}

/* 左パネル */
.fids-side {
  padding: 22px 12px 16px; display: flex; flex-direction: column; align-items: center;
  gap: 3px; text-align: center; border-right: 1px solid #1c1c1e; color: #f2f2f2;
}
.dep-icon {
  width: 66px; height: 66px; background: #17a85a; border-radius: 3px;
  display: grid; place-items: center; margin-bottom: 12px;
}
.dep-jp { font-size: 30px; font-weight: 700; letter-spacing: .35em; margin-left: .35em; line-height: 1.2; }
.dep-en { font-size: 19px; font-weight: 500; }
.dep-ru { font-size: 11px; letter-spacing: .04em; }
.dep-asia { font-size: 11px; color: #ddd; letter-spacing: .2em; }
.led-clock {
  font-family: var(--mono); font-style: italic; font-weight: 800; font-size: 34px;
  color: #ff2b17; text-shadow: 0 0 6px rgba(255, 43, 23, .85), 0 0 18px rgba(255, 43, 23, .35);
  background: #060202; padding: 2px 12px; margin: 14px 0; letter-spacing: .06em;
}
.poster {
  margin-top: auto; width: 100%; background: #fff; color: #c8102e; border-radius: 2px;
  padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 3px solid #c8102e; font-weight: 700;
}
.poster:hover { filter: brightness(.95); }
.poster-top { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.poster-plane { font-size: 34px; line-height: 1.1; } /* アイコンの飛行機は、もともと斜め上を向いている */
.poster-big { font-family: var(--mono); font-size: 30px; font-weight: 800; line-height: 1.1; }
.poster-lbl { font-size: 12px; color: #333; }
.poster-stamp {
  margin-top: 8px; font-size: 11px; background: #c8102e; color: #fff; padding: 3px 8px; border-radius: 2px;
}

/* 表 */
.fids-main { padding: 14px 16px 0; min-width: 0; display: flex; flex-direction: column; }
.frow {
  display: grid;
  grid-template-columns: 14px 100px 64px minmax(0, 1fr) 102px 102px 136px 46px;
  gap: 8px; align-items: center;
}
.frow > * { min-width: 0; }
.fhead { align-items: end; padding-bottom: 10px; border-bottom: 1px solid #1c1c1e; margin-bottom: 6px; }
.h { display: flex; flex-direction: column; line-height: 1.15; color: #eee; }
.h-ja { font-size: 13px; font-weight: 700; }
.h-en { font-size: 14px; }
.h-sub { font-size: 8px; color: #b5b5b5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#rows .frow { padding: 4px 4px; margin: 0 -4px; border-radius: 3px; cursor: pointer; transition: background .15s; }
#rows .frow:hover, #rows .frow:focus-visible { background: #19191c; outline: none; }
#rows .frow.blank { cursor: default; }
#rows .frow.blank:hover { background: transparent; }
#rows .frow.done { opacity: .45; }

.dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: #707276; box-shadow: inset 0 -2px 3px rgba(0,0,0,.45); }
.dot.on { background: #2fd26f; box-shadow: 0 0 8px rgba(47, 210, 111, .75); }
.dot.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { opacity: .25; } }

/* 航空会社ロゴ */
.al {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 24px;
  background: #f6f6f6; border-radius: 2px; font-weight: 800; font-size: 11px; white-space: nowrap; overflow: hidden;
}
.al i { flex: none; display: block; }
.al-study { color: #0b3f94; font-family: var(--mono); font-style: italic; letter-spacing: .02em; }
.al-study i { width: 20px; height: 12px; background: repeating-linear-gradient(115deg, #0b3f94 0 3px, transparent 3px 6px); }
.al-work { color: #333; letter-spacing: .3em; }
.al-work i { width: 14px; height: 14px; border-radius: 50%; background: #d7001d; }

/* フラップ文字 */
.flap-text {
  font-family: var(--mono), var(--jp); font-weight: 500; color: #f5f5f5;
  white-space: nowrap; overflow: hidden; font-size: 22px;
}
.flap {
  display: inline-block; min-width: .74em; text-align: center; position: relative; line-height: 1.32;
  background: linear-gradient(#1d1d20 0 50%, #151517 50%); margin-right: 3px; padding: 0 .04em;
  border-radius: 2px; box-shadow: inset 0 0 0 1px #070707;
}
.flap::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #000; }
.flap.sp { background: transparent; box-shadow: none; }
.flap.sp::after { display: none; }
.c-no { text-align: right; }
.c-gate { text-align: center; }
.c-est .flap-text, .c-est.flap-text { color: #ffd23f; }

.c-dest { display: flex; align-items: center; gap: 10px; }
.c-dest .city { flex: none; max-width: 100%; }
.dest-sub { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.dest-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-en { font-size: 10px; color: #bdbdbd; }
.d-title { font-size: 11px; color: #e8e8e8; }

/* 備考 */
.c-rm {
  display: flex; flex-direction: column; justify-content: center; min-height: 32px;
  background: #141416; padding: 2px 8px; border-radius: 2px; color: #f2f2f2; line-height: 1.2;
}
.rm-ja { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-en { font-size: 9px; color: #aaa; }
.blank .c-rm { background: transparent; }
.st-boarding .rm-ja, .st-soon .rm-ja { color: #43e07f; }
.st-delayed .rm-ja, .st-cancelled .rm-ja, .st-changed .rm-ja { color: #ff6a55; }
.st-inflight .rm-ja { color: #7cc1ff; }

/* 赤いLEDの流れる文字 */
.led-ticker {
  margin: 12px -16px 0; background: #050202; height: 34px; overflow: hidden;
  display: flex; align-items: center; border-top: 1px solid #1a1a1a;
}
.led-ticker span {
  display: inline-block; white-space: nowrap; padding-left: 100%;
  color: #ff2b17; font-size: 17px; font-weight: 700; letter-spacing: .08em;
  text-shadow: 0 0 5px rgba(255, 43, 23, .8);
  animation: tick 45s linear infinite;
}
@keyframes tick { to { transform: translateX(-100%); } }

.empty-hint { padding: 16px 4px 0; text-align: center; color: var(--muted); line-height: 1.8; }
.summary { color: var(--muted); font-size: 13px; margin: 14px 4px; display: flex; gap: 18px; flex-wrap: wrap; }
.summary b { color: var(--text); font-family: var(--mono); }

/* ---------- passport ---------- */
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat b { display: block; font-family: var(--mono); font-size: 32px; color: var(--amber); }
.stat span { color: var(--muted); font-size: 13px; }
.sec-title { font-size: 16px; margin: 24px 0 12px; }
.sec-title small { font-family: var(--mono); color: var(--muted); margin-left: 6px; letter-spacing: .08em; }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; border: 3px double var(--c, #555); color: var(--c, #555);
  display: grid; place-items: center; text-align: center; font-family: var(--mono);
  padding: 12px; position: relative; transform: rotate(var(--r, 0deg));
}
.stamp b { display: block; font-size: 22px; letter-spacing: .06em; }
.stamp span { display: block; font-size: 11px; }
.stamp .cnt { position: absolute; bottom: 12%; left: 0; right: 0; font-size: 11px; }
.stamp.off { --c: #2e343c; transform: none; }
.log { list-style: none; padding: 0; margin: 0; }
.log li {
  display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center;
}
.log .l-no { font-family: var(--mono); color: var(--amber); width: 64px; flex: none; }
.log .l-city { width: 110px; flex: none; font-family: var(--mono); }
.log .l-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.log .l-date { font-family: var(--mono); color: var(--muted); font-size: 12px; }

/* ---------- dialogs ---------- */
.dlg {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; width: min(520px, calc(100% - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.7);
}
.dlg::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.dlg h3 { margin: 0 0 14px; }
.field { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.field input, .field select {
  display: block; width: 100%; margin-top: 6px; background: #080a0d; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px;
  color-scheme: dark;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--amber); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.seg input { position: absolute; opacity: 0; }
.seg span {
  display: block; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.seg span small { color: var(--muted); font-family: var(--mono); }
.seg input:checked + span { border-color: var(--amber); background: rgba(255,200,61,.1); }
.seg input:focus-visible + span { outline: 2px solid var(--amber); }
.dlg-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.dlg-actions.wrap { flex-wrap: wrap; }
.big { padding: 12px 20px; font-size: 16px; }

/* boarding pass（スマホの搭乗券のような縦長のカード。どの航空会社にも似せないオリジナル） */
.dlg-pass { width: min(460px, calc(100% - 24px)); }
.pass {
  --bp: #1f3f99; --bp2: #3a6bd8; --paper: #f5f7fb;
  position: relative; background: var(--paper); color: #172238; border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.pass.bp-work { --bp: #0e6b5d; --bp2: #1fa38c; }
.bp-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px;
  background: linear-gradient(120deg, var(--bp), var(--bp2)); color: #fff;
}
.bp-brand { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.bp-brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-mark { position: relative; width: 22px; height: 22px; flex: none; }
.bp-mark i { position: absolute; width: 13px; height: 13px; border-radius: 4px; transform: rotate(45deg); }
.bp-mark i:first-child { left: 0; top: 6px; background: #fff; }
.bp-mark i:last-child { right: 0; top: 0; background: rgba(255,255,255,.55); }
.bp-kind { text-align: right; flex: none; }
.bp-kind b { display: block; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; }
.pass .bp-kind small { font-size: 9px; color: rgba(255,255,255,.82); }
.bp-body { padding: 14px 18px 12px; }
.pass small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .06em; color: #6b7892; }
.pass b { display: block; font-weight: 500; }
.bp-top { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; }
.bp-top b { font-family: var(--mono); font-size: 16px; }
.bp-top .r, .bp-route .r { text-align: right; }
.bp-route { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 10px; margin: 14px 0 10px; }
.bp-route b { font-size: 46px; font-weight: 400; line-height: 1; letter-spacing: .02em; }
.bp-route small { font-size: 11px; letter-spacing: 0; color: #4c5a75; }
.bp-path { position: relative; height: 46px; display: flex; align-items: center; justify-content: center; }
.bp-path::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dotted #b7c2d6; }
.bp-path svg { position: relative; width: 38px; height: 23px; fill: var(--bp); background: var(--paper); padding: 0 4px; box-sizing: content-box; }
.bp-grid { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 10px 14px; padding: 10px 0; border-top: 1px solid #dde3ee; }
.bp-grid b { font-family: var(--mono); font-size: 16px; }
.bp-grid .w2 { grid-column: span 4; }
.bp-grid .w2 b { font-family: var(--jp); font-size: 14px; font-weight: 700; }
#p-status.st-boarding, #p-status.st-soon, #p-status.st-checkin { color: #0d8a4a; }
#p-status.st-delayed, #p-status.st-changed { color: #b26a00; }
#p-status.st-cancelled { color: #c62828; }
#p-status.st-inflight, #p-status.st-arrived { color: var(--bp); }
.bp-pax { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding-top: 10px; border-top: 1px solid #dde3ee; }
.bp-pax b { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.bp-pax > div:first-child b { font-family: var(--mono); letter-spacing: .04em; }
/* 切り取り線（左右の丸い切り欠き） */
.bp-tear { position: relative; height: 22px; }
.bp-tear::before { content: ''; position: absolute; left: 16px; right: 16px; top: 50%; border-top: 2px dashed #c3ccdc; }
.bp-tear::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 0 50%, var(--panel) 10px, transparent 10.5px),
              radial-gradient(circle at 100% 50%, var(--panel) 10px, transparent 10.5px);
}
.bp-stub { display: flex; align-items: center; gap: 16px; padding: 6px 18px 18px; }
.bp-qr { width: 104px; height: 104px; flex: none; background: #fff; padding: 6px; border-radius: 8px; box-shadow: inset 0 0 0 1px #dde3ee; }
.bp-qr svg { display: block; width: 100%; height: 100%; }
.bp-stub-txt b { font-size: 18px; font-weight: 700; color: var(--bp); }
.bp-stub-txt small { margin-top: 2px; }
.bp-serial { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: #4c5a75; letter-spacing: .08em; }
/* 使い終わった・欠航の搭乗券には、はんこを押す */
.bp-stamp {
  position: absolute; right: 22px; top: 212px; transform: rotate(-14deg);
  border: 3px double currentColor; border-radius: 10px; padding: 6px 14px; text-align: center;
  font-family: var(--mono); font-weight: 800; font-size: 20px; letter-spacing: .1em; color: rgba(31, 63, 153, .75);
  background: rgba(245, 247, 251, .6); pointer-events: none;
}
.bp-stamp small { color: inherit; font-size: 10px; letter-spacing: .08em; }
.bp-stamp.cancelled { color: rgba(198, 40, 40, .8); }
.pass-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; min-height: 1em; }

/* stamp dialog */
.dlg-stamp { text-align: center; }
.stamp-big {
  width: 220px; height: 220px; margin: 10px auto 6px; border-radius: 50%; border: 5px double var(--c);
  color: var(--c); display: grid; place-items: center; font-family: var(--mono); transform: rotate(-12deg);
  animation: stampin .5s cubic-bezier(.2, 1.6, .4, 1);
}
.stamp-big b { display: block; font-size: 34px; }
.stamp-big span { display: block; font-size: 12px; letter-spacing: .1em; }
@keyframes stampin { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } }
.stamp-msg { color: var(--muted); }

/* ---------- flight mode ---------- */
.flight {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 600px at 50% 110%, #1b2b4a 0%, #070a12 60%);
}
.flight::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent),
    radial-gradient(1px 1px at 40% 70%, #fff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent),
    radial-gradient(1px 1px at 10% 80%, #fff, transparent), radial-gradient(1px 1px at 55% 45%, #fff, transparent);
}
.fl-inner { width: min(760px, 100%); text-align: center; position: relative; }
.fl-top { display: flex; gap: 12px; justify-content: center; align-items: center; font-family: var(--mono); color: var(--muted); flex-wrap: wrap; }
.fl-badge { background: var(--blue); color: #001; font-weight: 800; padding: 3px 10px; border-radius: 4px; font-size: 12px; letter-spacing: .1em; }
.fl-title { font-size: 22px; font-weight: 700; margin: 12px 0 0; overflow-wrap: anywhere; }
.route { width: 100%; height: auto; margin: 10px 0; }
.svg-code { fill: var(--muted); font-family: var(--mono); font-size: 14px; font-weight: 700; }
.fl-remaining { font-family: var(--mono); font-weight: 800; font-size: clamp(56px, 14vw, 110px); color: var(--amber); line-height: 1; }
.fl-meta { color: var(--muted); margin: 10px 0 24px; font-size: 14px; }
.fl-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1150px) {
  .fids { grid-template-columns: 1fr; }
  .fids-side {
    flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 4px 12px;
    padding: 12px 16px; border-right: 0; border-bottom: 1px solid #1c1c1e; text-align: left;
  }
  .dep-icon { width: 44px; height: 44px; margin: 0; }
  .dep-icon svg { width: 30px; height: 30px; }
  .dep-jp { font-size: 22px; letter-spacing: .15em; margin-left: 0; }
  .dep-ru, .dep-asia, .poster { display: none; }
  .led-clock { margin: 0 0 0 auto; font-size: 26px; }
}
@media (max-width: 960px) {
  .frow { grid-template-columns: 12px 56px minmax(0, 1fr) 88px 88px 124px 40px; }
  .c-al { display: none; }
  .frow .flap-text { font-size: 19px; }
}
@media (max-width: 700px) {
  .frow { grid-template-columns: 10px minmax(0, 1fr) 60px 86px 30px; gap: 6px; }
  .c-no, .c-est { display: none; }
  .fids-frame { padding: 6px; }
  .fids-main { padding: 10px 8px 0; }
  .frow .flap-text { font-size: 14px; }
  .flap { margin-right: 1px; }
  .c-dest { flex-direction: column; align-items: flex-start; gap: 2px; }
  .d-en, .h-sub { display: none; }
  .h-ja { font-size: 11px; } .h-en { font-size: 10px; }
  .c-rm { padding: 2px 5px; min-height: 28px; }
  .rm-ja { font-size: 10px; } .rm-en { font-size: 8px; }
  .led-ticker { margin: 8px -8px 0; height: 28px; }
  .led-ticker span { font-size: 14px; }
  .led-clock { font-size: 20px; }
  .dep-en { font-size: 14px; }
}
@media (max-width: 600px) {
  body { overflow-x: hidden; }
  .top { padding: 12px 16px; }
  .brand { min-width: 0; }
  .brand-en { font-size: 12px; letter-spacing: .04em; }
  .brand-jp { display: none; }
  #clock-date { display: none; }
  .logo { width: 38px; height: 38px; font-size: 20px; }
  #clock-time { font-size: 20px; }
  .tabs, main { padding-left: 16px; padding-right: 16px; }
  .tabs { flex-wrap: wrap; }
  .tab small { display: none; }
  .board-head { gap: 6px; }
  .board-date { min-width: 0; flex: 1; font-size: 15px; }
  .pp-stats { grid-template-columns: 1fr; }
  .bp-route b { font-size: 36px; }
  .bp-grid { grid-template-columns: repeat(2, auto); }
  .bp-grid .w2 { grid-column: span 2; }
  .bp-qr { width: 88px; height: 88px; }
  .log .l-city { width: 80px; }
  .log .l-date { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .led-ticker span, .dot.blink { animation: none; }
}

/* ---------- 環境音パネル ---------- */
.tabs { position: relative; }
.noise-panel {
  position: absolute; top: calc(100% + 4px); right: 24px; z-index: 30; width: 280px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
}
.np-title { font-weight: 700; margin-bottom: 10px; }
.np-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.np-opts input { position: absolute; opacity: 0; }
.np-opts span {
  display: block; text-align: center; padding: 8px 4px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.np-opts input:checked + span { border-color: var(--amber); background: rgba(255,200,61,.12); color: var(--amber); }
.np-opts input:focus-visible + span { outline: 2px solid var(--amber); }
.np-vol { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.np-vol input { flex: 1; accent-color: var(--amber); }
#noise-btn.on { border-color: var(--amber); background: rgba(255,200,61,.12); }
.fl-noise { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.fl-noise select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font: inherit; color-scheme: dark;
}

/* ---------- 案内板の切り替え ---------- */
.style-switch { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.style-switch button { background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.style-switch button.active { background: var(--amber); color: #111; font-weight: 700; }

/* ---------- 液晶式（伊丹空港風） ---------- */
.lcd-wall {
  background: repeating-linear-gradient(180deg, #dcdddf 0 13px, #c4c5c8 13px 15px);
  padding: 40px 16px; border-radius: 8px;
}
.lcd {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  background: #1c1d1f; padding: 20px 18px 26px; border-radius: 2px;
  box-shadow: 0 12px 30px rgba(0,0,0,.45), inset 0 0 0 1px #2c2d30;
}
.lcd-half { background: #0d0d0e; padding: 22px 10px 10px; min-width: 0; display: flex; flex-direction: column; }
.lrow {
  display: grid;
  grid-template-columns: 50px minmax(0, 1.25fr) 94px 42px 32px 34px minmax(0, 1.6fr);
  gap: 6px; align-items: center; height: 30px; padding: 0 6px;
  font-family: var(--jp); font-weight: 700; color: #fff;
}
.lrow > * { min-width: 0; }
.lhead { height: 26px; font-size: 11px; letter-spacing: .15em; border-bottom: 1px solid #5a5a5e; margin-bottom: 3px; }
.lhead > div { text-align: center; white-space: nowrap; overflow: visible; font-size: 11px; font-weight: 700; }
.lhead .l-gate, .lhead .l-wx, .lhead .l-seat { letter-spacing: 0; }
.lhead .l-rm { justify-content: space-between; }
.lcd-clock {
  background: #b3acd9; color: #fff; font-size: 20px; font-weight: 500; letter-spacing: .02em;
  padding: 0 10px; line-height: 24px; font-family: var(--jp);
}
.lcd-body { flex: 1; }
.lcd-body .lrow { border-bottom: 2px solid #0d0d0e; background: #232326; }
.lcd-body .lrow:nth-child(even) { background: #1b1b1e; }
.lcd-body .lrow:not(.blank) { cursor: pointer; }
.lcd-body .lrow:not(.blank):hover, .lcd-body .lrow:focus-visible { background: #34343a; outline: none; }
.l-time { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.l-dest {
  background: #3a3a3e; height: 26px; line-height: 26px; padding: 0 12px; font-size: 15px;
  text-align: justify; text-align-last: justify; white-space: nowrap; overflow: hidden;
}
.l-no { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.lg {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  width: 46px; height: 18px; background: #fff; border-radius: 1px; font-size: 9px; font-weight: 800;
}
.lg-study { color: #0b3f94; font-style: italic; }
.lg-work { color: #d7001d; }
.lg-work i { width: 8px; height: 8px; border-radius: 50%; background: #d7001d; }
.l-gate { text-align: center; font-size: 15px; font-weight: 500; }
.l-wx { display: grid; place-items: center; }
.l-seat { text-align: center; font-size: 17px; font-weight: 500; }
.l-cancel {
  grid-column: span 3; background: #ff4f4f; color: #fff; text-align: center;
  height: 24px; line-height: 24px; font-size: 15px; letter-spacing: .6em; text-indent: .6em;
}
.l-rm { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.rk { flex: none; font-size: 11px; font-weight: 700; }
.rt { overflow: hidden; text-overflow: ellipsis; color: #d8d8d8; }
.lk-boarding .rk, .lk-soon .rk { color: #43e07f; }
.lk-checkin .rk { color: #fff; }
.lk-changed .rk { color: #ffd23f; }
.lk-delayed .rk { color: #ff6a55; }
.lk-inflight .rk { color: #7cc1ff; }
.lk-arrived { opacity: .45; }
.lk-boarding .l-time { animation: blink 1s steps(2, start) infinite; }
.lcd-legend {
  display: flex; justify-content: flex-end; gap: 18px; flex-wrap: wrap;
  padding: 8px 10px 0; margin-top: 4px; border-top: 1px solid #5a5a5e;
  color: #fff; font-size: 14px; font-weight: 700;
}

@media (max-width: 1150px) {
  .lcd { grid-template-columns: 1fr; }
  /* 縦に並ぶときは、便のない右半分は凡例だけ残す */
  .lcd-half.no-flights { padding-top: 0; }
  .lcd-half.no-flights .lhead, .lcd-half.no-flights .lcd-body { display: none; }
  .lcd-half.no-flights .lcd-legend { border-top: 0; margin-top: 0; }
}
@media (max-width: 700px) {
  .lcd-wall { padding: 18px 6px; }
  .lcd { padding: 10px 8px 14px; }
  .lcd-half { padding: 12px 4px 8px; }
  .lrow { grid-template-columns: 42px minmax(0, 1fr) 30px 26px minmax(0, 1fr); gap: 4px; padding: 0 4px; }
  .l-no, .l-seat { display: none !important; }
  .l-cancel { grid-column: span 2; }
  .l-dest { font-size: 13px; padding: 0 8px; }
  .lcd-clock { font-size: 15px; }
  .lcd-legend { font-size: 11px; gap: 10px; }
  .board-head { flex-wrap: wrap; }
  .board-head .spacer { display: none; }
  .board-head .board-date { flex: 1; min-width: 0; }
  .style-switch { order: 5; width: 100%; }
  .style-switch button { flex: 1; }
  .noise-panel { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lk-boarding .l-time { animation: none; }
}

/* ---------- 今すぐ飛ぶ ---------- */
.q-note { margin: -4px 0 14px; color: var(--muted); font-size: 13px; }
.q-durs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.q-durs label { position: relative; }
.q-durs input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; }
.quick-btn, #add-btn { white-space: nowrap; }
.q-durs span {
  display: block; text-align: center; padding: 8px 0; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--mono); font-size: 13px; cursor: pointer;
}
.q-durs input:checked + span { border-color: var(--amber); background: rgba(255,200,61,.12); color: var(--amber); }
.q-durs input:focus-visible + span { outline: 2px solid var(--amber); }
@media (max-width: 700px) {
  .q-durs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-btn { padding-inline: 10px; }
}

/* ---------- 到着のご案内（到着スタンプの下） ---------- */
.arr-ann {
  margin: 4px 0 16px; padding: 12px 16px; text-align: left; border-radius: 10px;
  background: #0d1219; border: 1px solid rgba(255,200,61,.45); box-shadow: inset 0 0 0 1px rgba(255,200,61,.08);
}
.arr-ann small { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--amber); }
.arr-ann p { margin: 8px 0 0; font-size: 14px; line-height: 1.85; color: var(--text); animation: arr-in .9s ease both .5s; }
@keyframes arr-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- 設定：搭乗中 ---------- */
.s-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 6px 0 14px; }
.s-group legend { padding: 0 6px; font-size: 13px; color: var(--amber); }
.s-group select {
  width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font: inherit; color-scheme: dark; margin-top: 4px;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 2px 0 12px; cursor: pointer; }
.check input { accent-color: var(--amber); width: 16px; height: 16px; }

/* 案内板のページ表示（便が多いときは、ページが切りかわる） */
.fids-page { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; padding: 6px 14px 2px; font-family: var(--mono); color: var(--amber); }
.fids-page[hidden] { display: none; }
.fids-page b { font-size: 15px; letter-spacing: .1em; }
.fids-page span { font-size: 10px; letter-spacing: .3em; opacity: .7; }
.fids-page small { margin-right: auto; order: -1; font-family: inherit; font-size: 11px; color: #8a93a0; }
.board-all { margin-left: auto; font-size: 12px; padding: 4px 12px; }

/* 到着のスタンプ：インクで押したように（パスポートと同じ） */
.stamp-big:has(.ink-stamp) { border: 0; border-radius: 0; width: 240px; height: 240px; background: none; }
.stamp-big .ink-stamp { width: 100%; height: 100%; }

/* 案内：× で閉じる・ふわっと消える */
.announce-x { margin-left: 6px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.announce-x:hover { color: var(--text); }
.announce.out { opacity: 0; transition: opacity .4s; }

/* タブが増えても、文字が縦に折れないように（入りきらないときは 2 段に。狭い画面では英語を隠す） */
.tab { white-space: nowrap; flex: none; }
.tabs { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 1360px) { .tab small { display: none; } .tab { padding: 8px 11px; } }
