/* 또르르 홈페이지 모양(2판): 흰 바탕, 큰 글자, 진짜 화면 사진. 토스·당근 같은 대형 서비스 소개 페이지의 짜임새를 참고했다.
   색은 앱(app/lib/ui.dart)과 같다: 보라 #5B3DF5, 라임 #D4FF3A, 밤 #14152A. 글꼴은 프리텐다드. 밝은 화면 하나로 간다(어두운 화면 없음). */
@font-face { font-family: Pretendard; font-weight: 400; font-display: swap; src: url(fonts/Pretendard-Regular.subset.woff2) format("woff2"); }
@font-face { font-family: Pretendard; font-weight: 600; font-display: swap; src: url(fonts/Pretendard-SemiBold.subset.woff2) format("woff2"); }
@font-face { font-family: Pretendard; font-weight: 700; font-display: swap; src: url(fonts/Pretendard-Bold.subset.woff2) format("woff2"); }
@font-face { font-family: Pretendard; font-weight: 800; font-display: swap; src: url(fonts/Pretendard-ExtraBold.subset.woff2) format("woff2"); }

:root {
  --brand: #5B3DF5; --brand-hover: #4B2EE6; --brand-soft: #EEEAFF;
  --pop: #D4FF3A; --pop-soft: #F2FDCB; --night: #14152A; --live: #E5342A;
  --bg: #FFFFFF; --gray-50: #F6F7F9; --gray-100: #EDEFF2; --gray-200: #E2E5EA; --line: #E6E8EC;
  --ink: #111318; --ink-2: #353A44; --muted: #6B7280; --faint: #8A909C;
  --on-night: #C3C6D6;
  --font: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.7 var(--font); letter-spacing: -.012em; -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap {
  max-width: 1120px; margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* 머리 */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 20; }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.05em; }
.logo svg { display: block; height: 26px; width: auto; } /* 로고 A(결정기록 52번) */
.nav { display: flex; gap: 2px; margin-right: -10px; }
.nav a { padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav a:hover { background: var(--gray-50); }
.nav a[aria-current="page"] { color: var(--brand); }
/* 운영자 공지(서버 app_notice, 결정기록 72번): 생방송 미룸, 점검 */
.notice-bar { background: var(--pop); color: var(--ink); }
.notice-bar p { margin: 0; padding-block: 12px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.sample { padding: 6px 20px; background: var(--pop); color: var(--ink); font-size: 13px; font-weight: 700; text-align: center; }

/* 버튼, 글 조각 */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 24px; border: 0; border-radius: 16px;
  background: var(--gray-100); color: var(--ink); font: 700 17px/1 var(--font); letter-spacing: -.02em; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--gray-200); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.live { background: var(--live); color: #fff; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.kicker { color: var(--brand); font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.4; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }
.draft {
  display: inline-block; vertical-align: 2px; margin-right: 6px; padding: 1px 8px; border-radius: 6px;
  background: var(--pop); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.empty { padding: 28px; border-radius: 20px; background: var(--gray-50); color: var(--muted); font-weight: 600; }

/* 첫 장면 */
.hero { padding-top: 56px; }
.hero h1 { font-size: clamp(48px, 9vw, 104px); line-height: 1.12; letter-spacing: -.05em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-sub { margin-top: 22px; max-width: 32em; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.65; }
.stage { position: relative; margin-top: 52px; padding-top: 76px; overflow: hidden; border-radius: 32px; background: var(--night); }
.stage-cap { position: absolute; top: 26px; left: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: #fff; font-size: 16px; font-weight: 700; }
.stage-cap .sep { color: var(--on-night); font-weight: 600; }
.stage-cap .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pop); }
.stage-cap.on .dot { background: var(--live); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.frames { display: flex; justify-content: center; align-items: flex-start; gap: clamp(12px, 2vw, 24px); height: clamp(380px, 46vw, 560px); }
.frames img { flex: none; width: clamp(200px, 56vw, 300px); height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7); }
.nobr { white-space: nowrap; }
@media (min-width: 880px) {
  .hero { padding-top: 88px; }
  .frames img { width: clamp(200px, 24vw, 300px); }
  .frames img:nth-child(2) { margin-top: -30px; }
}

/* 소개 글 */
.statement { padding-block: 96px 24px; }
.big-text { max-width: 23em; color: var(--faint); font-size: clamp(23px, 3vw, 36px); font-weight: 700; line-height: 1.5; letter-spacing: -.035em; }
.big-text b { color: var(--ink); font-weight: 700; }

/* 상금 */
.prize { padding-block: 72px; }
.mega { margin-top: 10px; color: var(--brand); font-size: clamp(60px, 13.5vw, 152px); font-weight: 800; line-height: 1; letter-spacing: -.055em; }
.mega small { margin-left: .06em; font-size: .36em; letter-spacing: -.02em; }
.prize-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 22px; color: var(--muted); font-size: 18px; font-weight: 600; }
.prize-meta .hot { color: var(--ink); }
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 48px 0 0; }
.tiers > div { padding: 22px 0; border-top: 1px solid var(--line); }
.tiers dt { font-size: 20px; font-weight: 700; }
.tiers dd { margin: 0; }
.tiers .who { margin-top: 2px; color: var(--muted); font-size: 15px; }
.tiers .amt { margin-top: 10px; font-size: clamp(19px, 2vw, 23px); font-weight: 700; letter-spacing: -.03em; }
.small-note { max-width: 46em; margin-top: 16px; color: var(--muted); font-size: 14px; }
@media (min-width: 880px) { .tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 36px; } }

