:root {
  --navy: #0f1c33;
  --blue: #18407c;
  --gold: #c7a44e;
  --gold-soft: #e8d48a;
  --ink: #e8eef5;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #0b1524;
  color: var(--ink);
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 2px solid var(--gold);
  background: linear-gradient(160deg, var(--navy), var(--blue));
}
h1 { margin: 4px 0 0; font-size: 22px; font-weight: 700; }
.kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.sub { margin: 6px 0 0; font-size: 13px; color: #cbd5e1; max-width: 54em; line-height: 1.45; }
.lang {
  flex-shrink: 0;
  color: var(--gold-soft);
  text-decoration: none;
  border: 1px solid var(--gold);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.lang:hover { background: var(--gold); color: var(--navy); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  padding: 12px 24px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}
.legend .sec-key {
  color: #ccff00;
  font-weight: 800;
}
.legend .sec-key i {
  width: 14px;
  height: 12px;
  background: #ccff00;
  box-shadow: 0 0 10px rgba(204, 255, 0, 0.85);
}

.board { overflow: auto; padding: 8px 16px 48px; }

.row {
  display: grid;
  grid-template-columns: 268px repeat(19, minmax(36px, 1fr));
  min-width: 1180px;
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  align-items: stretch;
}
.row.head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #122033;
  min-height: 34px;
}
.row.group {
  min-height: 28px;
  background: #0b1524;
  border-bottom: 0;
}
.row.group span {
  grid-column: 1 / -1;
  padding: 12px 8px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.lab {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #0d1a2c;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab .id,
.bar .id {
  flex-shrink: 0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #e8d48a;
}
.bar .id { color: inherit; opacity: 0.9; margin-right: 6px; }
.row.head .lab { background: #122033; color: var(--gold-soft); font-size: 11px; }
.wk {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-soft);
  border-left: 1px solid rgba(255,255,255,0.04);
}
.wk.dim { color: #94a3b8; }

.bar {
  position: relative;
  margin: 8px 3px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #0f1c33;
  overflow: hidden;
  white-space: nowrap;
  cursor: help;
}
.bar.sec-end {
  padding-right: 16px;
}
.bar.sec-end::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: max(11px, 14%);
  border-radius: 0 5px 5px 0;
  background: #ccff00;
  box-shadow:
    inset 0 0 0 1px rgba(15, 28, 51, 0.25),
    0 0 10px rgba(204, 255, 0, 0.55);
}
.bar .tip { display: none; }
.core { background: #c7a44e; }
.ff { background: #3b82f6; color: #fff; }
.pdf { background: #2dd4bf; }
.res { background: #a78bfa; color: #fff; }
.live { background: #34d399; }
.later { background: #64748b; color: #fff; }
.harbor { background: #f59e0b; }
.sky { background: #fb7185; color: #1a1020; }
.ghost {
  background: repeating-linear-gradient(
    90deg,
    rgba(167, 139, 250, 0.45),
    rgba(167, 139, 250, 0.45) 6px,
    rgba(167, 139, 250, 0.18) 6px,
    rgba(167, 139, 250, 0.18) 12px
  );
  color: #f3e8ff;
}

.float-tip {
  position: fixed;
  z-index: 50;
  width: min(540px, calc(100vw - 24px));
  max-height: min(78vh, 560px);
  overflow: auto;
  padding: 14px 16px 16px;
  border-radius: 12px;
  border: 1px solid rgba(199, 164, 78, 0.55);
  background: linear-gradient(180deg, #1a2d44, #0f1c33);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  color: #e8eef5;
  font-size: 13px;
  line-height: 1.55;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.float-tip.on {
  opacity: 1;
  transform: none;
}
.float-tip .tz {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(199, 164, 78, 0.18);
  color: #e8d48a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.float-tip h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #fff;
  font-weight: 700;
}
.float-tip p { margin: 0 0 8px; }
.float-tip p:last-child { margin-bottom: 0; }
.float-tip .sec-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #ccff00;
  background: rgba(204, 255, 0, 0.08);
  color: #eaffb8;
}
.float-tip .sec-note strong {
  display: block;
  margin-bottom: 4px;
  color: #ccff00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hint {
  padding: 0 24px 8px;
  font-size: 12px;
  color: #94a3b8;
}


@media (max-width: 800px) {
  .top { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 18px; }
}
