/* ivel-flight (결항 지연 보상, en Flight Delay Compensation; named 지각비 until 2026-11-07). Source: a retractable steel tape measure. Grammar in docs/DESIGN.md. */
:root {
  --bench: #dfe3e7;      /* background: grey workbench */
  --paper: #f7f8fa;      /* panels, inputs */
  --ink: #15171a;        /* text, blade graduations */
  --sub: #535a63;        /* secondary text */
  --line: #c2c8cf;       /* borders */
  --blade: #f2c200;      /* the tape blade; the one filled button */
  --blade-ink: #15171a;  /* print on the blade (same in dark mode) */
  --case: #2c2f33;       /* tape case, tooltips */
  --case-hi: #4a4f55;    /* case window, lock */
  --stud: #c8102e;       /* red-boxed numbers: Korean bands */
  --chrome: #a3a9b0;     /* hook */
  --focus: #1a5fd0;
  /* state colours, verdicts only */
  --ok: #18794e; --warn: #8a5a00; --bad: #b3261e;
  --r: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bench: #121417; --paper: #1b1e22; --ink: #eceff2; --sub: #a2abb5; --line: #343a41;
    --case: #3a3e44; --case-hi: #5a6068; --stud: #e5484d; --chrome: #8d949c; --focus: #7aa7ff;
    --ok: #4cc38a; --warn: #f0b84a; --bad: #ff6b6b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bench); color: var(--ink);
  font: 16px/1.5 "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { display: flex; align-items: center; gap: 10px; padding: 16px 0 6px; }
.top a.home { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 19px; }
.top .mark { width: 28px; height: 28px; color: var(--case); }
.top .fbopen { margin-left: auto; height: 34px; }
.flighthead .sign { font-weight: 800; font-size: 20px; letter-spacing: .02em; border-bottom: 4px solid var(--blade); line-height: 1.25; }

/* query */
.query { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin: 10px 0 8px; }
.query label { display: grid; gap: 2px; font-size: 13px; color: var(--sub); }
.query input {
  height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  font-size: 20px; font-weight: 700; letter-spacing: .02em; width: 100%; min-width: 0;
}
.query input[name=f] { text-transform: uppercase; }
.query button.go {
  align-self: end; height: 52px; padding: 0 24px; border: 2px solid var(--blade-ink); border-radius: var(--r);
  background: var(--blade); color: var(--blade-ink); box-shadow: 0 3px 0 var(--blade-ink);
  font-weight: 800; font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 60ms, box-shadow 60ms;
}
.query button.go.pressed, .query button.go:active { transform: translateY(3px); box-shadow: 0 0 0 var(--blade-ink); }
.query button.go svg { width: 20px; height: 20px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 6px 0 14px; font-size: 14px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--case); }
.recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-basis: 100%; }
.recent .lab { color: var(--sub); font-size: 13px; }
.chip {
  height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip span { color: var(--stud); font-weight: 700; }
@media (max-width: 560px) {
  .query { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .query input { font-size: 17px; padding: 0 10px; }
  .query button.go { grid-column: 1 / -1; }
}

/* the tape */
.ruler { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 14px 10px; }
.ruler .head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; min-height: 38px; }
.ruler .big { font-size: 34px; font-weight: 800; line-height: 1.1; }
.ruler .big small { font-size: 16px; font-weight: 600; color: var(--sub); margin-left: 4px; }
.ruler .big.cancel { color: var(--bad); }
.ruler .times { color: var(--sub); font-size: 14px; }
.ruler .times b { color: var(--ink); }
.ruler .lead { font-size: 17px; font-weight: 700; }
.stag { font-size: 12px; font-weight: 600; color: var(--warn); border: 1px dashed currentColor; padding: 0 5px; border-radius: 3px; vertical-align: middle; margin-left: 6px; }

.track { position: relative; height: 158px; margin-top: 8px; }
.track .case {
  position: absolute; left: 0; top: 40px; width: 62px; height: 60px; background: var(--case); border-radius: 12px 6px 6px 12px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28);
}
.track .case .window { position: absolute; left: 14px; top: 13px; width: 34px; height: 34px; border-radius: 50%; background: var(--case-hi); }
.track .case .lock { position: absolute; right: 8px; top: -7px; width: 18px; height: 9px; border-radius: 2px 2px 0 0; background: var(--case-hi); transition: transform 120ms, background 120ms; }
.ruler.locked .case .lock { transform: translateY(4px); background: var(--stud); }
.ruler.pulling .case .lock { transform: none; background: var(--case-hi); }
.track .scale { position: absolute; left: 62px; right: 8px; top: 0; bottom: 0; --step: 12px; }
.track .scale::before { content: ""; position: absolute; left: 0; right: 0; top: 69px; border-top: 2px dotted var(--line); }
.blade { position: absolute; left: 0; top: 52px; height: 36px; width: 0; background: var(--blade); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16); }
.blade .marks {
  position: absolute; inset: 0; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, var(--blade-ink) 0 1px, transparent 1px var(--step)) 0 0 / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--blade-ink) 0 2px, transparent 2px calc(var(--step) * 3)) 0 0 / 100% 13px no-repeat,
    repeating-linear-gradient(90deg, var(--blade-ink) 0 1px, transparent 1px var(--step)) 0 100% / 100% 6px no-repeat;
}
.blade .marks .h { position: absolute; top: 13px; transform: translateX(-50%); font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--blade-ink); padding: 0 3px; }
.blade .marks .h.stud { background: var(--stud); color: #fff; border-radius: 2px; }
.blade .marks .h.skip { visibility: hidden; }
.blade .hook { position: absolute; right: -6px; top: -7px; width: 6px; height: 50px; background: var(--chrome); border-radius: 1px; box-shadow: 1px 0 0 rgba(0, 0, 0, .25); }
.blade.cancel { width: 100%; background: repeating-linear-gradient(45deg, var(--bad) 0 8px, var(--case) 8px 16px); }
.blade.cancel .marks, .blade.cancel .hook { display: none; }
.ruler.idle .blade { animation: idle 7.4s ease-in-out infinite; }
@keyframes idle { 0%, 8% { width: 0; } 45%, 62% { width: 74%; } 100% { width: 0; } }
@media (prefers-reduced-motion: reduce) { .ruler.idle .blade { animation: none; width: 38%; } }

.track .tick { position: absolute; width: 0; }
.track .tick.kr { top: 0; height: 52px; border-left: 2px dotted var(--stud); }
.track .tick.eu { top: 88px; bottom: 0; border-left: 2px dotted var(--ink); }
.track .tick.eu::before { content: ""; position: absolute; left: -7px; top: -4px; width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg); }
.track .tick.hit { border-left-style: solid; }
.track .tick span { position: absolute; left: 5px; white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1.25; }
.track .tick.kr .t { top: 0; color: var(--stud); }
.track .tick.kr .v { top: 17px; color: var(--sub); font-weight: 600; }
.track .tick.eu .t { top: 14px; }
.track .tick.eu .v { top: 31px; color: var(--sub); font-weight: 600; }
.track .tick.hit .v { color: var(--ink); }
.track .tick.hit .t { color: #fff; padding: 0 4px; border-radius: 2px; }
.track .tick.kr.hit .t { background: var(--stud); }
.track .tick.eu.hit .t { background: var(--case); }
.track .tick.mute span { visibility: hidden; }
.track .tick.kr.mute { top: 40px; bottom: auto; height: 12px; }
.track .tick.eu.mute { top: 88px; bottom: auto; height: 12px; }
.track .tick.flip span { left: auto; right: 5px; }
.track .zero { position: absolute; left: 2px; top: 92px; font-size: 12px; color: var(--sub); }

/* result */
.flighthead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 22px 0 10px; }
.flighthead .route { font-size: 20px; font-weight: 700; }
.flighthead .meta { color: var(--sub); font-size: 14px; }
.legs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.leg { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 14px; }
.leg .k { color: var(--sub); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.leg .row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.leg .row b { font-size: 18px; }
.leg .row s { color: var(--sub); }
.leg .d { font-weight: 700; }
.leg .d.late { color: var(--warn); }
.leg .d.cancel { color: var(--bad); }
.leg input { width: 90px; height: 36px; border: 1px solid var(--sub); border-radius: var(--r); padding: 0 8px; background: var(--paper); }
.leg .row label { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.vcard .fare { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--sub); flex-wrap: wrap; }
.vcard .fare input { width: 130px; height: 36px; border: 1px solid var(--sub); border-radius: var(--r); padding: 0 8px; background: var(--paper); color: var(--ink); }

.asks { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 16px 0; align-items: end; }
.ask { display: grid; gap: 4px; }
.ask > .lab { font-size: 13px; color: var(--sub); display: flex; gap: 4px; align-items: center; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); padding: 7px 11px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.seg button[aria-pressed=true] { background: var(--case); border-color: var(--case); color: #f2f3f5; font-weight: 700; }
.ask input[type=number] { height: 38px; width: 140px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px; background: var(--paper); }
.ask .switch { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }

.verdicts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.vcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 6px; align-content: start; }
.vcard .rg { font-size: 13px; color: var(--sub); display: flex; gap: 6px; align-items: center; }
.vcard .amt { font-size: 28px; font-weight: 800; line-height: 1.15; }
.vcard .amt small { font-size: 14px; font-weight: 600; color: var(--sub); }
.vcard .st { font-weight: 700; font-size: 14px; }
.vcard.yes, .vcard.maybe { border-color: var(--ink); box-shadow: inset 0 5px 0 var(--blade); padding-top: 18px; }
.vcard.yes .st { color: var(--ok); }
.vcard.maybe .st { color: var(--warn); }
.vcard.no .amt, .vcard.wait .amt { color: var(--sub); }
.vcard details { font-size: 13px; color: var(--sub); }
.vcard details summary { cursor: pointer; color: var(--ink); font-weight: 600; min-height: 24px; }
.vcard blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--blade); background: var(--bench); color: var(--ink); }
.vcard ul { margin: 4px 0; padding-left: 18px; }
.skipped { font-size: 13px; color: var(--sub); margin-top: 8px; }

