/* v161 UI polish layer — see _brief_ui_css.md
   index.html 뒤에 마지막으로 로드되므로, 동일 명시도에서는 이 파일이 이긴다.
   기존 규칙이 !important 를 쓰는 곳은 여기서도 !important + 더 높은 명시도로 덮는다. */

/* =====================================================================
   C1. 하단 고정바 여유 — 내비 56px(+safe) + CTA 56px(has-cta) + 16px
   ===================================================================== */
html[data-wsc="compact"] body {
  padding-bottom: calc(56px + 16px + env(safe-area-inset-bottom, 0px)) !important;
}
html[data-wsc="compact"] body.has-cta {
  padding-bottom: calc(56px + 56px + 16px + env(safe-area-inset-bottom, 0px)) !important;
}
html[data-wsc="medium"] body {
  padding-bottom: calc(56px + 16px + env(safe-area-inset-bottom, 0px)) !important;
}
/* v161(GPT 리뷰): 펼친 화면(medium)에도 CTA 바가 뜬다 — 그만큼 더 띄운다 */
html[data-wsc="medium"] body.has-cta {
  padding-bottom: calc(56px + 56px + 16px + env(safe-area-inset-bottom, 0px)) !important;
}
html[data-hsc="short"][data-wsc="medium"] body.has-cta {
  padding-bottom: calc(48px + 44px + 16px + env(safe-area-inset-bottom, 0px)) !important;
}
/* 낮은 창(short): 내비 48px · CTA 44px 규칙과 명시도를 맞춰 이긴다 */
html[data-hsc="short"][data-wsc="compact"] body,
html[data-hsc="short"][data-wsc="medium"] body {
  padding-bottom: calc(48px + 16px + env(safe-area-inset-bottom, 0px)) !important;
}
html[data-hsc="short"][data-wsc="compact"] body.has-cta {
  padding-bottom: calc(48px + 44px + 16px + env(safe-area-inset-bottom, 0px)) !important;
}
/* 패널 카드 마지막 줄도 살짝 띄운다 */
html[data-wsc="compact"] .panel > .card,
html[data-wsc="medium"] .panel > .card { padding-bottom: 12px; }

/* =====================================================================
   C2. 읽기 문장 행 — 텍스트가 버튼과 한 줄을 다투며 단어가 쪼개지던 문제
   (compact) 체크박스·번호·버튼이 1행, 본문은 전체폭 2행
   ===================================================================== */
html[data-wsc="compact"] .rd-line { gap: 6px !important; align-items: center !important; }
html[data-wsc="compact"] .rd-line .rd-cb { order: 1; margin: 0 !important; align-self: center !important; }
html[data-wsc="compact"] .rd-line .rd-num { order: 2; margin: 0 !important; min-width: 22px !important; }
html[data-wsc="compact"] .rd-line .rd-play {
  order: 3;
  width: 40px !important; height: 40px !important;
  min-width: 40px !important; min-height: 40px !important;
  padding: 0 !important; border-radius: 8px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
/* 첫 재생 버튼을 오른쪽 끝으로 밀어 1행을 정리 */
html[data-wsc="compact"] .rd-line .rd-play:first-of-type { margin-left: auto !important; }
html[data-wsc="compact"] .rd-line .rd-play[style] { margin-left: 0 !important; }
html[data-wsc="compact"] .rd-line .rd-txt {
  order: 4;
  flex: 1 0 100% !important;
  min-width: 0 !important;
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}
html[data-wsc="compact"] .rd-line .rd-ai { order: 5; flex-basis: 100% !important; }

/* =====================================================================
   C3. 1패널(medium/expanded) — 컨트롤/플레이어를 먼저, 목록은 55vh까지만
   ===================================================================== */
html[data-wsc="medium"] #rd-two-pane.one-pane,
html[data-wsc="expanded"] #rd-two-pane.one-pane,
html[data-wsc="medium"] #lsn-two-pane.one-pane,
html[data-wsc="expanded"] #lsn-two-pane.one-pane,
html[data-wsc="medium"] #sim-two-pane.one-pane,
html[data-wsc="expanded"] #sim-two-pane.one-pane {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
html[data-wsc="medium"] #rd-two-pane.one-pane .rd-pane-right,
html[data-wsc="expanded"] #rd-two-pane.one-pane .rd-pane-right,
html[data-wsc="medium"] #lsn-two-pane.one-pane .lsn-player-pane,
html[data-wsc="expanded"] #lsn-two-pane.one-pane .lsn-player-pane,
html[data-wsc="medium"] #sim-two-pane.one-pane .sim-pane-right,
html[data-wsc="expanded"] #sim-two-pane.one-pane .sim-pane-right {
  order: -1 !important;
  position: static !important;
}
html[data-wsc="medium"] #rd-two-pane.one-pane .rd-pane-left,
html[data-wsc="expanded"] #rd-two-pane.one-pane .rd-pane-left,
html[data-wsc="medium"] #lsn-two-pane.one-pane .lsn-transcript-pane,
html[data-wsc="expanded"] #lsn-two-pane.one-pane .lsn-transcript-pane,
html[data-wsc="medium"] #sim-two-pane.one-pane .sim-pane-left,
html[data-wsc="expanded"] #sim-two-pane.one-pane .sim-pane-left {
  max-height: 55vh !important;
  overflow: auto !important;
}
/* 실제 스크롤러는 조금 더 낮춰 이중 스크롤 방지 */
html[data-wsc="medium"] #rd-two-pane.one-pane #rd-list,
html[data-wsc="expanded"] #rd-two-pane.one-pane #rd-list,
html[data-wsc="medium"] #lsn-two-pane.one-pane .lsn-transcript-list,
html[data-wsc="expanded"] #lsn-two-pane.one-pane .lsn-transcript-list {
  max-height: 48vh !important;
}

