/* AILO Dashboard D22 — TradeView
   원형: 상단 가로 내비 + 지도 중심(세계 항로 히어로) / 타이포: Noto Serif KR 제목 + Pretendard 본문·숫자 / 컬러: 딥 네이비 + 골드 */

:root {
  --ailo-bg: #0a1526;
  --ailo-fg: #ece6d6;
  --ailo-muted: #9eabbe;
  --ailo-line: rgba(212, 175, 55, .16);
  --ailo-accent: #d4af37;
  --ailo-accent-ink: #1a1405;
  --ailo-header-h: 72px;

  --d22-serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --d22-panel: #0f1d31;
  --d22-panel-2: #13243c;
  --d22-hover: #172a45;
  --d22-grid: #1c2c44;
  --d22-axis: #2e4260;
  --d22-hair: rgba(158, 171, 190, .14);
  /* 차트 범주색 — 검증: dark / surface #0f1d31 / adjacent 5색, 수출·수입 2색은 all-pairs 통과 */
  --d22-ex: #b38c1c;
  --d22-im: #4a95e6;
  --d22-s3: #2aa58a;
  --d22-s4: #a678e0;
  --d22-s5: #d9694f;
  --d22-other: #56657a;
  --d22-spark: #5f7290;
  --d22-land: rgba(110, 140, 185, .08);
  --d22-land-dot: #35507a;
  --d22-lane-ex: #d4af37;
  --d22-lane-im: #5aa2ee;
  --d22-good: #63d3a6;
  --d22-bad: #ff9f88;
  /* 시세 관례: 상승 빨강 · 하락 파랑 (▲▼ 기호 병기) */
  --d22-up: #ff7a72;
  --d22-down: #6db3ff;
  --d22-warn: #fab219;
  --d22-serious: #ec835a;
  --d22-crit: #d03b3b;
  --d22-r: 14px;
}

body {
  font-size: 15px;
  letter-spacing: -.01em;
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(212, 175, 55, .07), transparent 70%),
    radial-gradient(1000px 600px at 100% 30%, rgba(74, 149, 230, .06), transparent 70%),
    var(--ailo-bg);
}
.dim { color: var(--ailo-muted); }

