:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #12151a;
  --ink-2: #4a515c;
  --ink-3: #8a919c;
  --line: #e3e6eb;
  --accent: #1f6feb;
  --accent-soft: #e6efff;
  --ok: #138a52;
  --ok-soft: #e3f5ec;
  --warn: #b25e00;
  --warn-soft: #fff2e0;
  --track: #e6e9ee;
  --hero: #0e1116;
  --hero-ink: #f5f7fa;
  --hero-ink-2: #9aa3af;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d11;
    --surface: #14171d;
    --surface-2: #1b1f26;
    --ink: #eef1f5;
    --ink-2: #b2b9c4;
    --ink-3: #7b8491;
    --line: #262b33;
    --accent: #5b9bff;
    --accent-soft: #16243d;
    --ok: #3ccf8e;
    --ok-soft: #10291e;
    --warn: #ffb35c;
    --warn-soft: #2e2112;
    --track: #262b33;
    --hero: #000000;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
[hidden] { display: none !important; }

/* banners */
.banner { padding: 10px 16px; font-size: 13px; text-align: center; }
.banner-mock { background: var(--warn-soft); color: var(--warn); }
.banner-stale { background: var(--warn-soft); color: var(--warn); border-top: 1px solid var(--line); }

/* header */
.top { background: var(--hero); color: var(--hero-ink); padding: 28px 0 56px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--hero-ink-2); text-transform: uppercase; }
.top h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.sub { margin: 6px 0 0; color: var(--hero-ink-2); font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.tabs button { background: rgba(255,255,255,.08); border: 0; color: var(--hero-ink); padding: 6px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--hero-ink); color: var(--hero); font-weight: 700; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: -36px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 14px 14px 12px; box-shadow: var(--shadow); min-width: 0; }
.stat-label { font-size: 12px; color: var(--ink-3); margin: 0 0 4px; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value small { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.stat-note { font-size: 12px; color: var(--ink-3); margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* sections */
.block { margin-top: 28px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block h2 { font-size: 18px; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }

/* vessel card */
.vessels { display: grid; gap: 10px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ship { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.route { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.pill { flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill-soon { background: var(--accent-soft); color: var(--accent); }
.pill-done { background: var(--ok-soft); color: var(--ok); }
.pill-port { background: var(--surface-2); color: var(--ink-2); }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0 0; font-size: 13px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.count { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.count-num { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.count-unit { font-size: 15px; font-weight: 700; }
.count-meta { font-size: 13px; color: var(--ink-3); }

/* stepper */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 0; padding: 0; }
.step { min-width: 0; }
.step-bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.step-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.step.full .step-bar i { background: var(--ok); }
.step-name { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.step-n { margin: 1px 0 0; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.step.zero .step-name, .step.zero .step-n { color: var(--ink-3); font-weight: 500; }
.status-line { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }

details.lots { margin-top: 12px; font-size: 13px; }
details.lots summary { cursor: pointer; color: var(--ink-2); list-style: none; }
details.lots summary::-webkit-details-marker { display: none; }
details.lots summary::after { content: " ▾"; color: var(--ink-3); }
details.lots[open] summary::after { content: " ▴"; }
.lot-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.lot-table th, .lot-table td { text-align: left; padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.lot-table th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.lot-table td.num, .lot-table th.num { text-align: right; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }

.empty { background: var(--surface); border-radius: var(--radius); padding: 28px 16px; text-align: center; color: var(--ink-3); }

/* waiting */
.waiting { margin-top: 14px; background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.waiting h3 { margin: 0 0 2px; font-size: 14px; }
.waiting p { margin: 0 0 8px; font-size: 12px; color: var(--ink-3); }
.waiting ul { list-style: none; margin: 0; padding: 0; }
.waiting li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.waiting li span:last-child { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* promo */
.promo { margin-top: 28px; }
.promo-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.promo-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.promo-link { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; min-width: 0; transition: border-color .15s; }
.promo-link:hover { border-color: var(--ink-3); }
.promo-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink); }
.promo-text { display: flex; flex-direction: column; min-width: 0; }
.promo-text b { font-size: 14px; }
.promo-text small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-arrow { margin-left: auto; color: var(--ink-3); font-size: 20px; line-height: 1; }

/* trend */
.trend { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 12px 10px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar-v { font-size: 12px; font-weight: 700; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.bar-fill { width: 100%; max-width: 44px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar.last .bar-fill { background: var(--ink); }
.bar-m { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* help */
.help { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.help h2 { font-size: 15px; margin-bottom: 8px; }
.help-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--ink-2); }
.help-steps li { margin: 3px 0; }
.help-steps b { color: var(--ink); margin-right: 4px; }
.help p { font-size: 12px; margin: 10px 0 0; }

/* footer */
.foot { margin-top: 36px; padding: 24px 0 40px; border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; font-size: 13px; }
.notice { font-weight: 700; color: var(--ink-2); }
.foot-links { display: flex; gap: 8px; }
.foot-links a { color: var(--ink-2); }
.foot-links span { color: var(--ink-3); }

@media (max-width: 480px) {
  .top h1 { font-size: 23px; }
  .stat { padding: 12px 10px 10px; }
  .stat-value { font-size: 19px; }
  .promo-links { grid-template-columns: 1fr; }
  .count-num { font-size: 27px; }
}
