/* 기사클럽 웹 — 디자인 시스템
   법적 고지 페이지(legal-site)는 /assets/style.css 를 그대로 사용하므로
   이 파일은 앱 화면 전용이다. */

:root {
  --brand: #4F46E5;
  --brand-2: #7C3AED;
  --brand-soft: #EEF0FF;
  --ink: #14162B;
  --ink-2: #3B3F58;
  --muted: #737893;
  --line: #E6E8F2;
  --bg: #F6F7FB;
  --card: #FFFFFF;
  --ok: #12805C;
  --ok-soft: #E7F7F0;
  --warn: #B45309;
  --warn-soft: #FFF4E5;
  --danger: #D92D20;
  --danger-soft: #FEECEB;
  --gold: #F59E0B;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 22, 43, .04), 0 8px 24px rgba(20, 22, 43, .06);
  --shadow-lg: 0 12px 40px rgba(20, 22, 43, .14);
  --header-h: 60px;
  --tab-h: 62px;
  --max: 1080px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.55; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* ── 헤더 ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; gap: 18px; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-2)); color: #fff;
  font-size: 16px; font-weight: 900; letter-spacing: -.03em;
  box-shadow: 0 4px 10px rgba(79, 70, 229, .28);
}
.brand-mark.small { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; }
.brand-text small { font-size: 10px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 5px; border-radius: 5px; margin-left: 4px; vertical-align: 2px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.main-nav a:hover { background: #F1F2F9; }
.main-nav a.active { color: var(--brand); background: var(--brand-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
  background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; font-weight: 700;
  color: var(--ink-2); white-space: nowrap;
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.chip-quota.low .chip-dot { background: var(--danger); }
.chip-quota.mid .chip-dot { background: var(--gold); }
.chip-points { color: #8A5B00; background: #FFF8E6; border-color: #F6E3B4; }
.btn {
  border: 0; border-radius: 11px; padding: 8px 14px; font-weight: 700; font-size: 13.5px;
  background: #F1F2F9; color: var(--ink); transition: transform .06s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(.97); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .28); }
.btn-kakao { background: #FEE500; color: #191600; font-weight: 800; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { padding: 13px 20px; font-size: 15.5px; border-radius: 13px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; padding: 0;
  background: var(--brand-soft) center/cover no-repeat; box-shadow: 0 0 0 1px var(--line);
  font-size: 15px; font-weight: 800; color: var(--brand); display: grid; place-items: center;
}

/* ── 레이아웃 ───────────────────────────────────────── */
.app-main { max-width: var(--max); margin: 0 auto; padding: 18px 16px 40px; }
.view { min-height: 60vh; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid rgba(230, 232, 242, .7);
}
.card-tight { padding: 14px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 0; }
.section-title h2 { font-size: 17px; font-weight: 800; }
.section-title .more { font-size: 12.5px; color: var(--brand); font-weight: 700; }

/* ── 히어로 ─────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 22px;
  background: linear-gradient(135deg, #4F46E5 0%, #6D28D9 55%, #9333EA 100%);
  box-shadow: 0 14px 34px rgba(79, 70, 229, .3);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.hero::before {
  content: ""; position: absolute; right: 30px; bottom: -90px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 22px; font-weight: 900; }
.hero p.sub { margin-top: 6px; font-size: 13.5px; color: rgba(255, 255, 255, .82); }
.hero-cta { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-cta .btn { background: #fff; color: var(--brand); box-shadow: none; }
.hero-cta .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.streak-badge {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 800;
}
.hero-bar { margin-top: 16px; }
.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: #fff; transition: width .35s ease; }
.bar.gray { background: #EDEFF7; }
.bar.gray > i { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.hero-bar .labels { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; color: rgba(255, 255, 255, .85); }

/* ── 퀵 타일 ─────────────────────────────────────────── */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 12px;
  text-align: left; display: flex; flex-direction: column; gap: 4px; transition: box-shadow .15s ease, transform .06s ease;
}
.quick-tile:hover { box-shadow: var(--shadow); }
.quick-tile:active { transform: translateY(1px); }
.quick-tile .ico { font-size: 20px; }
.quick-tile b { font-size: 13.5px; }
.quick-tile span.cap { font-size: 11.5px; color: var(--muted); }

/* ── 과목 그리드 ─────────────────────────────────────── */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.subject-card {
  position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px;
  transition: box-shadow .15s ease, transform .06s ease; overflow: hidden;
}
.subject-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.subject-card .emoji {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; display: grid; place-items: center;
  font-size: 22px; background: var(--brand-soft);
}
.subject-card h3 { font-size: 15px; font-weight: 800; }
.subject-card .desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.subject-card .meta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700;
  background: #F3F4FA; color: var(--ink-2); border-radius: 6px; padding: 3px 6px;
}
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.gold { background: #FFF6E0; color: #8A5B00; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.lock { background: #F2F3F7; color: var(--muted); }
.tag.live { background: var(--danger-soft); color: var(--danger); }

/* ── 회차 목록 ───────────────────────────────────────── */
.set-list { display: flex; flex-direction: column; gap: 8px; }
.set-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: left; width: 100%;
}
.set-row:hover { border-color: #D6D9EA; background: #FCFCFF; }
.set-row .idx {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; display: grid; place-items: center;
  background: #F3F4FA; font-size: 12px; font-weight: 800; color: var(--ink-2);
}
.set-row .body { flex: 1; min-width: 0; }
.set-row .body b { display: block; font-size: 14px; }
.set-row .body span { font-size: 11.5px; color: var(--muted); }
.set-row .chev { color: #B9BDD0; font-size: 18px; }

/* ── 퀴즈 ───────────────────────────────────────────── */
.quiz-top {
  position: sticky; top: var(--header-h); z-index: 20; background: rgba(246, 247, 251, .94);
  backdrop-filter: blur(10px); padding: 10px 0 8px; margin: -4px 0 12px;
}
.quiz-top .row-between { margin-bottom: 8px; }
.quiz-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.quiz-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.quiz-timer.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.q-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid rgba(230, 232, 242, .7); }
.q-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.q-no { font-size: 13px; font-weight: 900; color: var(--brand); }
.q-no b { font-size: 17px; }
.q-stem { font-size: 16.5px; font-weight: 650; line-height: 1.55; white-space: pre-wrap; word-break: keep-all; }
.q-image { margin: 14px 0 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.q-image img { display: block; width: 100%; height: auto; }
.options { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; text-align: left; width: 100%; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: #C9CCE3; }
.opt .num {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid #D5D8E8; font-size: 11.5px; font-weight: 800; color: var(--ink-2); margin-top: 1px;
}
.opt .txt { flex: 1; font-size: 14.5px; line-height: 1.5; word-break: keep-all; }
.opt.sel { border-color: var(--brand); background: #F7F6FF; }
.opt.sel .num { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.correct .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.opt.wrong .num { background: var(--danger); border-color: var(--danger); color: #fff; }
.opt.locked { opacity: .55; pointer-events: none; filter: blur(2.5px); }

.explain { margin-top: 14px; border-radius: 12px; background: #F8F9FE; border: 1px solid #E7E9F6; padding: 14px; }
.explain h4 { font-size: 12.5px; color: var(--brand); margin-bottom: 6px; }
.explain .body { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: keep-all; color: var(--ink-2); }
.explain .body strong { color: var(--ink); }

.q-actions { position: sticky; bottom: calc(var(--tab-h) + 8px); z-index: 15; margin-top: 16px; }
.q-actions-inner { display: flex; gap: 8px; background: rgba(255,255,255,.95); border: 1px solid var(--line); padding: 8px; border-radius: 14px; box-shadow: var(--shadow); }
.q-actions-inner .btn { flex: 1; }

.palette { display: flex; flex-wrap: wrap; gap: 5px; }
.palette button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: 11px; font-weight: 700; color: var(--ink-2); padding: 0;
}
.palette button.done { background: var(--brand-soft); border-color: #D7D9FF; color: var(--brand); }
.palette button.cur { outline: 2px solid var(--brand); outline-offset: 1px; }
.palette button.flagged { background: #FFF6E0; border-color: #F2D58B; color: #8A5B00; }

/* ── 잠금 ───────────────────────────────────────────── */
.locked-box {
  margin-top: 14px; border: 1.5px dashed #D8DBEC; border-radius: 14px; padding: 20px;
  text-align: center; background: linear-gradient(180deg, #FCFCFF, #F7F8FE);
}
.locked-box .ico { font-size: 28px; }
.locked-box h3 { font-size: 16px; margin-top: 6px; }
.locked-box p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.locked-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; text-align: left; }

/* ── 배너/알림 ──────────────────────────────────────── */
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  border: 1px solid #DDE0F5; background: linear-gradient(135deg, #F3F2FF, #FBFAFF);
}
.banner.welcome { border-color: #CDEBDD; background: linear-gradient(135deg, #ECFBF3, #F7FEFB); }
.banner.warn { border-color: #F6E3B4; background: linear-gradient(135deg, #FFF9EC, #FFFDF7); }
.banner .ico { font-size: 22px; line-height: 1; }
.banner h3 { font-size: 14.5px; font-weight: 800; }
.banner p { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.banner .act { margin-top: 8px; }

/* ── 광고 ───────────────────────────────────────────── */
.ad-slot { margin: 4px 0; min-height: 90px; display: flex; align-items: center; justify-content: center; }
.ad-slot ins { display: block; width: 100%; }
.ad-fallback {
  width: 100%; min-height: 90px; border: 1px dashed #D8DBEC; border-radius: 12px; display: grid; place-items: center;
  color: #9AA0B8; font-size: 11.5px; background: #FBFBFE;
}

/* ── 통계 ───────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
}
.stat b { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); }
.acc-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.acc-row .name { width: 120px; font-size: 12.5px; font-weight: 700; flex: 0 0 auto; }
.acc-row .bar { flex: 1; background: #EDEFF7; height: 9px; }
.acc-row .bar > i { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.acc-row .pct { width: 42px; text-align: right; font-size: 12px; font-weight: 800; }

/* ── 오답노트 ───────────────────────────────────────── */
.wrong-item { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.wrong-item summary { list-style: none; cursor: pointer; padding: 14px; display: flex; gap: 10px; align-items: flex-start; }
.wrong-item summary::-webkit-details-marker { display: none; }
.wrong-item .q { font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wrong-item .detail { padding: 0 14px 14px; }
.wrong-item .chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* ── 요금제 ─────────────────────────────────────────── */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.plan {
  position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.plan.featured { border-color: var(--brand); box-shadow: 0 12px 30px rgba(79, 70, 229, .16); }
.plan .ribbon { position: absolute; top: -10px; left: 16px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.plan h3 { font-size: 15px; }
.plan .price { font-size: 24px; font-weight: 900; letter-spacing: -.03em; }
.plan .price small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan ul { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.plan li { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 900; }

/* ── 모달 ───────────────────────────────────────────── */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-root[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 17, 34, .5); backdrop-filter: blur(3px); }
.modal {
  position: relative; z-index: 1; width: min(440px, 100%); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal h2 { font-size: 18px; }
.modal .modal-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.modal .modal-body { margin-top: 16px; }
.modal .modal-actions { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.modal-close { position: absolute; right: 12px; top: 10px; background: none; border: 0; font-size: 20px; color: var(--muted); }

/* ── 소셜 로그인 ─────────────────────────────────────── */
.social-list { display: flex; flex-direction: column; gap: 8px; }
.social-btn {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; font-weight: 800; font-size: 14px; width: 100%; text-align: left;
}
.social-btn .ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; }
.social-btn.kakao { background: #FEE500; border-color: #FEE500; color: #191600; }
.social-btn.kakao .ico { background: #191600; color: #FEE500; }
.social-btn.google .ico { background: #fff; color: #4285F4; border: 1px solid #E3E5EC; font-weight: 900; }
.social-btn.naver { background: #03C75A; border-color: #03C75A; color: #fff; }
.social-btn.naver .ico { background: #fff; color: #03C75A; }
.social-btn[disabled] { opacity: .55; }

/* ── 토스트 ─────────────────────────────────────────── */
.toast-root { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 18px); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #14162B; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-lg); animation: toastIn .2s ease-out; max-width: 90vw;
}
.toast.ok { background: #12805C; }
.toast.warn { background: #B45309; }
@keyframes toastIn { from { transform: translateY(6px); opacity: 0; } }

/* ── 하단 탭 ───────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: none; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); }
.tabbar a.active { color: var(--brand); }
.tab-ico { font-size: 18px; line-height: 1; }

/* ── 푸터 ───────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 20px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 22px 16px 26px; display: flex; flex-direction: column; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.footer-links a:hover { color: var(--brand); }
.footer-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.footer-note a { text-decoration: underline; }

/* ── 반응형 ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .tabbar { display: flex; }
  .brand-text small { display: none; }
  .header-actions .btn-login { padding: 7px 10px; font-size: 12px; }
  .chip { padding: 4px 8px; font-size: 11.5px; }
  .q-actions { bottom: calc(var(--tab-h) + 6px); }
  .hero { padding: 18px; border-radius: 18px; }
  .hero h1 { font-size: 19px; }
  .q-card { padding: 16px; border-radius: 14px; }
  .q-stem { font-size: 15.5px; }
  .opt .txt { font-size: 14px; }
}
@media (max-width: 420px) {
  .chip-quota { display: none; }
  .quick-grid { gap: 8px; }
  .quick-tile { padding: 11px 9px; }
  .quick-tile b { font-size: 12.5px; }
}
@media print { .site-header, .tabbar, .site-footer, .q-actions { display: none; } }