/* ===== Ticker ===== */
.ticker { position: relative; display: flex; align-items: center; height: 38px; background: #060e1b; border-bottom: 1px solid var(--ailo-line); font-size: 13px; overflow: hidden; }
.ticker__lbl { flex: none; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 16px; color: var(--ailo-accent); font-weight: 700; border-right: 1px solid var(--ailo-line); white-space: nowrap; }
.ticker__lbl small { color: var(--ailo-muted); font-weight: 400; }
.ticker__run { position: relative; flex: 1; min-width: 0; --ailo-marquee-gap: 0px; --ailo-marquee-speed: 48s; }
.ticker__run:hover .ailo-marquee__track, .ailo-marquee__track.is-paused { animation-play-state: paused; }
.tk { display: inline-flex; align-items: center; gap: 6px; padding: 0 22px; border-right: 1px solid var(--d22-hair); font-variant-numeric: tabular-nums; }
.tk-dup { display: inline-flex; }
.tk b { font-weight: 600; color: var(--ailo-muted); }
.tk em { font-style: normal; font-weight: 600; }
.tk .is-up { color: var(--d22-up); }
.tk .is-down { color: var(--d22-down); }
.ticker__pause { flex: none; width: 38px; height: 100%; border: 0; border-left: 1px solid var(--ailo-line); background: transparent; color: var(--ailo-muted); font-size: 12px; }
.ticker__pause:hover { color: var(--ailo-accent); }

/* ===== Header ===== */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(10, 21, 38, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--ailo-line); }
.hdr__in { max-width: 1560px; margin: 0 auto; height: var(--ailo-header-h); display: flex; align-items: center; gap: 28px; padding: 0 clamp(16px, 2.4vw, 36px); }
.hdr__burger { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--ailo-line); background: transparent; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ailo-accent); flex: none; }
.brand span { font-family: var(--d22-serif); font-weight: 700; font-size: 20px; color: var(--ailo-fg); line-height: 1; letter-spacing: -.02em; }
.brand small { display: block; font-family: "Pretendard Variable", Pretendard, sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: .32em; color: var(--ailo-accent); margin-top: 4px; }
.gnb { flex: 1; min-width: 0; }
.gnb ul { display: flex; gap: 2px; }
.gnb a { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 15px; font-weight: 500; color: #c4c9d2; white-space: nowrap; border-radius: 8px; }
.gnb a i { font-size: 13px; color: var(--ailo-muted); }
.gnb a:hover { color: var(--ailo-fg); background: var(--d22-hover); }
.gnb a.is-on { color: var(--ailo-accent); }
.gnb a.is-on i { color: var(--ailo-accent); }
.gnb a.is-on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 2px; background: var(--ailo-accent); }
.gnb__head, .gnb__foot { display: none; }
.scrim { display: none; }
.hdr__tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.hsearch { display: flex; align-items: center; gap: 8px; height: 40px; width: 240px; border-radius: 20px; padding: 0 14px; border: 1px solid var(--ailo-line); background: rgba(15, 29, 49, .7); }
.hsearch:focus-within { border-color: var(--ailo-accent); }
.hsearch i { color: var(--ailo-muted); font-size: 13px; }
.hsearch input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ailo-fg); font: inherit; font-size: 14px; outline: none; }
.hsearch input::placeholder { color: #7e8ca1; }
.ibtn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--ailo-line); background: transparent; font-size: 16px; }
.ibtn:hover, .hdr__burger:hover { border-color: var(--ailo-accent); color: var(--ailo-accent); }
.ibtn__n { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--ailo-accent); color: var(--ailo-accent-ink); font-size: 11px; font-weight: 800; line-height: 18px; border: 2px solid var(--ailo-bg); }
.drop { position: relative; }
.drop__panel { position: absolute; right: 0; top: calc(100% + 12px); width: min(350px, calc(100vw - 32px)); z-index: 80; background: var(--d22-panel-2); border: 1px solid var(--ailo-line); border-radius: 14px; box-shadow: 0 28px 60px rgba(0, 0, 0, .5); padding: 6px; }
.drop__title { padding: 10px 12px; font-family: var(--d22-serif); font-weight: 700; display: flex; justify-content: space-between; }
.drop__title span { font-family: "Pretendard Variable", Pretendard, sans-serif; color: var(--ailo-accent); font-size: 13px; }
.drop__panel li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.drop__panel li:hover { background: var(--d22-hover); }
.drop__panel time { font-size: 12px; color: var(--ailo-muted); }
.n-gold { color: var(--ailo-accent); }
.n-serious { color: var(--d22-serious); }
.mono-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #d4af37, #8d6c12); color: #1a1405; font-weight: 800; font-size: 15px; }
.me { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; text-align: left; }
.me__t { display: grid; line-height: 1.25; white-space: nowrap; }
.me__t small { font-size: 12px; color: var(--ailo-muted); }

/* ===== Page ===== */
.page { max-width: 1560px; margin: 0 auto; padding: clamp(18px, 2.4vw, 32px) clamp(16px, 2.4vw, 36px) 40px; display: grid; gap: clamp(14px, 1.4vw, 20px); }
.ptitle { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; }
.crumbs { display: flex; gap: 6px; font-size: 13px; color: var(--ailo-muted); margin-bottom: 4px; }
.crumbs li + li::before { content: "·"; margin-right: 6px; color: var(--ailo-accent); }
.crumbs a:hover { color: var(--ailo-accent); }
.ptitle h1 { font-family: var(--d22-serif); font-weight: 700; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.035em; line-height: 1.2; }
.ptitle__sub { color: var(--ailo-muted); font-size: 14px; margin-top: 4px; }
.period { display: inline-flex; border: 1px solid var(--ailo-line); border-radius: 999px; padding: 4px; background: rgba(15, 29, 49, .7); }
.period button { border: 0; background: transparent; color: var(--ailo-muted); font-weight: 600; font-size: 14px; padding: 8px 18px; border-radius: 999px; white-space: nowrap; }
.period button:hover { color: var(--ailo-fg); }
.period button[aria-pressed="true"] { background: var(--ailo-accent); color: var(--ailo-accent-ink); }