.steps { counter-reset: s; display: grid; gap: 8px; margin: 22px 0; padding: 0; list-style: none; }
.steps > li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 12px 52px; position: relative; }
.steps > li::before {
  content: counter(s); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; display: grid; place-items: center;
  border: 2px solid var(--ink); color: var(--ink); font-weight: 800; border-radius: 3px;
}
.steps h3 { margin: 0 0 6px; font-size: 16px; display: flex; gap: 6px; align-items: center; }
.steps .links { display: flex; flex-wrap: wrap; gap: 8px; }
.stay h2 { font-size: 16px; display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
.stay .links { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--paper); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn.dark { border-width: 2px; font-weight: 800; }
.btn .aff { font-size: 11px; color: var(--sub); font-weight: 500; }
.letter { width: 100%; min-height: 220px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bench); font: 14px/1.6 inherit; }

.picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.note { color: var(--sub); font-size: 14px; }

/* late flights from real airport records (not drawn while the data is a sample) */
.live { margin: 34px 0; }
.live h2, .hist h2 { font-size: 16px; display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
.board { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.board li a { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; align-items: center; }
.board li:last-child a { border-bottom: 0; }
.board .fl { font-weight: 800; letter-spacing: .03em; }
.board .dl { color: var(--stud); font-weight: 700; }
.board .dl.cancel { color: var(--bad); }
.board .when { color: var(--sub); font-size: 12px; }

/* explanations: hover, focus or tap; Esc closes */
.tip {
  position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 3px;
  border: 1px solid var(--sub); color: var(--sub); font-size: 12px; font-weight: 700; cursor: help; background: none; padding: 0; flex: none;
}
.tip.named { width: auto; padding: 0 7px; gap: 4px; display: inline-flex; align-items: center; }
.tip.tag { width: auto; height: 24px; padding: 0 7px; color: var(--warn); border: 1px dashed currentColor; font-weight: 600; }
.tip > span[role=tooltip] {
  display: none; position: absolute; z-index: 20; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(280px, 80vw); background: var(--case); color: #f2f3f5; padding: 8px 10px; border-radius: var(--r);
  font-size: 13px; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal; cursor: text;
}
.tip > span[role=tooltip]::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.tip:hover > span[role=tooltip], .tip:focus > span[role=tooltip], .tip[aria-expanded=true] > span[role=tooltip] { display: block; }
.tip.shut > span[role=tooltip] { display: none !important; }
.top .tip.tag > span[role=tooltip] { left: 0; transform: none; }

/* flight page */
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; font-size: 15px; color: var(--sub); }
.stats b { color: var(--ink); }
table.days { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
table.days th, table.days td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.days th { font-size: 12px; color: var(--sub); font-weight: 600; }
table.days td.late { color: var(--warn); font-weight: 700; }
table.days td.cancel { color: var(--bad); font-weight: 700; }
@media (max-width: 560px) { .legs { grid-template-columns: 1fr; } }

footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 18px 0 40px; font-size: 13px; color: var(--sub); display: grid; gap: 6px; }
footer .row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
footer a { display: inline-block; min-height: 24px; line-height: 24px; }
footer button.linkish { background: none; border: 0; padding: 0; min-height: 24px; text-decoration: underline; cursor: pointer; color: inherit; font-size: 13px; }
dialog { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink); width: min(440px, 92vw); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
dialog textarea { width: 100%; min-height: 120px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bench); color: var(--ink); font: inherit; }
dialog input[type=email] { border: 1px solid var(--line); border-radius: var(--r); background: var(--bench); padding: 0 8px; }
dialog .hp { position: absolute; left: -9999px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* not on the boards: why, other days, the example, then the route by airport name */
.miss .note b { color: var(--ink); }
.miss .links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.miss .links .lab { font-size: 13px; color: var(--sub); flex-basis: 100%; }
.miss .mhead { font-size: 15px; margin: 22px 0 0; }
.ask input.ap { height: 38px; width: min(220px, 80vw); border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px; background: var(--paper); }
.ask.switch { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; font-size: 14px; }
.flighthead .stag { margin-left: 0; }
.ask input.ap.al { width: 72px; text-transform: uppercase; }
.ask input.ap.late { width: 120px; }

/* visible page title (search phrase), quiet: the tape stays the loudest thing */
h1.title { font-size: 17px; font-weight: 700; margin: 4px 0 10px; color: var(--sub); }
/* what the rules pay: a plain reference table under the tool */
.guide { margin: 38px 0 10px; }
.guide h2 { font-size: 16px; margin: 0 0 8px; }
.guide table.days tbody th { font-size: 13px; color: var(--ink); font-weight: 600; width: 30%; }
.guide table.days td { vertical-align: top; }
.guide p { font-size: 14px; margin: 8px 0; }
.causehelp { margin: -2px 0 10px; }
@media (max-width: 520px) { .guide table.days th, .guide table.days td { padding: 7px 8px; } }

/* the board: first screen (P216) */
#board { margin: 12px 0 30px; }
#board h2 .stag { margin-left: 2px; }
.bfilter { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; margin: 0 0 8px; font-size: 13px; }
.bfilter label:not(.toggle) { display: grid; gap: 2px; color: var(--sub); }
.bfilter select { height: 36px; min-width: 104px; max-width: 46vw; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink); padding: 0 8px; font: inherit; font-size: 14px; }
.bfilter .seg button { padding: 7px 10px; }
.bfilter .toggle { font-size: 14px; color: var(--ink); }
#bcount { margin: 0 0 8px; }
.board .fl small { display: block; font-weight: 500; color: var(--sub); font-size: 11px; letter-spacing: 0; }
.board .right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.board .pay { font-size: 11px; font-weight: 700; color: var(--ok); border: 1px solid currentColor; border-radius: var(--r); padding: 0 5px; white-space: nowrap; }
.board li.empty { padding: 12px; color: var(--sub); font-size: 14px; }
.board li[hidden] { display: none; }
#bmore { margin-top: 8px; }
.searchhead { font-size: 16px; margin: 0 0 2px; }
@media (max-width: 560px) { .bfilter label:not(.toggle) { flex: 1 1 40%; } .bfilter select { max-width: none; width: 100%; } }

