/* ========== 색상 ========== */
:root {
  --bg: #f1f6f1;
  --surface: #ffffff;
  --surface-2: #ebf2ea;
  --text: #14201a;
  --muted: #5f6e65;
  --border: #dbe5d9;
  --primary: #1f9d55;
  --primary-text: #ffffff;
  --ok: #1a8f4c;
  --ok-bg: #e2f5e9;
  --ng: #e5484d;
  --ng-bg: #fdecec;
  --danger: #d93f45;
  --shadow: 0 1px 2px rgba(20, 50, 30, 0.05), 0 8px 24px rgba(20, 50, 30, 0.07);

  /* 형태적 분류 */
  --grass: #2e7d32;
  --grass-bg: #e3f2e4;
  --sedge: #7b1fa2;
  --sedge-bg: #f3e5f7;
  --broad: #1565c0;
  --broad-bg: #e3eefb;
  /* 생활형 */
  --summer: #c62828;
  --summer-bg: #fde8e8;
  --winter: #00897b;
  --winter-bg: #e0f4f1;
  --perennial: #e65100;
  --perennial-bg: #fff0e0;
  --food: #a15c00;
  --food-bg: #fbefd9;
  --fruit: #c2185b;
  --fruit-bg: #fce4ec;

  --radius: 18px;
  --tabbar-h: 60px;
  --actionbar-h: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px);
    --primary-strong: #157a40;
  --primary-soft: #e2f5e9;
  --hero: linear-gradient(135deg, #1f9d55 0%, #12804a 55%, #0f6b3f 100%);
  --font: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c130f;
    --surface: #152019;
    --surface-2: #1d2b23;
    --text: #e6efe8;
    --muted: #93a59a;
    --border: #28392f;
    --primary: #3ccb7f;
    --primary-text: #04170c;
    --ok: #4fd48c;
    --ok-bg: #14321f;
    --ng: #ff6b6b;
    --ng-bg: #3b1d20;
    --danger: #ff6b6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    --grass: #66bb6a;
    --grass-bg: #1d331f;
    --sedge: #ce93d8;
    --sedge-bg: #33213a;
    --broad: #64b5f6;
    --broad-bg: #1a2b3d;
    --summer: #ef7070;
    --summer-bg: #3a1e1e;
    --winter: #4dd0c0;
    --winter-bg: #163330;
    --perennial: #ffa552;
    --perennial-bg: #3a2914;
    --food: #e0b060;
    --food-bg: #3a2e18;
    --fruit: #f48fb1;
    --fruit-bg: #3a1f2a;
    --primary-strong: #229a5c;
    --primary-soft: #173826;
    --hero: linear-gradient(135deg, #1c7a48 0%, #145c37 60%, #0f4a2c 100%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c130f;
  --surface: #152019;
  --surface-2: #1d2b23;
  --text: #e6efe8;
  --muted: #93a59a;
  --border: #28392f;
  --primary: #3ccb7f;
  --primary-text: #04170c;
  --ok: #4fd48c;
  --ok-bg: #14321f;
  --ng: #ff6b6b;
  --ng-bg: #3b1d20;
  --danger: #ff6b6b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  --grass: #66bb6a;
  --grass-bg: #1d331f;
  --sedge: #ce93d8;
  --sedge-bg: #33213a;
  --broad: #64b5f6;
  --broad-bg: #1a2b3d;
  --summer: #ef7070;
  --summer-bg: #3a1e1e;
  --winter: #4dd0c0;
  --winter-bg: #163330;
  --perennial: #ffa552;
  --perennial-bg: #3a2914;
  --food: #e0b060;
  --food-bg: #3a2e18;
  --fruit: #f48fb1;
  --fruit-bg: #3a1f2a;
  --primary-strong: #229a5c;
  --primary-soft: #173826;
  --hero: linear-gradient(135deg, #1c7a48 0%, #145c37 60%, #0f4a2c 100%);
  color-scheme: dark;
}

.m-grass { --c: var(--grass); --c-bg: var(--grass-bg); }
.m-sedge { --c: var(--sedge); --c-bg: var(--sedge-bg); }
.m-broad { --c: var(--broad); --c-bg: var(--broad-bg); }
.l-summer { --c: var(--summer); --c-bg: var(--summer-bg); }
.l-winter { --c: var(--winter); --c-bg: var(--winter-bg); }
.l-perennial { --c: var(--perennial); --c-bg: var(--perennial-bg); }
/* 병해: 작물 구분 */
.c-food { --c: var(--food); --c-bg: var(--food-bg); }
.c-veg { --c: var(--grass); --c-bg: var(--grass-bg); }
.c-fruit { --c: var(--fruit); --c-bg: var(--fruit-bg); }
.c-tree { --c: var(--winter); --c-bg: var(--winter-bg); }
.t-host { --c: var(--text); --c-bg: var(--surface-2); }
/* 병해: 병원 종류 */
.p-fungus { --c: var(--broad); --c-bg: var(--broad-bg); }
.p-bacteria { --c: var(--sedge); --c-bg: var(--sedge-bg); }
.p-virus { --c: var(--summer); --c-bg: var(--summer-bg); }
.p-other { --c: var(--winter); --c-bg: var(--winter-bg); }
.p-oomycete { --c: var(--perennial); --c-bg: var(--perennial-bg); }
.p-slime { --c: var(--fruit); --c-bg: var(--fruit-bg); }

/* ========== 기본 ========== */
*, *::before, *::after { 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: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR",
    "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }

h1 { font-size: 1.5rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.6rem; }
h3 { font-size: 0.95rem; margin: 0.9rem 0 0.5rem; color: var(--muted); font-weight: 600; }
small { font-size: 0.82em; }
a { color: var(--primary); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.warn-text { color: var(--danger); font-weight: 600; }

/* ========== 상단·하단 바 ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 12px;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; }

.icon-btn {
  min-width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 1.25rem;
}
.icon-btn:active { background: var(--surface-2); }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.tabbar a span { font-size: 1.3rem; line-height: 1; }
.tabbar a.active { color: var(--primary); }

/* ========== 화면 ========== */
main { max-width: 640px; margin: 0 auto; }
.screen { display: none; padding: 12px 16px calc(var(--tabbar-h) + var(--safe-b) + 24px); }
.screen.active { display: block; }
#screen-home { padding-bottom: calc(var(--tabbar-h) + var(--actionbar-h) + var(--safe-b) + 24px); }
#screen-quiz { padding-bottom: calc(var(--actionbar-h) + var(--safe-b) + 24px); }
.loading { padding-top: 30vh; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* 하단 고정 버튼 영역 (한 손 조작) */
.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}
.action-bar > * { max-width: 608px; margin-left: auto; margin-right: auto; }
body[data-route="home"] .action-bar { bottom: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: 10px; }
.pool-info { font-size: 0.85rem; color: var(--muted); text-align: center; margin-bottom: 6px; }

/* ========== 버튼 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.05s, filter 0.15s;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-ghost { background: transparent; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.1rem; }
.btn-sm { min-height: 40px; padding: 6px 12px; font-size: 0.9rem; font-weight: 600; }
.btn-stack { display: grid; gap: 10px; margin-top: 24px; }
.link-btn {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ========== 태그 ========== */
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c, var(--muted));
  background: var(--c-bg, var(--surface-2));
  white-space: nowrap;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }

/* ========== 홈 ========== */
.hero h1 { margin-bottom: 0; }
.hero p { margin: 4px 0 0; }
.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }

.mode-list { display: grid; gap: 8px; }
.mode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}
.mode-card.selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.mode-card:disabled { opacity: 0.45; }
.mode-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  font-weight: 800;
}
.mode-card.selected .mode-num { background: var(--primary); color: var(--primary-text); }
.mode-text { display: flex; flex-direction: column; }
.mode-text small { color: var(--muted); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  flex: 1 1 0;
  min-width: 80px;
  min-height: 46px;
  padding: 8px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 700;
  font-size: 0.92rem;
}
.seg-btn.selected { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--c);
  border-radius: 999px;
  color: var(--c);
  background: var(--surface);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip.on { background: var(--c); color: var(--surface); }
