/* vocabulary.css — "My Reading Vocabulary" (Set-first design):
   Sets list (top level) -> Set detail (filter tabs + card grid). Reuses
   base.css's design tokens; select.css only for the shared .app-nav shell. */

.vocab-main { max-width: 1180px; padding-top:28px; padding-bottom:64px; }

.vocab-hero {
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:center;
  min-height:230px;
  overflow:hidden;
  padding:36px 43% 36px 40px;
  border:1px solid color-mix(in srgb,var(--unio-yellow) 45%,var(--ielts-border));
  border-radius:24px;
  background:
    radial-gradient(circle at 83% 30%,rgba(244,190,42,.29),transparent 28%),
    linear-gradient(132deg,#fff4c9,#fffdf6 49%,#e7f5ef 72%,#e8f3ff);
  box-shadow:0 18px 48px rgba(30,39,54,.085);
  transition:min-height 220ms ease,padding 220ms ease;
}
.vocab-hero::before {
  content:"";
  position:absolute;
  z-index:-1;
  left:-90px;
  bottom:-135px;
  width:215px;
  height:215px;
  border:32px solid rgba(224,163,30,.09);
  border-radius:50%;
}
.vocab-hero-copy { position:relative; z-index:3; }
.vocab-hero-kicker { display:inline-flex; align-items:center; gap:7px; margin-bottom:11px; color:#836109; font-size:10.5px; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.vocab-hero-kicker .icon { width:15px; height:15px; }
.vocab-page-title { margin:0; color:#20293a; font-family:var(--font-heading); font-size:clamp(32px,4vw,46px); line-height:1.08; }
.vocab-page-desc { max-width:520px; margin:12px 0 17px; color:#5e6878; font-size:14.5px; line-height:1.6; }
.vocab-hero-stats { display:flex; flex-wrap:wrap; gap:8px; }
.vocab-hero-stats > span { display:flex; align-items:baseline; gap:6px; padding:7px 11px; border:1px solid rgba(39,48,64,.09); border-radius:999px; background:rgba(255,255,255,.75); box-shadow:0 5px 14px rgba(32,40,55,.04); }
.vocab-hero-stats strong { color:#277c63; font-family:var(--font-heading); font-size:17px; line-height:1; }
.vocab-hero-stats > span:last-child strong { color:#4a7fb7; }
.vocab-hero-stats small { color:#596274; font-size:10.5px; font-weight:700; }
.vocab-hero-visual { position:absolute; inset:0 0 0 auto; width:43%; pointer-events:none; }
.vocab-hero-orbit { position:absolute; top:50%; left:50%; width:235px; height:155px; border:1px dashed rgba(55,101,129,.24); border-radius:50%; transform:translate(-50%,-50%) rotate(-13deg); animation:vocabOrbit 18s linear infinite; }
.vocab-hero-orbit::before,.vocab-hero-orbit::after { content:""; position:absolute; border-radius:50%; box-shadow:0 4px 10px rgba(38,50,67,.13); }
.vocab-hero-orbit::before { top:7px; left:47px; width:12px; height:12px; background:#e36c49; }
.vocab-hero-orbit::after { right:24px; bottom:19px; width:9px; height:9px; background:#4285bd; }
.vocab-hero-mascot { position:absolute; z-index:2; right:58px; bottom:-4px; width:168px; max-height:205px; object-fit:contain; filter:drop-shadow(0 15px 12px rgba(32,42,56,.15)); transform-origin:50% 100%; animation:vocabMascotFloat 3.6s ease-in-out infinite; }
.vocab-hero-card { position:absolute; z-index:1; display:flex; flex-direction:column; gap:1px; min-width:86px; padding:9px 11px; border:1px solid rgba(45,61,80,.12); border-radius:11px; background:rgba(255,255,255,.82); box-shadow:0 10px 22px rgba(36,47,62,.1); backdrop-filter:blur(7px); animation:vocabCardFloat 4s ease-in-out infinite; }
.vocab-hero-card b { color:#b07900; font-family:var(--font-heading); font-size:18px; }
.vocab-hero-card small { color:#687181; font-size:8px; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
.vocab-hero-card-word { left:34px; bottom:25px; transform:rotate(-7deg); }
.vocab-hero-card-pair { top:27px; right:28px; transform:rotate(7deg); animation-delay:-1.8s; }
.vocab-hero-card-pair b { color:#477fbd; }

#vocabContainer { margin-top:20px; }
.vocab-empty-state { display:flex; align-items:center; justify-content:center; gap:20px; min-height:180px; padding:28px; border:1px dashed color-mix(in srgb,var(--unio-yellow) 55%,var(--ielts-border)); border-radius:20px; color:var(--ielts-text-muted); background:linear-gradient(135deg,#fff9e5,var(--ielts-white)); }
.vocab-empty-state img { width:92px; max-height:110px; object-fit:contain; }
.vocab-empty-state h2 { margin:0 0 7px; color:var(--ielts-text); font-family:var(--font-heading); font-size:20px; }
.vocab-empty-state p { max-width:520px; margin:0; font-size:13px; line-height:1.55; }

body.vocab-detail-active .vocab-hero { min-height:158px; padding-top:25px; padding-bottom:25px; }
body.vocab-detail-active .vocab-hero-stats { display:none; }
body.vocab-detail-active .vocab-hero-mascot { width:116px; right:72px; }
body.vocab-detail-active .vocab-hero-card { opacity:.55; transform:scale(.82); }

/* ---- Sets list — folder cards, sorted, with a peek of each set's most
   recently saved terms. ---- */
.vocab-library-panel { padding:22px; border:1px solid var(--ielts-border); border-radius:20px; background:var(--ielts-white); box-shadow:0 10px 30px rgba(31,39,53,.055); }
.vocab-sets-heading-row { display: flex; align-items: center; justify-content: space-between; gap:14px; margin:0 0 18px; }
.vocab-sets-heading-copy { display:flex; align-items:center; gap:10px; }
.vocab-section-icon { display:grid; width:36px; height:36px; place-items:center; border-radius:11px; color:#986d00; background:#fff0bd; font-family:var(--font-heading); font-size:13px; font-weight:800; }
.vocab-sets-heading { font-size: 15px; font-weight: 700; margin: 0; }
.vocab-sets-heading-copy p { margin:2px 0 0; color:var(--ielts-text-muted); font-size:10.5px; }
.vocab-sort { position: relative; }
.vocab-sort-btn { font-size: 12px; font-weight: 700; color: var(--ielts-text-muted); background:var(--ielts-bg); border:1px solid var(--ielts-border); border-radius:999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; }
.vocab-sort-btn:hover { color: var(--ielts-text); }
.vocab-sort-caret { font-size: 10px; }
.vocab-sort-popover {
  position: absolute;
  top: 26px;
  right: 0;
  z-index: 5;
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-width: 140px;
}
.vocab-sort-popover.hidden { display: none; }
.vocab-sets-hint { text-align: center; color: var(--ielts-text-muted); font-size: 12.5px; margin-top: 22px; }

.vocab-set-folder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 16px; }
.vocab-set-folder-card {
  border-radius: 17px;
  overflow: hidden;
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  cursor: pointer;
  box-shadow:0 7px 20px rgba(31,39,53,.055);
  transition: box-shadow 0.18s, transform 0.18s, border-color .18s;
}
.vocab-set-folder-card:hover { border-color:color-mix(in srgb,var(--folder-solid) 45%,var(--ielts-border)); box-shadow: 0 15px 30px rgba(31,39,53,.12); transform: translateY(-5px); }

/* 5 rotating folder colors, cycled by grid position — purely decorative
   variety, not tied to item type (that's the peek symbol's job). */
.vocab-set-folder-card:nth-of-type(5n+1) { --folder-tint: #fdf1d4; --folder-solid: #e3a92e; }
.vocab-set-folder-card:nth-of-type(5n+2) { --folder-tint: #dce6fb; --folder-solid: #5b7fd1; }
.vocab-set-folder-card:nth-of-type(5n+3) { --folder-tint: #fbe3d6; --folder-solid: #c97a5c; }
.vocab-set-folder-card:nth-of-type(5n+4) { --folder-tint: #e9e1f7; --folder-solid: #8a6bc4; }
.vocab-set-folder-card:nth-of-type(5n+5) { --folder-tint: #e2f0e6; --folder-solid: #5f9e72; }
body.dark-theme .vocab-set-folder-card:nth-of-type(5n+1) { --folder-tint: #493c22; }
body.dark-theme .vocab-set-folder-card:nth-of-type(5n+2) { --folder-tint: #293a5c; }
body.dark-theme .vocab-set-folder-card:nth-of-type(5n+3) { --folder-tint: #4a3327; }
body.dark-theme .vocab-set-folder-card:nth-of-type(5n+4) { --folder-tint: #362c4a; }
body.dark-theme .vocab-set-folder-card:nth-of-type(5n+5) { --folder-tint: #263b2c; }

.vocab-set-folder-visual {
  position: relative;
  isolation: isolate;
  height: 142px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 105%, color-mix(in srgb, var(--folder-solid) 20%, transparent), transparent 48%),
    var(--folder-tint);
  padding: 18px 16px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.vocab-set-folder-visual::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 7px;
  width: 150px;
  height: 17px;
  border-radius: 50%;
  background: rgba(23, 28, 38, 0.2);
  filter: blur(7px);
  transform: translateX(-50%);
}
.vocab-folder-peek {
  position: absolute;
  z-index: 1;
  top: 24px;
  left: 50%;
  width: 142px;
  height: 62px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transform: translateX(-50%);
  transition: transform 0.2s ease;
}
.vocab-folder-peek:empty { display: none; }
.vocab-folder-peek-card {
  position: relative;
  width: 104px;
  min-width: 0;
  min-height: 48px;
  background: var(--ielts-white);
  border: 1px solid color-mix(in srgb, var(--folder-solid) 22%, var(--ielts-border));
  border-radius: 5px 5px 3px 3px;
  padding: 8px 9px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ielts-text);
  box-shadow: 0 3px 9px rgba(20, 27, 42, 0.14);
  white-space: nowrap;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-overflow: ellipsis;
  transition: transform 0.2s ease;
}
.vocab-folder-peek-card::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 7px;
  height: 1px;
  background: var(--ielts-border);
  box-shadow: 0 4px 0 var(--ielts-border);
  opacity: 0.7;
}
.vocab-folder-peek-card:nth-child(1) { z-index: 1; margin-right: -22px; transform: translate(-10px, 5px) rotate(-5deg); }
.vocab-folder-peek-card:nth-child(2) { z-index: 2; transform: translate(10px, 1px) rotate(4deg); }
.vocab-folder-peek-symbol { font-weight: 800; flex-shrink: 0; }
.vocab-folder-peek-symbol-vocabulary { color: #a4780c; }
.vocab-folder-peek-symbol-paraphrase { color: var(--unio-blue); }
.vocab-folder-peek-symbol-reading_connection { color: var(--vocab-purple); }

.vocab-folder-icon {
  position: relative;
  z-index: 2;
  width: 158px;
  height: 66px;
  margin-bottom: 8px;
  border: 1px solid color-mix(in srgb, var(--folder-solid) 78%, #000);
  border-radius: 5px 12px 13px 13px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.3), transparent 31%),
    linear-gradient(to bottom, color-mix(in srgb, var(--folder-solid) 84%, #fff) 0%, var(--folder-solid) 45%, color-mix(in srgb, var(--folder-solid) 88%, #000) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 6px 12px rgba(25, 31, 44, 0.18);
  transform: perspective(260px) rotateX(-2deg);
  transform-origin: bottom center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vocab-folder-icon::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -1px;
  width: 70px;
  height: 19px;
  border: 1px solid color-mix(in srgb, var(--folder-solid) 78%, #000);
  border-bottom: 0;
  border-radius: 8px 9px 0 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--folder-solid) 74%, #fff), var(--folder-solid));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.vocab-folder-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 10px;
  right: 10px;
  height: 1px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
}
.vocab-folder-count {
  position: relative;
  z-index: 1;
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #252a36;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}
.vocab-set-folder-card:hover .vocab-folder-icon {
  transform: perspective(260px) rotateX(-5deg) translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 9px 16px rgba(25, 31, 44, 0.22);
}
.vocab-set-folder-card:hover .vocab-folder-peek { transform: translate(-50%, -4px); }

.vocab-set-folder-footer { padding: 12px 16px 14px; background: var(--ielts-white); }
.vocab-set-folder-title { font-size: 15px; font-weight: 700; color: var(--ielts-text); line-height: 1.3; }
.vocab-set-folder-subtitle { font-size: 12.5px; color: var(--ielts-text-muted); margin-top: 2px; }

/* ---- Set detail ---- */
.vocab-detail-shell { animation:vocabDetailReveal 330ms ease both; }
.vocab-back-link {
  display: inline-flex;
  align-items:center;
  margin-bottom: 12px;
  padding: 7px 11px;
  border: 1px solid var(--ielts-border);
  border-radius:999px;
  background: var(--ielts-white);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ielts-text-muted);
  cursor: pointer;
}
.vocab-back-link:hover { color: var(--unio-blue); border-color:color-mix(in srgb,var(--unio-blue) 45%,var(--ielts-border)); }
.vocab-detail-header-v2 {
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:76px minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  overflow:visible;
  margin-bottom:18px;
  padding:20px 22px;
  border:1px solid color-mix(in srgb,var(--unio-yellow) 39%,var(--ielts-border));
  border-radius:19px;
  background:linear-gradient(135deg,#fff7d9,var(--ielts-white) 56%,#edf6ff);
  box-shadow:0 10px 28px rgba(31,39,53,.06);
}
.vocab-detail-header-v2::after { content:""; position:absolute; z-index:-1; right:22%; top:-24px; width:80px; height:80px; border:13px solid rgba(244,190,42,.07); border-radius:50%; }
.vocab-detail-folder-mark {
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  width:72px;
  height:50px;
  padding:7px;
  border:1px solid #cb9117;
  border-radius:5px 11px 12px 12px;
  background:linear-gradient(150deg,#f8cf59,#e3a928);
  box-shadow:inset 0 1px rgba(255,255,255,.5),0 7px 13px rgba(75,55,15,.16);
}
.vocab-detail-folder-mark::before { content:""; position:absolute; top:-10px; left:-1px; width:31px; height:12px; border:1px solid #cb9117; border-bottom:0; border-radius:6px 7px 0 0; background:#f3c552; }
.vocab-detail-folder-mark span { display:grid; min-width:23px; height:20px; padding:0 5px; place-items:center; border-radius:999px; color:#4f3a09; background:rgba(255,255,255,.82); font-size:9.5px; font-weight:800; }
.vocab-detail-heading-copy { min-width:0; }
.vocab-detail-title-v2 { margin:0; overflow:hidden; color:#222b3a; font-family:var(--font-heading); font-size:clamp(22px,3vw,30px); line-height:1.15; text-overflow:ellipsis; white-space:nowrap; }
.vocab-detail-subtitle-v2 { margin-top:5px; color:var(--ielts-text-muted); font-size:12px; }
.vocab-detail-practice-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex-shrink:0; padding:10px 17px; border-radius:999px; font-size:12px; }
.vocab-detail-practice-btn .icon { width:14px; height:14px; }
.vocab-detail-title-row { position: relative; display: flex; align-items: center; gap: 6px; }

.vocab-set-menu-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--ielts-text-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.vocab-set-menu-btn:hover { background: var(--ielts-bg); color: var(--ielts-text); }
.vocab-set-menu-popover {
  position: absolute;
  top: 28px;
  left: 0;
  z-index: 5;
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-width: 180px;
}
.vocab-set-menu-popover.hidden { display: none; }

.vocab-type-group { margin-top:16px; padding:19px; border:1px solid var(--ielts-border); border-radius:18px; background:var(--ielts-white); box-shadow:0 8px 25px rgba(31,39,53,.05); }
.vocab-type-group-header { display:flex; align-items:center; gap:9px; margin-bottom:14px; }
.vocab-type-group-badge { display:grid; width:34px; height:34px; place-items:center; border-radius:11px; font-family:var(--font-heading); font-size:13px; font-weight:800; }
.vocab-type-group-badge-vocabulary { color:#926700; background:#fff0bd; }
.vocab-type-group-badge-paraphrase { color:#357abd; background:#e5f1fc; }
.vocab-type-group-badge-reading_connection { color:#7654a0; background:#eee7f7; }
.vocab-type-group-name { color:var(--ielts-text); font-size:14px; font-weight:800; }
.vocab-type-group-count { display:grid; min-width:23px; height:22px; margin-left:auto; padding:0 6px; place-items:center; border-radius:999px; color:var(--ielts-text-muted); background:var(--ielts-bg); font-size:10px; font-weight:800; }

:root { --vocab-purple: #7c5cbf; }
body.dark-theme { --vocab-purple: #a78bda; }

.vocab-card-move-submenu { border-top: 1px solid var(--ielts-border); max-height: 160px; overflow-y: auto; }
.vocab-card-move-submenu.hidden { display: none; }
.vocab-card-move-submenu .vocab-card-menu-item { padding-left: 20px; font-size: 12px; }
.vocab-card-menu-empty { display: block; padding: 8px 20px; font-size: 12px; color: var(--ielts-text-muted); }

.vocab-card-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--ielts-text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.vocab-card-menu-btn:hover { background: var(--ielts-bg); color: var(--ielts-text); }
.vocab-card-menu-popover {
  position: absolute;
  top: 32px;
  right: 8px;
  z-index: 5;
  background: var(--ielts-white);
  border: 1px solid var(--ielts-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  min-width: 150px;
}
.vocab-card-menu-popover.hidden { display: none; }
.vocab-card-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: 12.5px;
  color: var(--ielts-text);
  cursor: pointer;
}
.vocab-card-menu-item:hover { background: var(--ielts-bg); }
.vocab-card-menu-delete { color: var(--ielts-incorrect); }

/* ---- Vocabulary row (set detail) — one compact line per item instead
   of a boxed card: term (+ part of speech) or a phrase pair on the left,
   meaning/its paired phrase on the right, a "Q{n}" source badge that
   expands (when a question's Explain evidence exists) into a blue
   "in the passage" context box below the row. Colors reuse the exact
   same palette as .vocab-type-group-badge-* above, so the group header
   and its rows read as one system. ---- */
.vocab-row-list { border: 1px solid var(--ielts-border); border-radius: 14px; overflow: hidden; }
.vocab-row { position: relative; background: var(--ielts-white); border-bottom: 1px solid var(--ielts-border); }
.vocab-row:last-child { border-bottom: none; }
.vocab-row.vocab-row-mastered { opacity: 0.55; }
.vocab-row.vocab-row-expanded .vocab-row-top { background: #fff8e6; }
body.dark-theme .vocab-row.vocab-row-expanded .vocab-row-top { background: #332c17; }

.vocab-row-top { display: flex; align-items: center; gap: 14px; padding: 14px 44px 14px 18px; }
.vocab-row-main { flex: 1 1 auto; min-width: 0; }
.vocab-row-term { font-size: 16px; font-weight: 700; color: var(--ielts-text); line-height: 1.35; overflow-wrap: anywhere; }
.vocab-row-pos { font-size: 12.5px; font-weight: 400; font-style: italic; color: #926700; }
body.dark-theme .vocab-row-pos { color: #e0b34d; }
.vocab-row-meaning { flex: 1 1 auto; min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--ielts-text-secondary); text-align: right; overflow-wrap: anywhere; }

.vocab-row-arrow { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; margin-right: 6px; font-size: 12px; font-weight: 700; }
.vocab-row-arrow-paraphrase { color: #357abd; background: #e5f1fc; }
.vocab-row-arrow-reading_connection { color: #7654a0; background: #eee7f7; }

.vocab-row-source {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--ielts-text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: default;
  padding: 4px 2px;
}
.vocab-row-source-expandable { cursor: pointer; }
.vocab-row-source-expandable:hover { color: var(--ielts-text); }
.vocab-row-chevron { display: inline-block; transition: transform 0.15s; }
.vocab-row.vocab-row-expanded .vocab-row-chevron { transform: rotate(90deg); }
.vocab-row-menu-btn.vocab-card-menu-btn { position: static; flex-shrink: 0; }

.vocab-row-context { padding: 12px 18px 16px; background: var(--ielts-blue-light); }
.vocab-row-context.hidden { display: none; }
.vocab-row-context-label { font-size: 11.5px; font-weight: 700; color: var(--unio-blue); margin-bottom: 5px; }
.vocab-row-context-text { font-size: 14px; font-weight: 700; color: var(--ielts-text); line-height: 1.5; }

@media (max-width: 560px) {
  .vocab-row-top { flex-wrap: wrap; padding-right: 40px; }
  .vocab-row-meaning { text-align: left; flex-basis: 100%; }
}

body.dark-theme .vocab-hero { border-color:#4c493d; background:radial-gradient(circle at 83% 30%,rgba(244,190,42,.13),transparent 29%),linear-gradient(132deg,#322c1c,#252931 52%,#20332d 73%,#1f2d39); }
body.dark-theme .vocab-page-title { color:#f4f2eb; }
body.dark-theme .vocab-page-desc { color:#bdc1ca; }
body.dark-theme .vocab-hero-kicker { color:#efd171; }
body.dark-theme .vocab-hero-stats > span { background:rgba(16,19,24,.46); border-color:rgba(255,255,255,.09); }
body.dark-theme .vocab-hero-stats small { color:#c6c8ce; }
body.dark-theme .vocab-empty-state,
body.dark-theme .vocab-detail-header-v2 { background:linear-gradient(135deg,#342f20,var(--ielts-white) 62%,#20303b); }
body.dark-theme .vocab-detail-title-v2 { color:#f3f1eb; }

@keyframes vocabOrbit { to { transform:translate(-50%,-50%) rotate(347deg); } }
@keyframes vocabMascotFloat { 0%,100% { transform:translateY(0) rotate(-1deg); } 50% { transform:translateY(-8px) rotate(1deg); } }
@keyframes vocabCardFloat { 0%,100% { translate:0 0; } 50% { translate:0 -7px; } }
@keyframes vocabDetailReveal { from { opacity:0; transform:translateY(9px); } to { opacity:1; transform:translateY(0); } }

@media (max-width: 760px) {
  .vocab-main { padding:18px 16px 44px; }
  .vocab-hero { min-height:210px; padding:30px 36% 30px 25px; border-radius:20px; }
  .vocab-hero-visual { width:37%; }
  .vocab-hero-mascot { right:16px; width:132px; }
  .vocab-hero-card-word { left:8px; }
  .vocab-hero-card-pair { right:8px; }
  .vocab-library-panel { padding:17px; border-radius:17px; }
  .vocab-detail-header-v2 { grid-template-columns:62px minmax(0,1fr); padding:17px; }
  .vocab-detail-folder-mark { width:60px; height:44px; }
  .vocab-detail-practice-btn { grid-column:1 / -1; width:100%; }
}

@media (max-width: 520px) {
  .vocab-main,
  #vocabContainer,
  .vocab-library-panel,
  .vocab-detail-shell,
  .vocab-set-folder-card { min-width:0; }
  .vocab-set-folder-grid { grid-template-columns: minmax(0, 1fr); }
  .vocab-hero { min-height:330px; align-items:flex-start; padding:27px 22px 155px; }
  .vocab-hero-visual { inset:auto 0 0; width:100%; height:150px; }
  .vocab-hero-mascot { right:calc(50% - 62px); width:124px; }
  .vocab-hero-orbit { width:185px; height:105px; }
  .vocab-hero-card { min-width:76px; padding:7px 9px; }
  .vocab-hero-card-word { left:22px; bottom:20px; }
  .vocab-hero-card-pair { top:12px; right:20px; }
  body.vocab-detail-active .vocab-hero { min-height:245px; padding:24px 20px 110px; }
  body.vocab-detail-active .vocab-hero-visual { height:105px; }
  body.vocab-detail-active .vocab-hero-mascot { right:calc(50% - 49px); width:98px; }
  .vocab-sets-heading-row { align-items:flex-start; flex-wrap:wrap; }
  .vocab-sort { margin-left:auto; }
  .vocab-sets-heading-copy p { display:none; }
  .vocab-sort-btn { padding:6px 9px; }
  .vocab-type-group { padding:14px; border-radius:15px; }
  .vocab-detail-title-v2 { white-space:normal; }
}

@media (prefers-reduced-motion: reduce) {
  .vocab-hero-orbit,.vocab-hero-mascot,.vocab-hero-card,.vocab-detail-shell { animation:none !important; }
  .vocab-hero,.vocab-set-folder-card { transition:none; }
}