/* ===== Stage (map) ===== */
.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--ailo-line); background: radial-gradient(120% 120% at 40% 0%, #10223b, #081322 70%);
}
.stage__map { min-width: 0; padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.stage__hd { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.stage__hd h2 { font-family: var(--d22-serif); font-size: 20px; font-weight: 700; }
.stage__hd p { font-size: 14px; color: var(--ailo-muted); }
.stage__hd p span { color: var(--ailo-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.mapwrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--d22-axis) transparent; border-radius: 10px; }
.mapwrap svg { display: block; width: 100%; min-width: 560px; height: auto; }
#graticule line { stroke: rgba(212, 175, 55, .06); stroke-width: 1; }
#graticule line.eqtr { stroke: rgba(212, 175, 55, .14); }
.lane-path { fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .85; transition: opacity .25s, stroke-width .25s; }
.lane-path.is-ex { stroke: var(--d22-lane-ex); }
.lane-path.is-im { stroke: var(--d22-lane-im); }
#world.has-focus .lane-path { opacity: .12; }
#world.has-focus .lane-path.is-focus { opacity: 1; filter: drop-shadow(0 0 4px rgba(212, 175, 55, .6)); }
.ship circle { fill: #f6f1e4; stroke-width: 2; }
.ship.is-ex circle { stroke: var(--d22-lane-ex); }
.ship.is-im circle { stroke: var(--d22-lane-im); }
#world.has-focus .ship { opacity: .15; }
#world.has-focus .ship.is-focus { opacity: 1; }
.port circle { fill: #ece6d6; stroke: #081322; stroke-width: 1.5; }
.port.is-hub circle:last-of-type { fill: var(--ailo-accent); }
.port.is-hub circle:first-child { stroke: none; }
.port.is-via circle { fill: var(--ailo-muted); }
.port text { fill: var(--ailo-fg); font-size: 11.5px; font-weight: 600; paint-order: stroke; stroke: #081322; stroke-width: 3px; stroke-linejoin: round; font-family: "Pretendard Variable", Pretendard, sans-serif; }
.port.is-hub text { fill: var(--ailo-accent); font-size: 13px; font-weight: 800; }
.port.is-via text { fill: var(--ailo-muted); font-weight: 500; }
.maplgd { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; }
.maplgd li { display: inline-flex; align-items: center; gap: 7px; }
.lane { display: inline-block; width: 18px; height: 3px; border-radius: 2px; flex: none; }
.lane--ex { background: var(--d22-lane-ex); }
.lane--im { background: var(--d22-lane-im); }
.ship-key { width: 9px; height: 9px; border-radius: 50%; background: #f6f1e4; box-shadow: 0 0 0 2px var(--d22-lane-ex); }

.stage__list { border-left: 1px solid var(--ailo-line); background: rgba(6, 14, 27, .55); padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (min-width: 1280px) {
  /* 목록이 지도 높이를 늘리지 않도록: 크기 기여 0, 목록 내부 스크롤 */
  .stage__list { contain: size; }
  .lanes { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--d22-axis) transparent; }
}
.lanes__more { display: none; border: 1px solid var(--ailo-line); background: transparent; color: var(--ailo-accent); border-radius: 999px; padding: 8px; font-size: 13px; font-weight: 600; }
.stage__list h3 { font-family: var(--d22-serif); font-size: 16px; font-weight: 700; padding: 0 6px; display: flex; justify-content: space-between; align-items: baseline; }
.stage__list h3 small { font-family: "Pretendard Variable", Pretendard, sans-serif; font-size: 12px; font-weight: 500; color: var(--ailo-muted); }
.lanes { display: grid; gap: 2px; }
.lanes button { width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; border: 1px solid transparent; background: transparent; text-align: left; }
.lanes button:hover { background: var(--d22-hover); }
.lanes button[aria-pressed="true"] { border-color: var(--ailo-accent); background: rgba(212, 175, 55, .08); }
.lanes__n { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lanes__n small, .lanes__v small { display: block; font-size: 12px; font-weight: 400; color: var(--ailo-muted); }
.lanes__v { text-align: right; font-variant-numeric: tabular-nums; }
.lanes__v b { font-size: 14px; font-weight: 700; }
.stage__note { margin-top: auto; padding: 0 6px; font-size: 12px; color: var(--ailo-muted); }

/* ===== KPI ===== */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1vw, 14px); }
.kc { position: relative; background: var(--d22-panel); border: 1px solid var(--d22-hair); border-radius: var(--d22-r); padding: 16px 16px 12px; display: grid; gap: 3px; min-width: 0; overflow: hidden; }
.kc::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--ailo-accent), transparent); opacity: .7; }
.kc h2 { font-size: 13px; font-weight: 600; color: var(--ailo-muted); }
.kc__v { font-size: clamp(22px, 1.9vw, 30px); font-weight: 700; letter-spacing: -.035em; line-height: 1.15; white-space: nowrap; }
.kc__v small { font-size: 14px; font-weight: 600; color: var(--ailo-muted); margin-left: 3px; }
.kc--gold { background: linear-gradient(160deg, rgba(212, 175, 55, .16), var(--d22-panel) 60%); border-color: rgba(212, 175, 55, .35); }
.kc--gold .kc__v { color: var(--ailo-accent); }
.kc__d { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc__d.is-good { color: var(--d22-good); }
.kc__d.is-bad { color: var(--d22-bad); }
.kc__sp { position: relative; display: block; height: 30px; margin-top: 6px; }
.kc__sp svg { width: 100%; height: 100%; overflow: visible; }
.kc__sp i { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ailo-accent); box-shadow: 0 0 0 2px var(--d22-panel); }

/* ===== Board ===== */
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.4vw, 20px); }
.b-4 { grid-column: span 4; } .b-8 { grid-column: span 8; } .b-12 { grid-column: span 12; }
.box { background: var(--d22-panel); border: 1px solid var(--d22-hair); border-radius: var(--d22-r); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.box__hd { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.box__hd h2 { font-family: var(--d22-serif); font-size: 18px; font-weight: 700; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; letter-spacing: -.02em; }
.box__hd h2 small { font-family: "Pretendard Variable", Pretendard, sans-serif; font-size: 12.5px; font-weight: 500; color: var(--ailo-muted); letter-spacing: 0; }
.klg { display: flex; gap: 14px; font-size: 13px; }
.klg li { display: inline-flex; align-items: center; gap: 6px; }
.klg i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.cbox { position: relative; width: 100%; }
.cbox--lg { height: 290px; }
.cbox--xl { height: 370px; }
.cbox--md { height: 220px; }
.more { font-size: 13px; color: var(--ailo-accent); }
.more:hover { color: #e9c75a; }

/* 품목 구성 */
.mixbar { display: flex; gap: 2px; height: 28px; }
.mixbar span { flex: var(--w) 1 0; background: var(--c); border-radius: 4px; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; padding-left: 8px; min-width: 0; }
.mixlist { display: grid; gap: 0; }
.mixlist li { display: grid; grid-template-columns: 12px 1fr auto 44px; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--d22-hair); font-size: 14px; font-variant-numeric: tabular-nums; }
.mixlist li:last-child { border-bottom: 0; }
.mixlist i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.mixlist b { font-weight: 700; }
.mixlist small { text-align: right; color: var(--ailo-muted); font-size: 13px; }

/* 환율 */
.ccy { display: inline-flex; border: 1px solid var(--ailo-line); border-radius: 999px; padding: 3px; }
.ccy button { border: 0; background: transparent; color: var(--ailo-muted); font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.ccy button[aria-pressed="true"] { background: rgba(212, 175, 55, .18); color: var(--ailo-accent); }
.fxhead { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 2px 14px; }
.fxhead__v { font-size: clamp(30px, 2.8vw, 40px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.fxhead__d { font-size: 13.5px; font-weight: 600; padding-bottom: 4px; }
.fxhead__d.is-up { color: var(--d22-up); }
.fxhead__d.is-down { color: var(--d22-down); }
.fxhead__d .dim { font-weight: 400; }
.fxhead__hl { grid-column: 1 / -1; display: flex; gap: 22px; margin: 6px 0 0; font-size: 13px; }
.fxhead__hl dt { font-weight: 400; color: var(--ailo-muted); display: inline; margin-right: 6px; }
.fxhead__hl dd { display: inline; margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 테이블 */
.tq { display: flex; align-items: center; gap: 8px; height: 38px; width: 260px; border-radius: 19px; padding: 0 14px; border: 1px solid var(--ailo-line); background: var(--d22-panel-2); }
.tq:focus-within { border-color: var(--ailo-accent); }
.tq i { color: var(--ailo-muted); font-size: 13px; }
.tq input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ailo-fg); font: inherit; font-size: 14px; outline: none; }
.tbox { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--d22-axis) transparent; }
.ledger { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 14px; }
.ledger th { padding: 0; text-align: left; border-bottom: 1px solid rgba(212, 175, 55, .3); white-space: nowrap; }
.ledger th button { display: inline-flex; align-items: center; gap: 6px; width: 100%; padding: 10px 10px; border: 0; background: none; color: var(--ailo-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.ledger th.r button { justify-content: flex-end; }
.ledger th button:hover { color: var(--ailo-fg); }
.ledger th button i { font-size: 10px; opacity: .5; }
.ledger th[aria-sort="ascending"] button, .ledger th[aria-sort="descending"] button { color: var(--ailo-accent); }
.ledger th[aria-sort="ascending"] i, .ledger th[aria-sort="descending"] i { opacity: 1; }
.ledger td { padding: 11px 10px; border-bottom: 1px solid var(--d22-hair); white-space: nowrap; vertical-align: middle; }
.ledger tbody tr:hover { background: var(--d22-hover); }
.ledger .r { text-align: right; font-variant-numeric: tabular-nums; }
.bl { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .01em; }
.dir { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.dir--ex { color: var(--ailo-accent); border-color: rgba(212, 175, 55, .45); }
.dir--im { color: #8fc0f3; border-color: rgba(74, 149, 230, .5); }
.late { font-style: normal; font-size: 12px; font-weight: 700; color: var(--d22-bad); margin-left: 4px; }
.stt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.stt i { font-size: 12px; }
.stt--sail i { color: var(--d22-lane-im); }
.stt--port i { color: var(--ailo-accent); }
.stt--cus i { color: var(--d22-s4); }
.stt--done { color: var(--ailo-muted); }
.stt--done i { color: var(--d22-good); }
.stt--late { color: #ffc2b0; }
.stt--late i { color: var(--d22-serious); }
.stt--wait { color: var(--ailo-muted); }
.prog { display: block; width: 110px; height: 3px; border-radius: 2px; background: var(--d22-grid); margin-top: 6px; position: relative; overflow: hidden; }
.prog::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--ailo-accent); border-radius: 2px; }
.prog--late::after { background: var(--d22-serious); }
.tnav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--ailo-muted); }
.pages { display: flex; gap: 4px; }
.pages button { min-width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--d22-hair); background: transparent; color: var(--ailo-muted); font-size: 13px; font-weight: 700; }
.pages button:hover:not(:disabled) { color: var(--ailo-fg); border-color: var(--ailo-line); }
.pages button[aria-current="page"] { background: var(--ailo-accent); border-color: var(--ailo-accent); color: var(--ailo-accent-ink); }
.pages button:disabled { opacity: .35; cursor: default; }

/* 타임라인 */
.feed { position: relative; display: grid; gap: 0; padding-left: 20px; }
.feed::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--ailo-line); }
.feed li { position: relative; padding: 0 0 16px; font-size: 14px; }
.feed li:last-child { padding-bottom: 0; }
.feed li::before { content: ""; position: absolute; left: -19px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--d22-panel); border: 2px solid var(--ailo-accent); }
.feed li.is-warn::before { border-color: var(--d22-serious); background: var(--d22-serious); }
.feed time { display: block; font-size: 12px; color: var(--ailo-muted); margin-bottom: 2px; }
.feed b { color: var(--ailo-accent); font-weight: 700; }

