* { box-sizing: border-box; }
:root { font-family: Arial, "Noto Sans KR", sans-serif; color: #e9edf5; background: #0d1118; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: #0d1118; }
a { color: inherit; text-decoration: none; }
.topbar { min-height: 68px; padding: 0 6vw; display: flex; align-items: center; gap: 28px; position: sticky; top: 0; z-index: 20; background: rgba(13,17,24,.92); border-bottom: 1px solid #252c38; backdrop-filter: blur(14px); }
.brand { font-size: 20px; font-weight: 900; margin-right: auto; }
.nav { display: flex; gap: 20px; color: #9ba7bb; font-size: 14px; font-weight: 700; }
.server-badge { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #2b3442; border-radius: 999px; color: #9ba7bb; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #707b8c; }
.status-dot.ok { background: #2dd17e; }
.status-dot.error { background: #ff6677; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 100px 0 76px; border-bottom: 1px solid #202733; }
.eyebrow { margin: 0 0 14px; color: #6e96ff; font-size: 12px; font-weight: 900; letter-spacing: .16em; }
h1 { margin: 0; max-width: 900px; font-size: clamp(42px, 7vw, 78px); line-height: 1.06; letter-spacing: -.055em; }
.hero-copy { max-width: 720px; margin: 26px 0 0; color: #98a4b8; font-size: 17px; line-height: 1.8; }
.section, .roadmap { padding: 64px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.sample-badge { padding: 7px 10px; border-radius: 999px; background: #1c2430; color: #8794a9; font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.market-card { min-height: 170px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; background: #141a23; border: 1px solid #252d3a; border-radius: 18px; }
.card-label { color: #8e9aae; font-size: 13px; font-weight: 700; }
.market-card strong { font-size: 30px; letter-spacing: -.04em; }
.market-card small { color: #6e96ff; font-weight: 700; }
.roadmap { border-top: 1px solid #202733; }
.roadmap-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.roadmap-grid div { padding: 18px; display: flex; gap: 16px; background: #111720; border: 1px solid #222a36; border-radius: 14px; }
.roadmap-grid b { color: #6e96ff; }
.roadmap-grid span { color: #c7cfdb; }
.error-message { color: #ff7a8b; }
footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 48px; display: flex; justify-content: space-between; gap: 20px; color: #707d91; border-top: 1px solid #202733; font-size: 12px; }
@media (max-width: 820px) { .nav { display: none; } .card-grid { grid-template-columns: repeat(2, 1fr); } .roadmap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .topbar { padding: 0 20px; } .server-badge { display: none; } main, footer { width: min(100% - 28px, 1180px); } .hero { padding-top: 68px; } .card-grid, .roadmap-grid { grid-template-columns: 1fr; } footer { flex-direction: column; } }


.status-dot.warn { background: #f1b24c; }

.section-note {
  margin: 10px 0 0;
  color: #7f8ca1;
  font-size: 13px;
  line-height: 1.6;
}

.refresh-button {
  border: 1px solid #324158;
  border-radius: 10px;
  padding: 9px 14px;
  background: #172131;
  color: #dbe4f4;
  font-weight: 800;
  cursor: pointer;
}

.refresh-button:disabled {
  opacity: .55;
  cursor: default;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #252d3a;
  border-radius: 16px;
  background: #111720;
}

.stock-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.stock-table th,
.stock-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #202835;
  white-space: nowrap;
}

.stock-table th {
  position: sticky;
  top: 68px;
  z-index: 5;
  background: #171e28;
  color: #8290a5;
  font-size: 12px;
  text-align: left;
}

.stock-table tbody tr:hover {
  background: #151e2b;
}

.stock-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stock-table .rank {
  color: #6e96ff;
  font-weight: 900;
}

.stock-table .stock-name {
  font-weight: 800;
  color: #edf2fa;
}

.stock-table .code {
  color: #78859a;
  font-family: Consolas, monospace;
}

.rate-up {
  color: #ff6876;
  font-weight: 900;
}

.rate-down {
  color: #5d93ff;
  font-weight: 900;
}

.rate-flat {
  color: #aab3c2;
}

.theme-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #c2cada;
}

.table-message {
  padding: 34px !important;
  color: #8491a5;
  text-align: center !important;
}

.empty-panel {
  padding: 28px;
  border: 1px dashed #303a49;
  border-radius: 16px;
  background: #111720;
  color: #7f8ca1;
  line-height: 1.7;
}


.strong-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.strong-theme-card {
  min-height: 170px;
  padding: 20px;
  border: 1px solid #273142;
  border-radius: 16px;
  background: #121923;
}

.theme-rank {
  color: #6e96ff;
  font-size: 12px;
  font-weight: 900;
}

.theme-name {
  margin-top: 10px;
  color: #edf2fa;
  font-size: 18px;
  font-weight: 900;
}

.theme-rate {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 900;
}

.theme-count {
  margin-top: 8px;
  color: #8c98aa;
  font-size: 12px;
}

.theme-leaders {
  margin-top: 12px;
  color: #aeb8c8;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .strong-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .strong-theme-grid { grid-template-columns: 1fr; }
}

/* ===== Multi-page UX v0.5.0 ===== */
.nav-link {
  position: relative;
  padding: 24px 2px 22px;
  transition: color .18s ease;
}
.nav-link:hover {
  color: #eef3ff;
}
.nav-link.active {
  color: #ffffff;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: #6e96ff;
}

.hero-home {
  padding-bottom: 58px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.primary-button {
  background: #6e96ff;
  color: #0d1118;
  border: 1px solid #6e96ff;
}

.secondary-button {
  background: #151d29;
  color: #dce5f5;
  border: 1px solid #303b4d;
}

.primary-button:hover,
.secondary-button:hover,
.route-card:hover {
  transform: translateY(-2px);
}

.compact-section {
  padding-top: 54px;
  padding-bottom: 54px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #2e493c;
  border-radius: 999px;
  background: #13251d;
  color: #59db91;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.route-section {
  border-top: 1px solid #202733;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.route-card {
  min-height: 200px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid #273142;
  border-radius: 18px;
  background: #121923;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.route-card:hover {
  border-color: #435677;
  background: #151e2a;
}

.route-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 11px;
  background: #1a2536;
  color: #88a8ff;
  font-size: 18px;
  font-weight: 900;
}

.route-card strong {
  font-size: 20px;
  letter-spacing: -.02em;
}

.route-card p {
  max-width: 520px;
  margin: 10px 0 24px;
  color: #8d99ac;
  font-size: 14px;
  line-height: 1.7;
}

.route-arrow {
  margin-top: auto;
  color: #7fa0ff;
  font-size: 13px;
  font-weight: 900;
}

.page-intro {
  min-height: 230px;
  padding: 66px 0 36px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #202733;
}

.page-title {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.page-description {
  max-width: 760px;
  margin: 16px 0 0;
  color: #8f9caf;
  font-size: 14px;
  line-height: 1.7;
}

.page-content-section {
  padding-top: 34px;
}

.coming-panel {
  min-height: 280px;
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px dashed #334055;
  border-radius: 20px;
  background: #111720;
}

.coming-panel h2 {
  margin-top: 14px;
  font-size: 26px;
}

.coming-panel p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #8895a8;
  line-height: 1.75;
}

.coming-badge {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 7px;
  background: #1c2940;
  color: #7fa0ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.compact-coming {
  min-height: 220px;
}

.search-shell {
  display: grid;
  gap: 16px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  border: 1px solid #273142;
  border-radius: 16px;
  background: #111720;
}

.search-box input,
.search-box button {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid #303b4d;
  font: inherit;
}

.search-box input {
  padding: 0 14px;
  background: #0e141d;
  color: #dce4f2;
}

.search-box button {
  min-width: 92px;
  padding: 0 16px;
  background: #202a3a;
  color: #8794a8;
  font-weight: 800;
}

.search-box input:disabled,
.search-box button:disabled {
  opacity: .72;
}

@media (max-width: 980px) {
  .topbar {
    padding-left: 24px;
    padding-right: 24px;
    gap: 18px;
  }
  .nav {
    gap: 14px;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 0;
    flex-wrap: wrap;
  }

  .brand {
    margin-right: 0;
  }

  .server-badge {
    margin-left: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .route-grid {
    grid-template-columns: 1fr;
  }

  .page-intro {
    min-height: 210px;
  }

  .stock-table th {
    top: 105px;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .server-badge {
    display: flex;
  }

  .hero {
    padding-top: 58px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .page-intro {
    min-height: 190px;
    padding-top: 46px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .page-intro .refresh-button {
    width: 100%;
  }

  .coming-panel {
    min-height: 240px;
    padding: 26px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .search-box button {
    width: 100%;
  }
}

/* ===== UX Polish v0.5.1 ===== */
:root {
  --page-width: 1180px;
}

.topbar {
  min-height: 64px;
  padding-left: max(22px, calc((100vw - var(--page-width)) / 2));
  padding-right: max(22px, calc((100vw - var(--page-width)) / 2));
  gap: 22px;
  background: rgba(13, 17, 24, .96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: 14px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #6e96ff;
  color: #0c1118;
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: -.04em;
}

.brand-name {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.nav {
  margin-right: auto;
  gap: 5px;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 9px;
  color: #8f9bad;
  transition: color .16s ease, background .16s ease;
}

.nav-link:hover {
  background: #151d28;
  color: #dfe7f4;
}

.nav-link.active {
  background: #1a2331;
  color: #ffffff;
}

.nav-link.active::after {
  display: none;
}

.server-badge {
  flex: 0 0 auto;
  background: #111821;
  border-color: #273140;
  color: #8c99ac;
}

.status-dot.ok {
  box-shadow: 0 0 0 4px rgba(45, 209, 126, .08);
}

.hero-home {
  min-height: 320px;
  padding: 54px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .72fr);
  align-items: center;
  gap: 54px;
}

.hero-home h1 {
  max-width: 680px;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.02;
}

.hero-home .hero-copy {
  max-width: 630px;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.75;
}

.hero-quick-panel {
  padding: 14px;
  border: 1px solid #283344;
  border-radius: 18px;
  background: #111821;
}

.hero-quick-title {
  margin: 4px 7px 10px;
  color: #748198;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.hero-quick-link {
  min-height: 74px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 13px;
  transition: background .16s ease, transform .16s ease;
}

.hero-quick-link + .hero-quick-link {
  border-top: 1px solid #222c3a;
}

.hero-quick-link:hover {
  background: #172131;
  transform: translateX(2px);
}

.hero-quick-link span:first-child {
  display: grid;
  gap: 5px;
}

.hero-quick-link b {
  color: #edf2fa;
  font-size: 15px;
}

.hero-quick-link small {
  color: #7f8da1;
  font-size: 12px;
}

.quick-arrow {
  color: #789cff;
  font-size: 20px;
}

.compact-section {
  padding-top: 44px;
  padding-bottom: 52px;
}

.card-grid {
  grid-template-columns: 1.2fr 1.2fr .8fr .8fr;
  gap: 12px;
}

.market-card {
  min-height: 148px;
  padding: 18px;
  border-radius: 16px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

a.market-card:hover {
  transform: translateY(-2px);
  border-color: #40516d;
  background: #17202c;
}

.market-card-primary,
.market-card-theme {
  background: #151d29;
}

.market-card-primary {
  border-color: #31486f;
}

.market-card-theme {
  border-color: #3a3e61;
}

.market-card-top,
.market-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-card-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #202a39;
  color: #8cabff;
  font-size: 12px;
  font-weight: 950;
}

.market-card strong {
  margin: 18px 0;
  font-size: clamp(21px, 2.15vw, 29px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-go {
  flex: 0 0 auto;
  color: #7788a1;
  font-size: 11px;
  font-weight: 850;
}

.route-section {
  padding-top: 48px;
}

.route-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.route-card {
  min-height: 165px;
  padding: 19px;
  border-radius: 15px;
}

.route-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 15px;
  border-radius: 9px;
  font-size: 15px;
}

.route-card strong {
  font-size: 17px;
}

.route-card p {
  margin: 8px 0 16px;
  font-size: 12px;
  line-height: 1.6;
}

.route-arrow {
  font-size: 11px;
}

.section-heading {
  margin-bottom: 19px;
}

.section-heading h2 {
  font-size: 25px;
}

.page-intro {
  min-height: 205px;
  padding-top: 48px;
}

.page-title {
  font-size: clamp(36px, 4vw, 50px);
}

@media (max-width: 1040px) {
  .topbar {
    padding-left: 20px;
    padding-right: 20px;
  }

  .brand-name {
    display: none;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    padding-top: 9px;
  }

  .brand-name {
    display: inline;
  }

  .nav {
    gap: 5px;
    padding-bottom: 7px;
  }

  .nav-link {
    padding: 9px 11px;
  }

  .hero-home {
    min-height: auto;
    padding: 44px 0 40px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-quick-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }

  .hero-quick-title {
    grid-column: 1 / -1;
  }

  .hero-quick-link + .hero-quick-link {
    border-top: 0;
  }

  .hero-quick-link {
    min-height: 82px;
  }

  .stock-table th {
    top: 103px;
  }
}

@media (max-width: 600px) {
  .brand-name {
    font-size: 16px;
  }

  .server-badge {
    padding: 6px 8px;
    font-size: 11px;
  }

  .hero-home {
    padding-top: 36px;
  }

  .hero-home h1 {
    font-size: 42px;
  }

  .hero-quick-panel {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .market-card {
    min-height: 128px;
  }

  .route-card {
    min-height: 145px;
  }
}

/* ===== Header overlap fix v0.5.2 ===== */
:root {
  --topbar-height: 64px;
}

.stock-table th {
  position: static;
  top: auto;
  z-index: auto;
  box-shadow: inset 0 -1px 0 #2a3342;
}

.page-intro,
.section {
  scroll-margin-top: calc(var(--topbar-height) + 12px);
}
