body.page-lotto {
  display: block;
  margin: 0;
  padding: 0 0 48px;
  min-height: 100vh;
  color: #1c2430;
  background:
    linear-gradient(180deg, rgba(226, 61, 43, 0.08), transparent 240px),
    #f6f1e7;
  font-family: "IBM Plex Sans KR", "Noto Sans KR", sans-serif;
}

body.page-lotto .site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  background: #1a120e;
  border: 0;
  border-bottom: 4px solid #e23d2b;
  border-radius: 0;
}

body.page-lotto .site-nav::after { content: none; }

body.page-lotto .site-nav a {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f3e6d4;
  padding: 0;
  box-shadow: none;
}

body.page-lotto .site-nav > a[aria-current="page"] {
  background: #e23d2b;
  color: #fff;
}

body.page-lotto .site-nav .nav-bgm button,
body.page-lotto #nav-fold {
  border-color: rgba(226, 61, 43, 0.7);
  color: #f3e6d4;
  background: rgba(226, 61, 43, 0.18);
}

body.page-lotto .site-nav .nav-bgm button[aria-pressed="true"] {
  background: #f0c14b;
  color: #1a120e;
  border-color: transparent;
}

body.page-lotto .wrap {
  width: min(720px, calc(100% - 32px));
  margin: 28px auto 0;
  text-align: left;
}

body.page-lotto h1 {
  margin: 0 0 6px;
  font-family: "Song Myung", serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: #1a120e;
  text-align: left;
}

body.page-lotto .lotto-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

body.page-lotto .lotto-top .sub { margin-bottom: 0; }

body.page-lotto a.buy-lotto {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 72px;
  padding: 0 28px;
  border-radius: 16px;
  background: #e23d2b;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  box-shadow: 0 8px 0 #9d2418;
}

body.page-lotto a.buy-lotto:hover { filter: brightness(1.06); }

@media (max-width: 640px) {
  body.page-lotto .lotto-top { flex-direction: column; align-items: stretch; }
  body.page-lotto a.buy-lotto { width: 100%; min-height: 76px; font-size: 1.45rem; }
}

body.page-lotto .sub,
body.page-lotto .hint {
  margin: 0 0 18px;
  color: #6d6258;
  text-align: left;
}

body.page-lotto .hint {
  margin-top: 14px;
  font-size: 0.88rem;
}

body.page-lotto .machine {
  background: #fffdf8;
  border: 0;
  border-top: 10px solid #e23d2b;
  border-radius: 6px;
  box-shadow: 0 16px 0 rgba(26, 18, 14, 0.08);
  padding: 20px 16px 22px;
  text-align: left;
}

body.page-lotto .status {
  margin: 0;
  color: #6d6258;
}

body.page-lotto .latest-meta,
body.page-lotto .block-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #6d6258;
}

body.page-lotto .block-title.spaced { margin-top: 22px; }

body.page-lotto .balls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.page-lotto .ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1a1208;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

body.page-lotto .ball.y { background: #f6c431; }
body.page-lotto .ball.b { background: #4c9fe0; color: #fff; }
body.page-lotto .ball.r { background: #e5534b; color: #fff; }
body.page-lotto .ball.k { background: #8d8f97; color: #fff; }
body.page-lotto .ball.g { background: #5cba6a; color: #fff; }
body.page-lotto .ball.bonus { outline: 2px dashed #1a120e; outline-offset: 2px; }

body.page-lotto .plus {
  color: #8a7b6d;
  font-weight: 700;
}

body.page-lotto .prize {
  margin: 10px 0 0;
  color: #1a120e;
  font-weight: 700;
}

body.page-lotto .recent {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

body.page-lotto .recent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

body.page-lotto .round {
  width: 64px;
  color: #6d6258;
  font-size: 0.82rem;
  font-weight: 700;
}

body.page-lotto .recent .ball {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

body.page-lotto .modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 12px;
}

body.page-lotto .modes button,
body.page-lotto #again {
  appearance: none;
  cursor: pointer;
  border: 1px solid #e4d3c4;
  background: #fff;
  color: #1a120e;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
}

body.page-lotto .modes button.is-on,
body.page-lotto #again {
  background: #e23d2b;
  border-color: transparent;
  color: #fff;
}

body.page-lotto .sets {
  display: grid;
  gap: 10px;
}

body.page-lotto .set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.page-lotto .set-no {
  width: 22px;
  color: #8a7b6d;
  font-weight: 700;
}

body.page-lotto #again {
  margin-top: 14px;
}

body.page-lotto .freq {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  overflow-x: auto;
  margin-top: 8px;
  padding-bottom: 4px;
}

body.page-lotto .col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 18px;
}

body.page-lotto .col i {
  display: block;
  width: 12px;
  border-radius: 4px 4px 0 0;
  background: #e7d3c4;
}

body.page-lotto .col.top i { background: #e23d2b; }
body.page-lotto .col em {
  font-style: normal;
  font-size: 0.68rem;
  color: #8a7b6d;
}