/* ===== Footer ===== */
.ftr { max-width: 1560px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding: 18px clamp(16px, 2.4vw, 36px) 28px; border-top: 1px solid var(--ailo-line); font-size: 13px; color: var(--ailo-muted); }
.ftr a:hover { color: var(--ailo-accent); }
.ftr b { color: var(--ailo-fg); }

.swal2-popup { border-radius: 16px !important; }

/* ===== Responsive ===== */
@media (max-width: 1439.98px) {
  .hsearch { width: 190px; }
  .gnb a { padding: 10px 9px; font-size: 14px; }
  .gnb a i { display: none; }
  .me__t { display: none; }
}
@media (max-width: 1279.98px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage { grid-template-columns: 1fr; }
  .stage__list { border-left: 0; border-top: 1px solid var(--ailo-line); }
  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
  .b-4, .b-8 { grid-column: span 12; }
  /* 좁은 화면: 검색은 아이콘 크기로 접었다가 포커스하면 펼침 */
  .hdr__tools { position: relative; }
  .hsearch { width: 42px; padding: 0 13px; cursor: text; transition: width .25s var(--ailo-ease); }
  .hsearch input { width: 0; }
  .hsearch:focus-within { position: absolute; right: 0; top: 50%; translate: 0 -50%; z-index: 5; width: min(300px, calc(100vw - 32px)); background: var(--d22-panel-2); }
  .hsearch:focus-within input { width: auto; }
}
@media (max-width: 991.98px) {
  /* backdrop-filter 는 position:fixed 자손의 기준 상자가 되어 오프캔버스 메뉴(.gnb)가 헤더 높이에 갇힘 → 모바일에서 해제(배경을 조금 더 불투명하게) */
  .hdr { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10, 21, 38, .97); }
  .hdr__in { gap: 12px; }
  .hdr__burger { display: grid; place-items: center; }
  .gnb {
    position: fixed; z-index: 95; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    background: #0b1729; border-right: 1px solid var(--ailo-line); box-shadow: 30px 0 60px rgba(0, 0, 0, .5);
    display: flex; flex-direction: column; padding: 18px 14px; gap: 14px; overflow-y: auto;
    translate: -100% 0; visibility: hidden; transition: translate .32s var(--ailo-ease), visibility .32s;
  }
  html.dash-open .gnb { translate: 0 0; visibility: visible; transition: translate .32s var(--ailo-ease), visibility 0s; }
  .gnb__head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; border-bottom: 1px solid var(--ailo-line); }
  .gnb__x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ailo-line); background: transparent; }
  .gnb ul { flex-direction: column; gap: 2px; }
  .gnb a { padding: 12px 12px; font-size: 16px; }
  .gnb a i { display: inline-block; width: 18px; text-align: center; font-size: 15px; }
  .gnb a.is-on { background: rgba(212, 175, 55, .1); }
  .gnb a.is-on::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .gnb__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--ailo-line); }
  .gnb__foot span:last-child { display: grid; line-height: 1.25; }
  .gnb__foot small { color: var(--ailo-muted); font-size: 12px; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(3, 8, 16, .65); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  html.dash-open .scrim { opacity: 1; visibility: visible; }
  html.dash-open body { overflow: hidden; }
}
@media (max-width: 767.98px) {
  .lanes { grid-template-columns: 1fr; }
  .lanes:not(.is-all) li:nth-child(n+6) { display: none; }
  .lanes__more { display: block; }
  .ticker__lbl small { display: none; }
}
@media (max-width: 575.98px) {
  .me { display: none; } /* 프로필은 오프캔버스 메뉴 하단에 표시 */
  .hdr__tools { gap: 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc { padding: 14px 12px 10px; }
  .kc__d .dim { display: block; }
  .kc__d { white-space: normal; }
  .ptitle { align-items: stretch; flex-direction: column; }
  .period { display: grid; grid-template-columns: repeat(3, 1fr); }
  .stage { border-radius: 16px; }
  .stage__map { padding: 14px 12px 10px; }
  .box { padding: 16px 14px; }
  .tq { width: 100%; }
  .fxhead { grid-template-columns: 1fr; }
  .fxhead__hl { flex-wrap: wrap; gap: 4px 16px; }
  .cbox--xl { height: 360px; }
  .brand span { font-size: 18px; }
  .ftr { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__run { overflow-x: auto; }
}