/* the flight number explained, and the find-by-time box */
h1.title.headline { font-size: 20px; line-height: 1.4; color: var(--ink); margin: 6px 0 14px; }
.fhelp { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 13px; color: var(--sub); }
.fhelp .pass { width: 64px; height: 32px; flex: none; color: var(--sub); }
.altfind { margin: 0 0 12px; font-size: 14px; }
.altfind summary { cursor: pointer; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.altform { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; margin: 8px 0; }
.altform label { display: grid; gap: 2px; font-size: 13px; color: var(--sub); }
.altform select, .altform input { height: 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink); padding: 0 8px; font: inherit; font-size: 15px; }
.altlist { display: flex; flex-wrap: wrap; gap: 6px; }
.altlist .chip small { color: var(--sub); font-weight: 500; }
@media (max-width: 560px) { h1.title.headline { font-size: 18px; } }
.jump { margin: -6px 0 14px; }
.jump .btn { font-size: 14px; }
.bseg { display: grid; gap: 2px; color: var(--sub); }
.bseg .lab { font-size: 13px; }
.board li a { position: relative; padding-right: 26px; }
.board li a::after { content: '›'; position: absolute; right: 10px; top: 50%; transform: translateY(-52%); font-size: 20px; color: var(--sub); }
#find { scroll-margin-top: 12px; }
