@font-face {
  font-family: "NanumGothic";
  src: url("../fonts/nanum/NanumGothic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Pretendard";
  src: url("../fonts/pretendard/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Pretendard";
  src: url("../fonts/pretendard/Pretendard-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "Pretendard";
  src: url("../fonts/pretendard/Pretendard-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Pretendard";
  src: url("../fonts/pretendard/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Helvetica";
  src: url("../fonts/pretendard/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Helvetica";
  src: url("../fonts/pretendard/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

:root {
  --blue: #3182F6;
  --blue-weak: #E8F3FF;
  --blue-ink: #1B64DA;
  --bg: #F2F4F6;
  --card: #FFFFFF;
  --ink: #191F28;
  --ink-2: #4E5968;
  --ink-3: #8B95A1;
  --line: #E5E8EB;
  --y: #F2B705;
  --bb: #3182F6;
  --r: #E54B4B;
  --g: #8A8F99;
  --n: #2E9B4E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 390px;
  height: 844px;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "NanumGothic", "Helvetica", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.num, .ball, .status .time, .meta, table, .bead, .cnt, .rnd, .dt {
  font-family: "Helvetica", "Liberation Sans", Arial, sans-serif;
}
.ko { font-family: "NanumGothic", sans-serif; }

.phone {
  width: 390px;
  height: 844px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* status */
.status {
  height: 44px;
  padding: 12px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg);
}
.status .time {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.status .icons { display: flex; align-items: center; gap: 6px; }

/* top bar */
.top {
  height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sl {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
.wordmark {
  font-size: 20px;
  letter-spacing: -0.4px;
  color: var(--ink);
  line-height: 1;
}
.top-title {
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--ink);
}

/* scroll body */
.scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 20px 8px;
}

/* typography */
.h1 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 4px 0 16px;
}
.h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 8px;
}
.cap {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.4;
}
.body {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  cursor: default;
  text-decoration: none;
}
.btn-xl {
  height: 56px;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  letter-spacing: -0.2px;
  font-family: "NanumGothic", sans-serif;
}
.btn-weak {
  height: 40px;
  background: transparent;
  color: var(--blue-ink);
  font-size: 16px;
  font-family: "NanumGothic", sans-serif;
}
.btn-caption {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 2px;
  margin-bottom: 16px;
}

/* cards */
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
}
.card + .card { margin-top: 10px; }

/* balls */
.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}
.ball.sm { width: 18px; height: 18px; font-size: 9px; }
.ball.md { width: 28px; height: 28px; font-size: 12px; }
.ball.lg { width: 34px; height: 34px; font-size: 14px; }
.ball.y { background: #F2B705; }
.ball.b { background: #3182F6; }
.ball.r { background: #E54B4B; }
.ball.g { background: #8A8F99; }
.ball.n { background: #2E9B4E; }
.plus { color: var(--ink-3); font-size: 14px; font-weight: 700; padding: 0 2px; font-family: "Helvetica", sans-serif; }

/* lines */
.line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}
.line + .line { border-top: 1px solid var(--line); }
.line .idx {
  width: 18px;
  font-size: 13px;
  color: var(--ink-3);
  font-family: "Helvetica", sans-serif;
  flex-shrink: 0;
}
.line .balls { display: flex; align-items: center; gap: 5px; flex: 1; }
.line .tag {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.line.ph {
  color: var(--ink-3);
  font-size: 15px;
}
.line.ph .slot {
  flex: 1;
  color: var(--ink-3);
}

/* teasers */
.teasers { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: 14px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
}
.teaser .chev { color: var(--ink-3); font-family: "Helvetica", sans-serif; font-size: 18px; }

/* segments */
.segs {
  display: flex;
  gap: 16px;
  margin: 2px 0 12px;
  border-bottom: 1px solid var(--line);
}
.seg {
  font-size: 15px;
  color: var(--ink-3);
  padding: 0 0 10px;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.seg.on {
  color: var(--ink);
}
.seg.on::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

/* search + chips */
.find {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B95A1' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") no-repeat 12px center;
  padding: 0 12px 0 38px;
  font-size: 15px;
  color: var(--ink-3);
  font-family: "NanumGothic", sans-serif;
  margin-bottom: 8px;
}
.filt {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.filt .k {
  font-size: 13px;
  color: var(--ink-2);
  margin-right: 2px;
  flex-shrink: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
  border: 1px solid var(--line);
}
.chip.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.chip.add {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0 4px;
}
.chip.ghost {
  background: var(--blue-weak);
  border-color: transparent;
  color: var(--blue-ink);
}

/* draw cards */
.draw {
  background: #fff;
  border-radius: 16px;
  padding: 8px 12px 8px;
  margin-bottom: 6px;
}
.draw .row1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.draw .no { font-size: 12px; color: var(--ink-3); }
.draw .rnd { font-size: 16px; font-weight: 700; color: var(--ink); }
.draw .dt { font-size: 13px; color: var(--ink-3); margin-left: auto; }
.draw .balls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.draw .ranks {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-3);
  overflow-x: auto;
}
.draw .ranks b {
  color: var(--ink-2);
  font-weight: 700;
  font-family: "Helvetica", sans-serif;
}

/* tables */
.tbl-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 10px;
}
.tbl-scroll { overflow-x: auto; overflow-y: hidden; }
table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--ink);
}
table.grid th {
  background: #F9FAFB;
  color: var(--ink-2);
  font-weight: 400;
  font-size: 11px;
  padding: 7px 4px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  font-family: "NanumGothic", sans-serif;
}
table.grid th.en { font-family: "Helvetica", sans-serif; }
table.grid td {
  padding: 6px 3px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid #F2F4F6;
  vertical-align: middle;
}
table.grid .tot { font-weight: 700; font-size: 13px; }
.up { color: #E54B4B; font-family: "Helvetica", sans-serif; }
.dn { color: #3182F6; font-family: "Helvetica", sans-serif; }
.dash { color: #B0B8C1; }

/* text tabs */
.ttabs {
  display: flex;
  gap: 16px;
  margin: 4px 0 10px;
}
.ttab {
  font-size: 15px;
  color: var(--ink-3);
}
.ttab.on { color: var(--ink); }

/* beads */
.beads-board {
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-radius: 16px;
  padding: 12px 8px 10px;
}
.bcol { display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.bcol-h { font-size: 14px; margin-bottom: 8px; }
.bcol-h.odd { color: #3182F6; }
.bcol-h.even { color: #E54B4B; }
.beads { display: flex; flex-direction: column; gap: 6px; min-height: 84px; align-items: center; }
.bead {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
}
.bead.odd { background: #3182F6; }
.bead.even { background: #E54B4B; }
.bcol-f { margin-top: 6px; font-size: 13px; color: var(--ink-3); font-family: "Helvetica", sans-serif; }

/* oe chart */
.chart-card {
  background: #fff;
  border-radius: 16px;
  padding: 10px 8px 8px;
}
.chart {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 136px;
}
.rcol { display: flex; flex-direction: column; align-items: center; width: 64px; }
.up-zone, .dn-zone {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center;
}
.up-zone { justify-content: flex-end; }
.dn-zone { justify-content: flex-start; }
.stack { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.blk { width: 18px; height: 10px; border-radius: 2px; }
.blk.odd { background: #E54B4B; }
.blk.even { background: #3182F6; }
.cnt-up, .cnt-dn {
  font-size: 12px; font-weight: 700; height: 14px; line-height: 14px;
  font-family: "Helvetica", sans-serif;
}
.cnt-up { color: #E54B4B; margin-bottom: 2px; }
.cnt-dn { color: #3182F6; margin-top: 2px; }
.base { width: 100%; height: 2px; background: #D1D6DB; flex-shrink: 0; }
.rlabel { margin-top: 4px; font-size: 11px; color: var(--ink-2); font-family: "Helvetica", sans-serif; }
.legend {
  display: flex; justify-content: center; gap: 16px;
  padding-top: 6px; font-size: 13px; color: var(--ink-2);
}
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.sw.odd { background: #E54B4B; }
.sw.even { background: #3182F6; }

/* result empty */
.empty {
  text-align: center;
  padding: 28px 12px 8px;
}
.empty .ico {
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
}
.empty .t {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty .d {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.45;
  margin-bottom: 20px;
}

.win-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.win-meta .rnd { font-size: 18px; font-weight: 700; }
.win-meta .dt { font-size: 14px; color: var(--ink-3); }
.win-balls { display: flex; align-items: center; gap: 6px; }

/* tab bar */
.tabs {
  height: 56px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  flex-shrink: 0;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 11px;
}
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--blue); }

.safe {
  height: 22px;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
}
.home-ind {
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: #191F28;
  opacity: 0.18;
  margin-top: 6px;
}

/* oe table balls left */
td.balls { text-align: left; padding-left: 6px; }
.empty-cell { color: #C0C5CC; }

.ou {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  color: #fff; font-size: 10px; font-weight: 700;
  font-family: "Helvetica", sans-serif;
}
.ou.o { background: #C47A12; }
.ou.u { background: #5A7A9A; }
.oe-row {
  background: #fff;
  border-radius: 14px;
  padding: 7px 10px;
  margin-bottom: 5px;
}
.oe-row .top {
  height: auto;
  padding: 0;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.oe-row .rnd { font-size: 16px; font-weight: 700; }
.oe-row .dt { font-size: 13px; color: var(--ink-3); }
.oe-row .ratio {
  margin-left: auto;
  font-size: 16px;
  font-weight: 700;
  font-family: "Helvetica", sans-serif;
  color: var(--ink);
}
.oe-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.oe-line .k {
  width: 32px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-3);
}

.tab.off { color: var(--ink-3); pointer-events: none; cursor: default; }

/* toss2 cuts — calc / color / band */
.top-title.lg {
  font-size: 26px;
  letter-spacing: -0.6px;
}
.sec-k {
  font-size: 16px;
  color: var(--ink-2);
  margin: 2px 0 10px;
}
.cond-empty {
  text-align: center;
  padding: 22px 12px;
  color: var(--ink-3);
  font-size: 15px;
}
.count-card { text-align: center; padding: 18px 16px 16px; }
.count-card .lab { font-size: 13px; color: var(--ink-3); }
.count-card .val {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-top: 6px;
  font-family: "Helvetica", "Liberation Sans", Arial, sans-serif;
  color: var(--ink);
}
.count-card .fn {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 8px;
  line-height: 1.4;
}
.cond-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.qty {
  display: flex;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin: 10px 0 12px;
}
.qty-btn {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 16px;
}
.qty-btn.on { background: var(--blue); color: #fff; }
.qty-btn + .qty-btn { border-left: 1px solid var(--line); }
.btn-off {
  background: #D1D6DB;
  color: #fff;
  pointer-events: none;
}
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 8px;
}
.page-head .h1 { margin: 0; font-size: 22px; }
.back {
  color: var(--blue);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.note {
  font-size: 12px;
  color: var(--ink-3);
  margin: 2px 0 10px;
  line-height: 1.4;
}
.crows { display: flex; flex-direction: column; gap: 14px; }
.crow { display: flex; align-items: center; gap: 8px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dot.y { background: var(--y); }
.dot.b { background: var(--bb); }
.dot.r { background: var(--r); }
.dot.g { background: var(--g); }
.dot.n { background: var(--n); }
.crow .cn { width: 28px; font-size: 13px; color: var(--ink); flex-shrink: 0; }
.crow .cr {
  width: 38px; font-size: 12px; color: var(--ink-3); flex-shrink: 0;
  font-family: "Helvetica", "Liberation Sans", Arial, sans-serif;
}
.track {
  flex: 1; height: 8px; background: #EEF0F3; border-radius: 4px; overflow: hidden;
}
.track .fill { height: 100%; border-radius: 4px; }
.fill.y { background: var(--y); }
.fill.b { background: var(--bb); }
.fill.r { background: var(--r); }
.fill.g { background: var(--g); }
.fill.n { background: var(--n); }
.crow .cv {
  width: 28px; text-align: right; font-size: 13px; color: var(--ink); flex-shrink: 0;
}
.deltas {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 2px;
  font-size: 11px;
  color: var(--ink-2);
  align-items: center;
}
.deltas span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.delta-none { font-size: 13px; color: var(--ink-3); }
.band-leg {
  display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin: 0 0 10px;
}
.sq {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 4px; vertical-align: -1px;
}
.sq.y { background: var(--y); }
.sq.off { background: #EEF0F3; }
.band-grid {
  display: grid;
  grid-template-columns: 44px repeat(6, 1fr);
  gap: 4px;
  align-items: center;
}
.band-grid .gh {
  text-align: center; font-size: 11px; color: var(--ink-3);
  font-family: "Helvetica", "Liberation Sans", Arial, sans-serif;
}
.band-grid .gl {
  font-size: 12px; color: var(--ink-2);
  font-family: "Helvetica", "Liberation Sans", Arial, sans-serif;
}
.cell { height: 22px; border-radius: 4px; background: #EEF0F3; }
.cell.on { background: var(--y); }
.vchart {
  display: flex; align-items: flex-end; justify-content: space-around;
  height: 132px; padding-top: 4px;
}
.vcol {
  display: flex; flex-direction: column; align-items: center;
  width: 56px; height: 100%;
}
.vval {
  font-size: 13px; font-weight: 700; margin-bottom: 4px;
  font-family: "Helvetica", "Liberation Sans", Arial, sans-serif;
}
.vbar-wrap { flex: 1; width: 22px; display: flex; align-items: flex-end; }
.vbar { width: 100%; border-radius: 4px 4px 0 0; background: var(--y); }
.vlbl {
  margin-top: 6px; font-size: 11px; color: var(--ink-2);
  font-family: "Helvetica", "Liberation Sans", Arial, sans-serif;
}
.closed-set { margin-top: 18px; }
.closed-set .kicker { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.closed-set a {
  display: block; font-size: 14px; color: var(--ink-3);
  text-decoration: none; padding: 5px 0;
}