/* =====================================================================
   C4. 컨트롤 덱 정리 — 높이 40px, 간격 6px, 라벨 수직 중앙 (읽기/듣기)
   ===================================================================== */
#panel-reading .rd-controls,
#lsn-controls { gap: 6px !important; align-items: center !important; }
#panel-reading .rd-controls > label,
#panel-reading .rd-controls .rd-lbl,
#lsn-controls > label,
#lsn-controls > span {
  display: inline-flex !important;
  align-items: center !important;
  height: 40px !important;
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
#panel-reading .rd-controls > label { gap: 4px !important; }
#panel-reading .rd-controls input[type="checkbox"],
#lsn-controls input[type="checkbox"] {
  width: 20px !important; height: 20px !important;
  margin: 0 !important;
  flex: none !important;
}
#panel-reading .rd-controls .btn-sm,
#lsn-controls .btn-sm {
  height: 40px !important;
  min-height: 40px !important;
  min-width: 0 !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#panel-reading .rd-controls .rd-sel {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 6px !important;
  font-size: .8rem !important;
}
#panel-reading .rd-controls .rd-sep { height: 24px !important; }
#lsn-controls .lsn-speed-pill {
  height: 34px !important;
  min-height: 34px !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#lsn-controls #lsn-speed-pills { align-items: center !important; }

/* =====================================================================
   C5. .btn-ghost 는 정의가 없어 UA 기본(흰 배경) + 밝은 글자로 안 보였다
   인라인 배경을 가진 시드 버튼은 건드리지 않도록 클래스 규칙만 추가
   ===================================================================== */
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* =====================================================================
   C6. 음성 선택 pill — 공간 있으면 전문 표시, compact 는 말줄임 + 40px
   ===================================================================== */
html[data-wsc="medium"] [data-voice-slot] select,
html[data-wsc="expanded"] [data-voice-slot] select {
  max-width: min(62vw, 420px) !important;
  height: 36px !important;
}
html[data-wsc="compact"] [data-voice-slot] select {
  max-width: 180px !important;
  min-height: 40px !important;
  height: 40px !important;
  text-overflow: ellipsis !important;
}

/* =====================================================================
   C7. 유튜브 채널 차단 버튼(인라인 스타일) — 작고 중립적으로, hover 시 빨강
   ===================================================================== */
#panel-youtube button[data-es-block="1"] {
  width: 28px !important;
  height: 28px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, .55) !important;
  color: rgba(255, 255, 255, .85) !important;
  opacity: .75;
  font-size: .75rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity .15s ease, background .15s ease;
}
#panel-youtube button[data-es-block="1"]:hover,
#panel-youtube button[data-es-block="1"]:focus-visible {
  opacity: 1;
  background: rgba(220, 38, 38, .95) !important;
  color: #fff !important;
}

/* =====================================================================
   C8. 헤더 압축(compact) + 저장소 칩 중립화(medium/expanded)
   ===================================================================== */