.chip.on::before { content: "✓"; margin-right: 6px; }
.chip:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.switch-row > span:first-child { flex: 1; display: flex; flex-direction: column; }
.switch-row small { color: var(--muted); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  flex: none;
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
.switch-row input:checked + .switch { background: var(--primary); }
.switch-row input:checked + .switch::after { transform: translateX(22px); }
.switch-row:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.cycle-info { margin-top: 8px; font-size: 0.9rem; color: var(--muted); text-align: center; }

.notice { margin-top: 20px; font-size: 0.85rem; color: var(--muted); display: grid; gap: 6px; }
.notice ul { margin: 6px 0; padding-left: 20px; }

/* ========== 퀴즈 ========== */
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quiz-progress { font-size: 1.05rem; }
.quiz-progress b { font-size: 1.3rem; }
.quiz-score { min-width: 44px; text-align: right; font-weight: 600; }
.quiz-score b { color: var(--primary); font-size: 1.2rem; }
.progress-bar { height: 6px; margin: 6px 0 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--primary); transition: width 0.3s; }
.quiz-type { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }

.photo-box { margin: 0 -16px; }
.photo-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
}
.quiz-photo, .photo-btn .img-missing {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  background: #000;
}
.photo-btn .img-missing { height: 40vh; color: #bbb; }
.zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
}
.photo-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px 0; }
.badge-hint {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4cc;
  color: #7a5a00;
  font-size: 0.85rem;
  font-weight: 700;
}