/* 기능 소개 */
.feature { padding-block: 56px; }
.feature .wrap { display: grid; gap: 36px; align-items: center; }
.feature h2 { margin-top: 12px; font-size: clamp(32px, 4.6vw, 54px); }
.desc { max-width: 25em; margin-top: 18px; color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); }
.media { position: relative; height: clamp(440px, 50vw, 600px); overflow: hidden; border-radius: 32px; }
.media.purple { background: var(--brand-soft); }
.media.lime { background: var(--pop-soft); }
.phone {
  position: absolute; top: 48px; left: 50%; transform: translateX(-50%); width: clamp(220px, 23vw, 290px);
  padding: 8px; border-radius: 44px; background: #101116; box-shadow: 0 50px 80px -30px rgba(20, 21, 42, .5);
}
.phone img { width: 100%; height: auto; border-radius: 36px; }
@media (min-width: 880px) {
  .feature { padding-block: 72px; }
  .feature .wrap { grid-template-columns: 1fr 1.1fr; gap: 72px; }
  .feature.flip .media { order: -1; }
}

/* 생방송 */
.live { padding-block: 72px 88px; }
.live .wrap { display: grid; gap: 40px; }
.live h2 { margin-top: 12px; font-size: clamp(32px, 4.6vw, 54px); }
.live-count { margin-top: 12px; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); font-weight: 600; }
.sched { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.sched li { display: grid; grid-template-columns: minmax(4.6rem, max-content) 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.day b { display: block; font-size: clamp(28px, 3vw, 36px); font-weight: 800; line-height: 1.1; letter-spacing: -.045em; white-space: nowrap; }
.day span { color: var(--muted); font-size: 15px; font-weight: 600; }
.sched h3 { font-size: 20px; }
.sched .tag { margin-bottom: 4px; color: var(--brand); font-size: 14px; font-weight: 700; }
.sched .tag:empty { display: none; }
.sched li.now .tag { color: var(--live); }
.sched .dsc { margin-top: 6px; color: var(--muted); font-size: 15px; }
@media (min-width: 880px) { .live .wrap { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; } }

/* 공정하게 */
.open { padding-block: 72px; }
.open h2 { margin-top: 12px; font-size: clamp(32px, 4.6vw, 54px); }
.facts { display: grid; gap: 0 56px; margin-top: 40px; }
.facts > div { padding: 26px 0; border-top: 1px solid var(--line); }
.facts h3 { font-size: 21px; }
.facts p { margin-top: 8px; color: var(--muted); }
.facts a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.open .link-arrow { margin-top: 24px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 지난 결선 */
.recent-sec { padding-block: 48px 96px; }
.kings-sec { padding-block: 48px 0; }
.kings-sec .rows { margin-top: 16px; }
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.head-row h2 { font-size: clamp(28px, 3.6vw, 40px); }
.recent { margin-top: 24px; }
.recent-head { margin-bottom: 10px; color: var(--muted); font-weight: 600; }
.rows, .chips { margin: 0; padding: 0; list-style: none; }
.rows li { display: flex; align-items: center; gap: 14px; padding: 18px 2px; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows .rk { flex: none; width: 2.8em; font-weight: 700; }
.rows .r1 .rk { color: var(--brand); }
.rows .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rows .pl { color: var(--muted); font-size: 15px; white-space: nowrap; }
.rows .amt { min-width: 6.2em; text-align: right; font-weight: 700; white-space: nowrap; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 0 24px; }
.chips li { display: flex; align-items: baseline; gap: 8px; padding: 13px 0; border-top: 1px solid var(--line); }
.chips .pl { flex: none; color: var(--muted); font-size: 14px; }
.chips .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }

/* 앱 */
.cta-sec { padding-bottom: 96px; }
.cta-panel { padding: 52px 24px; border-radius: 32px; background: var(--brand); color: #fff; }
.cta-panel h2 { font-size: clamp(32px, 4.6vw, 54px); }
.cta-panel p { max-width: 30em; margin-top: 16px; color: rgba(255, 255, 255, .84); font-size: 18px; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 60px; padding: 0 22px; border-radius: 16px;
  background: #0F1015; color: #fff; font-size: 17px; font-weight: 700; line-height: 1.3;
}
.store small { color: #A9ADC4; font-size: 12px; font-weight: 600; }
@media (min-width: 880px) { .cta-panel { padding: 80px 72px; } }

/* 바닥 */
.foot { padding-block: 44px 60px; background: var(--gray-50); color: var(--muted); font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--ink-2); font-weight: 600; }
.foot-links a.strong { color: var(--ink); font-weight: 700; }
.foot-legal { margin-top: 22px; }
.foot-copy { margin-top: 4px; }

/* 글 쪽(규칙, 결과, 개인정보, 고객센터) */
.page-head { padding-block: 64px 20px; }
.page-head h1 { margin-top: 10px; font-size: clamp(36px, 6vw, 60px); letter-spacing: -.045em; }
.page-head p:not(.kicker) { margin-top: 14px; color: var(--muted); font-size: 17px; }
.doc { max-width: 760px; padding-block: 12px 96px; }
.doc h2 { margin-top: 56px; font-size: 26px; scroll-margin-top: 88px; }
.doc h3 { margin-top: 28px; font-size: 19px; }
.doc p { margin-top: 12px; color: var(--ink-2); }
.doc ul, .doc ol { margin: 14px 0 0; padding-left: 1.3em; color: var(--ink-2); }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--faint); }
.doc a { color: var(--brand); font-weight: 600; }
.note { margin-top: 8px; padding: 24px 26px; border-radius: 20px; background: var(--gray-50); color: var(--ink); font-size: 18px; line-height: 1.7; }
.toc { margin-top: 24px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 20px; }
.toc b { color: var(--muted); font-size: 15px; }
.toc ol { margin: 10px 0 0; }
.toc li { margin-top: 6px; }
.toc a { color: var(--ink); font-weight: 600; }
.toc a:hover { color: var(--brand); }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 40px; } }
.table-wrap { margin-top: 16px; overflow-x: auto; border-top: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 12px 14px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 14px; font-weight: 600; }
details { padding: 20px 0; border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 16px; font-size: 18px; font-weight: 700; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--faint); font-size: 24px; font-weight: 400; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; color: var(--muted); }
.contact { margin-top: 16px; padding: 20px 22px; border-radius: 16px; background: var(--gray-50); font-weight: 600; }

