/* vanvan.kr 공통 스타일 */
:root, [data-theme="blue"] {
  --bg: #0E1630; --surface: #16213F; --line: #26345C; --chip: #1C2A52; --sub: #111B38;
  --text: #F2F4FA; --muted: #A7B0C8; --soft: #D5DAE8; --gold: #F2C14E; --gold-text: #F2C14E; --gold-bg: #241F10; --mine: #2A2A1A;
  --btn-line: #3A4A78; --danger: #FF9A9A;
}
[data-theme="black"] {
  --bg: #0B0B0D; --surface: #17171B; --line: #2A2A31; --chip: #202027; --sub: #111114;
  --text: #F4F4F5; --muted: #A1A1AA; --soft: #D4D4D8; --gold: #F2C14E; --gold-text: #F2C14E; --gold-bg: #221D0E; --mine: #262212;
  --btn-line: #3A3A44; --danger: #FF9A9A;
}
[data-theme="white"] {
  --bg: #F3F5FA; --surface: #FFFFFF; --line: #E1E5EE; --chip: #EEF1F7; --sub: #FFFFFF;
  --text: #151A2B; --muted: #5A6278; --soft: #2E3550; --gold: #F2C14E; --gold-text: #8A6100; --gold-bg: #FFF6DC; --mine: #FFF6DC;
  --btn-line: #C9D0DE; --danger: #C0392B;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; line-height: 1.5; }
a { color: var(--gold-text); }
button { font: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* 전광판 */
.board-wrap { padding: 14px 20px 0; }
.billboard { max-width: 1120px; margin: 0 auto; height: 76px; border-radius: 16px; border: 2px solid #F2C14E; background: #05070F; overflow: hidden; display: flex; align-items: center; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 6px 6px; }
.track { display: flex; align-items: center; width: max-content; animation: vvMarquee 32s linear infinite; }
.track span { padding: 0 34px; font-size: 26px; font-weight: 900; letter-spacing: 2px; white-space: nowrap; }
.track .y { color: #FFD34D; text-shadow: 0 0 8px rgba(255,196,0,.75); }
.track .c { color: #7FE3FF; text-shadow: 0 0 8px rgba(80,210,255,.7); }
.track .dot { padding: 0; font-size: 18px; }
@keyframes vvMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .track { animation: none; } }

/* 헤더 */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 12px; padding-bottom: 12px; }
.left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.logo i { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #0E1630; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 900; font-size: 17px; }
.logo b { font-weight: 900; font-size: 22px; letter-spacing: -.5px; }
.cats { display: flex; flex-wrap: wrap; gap: 4px; }
.cats a { padding: 10px 14px; border-radius: 10px; color: var(--soft); text-decoration: none; font-size: 15px; }
.cats a[aria-current] { background: var(--chip); color: var(--gold-text); font-weight: 700; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; position: relative; }
.btn-talk, .btn-line { min-height: 44px; padding: 0 13px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 14px; cursor: pointer; }
.btn-talk { border: 1px solid var(--gold); background: var(--gold-bg); color: var(--gold-text); font-weight: 700; }
.btn-talk[aria-current] { background: var(--gold); color: #0E1630; }
.btn-line { border: 1px solid var(--btn-line); background: transparent; color: var(--text); }
.btn-line:disabled { color: var(--muted); cursor: default; }
.theme-menu { position: absolute; right: 0; top: 50px; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: none; min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.theme-menu.open { display: block; }
.theme-menu button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.theme-menu button[aria-checked="true"] { background: var(--chip); color: var(--gold-text); font-weight: 700; }
.theme-menu i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--btn-line); }
.subnav { background: var(--sub); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 20px; }
.subnav .t { font-size: 13px; font-weight: 700; color: var(--muted); }
.subnav a { padding: 12px 4px; margin-bottom: -1px; text-decoration: none; font-size: 15px; color: var(--soft); border-bottom: 3px solid transparent; }
.subnav a[aria-current] { color: var(--gold-text); font-weight: 700; border-bottom-color: var(--gold); }

/* 본문 공통 */
main.wrap { padding-top: 24px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--surface); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.gold { border: 1px solid var(--gold); }
.card h1, .card h2, .card h3 { margin: 0; }
h1.big { font-size: 26px; font-weight: 900; line-height: 1.35; }
.card h2 { font-size: 19px; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.pill.gold { background: var(--gold); color: #0E1630; font-weight: 700; }
.btn { min-height: 46px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--gold); color: #0E1630; font-weight: 900; font-size: 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.ghost { background: transparent; border: 1px solid var(--gold); color: var(--gold-text); }
.btn.plain { background: var(--chip); border: 1px solid var(--btn-line); color: var(--text); font-weight: 500; font-size: 14px; }
.btn:disabled { background: var(--chip); color: var(--muted); border: 1px solid var(--btn-line); cursor: default; }
.ball { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; color: #141414; flex: none; }
.ball.s { width: 32px; height: 32px; font-size: 13px; font-weight: 700; }
.ball.ring { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--gold); }
.b1 { background: #FBC400; } .b2 { background: #69C8F2; } .b3 { background: #FF7272; } .b4 { background: #B9B9B9; } .b5 { background: #B0D840; }
.plus { color: var(--muted); font-size: 18px; padding: 0 2px; }
.stat { background: var(--chip); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 19px; }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--gold-bg); border: 1px solid var(--gold); border-radius: 14px; padding: 14px 16px; }
.notice p { margin: 0; flex: 1; font-size: 14px; line-height: 1.7; }
.x { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; border-radius: 8px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t tr.hl td { color: var(--gold-text); font-weight: 700; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--gold); color: #0E1630; font-weight: 700; padding: 12px 20px; border-radius: 12px; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; }
footer.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; }
footer.foot p { margin: 4px 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
footer.foot a { color: var(--muted); }

/* 번호 추천 */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: 'm c' 'p c'; gap: 18px 20px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.side-m { grid-area: m; } .side-p { grid-area: p; }
.mainc { grid-area: c; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: 'm' 'c' 'p'; }
  .side-m { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
}
.method { min-height: 54px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.method small { font-size: 12px; color: var(--muted); }
.method[aria-pressed="true"] { border-color: var(--gold); background: var(--chip); }
.method[aria-pressed="true"] strong { color: var(--gold-text); }
.game { border-top: 1px solid var(--line); padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.game .lab { width: 22px; font-weight: 900; color: var(--gold-text); }
.game details summary { cursor: pointer; font-size: 13px; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.game details ul { margin: 4px 0 0; padding: 12px 16px; list-style: none; background: var(--chip); border-radius: 10px; font-size: 13px; line-height: 1.9; }
.log { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; background: var(--chip); border: 1px solid var(--chip); }
.log.me { background: var(--mine); border-color: var(--gold); }
.pat { display: grid; grid-template-columns: 40px repeat(5, 1fr); gap: 4px; align-items: center; }
.pat span { text-align: center; }
.pat .c { height: 30px; border-radius: 8px; background: var(--chip); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.pat .c.z { opacity: .4; }
.pat.top .c { background: var(--gold-bg); color: var(--gold-text); }
.cfg { display: flex; align-items: center; gap: 8px; }
.cfg span { width: 52px; font-size: 13px; color: var(--soft); }
.cfg button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--chip); color: var(--text); font-size: 18px; cursor: pointer; }
.cfg b { width: 24px; text-align: center; font-size: 17px; color: var(--gold-text); }

/* 기록실 */
.numin { width: 52px; height: 48px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--bg); color: var(--text); font-size: 18px; font-weight: 700; text-align: center; }
select.sel { min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--bg); color: var(--text); font-size: 14px; }

/* 연금복권 */
.digit { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; background: #E9EDF7; color: #141414; flex: none; }
.digit.dim { background: var(--chip); color: var(--text); }
.digit.end { border: 2px solid var(--gold); }
.digit.s { width: 30px; height: 30px; font-size: 13px; }
.jo { min-width: 56px; height: 42px; padding: 0 10px; border-radius: 21px; background: var(--gold); color: #0E1630; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; flex: none; }
.jo.s { min-width: 42px; height: 30px; font-size: 13px; }
.jo.out { background: transparent; border: 1px dashed var(--gold); color: var(--gold-text); font-weight: 700; }

@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .board-wrap { padding: 10px 14px 0; }
  .billboard { height: 56px; border-radius: 12px; }
  .track span { font-size: 19px; padding: 0 22px; }
  .card { padding: 16px; border-radius: 16px; }
  h1.big { font-size: 22px; }
  .ball { width: 38px; height: 38px; font-size: 15px; }
  .digit, .jo { height: 38px; } .digit { width: 38px; font-size: 15px; }
  .btn-talk span.l, .btn-line span.l { display: none; }
}
@media (max-width: 380px) {
  .ball { width: 34px; height: 34px; font-size: 14px; }
  .digit { width: 34px; height: 34px; } .jo { min-width: 46px; height: 34px; font-size: 14px; }
}
@media (max-width: 420px) {
  .row { gap: 5px; }
  .digit { width: 30px; height: 30px; font-size: 14px; }
  .jo { min-width: 42px; height: 30px; font-size: 14px; padding: 0 8px; }
  .digit.s { width: 26px; height: 26px; font-size: 12px; }
  .jo.s { min-width: 38px; height: 26px; font-size: 12px; }
  .ball { width: 34px; height: 34px; font-size: 14px; }
  .ball.s { width: 30px; height: 30px; font-size: 12px; }
  .log strong.small { min-width: 0 !important; width: auto !important; }
}
