/* 모이핑 C안 '햇살 오렌지' — 흰 바탕, 오렌지·레몬, 2px 먹색 테두리, 큰 둥근 모서리 */
:root {
  --orange: #FF6A2B;
  --lemon: #FFE45C;
  --cheek: #FFB3A0;
  --ink: #111111;
  --ink-soft: #444444;
  --muted: #666666;
  --line: #EDEDED;
  --bg: #FFFFFF;
  --up: #D02F2F;
  --down: #1F5FD1;
  --f-display: 'Black Han Sans', 'Noto Sans KR', -apple-system, sans-serif;
  --f-body: 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--f-body); font-size: 15px; line-height: 1.6; word-break: keep-all; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--ink); }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 18px 6px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo b { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; }
.logo .tag { font-size: 12px; font-weight: 700; color: var(--ink-soft); align-self: flex-end; padding-bottom: 3px; white-space: nowrap; }
.iconbtn { width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; display: grid; place-items: center; cursor: pointer; }
.hello { font-size: 15px; font-weight: 700; padding-block: 4px 10px; }

main { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-block: 6px 24px; }
.card { border: 2px solid var(--ink); border-radius: 22px; padding: 16px; background: #fff; }
.card h2 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 400; font-size: 20px; line-height: 1.3; }
.pill { display: inline-block; font-size: 12px; font-weight: 900; border-radius: 999px; padding: 2px 10px; }
.pill.dark { background: var(--ink); color: var(--lemon); }
.pill.line { border: 2px solid var(--ink); padding: 0 8px; font-size: 11px; }

.oneliner { background: var(--lemon); }
.oneliner p { margin: 8px 0 0; font-size: 19px; line-height: 1.55; font-weight: 700; }

.weather { background: var(--orange); display: flex; gap: 16px; align-items: center; }
.weather .temp { font-family: var(--f-display); font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.weather .sub { font-size: 13px; font-weight: 700; }
.weather .city { align-self: flex-start; border: 2px solid var(--ink); border-radius: 999px; background: #fff; padding: 2px 12px; font-weight: 700; font-size: 13px; cursor: pointer; min-height: 36px; }
.weather .info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.issue { border: 2px solid var(--ink); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.issue .t { font-size: 16px; font-weight: 900; line-height: 1.45; }
.issue .t a { text-decoration: none; }
.issue .me { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
mark { background: var(--lemon); color: var(--ink); padding: 0 3px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.sec-title { margin: 4px 2px 0; font-family: var(--f-display); font-weight: 400; font-size: 22px; }

.market .row { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-variant-numeric: tabular-nums; padding: 4px 0; }
.up { color: var(--up); font-weight: 900; }
.down { color: var(--down); font-weight: 900; }
.note { font-size: 13px; color: var(--ink-soft); }

.ad { background: #F2F2F2; border-radius: 18px; padding: 14px 16px; }
.ad .lbl { font-size: 11px; font-weight: 700; color: #555; }

.sched { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.sched div { display: flex; gap: 10px; align-items: center; }
.when { flex: 0 0 auto; background: var(--lemon); border-radius: 8px; padding: 2px 8px; font-weight: 900; font-variant-numeric: tabular-nums; }
.when.now { background: var(--orange); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.duo .card { border-radius: 18px; padding: 14px; }
.duo h2 { font-family: var(--f-body); font-weight: 900; font-size: 14px; margin-bottom: 6px; }
.year { font-family: var(--f-display); font-size: 24px; line-height: 1; }

.quiz .q { font-weight: 900; font-size: 16px; margin-bottom: 10px; }
.quiz .opts { display: grid; gap: 8px; }
.quiz button.opt { text-align: left; min-height: 48px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; padding: 8px 14px; cursor: pointer; font-weight: 700; }
.quiz button.opt.right { background: var(--lemon); }
.quiz button.opt.wrong { background: #FFE1DA; }
.quiz .result { margin-top: 10px; display: flex; gap: 10px; align-items: center; font-size: 14px; }

.video { text-decoration: none; border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.video .thumb { height: 150px; background: var(--ink); display: grid; place-items: center; position: relative; }
.video .thumb .pill { position: absolute; left: 12px; top: 12px; background: var(--lemon); color: var(--ink); }
.video .ttl { padding: 12px 16px 14px; font-weight: 900; }

.foot { font-size: 12px; color: var(--muted); padding: 0 2px; }
.foot a { color: var(--muted); }

/* nav */
nav.tabs { position: sticky; bottom: 0; padding-block: 8px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0)); }
nav.tabs .bar { background: var(--ink); border-radius: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; }
nav.tabs button { min-height: 52px; border: 0; border-radius: 18px; background: none; color: #fff; font-size: 13px; cursor: pointer; }
nav.tabs button[aria-current="page"] { background: var(--orange); color: var(--ink); font-weight: 900; }

/* chips (onboarding/settings) */
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chip { min-height: 48px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--lemon); font-weight: 900; }
.cta { display: flex; align-items: center; justify-content: center; min-height: 58px; border: 2px solid var(--ink); border-radius: 20px; background: var(--orange); font-size: 17px; font-weight: 900; cursor: pointer; width: 100%; }
.hint { text-align: center; font-size: 13px; color: var(--muted); margin: 0; }
.hero { background: var(--lemon); border: 2px solid var(--ink); border-radius: 28px; padding: 20px; display: flex; gap: 12px; align-items: center; }
.hero b { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; display: block; margin-bottom: 6px; }
.onb { display: flex; flex-direction: column; gap: 24px; padding-block: 32px 28px; min-height: 100vh; }
.onb h2 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 400; font-size: 20px; }

/* settings */
.list .item { min-height: 52px; display: flex; align-items: center; justify-content: space-between; border-top: 2px solid #F0F0F0; gap: 10px; }
.list .item:first-of-type { border-top: 0; }
.switch { width: 56px; height: 34px; border: 2px solid var(--ink); border-radius: 17px; padding: 2px; display: flex; cursor: pointer; background: #EDEDED; flex: 0 0 auto; }
.switch span { width: 26px; height: 26px; border-radius: 13px; background: #fff; border: 2px solid var(--ink); }
.switch[aria-pressed="true"] { background: var(--orange); justify-content: flex-end; }
select.sel { min-height: 40px; border: 2px solid var(--ink); border-radius: 12px; padding: 0 10px; background: #fff; font-weight: 700; }
.guide ol { margin: 6px 0 0; padding-left: 1.2em; }
.archive a { display: flex; justify-content: space-between; text-decoration: none; padding: 12px 2px; border-top: 2px solid #F0F0F0; font-weight: 700; }
.archive a:first-child { border-top: 0; }
.install { background: #FFF6CC; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