html[data-wsc="compact"] header { padding: .3rem 0 !important; }
html[data-wsc="compact"] header h1 { font-size: 1.15rem !important; }
html[data-wsc="compact"] #gbar.gamification-bar {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
}
html[data-wsc="compact"] #gbar .gbar-item {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 8px !important;
}
html[data-wsc="compact"] #gbar #g-level {
  width: 26px !important;
  height: 26px !important;
  font-size: .72rem !important;
}
/* JS 가 인라인으로 빨강을 넣는다 → !important 로 중립 색 고정 */
html[data-wsc="medium"] #storage-chip,
html[data-wsc="expanded"] #storage-chip {
  color: var(--text2) !important;
  border-color: var(--border) !important;
}

/* =====================================================================
   C9. 하단 내비(compact) — 56px, 아이콘 22px, 라벨 11px, 활성 탭 강조
   ===================================================================== */
html[data-wsc="compact"] .app-shell-bar-item {
  position: relative !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 4px 2px !important;
}
html[data-wsc="compact"] .app-shell-bar-item svg {
  width: 22px !important;
  height: 22px !important;
  margin-bottom: 3px !important;
}
html[data-wsc="compact"] .app-shell-bar-item .app-shell-label {
  font-size: 11px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
html[data-wsc="compact"] .app-shell-bar-item.active { color: var(--accent, #58A6FF) !important; }
html[data-wsc="compact"] .app-shell-bar-item.active .app-shell-label { font-weight: 700 !important; }
html[data-wsc="compact"] .app-shell-bar-item.active svg { transform: scale(1.08); }
html[data-wsc="compact"] .app-shell-bar-item.active::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 26px !important;
  height: 3px !important;
  border-radius: 0 0 3px 3px !important;
  background: var(--accent, #58A6FF) !important;
}

/* =====================================================================
   C10. 문장 조립 — 단어 칩 간격·높이 통일, 칩 영역만 스크롤(40vh)
   ===================================================================== */
html[data-wsc="compact"] #builder-words {
  gap: 6px !important;
  max-height: 40vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
html[data-wsc="compact"] #builder-words .word-card {
  min-height: 36px !important;
  padding: 4px 10px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
}

/* =====================================================================
   C11. 퀴즈 설정 <details class="vq-settings"> — 컴팩트 pill 요약 + 회전 쉐브론
   ===================================================================== */
.vq-settings {
  margin: .4rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.vq-settings > summary {
  position: relative;
  display: block;
  list-style: none;
  cursor: pointer;
  min-height: 40px;
  padding: 9px 30px 9px 12px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.vq-settings > summary::-webkit-details-marker { display: none; }
.vq-settings > summary::marker { content: ""; }
.vq-settings > summary::after {
  content: "▾";
  position: absolute;
  right: 11px;
  top: 50%;
  margin-top: -.45em; /* 세로 중앙 정렬 */
  color: var(--text2);
  font-size: .9rem;
  line-height: 1;
  transition: transform .2s ease;
}
.vq-settings[open] > summary::after { transform: rotate(180deg); }
.vq-settings[open] > summary { border-bottom: 1px solid var(--border); }
.vq-settings > :not(summary) { padding: 8px; box-sizing: border-box; }

/* =====================================================================
   C12. 그 밖에 눈에 띈 정리
   ===================================================================== */
/* 발표 시뮬레이터 슬라이드: compact 에서 과한 여백·큰 글자 완화 */
html[data-wsc="compact"] .sim-slide {
  padding: .9rem 1rem !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
}
/* compact 전역 체크박스의 margin:11px 이 라벨 정렬을 흐트리는 문제 보정 */
html[data-wsc="compact"] #lsn-controls input[type="checkbox"],
html[data-wsc="compact"] #panel-reading .rd-controls input[type="checkbox"] { margin: 0 !important; }

/* =====================================================================
   v163 A: 단어 카드·어휘 재생 커버 최적화 (DeepSeek)
   커버(344px)·폰(390px)에서 단어가 글자 단위로 쪼개지고, 배지가 세로로
   한 글자씩 쌓이고, 재생 바가 오른쪽으로 잘리던 문제를 잡는다.
   대상: 단어장 카드(.vword-*), 상단 고정 어휘 재생 바(#vplay-mini),
   그리고 재생 중 확대(스포트라이트 .vp-spot) 예문.
   ===================================================================== */

/* --- A1. 카드 첫 줄 재배치: [아이콘 44px] [단어+배지 = 남은 전폭]
       액션 버튼(🔊 ✏️ ⬜ ⋯)은 단어 아래 자기 줄로 내려 오른쪽 정렬 --- */
html[data-wsc="compact"] .vword-card .vocab-thumb {
  width: 44px !important;
  height: 44px !important;
  border-radius: 8px !important;
  font-size: 1.5rem !important;      /* 이모지 fallback 이 44px 박스를 넘지 않게 */
}
html[data-wsc="compact"] .vword-card .vocab-thumb svg {
  width: 30px !important;
  height: 30px !important;
}
/* 헤더를 2행으로: 1행 단어+배지 전폭, 2행 액션 버튼 */
html[data-wsc="compact"] .vword-header {
  flex-wrap: wrap !important;
  row-gap: 6px !important;
  align-items: flex-start !important;
}
html[data-wsc="compact"] .vword-header > div:first-child {
  flex: 1 1 100% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px 6px !important;
}
html[data-wsc="compact"] .vword-header > div:last-child {
  flex: 0 0 100% !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  position: relative !important;   /* ⋯ 더보기 메뉴 기준점 유지 */
}
html[data-wsc="compact"] #panel-vocab .vword-header .btn-sm {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  font-size: .9rem !important;
}
/* 단어는 절대 단어 안에서 쪼개지지 않게, 배지는 가로 한 줄로 흐르게 */
html[data-wsc="compact"] .vword-eng {
  font-size: 1.15rem !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  min-width: 0 !important;
}
html[data-wsc="compact"] .vword-header .badge,
html[data-wsc="compact"] .vword-header .vword-tag,
html[data-wsc="compact"] .vword-header .vword-phonetic,
html[data-wsc="compact"] .vword-header .vcard-qbadge {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  word-break: keep-all !important;
}

/* --- A2. 상단 고정 어휘 재생 바(#vplay-mini) — 2행으로 접어 잘림 제거.
       페이지를 넘치지 않고, 제목만 말줄임, 버튼은 40px 유지 --- */
html[data-wsc="compact"] #vplay-mini {
  flex-wrap: wrap !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  column-gap: 6px !important;
  row-gap: 3px !important;
  max-width: 100vw !important;
}
/* 2행: 액션 버튼 묶음은 오른쪽 정렬, 자기 줄 전체 차지 */
html[data-wsc="compact"] #vplay-mini > div:last-child {
  flex: 0 0 100% !important;
  margin-left: 0 !important;
  justify-content: flex-end !important;
}
/* 1행 정보 스팬은 줄어들 수 있게(말줄임 유지) */
html[data-wsc="compact"] #vplay-mini > span {
  min-width: 0 !important;
}
html[data-wsc="compact"] #vplay-mini > span[style*="max-width:110px"] {
  max-width: none !important;
  flex: 1 1 auto !important;
}