/* 결과 쪽 */
.round-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.round-nav .btn { min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 15px; }
.res { padding-block: 20px 96px; }
.sum { display: flex; flex-wrap: wrap; gap: 12px 48px; padding: 26px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.sum b { display: block; color: var(--muted); font-size: 14px; font-weight: 600; }
.sum strong { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.04em; }
.res h2 { margin-top: 48px; font-size: 24px; }
.res h2 small { margin-left: 8px; color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.res .rows, .res .chips, .res details { margin-top: 12px; }
.res details { padding: 0; border: 0; }
.res details summary { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 16px; }
.res details[open] summary { margin-bottom: 4px; }
.note-s { margin-top: 40px; color: var(--muted); font-size: 15px; }
/* 조별 도착 순서(지난 결과) */
.o-tools { display: grid; gap: 12px; margin-top: 12px; }
.o-find { display: flex; gap: 8px; }
.o-find input, .o-tools select {
  min-width: 0; height: 52px; padding: 0 14px; border: 1px solid var(--gray-200); border-radius: 14px;
  background: var(--bg); color: var(--ink); font: 600 16px var(--font);
}
.o-find input { flex: 1; }
.o-find .btn { flex: none; min-height: 52px; padding: 0 20px; }
.o-tools select { width: 100%; }
.res .o-tools p { margin: 0; }
.order { margin: 0; padding: 0; list-style: none; max-height: 70vh; overflow-y: auto; position: relative; border-block: 1px solid var(--line); }
.order li {
  display: grid; grid-template-columns: 3.6em auto minmax(0, 1fr) auto auto; align-items: baseline; gap: 10px;
  padding: 10px 2px; border-top: 1px solid var(--line); font-size: 15px;
}
.order li:first-child { border-top: 0; }
.order .pl { font-weight: 700; }
.order .tk, .order .tm { color: var(--muted); }
.order .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.order .tg { color: var(--brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.order .tm { text-align: right; white-space: nowrap; }
.order .late { color: var(--faint); }
.order .late .nm { font-weight: 400; }
.order .hit { background: var(--pop-soft); }
.o-file a { color: var(--brand); font-weight: 600; }
.note-s a { color: var(--brand); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