.name-card {
  padding: 28px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.name-card-label { color: var(--muted); font-size: 0.9rem; }
.name-card-name { font-size: 2.1rem; font-weight: 800; margin-top: 4px; word-break: keep-all; }

.answer-area { margin-top: 14px; }
.field-label { display: block; margin: 12px 0 6px; font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.answer-area > .field-label:first-child { margin-top: 0; }
.name-input {
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 1.2rem;
}
.name-input:focus { outline: none; border-color: var(--primary); }
.name-input.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.name-input.is-wrong { border-color: var(--ng); background: var(--ng-bg); }
.name-input:disabled { opacity: 1; -webkit-text-fill-color: var(--text); }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: left;
}
.choice-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 0.9rem;
}
.choice:active:not(:disabled) { border-color: var(--primary); }

.opt-grid { display: grid; gap: 8px; }
.opt-morph { grid-template-columns: repeat(3, 1fr); }
.opt-life { grid-template-columns: repeat(2, 1fr); }
.opt-btn {
  min-height: 52px;
  padding: 8px 6px;
  border: 2px solid var(--c);
  border-radius: 12px;
  background: var(--surface);
  color: var(--c);
  font-weight: 800;
  font-size: 1rem;
  word-break: keep-all;
}
.opt-btn.selected { background: var(--c); color: var(--surface); }

/* 채점 후 상태 */
.is-correct.choice, .is-correct.opt-btn {
  border-color: var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
}
.is-correct.choice::after, .is-correct.opt-btn::after { content: " ⭕"; }
.is-wrong.choice, .is-wrong.opt-btn {
  border-color: var(--ng);
  background: var(--ng-bg);
  color: var(--ng);
}
.is-wrong.choice::after, .is-wrong.opt-btn::after { content: " ❌"; }
.is-dim { opacity: 0.4; }
.choice:disabled, .opt-btn:disabled { cursor: default; }