/* --- A3. 재생 중 스포트라이트 확대 — 커버에서 예문이 화면을 뒤덮던 문제.
       예문만 1.05rem 으로 상한, 줄간격 1.5 (잠금 화면에서도 배경 카드라 동일 적용) --- */
html[data-wsc="compact"] .vword-example.vp-spot {
  font-size: 1.05rem !important;
  line-height: 1.5 !important;
}
html[data-wsc="compact"] .vword-ko.vp-spot {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

/* v165 유튜브: 📅 오늘의 추천 + ⭐ 관심 키워드 편집기 (yt-extra.js) */
.yt-picks{margin:.2rem 0 .6rem}
.yt-picks-hd{display:flex;align-items:baseline;gap:.25rem;margin-bottom:.35rem;font-size:.95rem}
.yt-picks-date{color:var(--text2);font-size:.78rem}
.yt-picks-row{display:flex;gap:.55rem;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:.35rem;-webkit-overflow-scrolling:touch}
.yt-pick{flex:0 0 min(62vw,220px);scroll-snap-align:start;display:flex;flex-direction:column;gap:.2rem;text-align:left;
  background:var(--card2,#252a38);border:1px solid var(--border,#30363d);border-radius:12px;padding:0 0 .5rem;overflow:hidden;cursor:pointer;color:var(--text)}
.yt-pick img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}
.yt-pick-why{margin:.35rem .55rem 0;font-size:.72rem;font-weight:700;color:#f59e0b;line-height:1.3}
.yt-pick-t{margin:0 .55rem;font-size:.84rem;font-weight:600;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yt-pick-c{margin:0 .55rem;font-size:.72rem;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.yt-interest-box{background:var(--card2,#252a38);border:1px solid var(--border,#30363d);border-radius:12px;padding:.7rem .75rem;margin:.4rem 0 .6rem}
.yt-interest-box[hidden]{display:none}
.yti-hd{display:flex;flex-direction:column;gap:.15rem;margin-bottom:.5rem}
.yti-sub{font-size:.76rem;color:var(--text2)}
.yti-chips{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:.55rem}
.yti-chip{display:inline-flex;align-items:center;gap:.2rem;padding:.2rem .2rem .2rem .6rem;border-radius:999px;background:var(--card,#1e2230);border:1px solid var(--border);font-size:.82rem}
.yti-x{min-width:30px;min-height:30px;border:0;background:transparent;color:var(--text2);border-radius:50%;cursor:pointer}
.yti-empty{font-size:.8rem;color:var(--text2)}
.yti-form{display:flex;gap:.35rem;flex-wrap:wrap}
.yti-form input{flex:1 1 160px;min-height:42px;border-radius:10px;padding:0 .7rem;background:var(--surface,#161b22);color:var(--text);border:1px solid var(--border)}
.yti-add,.yti-save{min-height:42px;padding:0 .9rem;border-radius:10px;border:1px solid var(--border);background:var(--card);color:var(--text);font-weight:700;cursor:pointer}
.yti-save.is-dirty{background:var(--primary,#6c8cff);color:#fff;border-color:transparent}
.yti-save:disabled{opacity:.6;cursor:default}
.yti-sug{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.55rem;align-items:center}
.yti-sug-l{font-size:.74rem;color:var(--text2)}
.yti-sug-b{min-height:32px;padding:0 .55rem;border-radius:999px;border:1px dashed var(--border);background:transparent;color:var(--text2);font-size:.76rem;cursor:pointer}

/* ───────── v180 (2026-11-29) 모바일 점검 수정 ─────────
   글자 크기 설정을 최대로 올린 휴대폰에서 깨지던 곳. rem 은 px 상한과 함께 쓴다. */
/* 단어 하위 탭: 한 글자씩 세로로 꺾이던 것 */
.vocab-subtabs .vocab-subtab { font-size: min(.9rem, 16px) !important; white-space: nowrap; word-break: keep-all; min-width: 0; padding-left: 4px !important; padding-right: 4px !important; }
/* 플래시카드: 높이를 고정해 글자가 카드 밖으로 넘쳐 위아래와 겹치던 것 → 내용만큼 늘어나게(앞·뒷면을 같은 칸에 겹쳐 둔다) */
.flashcard { height: auto !important; min-height: 190px; }
.flashcard-inner { display: grid; height: auto !important; min-height: 190px; }
.flashcard-front, .flashcard-back { position: relative !important; grid-area: 1 / 1; height: auto !important; min-height: 190px; box-sizing: border-box; overflow-wrap: anywhere; }
#vq-fc .flashcard-front > div:first-child, #vq-fc .flashcard-back > div:first-child { font-size: min(1.5rem, 30px) !important; }
/* 입력 + 확인 줄: 확인 버튼이 세로로 꺾이던 것 */
#vq-input { min-width: 0; }
#vq-input + button, #vq-input ~ .btn-primary { white-space: nowrap; flex: none; }
/* 매칭 게임: 단어가 중간에서 끊기던 것(hierarc/hy) */
.vq-match-grid { grid-template-columns: repeat(auto-fill, minmax(min(140px, 44%), 1fr)); }
.vq-match-card { font-size: min(.9rem, 16px) !important; word-break: keep-all; overflow-wrap: break-word; hyphens: auto; }
/* 읽기 화면의 떠 있는 잠금 버튼이 본문을 가리던 것 → 휴대폰에서는 작은 동그라미로 */
@media (max-width: 899px) {
  #ek-lock-fab { width: 44px; height: 44px; padding: 0 !important; justify-content: center; border-radius: 50% !important; opacity: .88; }
  #ek-lock-fab .ek-lock-t { display: none; }
}
/* 음성 오류 알림: 큰 글자 설정에서 화면을 덮던 빨간 상자 → 하단 바 위의 작은 알림 */
#cloud-tts-error-toast { font-size: min(.85rem, 14px) !important; padding: 8px 14px !important; width: max-content; max-width: min(90vw, 420px) !important;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; background: #4a2327 !important; border: 1px solid #b4545c; font-weight: 600 !important; white-space: normal !important; word-break: keep-all; }
/* 폴드 펼침·태블릿(600px 이상): 객관식 보기를 두 줄 두 칸으로 — 넓은 화면에서 한 줄짜리 긴 띠가 되지 않게 */
@media (min-width: 600px) {
  #vquiz-q .vquiz-option { display: inline-block; width: calc(50% - .45rem); margin: .25rem .2rem; vertical-align: top; min-height: 56px; }
}
/* 퀴즈 머리글·점수 줄은 큰 글자 설정에서도 한 줄에 */
.ek-score-row, .vq-settings > summary { font-size: min(.9rem, 16px) !important; }
/* ── Gemini Neon 화면 검토 반영(직접 확인한 것만) ── */
/* 조각 맞추기: 풀기 전에는 아래 큰 [다음 ▶](건너뛰기)이 주 버튼처럼 보여 헷갈렸다 → 이 모드에서는 숨기고 카드 안 버튼만 쓴다 */
#panel-vocab:has(.vqt-card) .nav-btns { display: none !important; }
#vquiz-q:has(.vqt-res.ok) #vq-next-wrap > div { display: none; }   /* 정답이면 '해설을 다 읽은 뒤…' 안내는 필요 없다 */
.vqt-check:disabled { opacity: .6; }
/* 한국어 줄바꿈: 어절 중간에서 끊기지 않게(긴 영어 낱말은 넘치기 전에만 끊는다) */
.panel { word-break: keep-all; overflow-wrap: break-word; }
/* 영상 분류 칩: 누르기 쉬운 높이 + 오른쪽 끝이 잘린 것처럼 보이지 않게 흐리게 */
#yt-cats.ek-catrow .yt-cat, .yt-cat { min-height: 44px; display: inline-flex; align-items: center; }
#yt-cats { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 28px; }

#vquiz-score, #vquiz-progress { font-size: min(.88rem, 15px) !important; }
#panel-vocab #vquiz-score.score-display, #panel-vocab #vquiz-progress { font-size: min(.88rem, 15px) !important; }

/* v181 영상 플레이어 — 좁은 화면·큰 글자 */
/* 자막·학습 도구로 내려가도 영상이 화면 위에 붙어 있게(세로 화면만, 전체화면 제외) */
@media (orientation:portrait){
  /* body 가 overflow-x:hidden 이라 스스로 스크롤 상자가 되어 sticky 가 듣지 않는다 → 플레이어가 열려 있을 때만 clip 으로 */
  body:has(#yt-player-area:not([style*="none"])){overflow-x:clip}
  #yt-player-area .yt-player-wrap:not(.custom-fullscreen){position:sticky !important;top:0;z-index:20}
}
/* 머리줄: 버튼 4개가 네 줄로 쌓이던 것을 옆으로 미는 한 줄로, 제목은 두 줄까지 */
#yt-player-area .mode-header{flex-wrap:wrap;gap:6px}
#yt-player-area .mode-header>div{flex-wrap:nowrap !important;overflow-x:auto;max-width:100%;scrollbar-width:none}
#yt-player-area .mode-header>div>button{flex:0 0 auto;white-space:nowrap}
#yt-player-area .yt-video-info .yt-vtitle{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* 이전·재생·다음·잠금: 글자가 세로로 한 자씩 꺾이지 않게, 자리가 모자라면 다음 줄로 */
#yt-player-area .ek-ytc-main{display:flex;flex-wrap:wrap;align-self:stretch}
#yt-player-area .ek-ytc-main>button{flex:1 1 auto;white-space:nowrap;padding-inline:8px !important;font-size:min(.9rem,22px) !important}
/* 목록 카드: 길이·시청함 표시, 다 본 영상은 흐리게 */
.yt-vcard .yt-vdur{position:absolute;top:6px;left:6px;padding:2px 7px;border-radius:6px;background:rgba(0,0,0,.72);color:#fff;font-size:.75rem;font-weight:600;line-height:1.4;pointer-events:none}
.yt-vcard.is-done img{opacity:.45}
/* 👍·👎: 자리는 그대로 두고 누르는 면적만 44px 로 */
#yt-results .yt-vcard span[onclick]{padding:15px;margin:-15px -9px}
/* 플레이어: 큰 글자 설정에서 버튼·제목이 화면을 다 차지하던 것 — 글자 상한 */
#yt-player-area .mode-header button, #yt-player-area .ek-ytc-main > button, #yt-player-area .ek-ytc button { font-size: min(.9rem, 17px) !important; }
#yt-player-area .yt-video-info .yt-vtitle { font-size: min(1rem, 18px) !important; }
