:root {
  --ink: #172026;
  --muted: #68737d;
  --line: #dfe6ea;
  --paper: #ffffff;
  --wash: #f5f7f4;
  --teal: #087b76;
  --teal-dark: #075f5b;
  --yellow: #f3c63a;
  --red: #d9514e;
  --blue: #3d79bd;
  --green: #49a466;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family:
    "Pretendard",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    Arial,
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(223, 230, 234, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 900;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 8px 11px;
  border-radius: 6px;
}

.nav a:hover {
  background: #eef4f3;
  color: var(--teal-dark);
}

.hero {
  position: relative;
  min-height: min(680px, calc(100svh - 62px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0e1619;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 17, 18, 0.88), rgba(9, 17, 18, 0.48) 45%, rgba(9, 17, 18, 0.18)),
    linear-gradient(0deg, rgba(9, 17, 18, 0.22), rgba(9, 17, 18, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  color: #fff;
  padding: 80px 0 110px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #8de0d3;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 720px;
  font-size: clamp(42px, 6vw, 78px);
  word-break: keep-all;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.hero-copy {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2.2vw, 20px);
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--yellow);
  color: #161913;
  box-shadow: 0 12px 24px rgba(243, 198, 58, 0.28);
}

.button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.button.dark {
  background: var(--ink);
  color: #fff;
}

.ticker-band {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.ticker-band > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ticker-band strong {
  font-size: clamp(18px, 2.5vw, 28px);
}

.muted {
  color: var(--muted);
}

.section {
  padding: 72px clamp(18px, 4vw, 56px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(260px, 0.55fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head p:last-child,
.generator-copy p,
.notice p {
  margin: 0;
  color: var(--muted);
  word-break: keep-all;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(23, 32, 38, 0.06);
  padding: 22px;
}

.latest-panel {
  grid-row: span 2;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-weight: 900;
}

.panel-title small {
  color: var(--muted);
  font-weight: 700;
}

.balls,
.set-balls,
.mini-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.ball {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.16);
}

.ball.yellow {
  background: #d7a800;
}

.ball.blue {
  background: var(--blue);
}

.ball.red {
  background: var(--red);
}

.ball.gray {
  background: #727a81;
}

.ball.green {
  background: var(--green);
}

.ball.bonus {
  outline: 3px solid #fff;
  box-shadow:
    0 0 0 2px var(--ink),
    inset 0 -8px 16px rgba(0, 0, 0, 0.16);
}

.stat-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}

.stat-pills div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.stat-pills dt {
  color: var(--muted);
  font-size: 13px;
}

.stat-pills dd {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 900;
}

.range-chart,
.temperature-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 54px 1fr 28px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f0;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--yellow));
}

.insight-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.insight-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.insight-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.insight-list span {
  color: var(--muted);
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(320px, 1fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  background: #eef4f3;
}

.generator-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.control-row {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.seg {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.seg.active {
  background: var(--teal);
  color: #fff;
}

.wide-button {
  width: 100%;
}

.generated-sets {
  display: grid;
  gap: 12px;
}

.generated-set {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.generated-set header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.set-balls .ball,
.mini-balls .ball {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.check-form {
  display: grid;
  gap: 8px;
}

.check-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.input-row input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 13px;
  outline: 0;
}

.input-row input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 123, 118, 0.15);
}

.check-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #f8faf9;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8faf9;
  color: var(--muted);
  font-size: 13px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.notice {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  background: #172026;
  color: #fff;
}

.notice .eyebrow {
  color: #f2d266;
}

.notice p {
  color: rgba(255, 255, 255, 0.76);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 4vw, 56px);
  color: var(--muted);
  background: #fff;
  font-size: 13px;
}

@media (max-width: 1040px) {
  .dashboard-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .latest-panel {
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

  .ticker-band,
  .section-head,
  .notice {
    grid-template-columns: 1fr;
  }

  .stat-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ball {
    width: 46px;
    height: 46px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }
}
