/* ============================================================
   행운로또 — 공통 스타일 (목업 C: 캐주얼 행운형)
   파스텔 라벤더/민트 · 둥근 친근 · 모바일 우선
   ============================================================ */
:root{
  --bg1:#fef6ff; --bg2:#eef4ff; --bg3:#f3fbf6;
  --ink:#3b3550; --ink2:#4a3f6b; --muted:#8579a8; --muted2:#a99fce;
  --primary:#7c6bd6; --primary-soft:#a78bfa; --pink:#f472b6;
  --card:#ffffff; --line:#efe9ff;
  --y:#fbc400; --b:#69c8f2; --r:#ff7272; --g:#aaaaaa; --grn:#b0d840;
  --shadow:0 8px 24px rgba(124,107,214,.14);
  --shadow-sm:0 3px 10px rgba(124,107,214,.08);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:'Noto Sans KR',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--ink); background:linear-gradient(180deg,var(--bg1),var(--bg2) 40%,var(--bg3));
  background-attachment:fixed; line-height:1.5; -webkit-font-smoothing:antialiased;
}
.wrap{max-width:480px; margin:0 auto; padding:0 0 40px; min-height:100vh; position:relative;}
a{color:inherit; text-decoration:none}
button{font-family:inherit; cursor:pointer}

/* 헤더/네비 */
.nav{display:flex; align-items:center; justify-content:space-between; padding:14px 18px;}
.nav-logo{font-size:19px; font-weight:800; letter-spacing:-.5px; color:var(--primary)}
.nav-logo small{color:var(--muted2); font-weight:400; font-size:10.5px}
.nav-menu{display:flex; gap:14px; font-size:13px; font-weight:600; color:var(--muted)}
.nav-menu a.on{color:var(--primary)}
.trust-strip{font-size:11.5px; text-align:center; padding:5px; color:var(--primary)}

/* 히어로 */
.hero{padding:8px 18px 4px; text-align:center}
.luck-emoji{font-size:34px}
.round-pill{display:inline-block; background:#fff; color:var(--primary); border:1.5px solid var(--line);
  border-radius:20px; padding:5px 14px; font-size:12.5px; font-weight:700; margin:8px 0; box-shadow:var(--shadow-sm)}
h1{font-size:24px; font-weight:800; letter-spacing:-1px; margin:4px 0; color:var(--ink2)}
.hero-desc{font-size:13px; color:var(--muted); margin-top:6px; line-height:1.55}