.feedback {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  border: 2px solid;
  scroll-margin-top: 70px;
}
.feedback.ok { border-color: var(--ok); background: var(--ok-bg); }
.feedback.ng { border-color: var(--ng); background: var(--ng-bg); }
.verdict { font-size: 1.4rem; font-weight: 800; }
.feedback.ok .verdict { color: var(--ok); }
.feedback.ng .verdict { color: var(--ng); }
.part-rows { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.part-rows li { display: flex; align-items: baseline; gap: 8px; }
.part-label { font-weight: 700; min-width: 3.5em; }
.part-mine { color: var(--muted); font-size: 0.9rem; word-break: break-all; }

.answer-card {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
}
.answer-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.features { margin: 8px 0 0; white-space: pre-line; }

.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb {
  flex: none;
  width: 104px;
  height: 78px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.thumb img, .thumb .img-missing { width: 100%; height: 100%; object-fit: cover; display: block; }

.img-missing {
  display: grid;
  place-items: center;
  padding: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ========== 결과·기록 ========== */
.result-card { text-align: center; }
.result-score { font-size: 1.4rem; margin-top: 6px; }
.result-score b { font-size: 3.2rem; color: var(--primary); }
.result-pct { font-size: 1.1rem; font-weight: 700; }
.round-done {
  margin-top: 10px;
  padding: 8px;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 700;
}

.weed-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.weed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.weed-row-img { flex: none; width: 84px; height: 64px; border-radius: 8px; overflow: hidden; background: #000; }
.weed-row-img img, .weed-row-img .img-missing { width: 100%; height: 100%; object-fit: cover; display: block; }
.weed-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.weed-row-text b { font-size: 1.1rem; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat b { font-size: 1.6rem; }
.stat b small { font-size: 0.9rem; color: var(--muted); }
.stat span { font-size: 0.85rem; color: var(--muted); }

.all-stats { margin-top: 20px; }
.all-stats summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.all-stats table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.all-stats th, .all-stats td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.all-stats tbody tr { cursor: pointer; }
.rate-bar {
  display: inline-block;
  width: 50px;
  height: 6px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.rate-bar span { display: block; height: 100%; background: var(--primary); }

/* ========== 도감 ========== */
.dex-tools { display: grid; gap: 8px; position: sticky; top: 52px; z-index: 5; padding: 8px 0; background: var(--bg); }
.search {
  width: 100%;
  min-height: 46px;
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.search:focus { outline: none; border-color: var(--primary); }
.dex-group { margin-top: 12px; }
.dex-head {
  margin: 16px 0 4px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--c-bg, var(--surface-2));
  color: var(--c, var(--text));
}
.dex-head small { font-weight: 600; opacity: 0.8; }
.dex-sub { display: flex; align-items: center; }
.dex-sub small { margin-left: 6px; font-weight: 500; }
.dex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 520px) { .dex-grid { grid-template-columns: repeat(3, 1fr); } }
.dex-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.dex-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #000; }
.dex-img { overflow: hidden; }
.dex-img img, .dex-img .img-missing { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.img-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
}
.dex-info { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; }
.dex-info b { font-size: 1.05rem; }

/* ========== 모달·확대 ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}
.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px 16px calc(24px + var(--safe-b));
  border-radius: 20px 20px 0 0;
  background: var(--surface);
}
@media (min-width: 680px) {
  .modal { align-items: center; }
  .modal-sheet { border-radius: 20px; }
}
.modal-close { position: absolute; top: 8px; right: 8px; }
.detail-name { margin: 0 44px 6px 0; font-size: 1.6rem; }
.detail-photos { display: grid; gap: 10px; margin-top: 12px; }
.detail-photo { padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; }
.detail-photo img, .detail-photo .img-missing { display: block; width: 100%; height: auto; min-height: 80px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
}
.lb-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-photo { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .img-missing { background: transparent; color: #ccc; }
.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 72px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(14px + var(--safe-b));
  display: flex;
  justify-content: center;
  gap: 14px;
  color: #ccc;
  font-size: 0.85rem;
  pointer-events: none;
}

.lb-credit {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  color: #bbb;
  font-size: 0.75rem;
  text-align: center;
}
.lb-credit:empty { display: none; }
.lb-credit a { color: #9fd3a2; }

/* ========== 헷갈리는 쌍 ========== */
.pair-card { margin-bottom: 14px; padding: 14px 12px; }
.pair-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.1rem; }
.pair-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 0.85rem;
}
.pair-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; }
.pair-vs { align-self: center; margin-top: -40px; color: var(--muted); font-weight: 800; font-size: 0.85rem; }
.pair-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pair-img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.pair-img img, .pair-img .img-missing { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pair-name { font-size: 1.05rem; word-break: keep-all; }
.pair-note {
  margin: 2px 0 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.88rem;
  font-weight: 600;
  word-break: keep-all;
}
.pair-common { margin: 10px 0 0; font-size: 0.9rem; font-weight: 600; }
.pair-practice { margin-top: 10px; }

/* ========== 과목 전환·기주 표시 ========== */
.topbar-right { display: flex; align-items: center; gap: 4px; }
.subject-switch {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.subject-switch:active { background: var(--surface-2); }
.host-label {
  padding: 8px 16px;
  background: var(--surface-2);
  font-size: 1.05rem;
}

.pair-filter { margin: 12px 0 4px; }
.pair-filter .seg-btn { min-width: 64px; flex: 1 1 auto; }
.pair-kind { margin: 20px 0 2px; }
.pair-kind small { color: var(--muted); font-weight: 600; }
.pair-kind-desc { margin: 0 0 10px; }

.pair-row.three { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.pair-row.three .pair-vs { display: none; }
.pair-row.three .pair-name { font-size: 0.95rem; }
.pair-row.three .pair-note { font-size: 0.8rem; padding: 5px 6px; }

/* ========== 암기 체크 ========== */
.check-progress { margin: 8px 0 12px; font-size: 0.95rem; }
.check-progress b { font-size: 1.4rem; color: var(--primary); }
.check-filter { margin-bottom: 10px; }
.check-hide { margin-bottom: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 520px) { .check-grid { grid-template-columns: repeat(3, 1fr); } }
.check-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.check-card.is-on { border-color: var(--ok); }
.check-card.is-on .check-img { opacity: 0.55; }
.check-img { position: relative; display: block; aspect-ratio: 4 / 3; padding: 0; border: 0; background: #000; }
.check-img { overflow: hidden; }
.check-img img, .check-img .img-missing { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.check-name {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 52px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  text-align: left;
}
.check-name b { font-size: 1.02rem; word-break: keep-all; }
.check-name.is-hidden { background: var(--surface-2); }
.check-toggle {
  min-height: 46px;
  border: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
}
.check-card.is-on .check-toggle { background: var(--ok-bg); color: var(--ok); }
.check-reset { margin-top: 20px; }
.master-btn { margin-top: 12px; }
.master-btn.is-on { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }

/* 도감 묶음 접기/펴기 */
.dex-fold-all { display: flex; justify-content: flex-end; gap: 12px; font-size: 0.88rem; }
.dex-head { padding: 0; }
.fold-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.dex-sub .fold-btn { padding: 6px 2px; min-height: 40px; color: var(--muted); font-weight: 600; }
.fold-arrow { display: inline-block; width: 1em; font-size: 0.9em; }


/* =====================================================================
   디자인 개편 (2026-10): 초록 기반 · Pretendard · 둥근 카드 · 눌리는 입체 버튼
   참고: 듀오링고(입체 버튼), Material 3(톤 면), 토스(플랫 카드·절제된 강조)
   ===================================================================== */
body { font-family: var(--font); letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-weight: 800; letter-spacing: -0.02em; }

/* 상단 바: 반투명 + 블러 */
.topbar {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.brand { font-size: 1.12rem; letter-spacing: -0.02em; }
.subject-switch { border-width: 1.5px; background: var(--surface); box-shadow: var(--shadow); border-color: transparent; }

/* 하단 탭: 반투명 + 활성 탭 알약 배경 */
.tabbar {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.tabbar a { font-size: 0.74rem; gap: 3px; }
.tabbar a span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  font-size: 1.15rem;
  transition: background 0.2s;
}
.tabbar a.active span { background: var(--primary-soft); }
.tabbar a.active { font-weight: 800; }

/* 카드·면 */
.card { border: 0; border-radius: 20px; }
.action-bar { border-top: 0; background: linear-gradient(to top, var(--bg) 70%, color-mix(in srgb, var(--bg) 0%, transparent)); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* 버튼: 아래 테두리로 입체감, 누르면 내려감 */
.btn {
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.06s, border-bottom-width 0.06s, filter 0.15s;
}
.btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.btn-primary { border-color: var(--primary-strong); background: var(--primary); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.04); }
.btn-ghost { border-color: transparent; border-bottom-width: 2px; }
.btn-danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-lg { min-height: 58px; font-size: 1.08rem; border-radius: 18px; }
.link-btn { text-decoration: none; font-weight: 800; }

/* 세그먼트 컨트롤: 회색 트랙 위 흰 알약 */
.seg { background: var(--surface-2); border-radius: 16px; padding: 4px; gap: 4px; }
.seg-btn {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  font-weight: 800;
  transition: background 0.15s, color 0.15s;
}
.seg-btn.selected { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

/* 태그 */
.tag { padding: 3px 9px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- 홈 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 20px 18px 18px;
  border-radius: 24px;
  background: var(--hero);
  color: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 30%, transparent);
}
.hero::after {
  content: attr(data-icon);
  position: absolute;
  right: -14px;
  top: -22px;
  font-size: 6.5rem;
  opacity: 0.16;
  transform: rotate(-12deg);
  pointer-events: none;
}
.hero-eyebrow { font-size: 0.8rem; font-weight: 700; opacity: 0.85; }
.hero h1 { margin: 2px 0 2px; color: #fff; font-size: 1.55rem; }
.hero p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.88rem; }
.hero-stats { display: flex; gap: 8px; position: relative; z-index: 1; }
.hero-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 8px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}
.hero-stats b { font-size: 1.15rem; line-height: 1.1; }
.hero-stats span { font-size: 0.68rem; opacity: 0.85; }

.opt-section h2 { font-size: 1.02rem; margin: 22px 0 10px; }
.mode-list { gap: 10px; }
.mode-card {
  min-height: 66px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: 18px;
  transition: border-color 0.15s, background 0.15s, transform 0.06s;
}
.mode-card:active:not(:disabled) { transform: translateY(2px); }
.mode-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.mode-num {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--surface-2);
  font-size: 1.3rem;
}
.mode-card.selected .mode-num { background: var(--surface); color: inherit; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.mode-text b { font-size: 1rem; }
.mode-card::after { content: ""; margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); }
.mode-card.selected::after { border-color: var(--primary); background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }

.chip { border-width: 2px; min-height: 42px; padding: 7px 14px; }
.switch-row { border: 0; border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; }
.switch { width: 50px; height: 30px; }
.resume { border: 2px solid var(--primary); background: var(--primary-soft); box-shadow: none; }

/* ---------- 퀴즈 ---------- */
.quiz-head .icon-btn { background: var(--surface); box-shadow: var(--shadow); border-radius: 14px; }
.progress-bar { height: 12px; margin: 8px 0 10px; background: var(--surface-2); }
.progress-bar > div {
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #b6f0c8));
  border-radius: 999px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}
.quiz-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
}
.photo-box { margin: 0; }
.photo-btn { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.photo-tools { padding: 8px 2px 0; }
.host-label { border-radius: 14px; margin-bottom: 8px; padding: 8px 14px; background: var(--primary-soft); }
.name-card { border: 0; border-radius: 22px; background: var(--hero); color: #fff; }
.name-card-label { color: rgba(255, 255, 255, 0.85); }

.name-input { border-width: 2px; border-bottom-width: 4px; border-radius: 16px; }
.choices { gap: 12px; }
.choice {
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: 18px;
  min-height: 60px;
  transition: transform 0.06s, border-color 0.15s;
}
.choice:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.choice-num { width: 30px; height: 30px; border-radius: 10px; border: 2px solid var(--border); background: transparent; color: var(--muted); }
.opt-btn { border-bottom-width: 4px; border-radius: 16px; }
.opt-btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.is-correct.choice, .is-correct.opt-btn { border-bottom-color: var(--ok); }

.feedback { border: 0; border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.feedback.ok { background: var(--ok-bg); }
.feedback.ng { background: var(--ng-bg); }
.verdict { font-size: 1.35rem; letter-spacing: -0.02em; }
.answer-card { border-radius: 18px; padding: 14px; }
.answer-name { font-size: 1.45rem; letter-spacing: -0.03em; }
.thumb { border-radius: 12px; border: 0; }
.badge-hint { border-radius: 999px; }

/* ---------- 결과·기록 ---------- */
.result-card { background: var(--hero); color: #fff; }
.result-card .muted, .result-card .small { color: rgba(255, 255, 255, 0.85); }
.result-score b { color: #fff; font-size: 3.4rem; }
.round-done { background: rgba(255, 255, 255, 0.18); color: #fff; }
.weed-row { border: 0; border-radius: 18px; box-shadow: var(--shadow); padding: 8px; }
.weed-row-img { border-radius: 12px; }
.stat { border: 0; border-radius: 20px; box-shadow: var(--shadow); }
.stat b { color: var(--primary); letter-spacing: -0.03em; }
.all-stats summary { padding: 12px 0; }

/* ---------- 도감·암기·비교 ---------- */
.search { border-width: 2px; border-radius: 16px; background: var(--surface); }
.dex-tools { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.dex-head { border-radius: 16px; }
.dex-card, .check-card, .pair-card { border: 0; border-radius: 20px; box-shadow: var(--shadow); }
.check-card { border: 2px solid transparent; }
.check-card.is-on { border-color: var(--ok); }
.dex-info b, .check-name b { letter-spacing: -0.02em; }
.img-count { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.check-progress b { letter-spacing: -0.03em; }
.pair-img { border-radius: 14px; }
.pair-note { border-radius: 12px; }
.pair-num { width: 28px; height: 28px; }
.pair-kind { font-size: 1.1rem; }
.master-btn.is-on { border-color: var(--ok); }

/* 모달·확대 */
.modal-sheet { border-radius: 26px 26px 0 0; }
@media (min-width: 680px) { .modal-sheet { border-radius: 26px; } }

/* 개편 보정: 하단 버튼 영역 배경, 비교 필터 한 줄 */
.action-bar { background: var(--bg); box-shadow: 0 -12px 16px -4px var(--bg); }
.pair-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pair-filter::-webkit-scrollbar { display: none; }
.pair-filter .seg-btn { flex: 1 0 auto; min-width: 0; padding: 8px 12px; white-space: nowrap; }

/* 홈 하단 고정 토글 (외운 것 빼기 · 한 바퀴) */
#screen-home { padding-bottom: calc(var(--tabbar-h) + 184px + var(--safe-b) + 16px); }
.quick-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.qt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.06s;
}
.qt:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.qt:disabled { opacity: 0.45; }
.qt-box {
  flex: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.qt.on { border-color: var(--primary); background: var(--primary-soft); }
.qt.on .qt-box {
  border-color: var(--primary);
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.qt-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.qt-text b { font-size: 0.98rem; white-space: nowrap; }
.qt-text small { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt.on .qt-text small { color: var(--primary); }
.opt-help { margin: 18px 2px 0; line-height: 1.6; }
.pool-info { margin-bottom: 8px; }

.seg-grid { display: grid; grid-template-columns: 1fr 1fr; }
.seg-grid .seg-btn { min-width: 0; font-size: 0.88rem; padding: 8px 6px; }
.tabbar { background: color-mix(in srgb, var(--surface) 97%, transparent); }

/* ========== 즐겨찾기 ========== */
.fav-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  vertical-align: middle;
  transition: transform 0.12s;
}
.fav-btn:active { transform: scale(0.85); }
.fav-btn.on { color: #f5b400; }
.answer-name .fav-btn, .detail-name .fav-btn { margin-left: 4px; }
/* 카드 위 별: 사진 오른쪽 위 동그란 배경 */
.dex-cell { position: relative; display: flex; }
.dex-cell > .dex-card { width: 100%; }
.dex-cell > .fav-btn, .check-card > .fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 1.15rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dex-cell > .fav-btn.on, .check-card > .fav-btn.on { background: rgba(255, 255, 255, 0.92); color: #f5b400; }
.check-card { position: relative; }
.dex-fold-all { align-items: center; }
.dex-fold-all .spacer { flex: 1; }
.fav-filter {
  min-height: 34px;
  padding: 4px 12px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}
.fav-filter.on { border-color: #f5b400; background: color-mix(in srgb, #f5b400 16%, var(--surface)); color: var(--text); }
/* 하단 토글 3개 */
.quick-toggles.three { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.quick-toggles.three .qt { gap: 6px; padding: 8px 8px; }
.quick-toggles.three .qt-box { width: 20px; height: 20px; border-radius: 7px; }
.quick-toggles.three .qt-text b { font-size: 0.86rem; }
.quick-toggles.three .qt-text small { font-size: 0.74rem; }
.qt.fav.on { border-color: #f5b400; background: color-mix(in srgb, #f5b400 14%, var(--surface)); }
.qt.fav.on .qt-box { border-color: #f5b400; background-color: #f5b400; }
.qt.fav.on .qt-text small { color: #b07f00; }
.dex-tools { background: var(--bg); }
.check-filter .seg-btn { white-space: nowrap; min-width: 0; padding: 6px 4px; font-size: 0.86rem; }
.check-filter .seg-btn[data-check-filter="⭐"] { flex: 0 0 52px; }

/* 4지선다: 보기 가리개 */
.choice-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 150px;
  padding: 18px 14px;
  border: 2px dashed color-mix(in srgb, var(--primary) 55%, var(--border));
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--text);
  text-align: center;
}
.choice-cover-icon { font-size: 2rem; line-height: 1; }
.choice-cover b { font-size: 1.05rem; }
.choice-cover small { color: var(--muted); font-weight: 600; }
.choice-cover:active { transform: translateY(1px); }

/* 병원균 속명, 비교 탭 4개 묶음 */
.genus { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); }
.genus i { color: var(--text); font-weight: 600; }
.pair-row.four { grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.pair-row.four .pair-vs { display: none; }
.pair-row.four .pair-name { font-size: 0.95rem; }
.opt-pathogen { grid-template-columns: repeat(2, 1fr); }

/* 자료 출처 문구 */
.source-note { margin: 14px 2px 0; line-height: 1.6; }

/* 만든 사람 표시 */
.made-by { margin: 10px 0 0; text-align: center; font-size: 0.75rem; color: var(--muted); opacity: 0.8; }
