/* ============ 공통 바탕 — 세 화면(공지 · 지난 공지 · 뽑기)이 함께 씁니다 ============
   색은 파랑 계열 + 황금빛 한 가지. 황금은 '표시'에만 씁니다 — 오늘, 게임 폭 점선, 이 날만 바꾼 것, 복사 완료.
   기본은 라이트, html[data-theme="dark"] 로 전환합니다(머리의 작은 스크립트가 저장된 선택이나 기기 설정을 입힘). */
:root{
  color-scheme:light;
  --bg:#EAF0F8; --panel:#FFFFFF; --panel2:#EEF3FB; --line:#DCE5F2; --line2:#BFCDE3;
  --text:#1C2B45; --muted:#5F6F8C;
  --blue:#4677D3; --blue-ink:#3866BD; --sky:#9BBDF2; --pale:#E6EEFB; --on-blue:#FFFFFF;
  --gold:#E2B23C; --on-gold:#1C2B45;
  --danger:#C9474D; --danger-line:#F0C9CB;
  --shadow:rgba(28,43,69,.07); --shadow-lg:rgba(28,43,69,.14); --scrim:rgba(28,43,69,.32);
  --radius:16px;
  --font:"Pretendard","Apple SD Gothic Neo","Malgun Gothic","맑은 고딕",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --mono:"SF Mono","Fira Code","Consolas","D2Coding",monospace;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0E1626; --panel:#152036; --panel2:#1B2842; --line:#26365A; --line2:#3A4D78;
  --text:#E6EDF9; --muted:#97A6C2;
  --blue:#6A95E6; --blue-ink:#9DBBF2; --sky:#4E6FA8; --pale:#1E3156; --on-blue:#0E1626;
  --gold:#E2B23C; --on-gold:#0E1626;
  --danger:#E57379; --danger-line:#4E2A33;
  --shadow:rgba(0,0,0,.35); --shadow-lg:rgba(0,0,0,.5); --scrim:rgba(0,0,0,.55);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--text); font-family:var(--font);
  font-size:15px; line-height:1.5;
  padding-bottom:calc(96px + env(safe-area-inset-bottom));
}
button,input,select,textarea{font-family:inherit}
.wrap{max-width:600px;margin:0 auto;padding:0 16px}
.sr-only{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;
}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

/* ---------- 머리 — 작은 머리말 + 큰 제목 + 테마 ---------- */
.top{display:flex;align-items:flex-start;gap:12px;padding:22px 4px 8px}
.top-main{flex:1;min-width:0}
.eyebrow{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--blue-ink);letter-spacing:.3px}
.eyebrow .dot{width:8px;height:8px;border-radius:50%;background:var(--gold);flex:none}
.top h1{margin:4px 0 0;font-size:27px;font-weight:900;letter-spacing:-.8px;line-height:1.2}

/* 테마 — 체크박스는 눈에서만 감추고, 동그란 버튼에 해/달을 겹쳐 둡니다 */
.mode-toggle{position:relative;flex:none;display:flex}
.mode-toggle input{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;
}
.mode-toggle label{
  position:relative;width:44px;height:44px;border-radius:50%;cursor:pointer;
  background:var(--panel);border:1px solid var(--line);color:var(--text);
  display:flex;align-items:center;justify-content:center;transition:border-color .2s;
}
.mode-toggle label:hover{border-color:var(--line2)}
.mode-toggle input:focus-visible + label{outline:2px solid var(--blue);outline-offset:2px}
.mode-toggle svg{
  position:absolute;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;
  transition:opacity .22s,transform .3s cubic-bezier(.3,.85,.4,1);
}
/* 라이트일 땐 '다크로' 달을, 다크일 땐 '라이트로' 해를 보여 줍니다 */
.mode-toggle .i-sun{opacity:0;transform:rotate(-70deg) scale(.6)}
:root[data-theme="dark"] .mode-toggle .i-moon{opacity:0;transform:rotate(70deg) scale(.6)}
:root[data-theme="dark"] .mode-toggle .i-sun{opacity:1;transform:none}

/* ---------- 아래 탭 바 ---------- */
.bottom{
  position:fixed;left:0;right:0;bottom:0;z-index:30;
  background:var(--panel);border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);
}
.tabbar{max-width:600px;margin:0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:4px 8px 8px}
.tabbar a{
  height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  font-size:11px;color:var(--muted);text-decoration:none;border-radius:12px;
}
.tabbar a:hover{color:var(--text)}
.tabbar a.on{color:var(--blue-ink);font-weight:700}
.tabbar svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- 알림 ---------- */
.toast{
  position:fixed;left:50%;transform:translateX(-50%);z-index:60;
  bottom:calc(var(--bottom-h,80px) + 14px);
  max-width:calc(100% - 32px);
  background:var(--text);color:var(--bg);padding:10px 18px;border-radius:999px;
  font-size:13px;font-weight:700;box-shadow:0 8px 22px var(--shadow-lg);
  opacity:0;pointer-events:none;transition:opacity .2s;
}
.toast.show{opacity:1}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