/* 생성 카드 */
.gen-card{background:var(--card); margin:14px 16px; border-radius:24px; padding:24px 16px; box-shadow:var(--shadow); text-align:center}
.gen-label{font-size:12px; color:var(--muted2); margin-bottom:16px}
.balls{display:flex; justify-content:center; gap:7px; flex-wrap:wrap}
.ball{width:44px; height:44px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:17px; color:#fff; box-shadow:0 5px 12px rgba(0,0,0,.13); animation:pop .35s ease}
.ball.sm{width:28px; height:28px; font-size:12px; box-shadow:0 2px 5px rgba(0,0,0,.1)}
@keyframes pop{0%{transform:scale(.3);opacity:0}70%{transform:scale(1.12)}100%{transform:scale(1);opacity:1}}
.luck-msg{font-size:12.5px; color:var(--primary-soft); margin-top:16px; font-weight:600; min-height:18px}

/* 버튼 */
.btn-main{display:block; width:100%; background:linear-gradient(135deg,var(--primary-soft),#f0abfc); color:#fff;
  border:none; border-radius:18px; padding:16px; font-size:16px; font-weight:800; margin-top:18px;
  box-shadow:0 6px 16px rgba(167,139,250,.35); transition:transform .1s}
.btn-main:active{transform:scale(.97)}
.btn-row{display:flex; gap:8px; margin-top:10px}
.btn-ghost{flex:1; background:#f4f0ff; color:var(--primary); border:none; border-radius:14px; padding:12px; font-size:13px; font-weight:700}
.btn-ghost:active{background:#ebe3ff}

/* 5게임 한번에 (A~E 줄별 표시) */
.balls.multi{flex-direction:column; gap:11px; align-items:stretch}
.game-line{display:flex; align-items:center; justify-content:center; gap:9px}
.game-line .gtag{font-size:12px; font-weight:800; color:var(--primary-soft); width:16px; text-align:right}
.game-line .balls-row{display:flex; gap:6px}
.game-line .ball{width:36px; height:36px; font-size:14px}

/* 모드 전환 */
.mode-switch{display:flex; gap:10px; margin:2px 16px}
.mode-card{flex:1; background:#fff; border:2px solid var(--line); border-radius:18px; padding:13px; text-align:center; display:block}
.mode-card.on{border-color:var(--primary-soft); background:#f7f2ff}
.mode-card .mi{font-size:22px}
.mode-card .mt{font-size:13px; font-weight:800; margin-top:3px; color:var(--ink2)}
.mode-card .md{font-size:10.5px; color:var(--muted2); margin-top:2px}

/* 섹션 */
.sec-title{font-size:15px; font-weight:800; margin:22px 18px 10px; color:var(--ink2); display:flex; justify-content:space-between; align-items:center}
.sec-title .act{font-size:11.5px; font-weight:600; color:var(--pink)}

/* 최근 기록 */
.recent{margin:0 16px}
.rec-item{background:#fff; border-radius:16px; padding:11px 13px; margin-bottom:9px; box-shadow:var(--shadow-sm)}
.rec-top{display:flex; justify-content:space-between; font-size:11px; color:var(--muted2); margin-bottom:7px}
.rec-mode{color:var(--primary); font-weight:700}
.rec-balls{display:flex; gap:5px; flex-wrap:wrap}
.empty{text-align:center; color:var(--muted2); font-size:12.5px; padding:24px 0}

/* 번호판 (반자동) */
.pad-wrap{background:#fff; margin:12px 16px; border-radius:20px; padding:16px; box-shadow:var(--shadow)}
.pad-help{font-size:11.5px; color:var(--muted2); margin-bottom:12px; line-height:1.5}
.num-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:6px}
.num{aspect-ratio:1; border-radius:50%; border:1.5px solid var(--line); background:#faf8ff;
  font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; color:var(--muted); transition:.12s}
.num.fix{background:linear-gradient(145deg,var(--primary-soft),#8b5cf6); color:#fff; border-color:transparent}
.num.exc{background:#ffe4ef; color:#e84393; border-color:#ffc9de; text-decoration:line-through}
.legend{display:flex; gap:14px; justify-content:center; font-size:11px; margin:13px 0 2px; color:var(--muted)}
.legend i{display:inline-block; width:12px; height:12px; border-radius:50%; margin-right:4px; vertical-align:-1px}
.pick-summary{background:#f7f2ff; border-radius:16px; padding:11px 14px; font-size:12.5px; margin:0 16px; color:var(--primary); font-weight:600; text-align:center}

/* 당첨 확인 */
.check-input{display:grid; grid-template-columns:repeat(6,1fr); gap:7px; margin:6px 0 4px}
.check-input input{width:100%; aspect-ratio:1; border:1.5px solid var(--line); border-radius:12px; text-align:center;
  font-size:16px; font-weight:700; color:var(--ink2); background:#faf8ff}
.check-input input:focus{outline:none; border-color:var(--primary-soft)}
.check-result{margin:14px 16px; background:#fff; border-radius:18px; padding:18px; text-align:center; box-shadow:var(--shadow); display:none}
.check-result.show{display:block}
.rank-big{font-size:28px; font-weight:800; color:var(--primary)}
.rank-big.miss{color:var(--muted2)}

/* 광고 슬롯(목업용 placeholder) */
.ad-slot{margin:18px 16px; min-height:90px; border:1.5px dashed #ddd3f7; border-radius:16px;
  display:flex; align-items:center; justify-content:center; color:#bcb0e0; font-size:11px; background:#fbf9ff}

/* AdSense 실광고 블록 (비어있을 땐 여백 0 → 개발/미승인 시 빈 박스 안 보임) */
.ad-block{text-align:center; margin:0 auto}
.ad-block:not(:empty){margin:24px 16px}
@media (max-width:600px){ .ad-block:not(:empty){margin:18px 16px} }

/* SEO 콘텐츠 */
.seo{background:#fff; margin:14px 0 0; padding:24px 18px; border-radius:24px 24px 0 0}
.seo h2{font-size:17px; font-weight:800; margin:16px 0 8px; color:var(--ink2)}
.seo h3{font-size:13.5px; font-weight:700; margin:14px 0 5px; color:var(--primary)}
.seo p{font-size:13px; color:#6b6188; line-height:1.7; margin:0 0 6px}
.txt-b{font-weight:700; color:var(--ink2)}
.txt-hl{background:#fdeaff; padding:1px 5px; border-radius:6px; color:#a855a8}
.txt-ul{text-decoration:underline; text-underline-offset:3px; text-decoration-color:#c4b5fd}
.faq-item{border-bottom:1px solid var(--line)}
.faq-q{width:100%; text-align:left; background:none; border:none; padding:13px 0; font-size:13px; font-weight:700;
  display:flex; justify-content:space-between; color:var(--ink2)}
.faq-q .arw{transition:transform .2s}
.faq-item.open .faq-q .arw{transform:rotate(180deg)}
.faq-a{font-size:12.5px; color:var(--muted); line-height:1.65; max-height:0; overflow:hidden; transition:max-height .25s, padding .25s}
.faq-item.open .faq-a{max-height:300px; padding:0 0 13px}

/* 교차추천 */
.xlink{margin:14px 16px; background:linear-gradient(135deg,#fff0f9,#f0f4ff); border-radius:20px; padding:16px; text-align:center}
.xlink-t{font-size:14px; font-weight:800; color:#b1559e}
.xlink-d{font-size:11.5px; color:var(--muted); margin:4px 0 10px}
.xlink-btn{display:inline-block; background:linear-gradient(135deg,var(--pink),var(--primary-soft)); color:#fff;
  font-size:12.5px; font-weight:700; padding:10px 18px; border-radius:14px}

/* 푸터 */
.foot{padding:22px 18px; font-size:11.5px; line-height:1.75; color:var(--muted2); text-align:center}
.foot a{color:var(--muted)}
.foot-nav{display:flex; gap:14px; justify-content:center; margin-bottom:10px; font-weight:600; flex-wrap:wrap}

.toast{position:fixed; left:50%; bottom:28px; transform:translateX(-50%) translateY(20px); background:var(--ink2); color:#fff;
  padding:11px 20px; border-radius:24px; font-size:13px; font-weight:600; opacity:0; pointer-events:none; transition:.25s; z-index:99}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
