
:root{
  --bg:#edf3f8;
  --sidebar:#f7fbff;
  --card:#ffffff;
  --line:#d6e2ee;
  --text:#1c2b39;
  --muted:#647588;
  --blue:#2f80ed;
  --blue-soft:#eaf3ff;
  --shadow:0 14px 32px rgba(30, 60, 90, 0.08);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans KR",sans-serif;
  color:var(--text);
  background:linear-gradient(180deg,#f3f7fb 0%, #eaf0f6 100%);
}
.shell{
  display:grid;
  grid-template-columns:224px 1fr;
  min-height:100vh;
}
.sidebar{
  background:var(--sidebar);
  border-right:1px solid var(--line);
  padding:24px 18px;
  overflow:auto;
}
.kicker{
  color:var(--blue);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.brand h1{
  margin:8px 0 10px;
  font-size:26px;
  line-height:1.15;
}
.brand p{
  margin:0 0 18px;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}

.brand{margin-bottom:12px;}
.brand h1{margin:8px 0 0;font-size:22px;line-height:1.1;word-break:keep-all;}
.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 14px;}
.quick-action-btn{border:1px solid var(--line);background:#fff;border-radius:14px;padding:11px 10px;font-size:14px;font-weight:800;cursor:pointer;color:var(--text);}
.quick-action-btn:hover{background:var(--blue-soft);border-color:#9fc4ff;color:#1f5fbf;}
.quick-action-btn.active{background:var(--blue-soft);border-color:#9fc4ff;color:#1f5fbf;}
.search input{padding:11px 14px;border-radius:14px;}
.progress-card{margin-top:12px;}
.lesson-item{position:relative;padding:12px 44px 12px 14px;}
.lesson-star{position:absolute;right:12px;top:50%;transform:translateY(-50%);border:none;background:transparent;font-size:18px;line-height:1;cursor:pointer;color:#b8c4d1;padding:2px 4px;border-radius:8px;}
.lesson-star.is-favorite{color:#f6b800;}
.lesson-star:hover{background:#eef4fa;}
.search input{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  font-size:14px;
}
.progress-card{
  margin-top:14px;
  padding:14px 16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
}
.progress-title{
  font-size:13px;
  color:var(--muted);
  margin-bottom:4px;
}
.progress-text{
  font-weight:800;
  font-size:18px;
}
.lesson-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:16px;
}
.lesson-item{
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:12px 14px;
  cursor:pointer;
  transition:all .15s ease;
}
.lesson-item:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow);
}
.lesson-item.active{
  border-color:#9fc4ff;
  background:var(--blue-soft);
}
.lesson-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}
.lesson-code{
  color:var(--blue);
  font-size:12px;
  font-weight:800;
  margin-bottom:4px;
}
.lesson-name{
  font-weight:700;
  line-height:1.35;
}
.badge{
  font-size:12px;
  font-weight:700;
  border-radius:999px;
  padding:6px 10px;
  background:#eef2f7;
  color:#6a7b8d;
}
.badge.done{
  background:#e3f6e8;
  color:#157347;
}
.main{
  padding:16px;
}
.header{
  display:flex;
  margin-bottom:8px;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:16px;
}
.eyebrow{
  color:var(--blue);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}
.header h2{
  margin:4px 0 0;
  font-size:30px;
}
.header-actions{
  display:flex;
  gap:10px;
}
.ghost-btn,.primary-btn{
  border:none;
  border-radius:12px;
  padding:11px 16px;
  font-size:14px;
  cursor:pointer;
}
.ghost-btn{
  background:#fff;
  border:1px solid var(--line);
}
.primary-btn{
  background:var(--blue);
  color:#fff;
}
.top-info{
  display:flex;
  margin-bottom:10px;
  padding:10px 12px;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 18px;
  box-shadow:var(--shadow);
  margin-bottom:18px;
}
.done-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
}
.small-note{
  color:var(--muted);
  font-size:13px;
}
.content-grid{
  display:grid;
  gap:12px;
  grid-template-columns:1.325fr 0.675fr;
  gap:18px;
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  box-shadow:var(--shadow);
}
.card-head{
  display:flex;
  margin-bottom:8px;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
  gap:12px;
}
.card-head h3{
  margin:0;
  font-size:18px;
}
.pill{
  background:#eaf3ff;
  color:#2b6ed2;
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  font-weight:800;
}
.pill.subtle{
  background:#f2f5f8;
  color:#6a7a8c;
}
.page-wrap{
  background:#f6f9fc;
  overflow:auto;
  min-height:720px;
  border:1px solid #edf2f7;
  border-radius:18px;
  padding:14px;
  text-align:center;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}
.page-wrap img{
  max-width:none;
  width:130%;
  transform-origin:top center;
  display:block;
  margin:0 auto;
  transition:transform .15s ease;
  border-radius:12px;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}
.audio-box{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  margin-bottom:8px;
  background:#fbfdff;
}
.audio-label{
  font-weight:700;
  margin-bottom:8px;
}
audio{
  width:100%;
}
.guide{
  background:#f6fbff;
  padding:10px 12px;
  border:1px solid #d8eaff;
  border-radius:16px;
  padding:14px 16px;
  margin-top:6px;
  color:#35506f;
}
.guide strong{
  display:block;
  margin-bottom:8px;
}
.guide ol{
  margin:0;
  padding-left:18px;
  line-height:1.65;
}
.memo-section{
  margin-top:16px;
}
.memo-section label{
  display:block;
  font-weight:700;
  margin-bottom:8px;
}
textarea{
  width:100%;
  min-height:110px;
  resize:vertical;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  font:inherit;
}
.memo-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.save-status{
  font-size:13px;
  color:var(--muted);
}
@media (max-width: 1024px){
  .shell{grid-template-columns:1fr}
  .sidebar{border-right:none;border-bottom:1px solid var(--line)}
  .content-grid{grid-template-columns:1fr}
  .main{padding:18px}
}


.page-tools{
  display:flex;
  align-items:center;
  gap:8px;
}
.tool-btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:10px;
  padding:7px 10px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  min-width:46px;
}
.tool-btn:hover{
  background:#f5f8fc;
}


.mode-tabs{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
  margin-top:14px;
}
.mode-tab{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:10px 8px;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}
.mode-tab.active{
  background:var(--blue-soft);
  border-color:#9fc4ff;
  color:#1f5fbf;
}
.view-section{display:none;}
.view-section.active{display:block;}

.quiz-shell,.wrong-shell{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  box-shadow:var(--shadow);
}
.quiz-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.quiz-progress,.quiz-score,.wrong-summary{
  font-size:14px;
  font-weight:700;
  color:var(--text);
}
.quiz-card{
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  min-height:260px;
  background:#fbfdff;
}
.quiz-empty{
  color:var(--muted);
  line-height:1.6;
}
.quiz-type{
  font-size:12px;
  font-weight:800;
  color:var(--blue);
  margin-bottom:8px;
}
.quiz-question{
  font-size:22px;
  font-weight:800;
  margin-bottom:12px;
}
.quiz-sub{
  color:var(--muted);
  margin-bottom:12px;
}
.choice-list{
  display:grid;
  gap:10px;
}
.choice-btn{
  text-align:left;
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:12px 14px;
  cursor:pointer;
  font-size:15px;
}
.choice-btn:hover{background:#f7fbff;}
.choice-btn.correct{
  background:#e7f8ec;
  border-color:#91d8a6;
}
.choice-btn.wrong{
  background:#fdecec;
  border-color:#f0b4b4;
}
.quiz-feedback{
  margin-top:14px;
  font-weight:700;
}
.quiz-progress-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap;}
.quiz-progressbar{height:10px;border-radius:999px;background:#eaf0f7;overflow:hidden;margin-bottom:16px;}
.quiz-progressbar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2f80ed,#69a7ff);transition:width .25s ease;}
.choice-btn{display:flex;align-items:center;justify-content:space-between;gap:14px;transition:transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;}
.choice-btn:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(47,128,237,.08);}
.choice-btn:disabled{cursor:default;opacity:1;}
.choice-btn.is-picked{border-color:#8db5ee;background:#f6fbff;}
.choice-btn.is-judged:not(.correct):not(.wrong){opacity:.75;}
.choice-btn-label{flex:1 1 auto;}
.choice-btn-mark{width:28px;min-width:28px;height:28px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:800;color:transparent;background:#f2f5f9;border:1px solid #dce5ef;}
.choice-btn.correct .choice-btn-mark{color:#1f7a3e;background:#e7f8ec;border-color:#91d8a6;}
.choice-btn.wrong .choice-btn-mark{color:#c23d3d;background:#fdecec;border-color:#f0b4b4;}
.choice-btn.correct .choice-btn-mark::before{content:"✓";}
.choice-btn.wrong .choice-btn-mark::before{content:"✕";}
.feedback-badge{display:inline-flex;align-items:center;justify-content:center;min-width:52px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:800;margin-right:8px;}
.feedback-badge.is-correct{background:#e7f8ec;color:#1f7a3e;border:1px solid #91d8a6;}
.feedback-badge.is-wrong{background:#fdecec;color:#b64242;border:1px solid #f0b4b4;}
.quiz-result-hero{padding:8px 0 2px;}
.quiz-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px;}
.quiz-result-card{border:1px solid var(--line);background:#fff;border-radius:14px;padding:14px;}
.result-label{font-size:13px;color:var(--muted);margin-bottom:6px;}
.result-value{font-size:28px;font-weight:800;line-height:1.1;color:var(--text);}
.quiz-weak-list{display:grid;gap:10px;}
.quiz-weak-item{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1px solid #e3ebf5;border-radius:12px;background:#fff;}
.quiz-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
}
.wrong-list{
  display:grid;
  gap:10px;
  margin-top:12px;
}
.wrong-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  background:#fbfdff;
}
.wrong-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.wrong-title{
  font-weight:800;
}
.wrong-meta{
  color:var(--muted);
  font-size:13px;
}
.badge-wrong{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:#fff2f2;
  color:#b44c4c;
  font-size:12px;
  font-weight:800;
}

.quiz-card audio{ width:100%; margin-bottom:12px; }
.quiz-question{ line-height:1.4; }

.wrong-summary{
  line-height:1.5;
}

.mode-tabs-5{
  grid-template-columns: 1fr 1fr;
}
#examCard .choice-btn, #quizCard .choice-btn{
  text-align:left;
}
.exam-top-note{
  color: var(--muted);
}

.shadow-box{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  margin-bottom:10px;
  background:#fbfdff;
}
.shadow-actions{
  display:flex;
  gap:8px;
  margin-bottom:8px;
}
.record-status{
  font-size:13px;
  color:var(--muted);
  line-height:1.5;
  margin-bottom:8px;
}
#myRecording{
  width:100%;
}

.audio-controls{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:6px 0 10px;
  font-size:13px;
}
.audio-controls select{
  padding:3px 6px;
}

.auto-settings{
  margin-top:10px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:10px;
  font-size:13px;
}
.auto-settings label{
  display:flex;
  justify-content:space-between;
  margin-top:6px;
}
.auto-settings input, .auto-settings select{
  width:80px;
}

.auto-inline{
  display:flex;
  align-items:center;
  gap:10px;
}
.auto-inline-controls{
  display:flex;
  gap:10px;
  font-size:13px;
  align-items:center;
}
.auto-inline input{
  width:50px;
}

.auto-inline{
  flex-wrap: wrap;
}
.auto-inline-controls{
  flex-wrap: wrap;
}
#stopAutoBtn[disabled]{
  opacity: .55;
  cursor: default;
}


.explanation-box{margin-top:14px;padding:12px 14px;border-radius:14px;background:#f6f8fb;border:1px solid #dfe6f1;color:#243041;line-height:1.55;}
.explanation-title{font-weight:700;margin-bottom:6px;}
.quiz-hint{margin-top:8px;font-size:13px;color:#5b6472;}
.auto-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:#eef5ff;color:#2757a5;font-size:12px;font-weight:700;}

.mode-tabs-6{
  grid-template-columns: 1fr 1fr;
}

.explanation-box{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid #d8eaff;
  background:#f6fbff;
  border-radius:14px;
  line-height:1.6;
}
.explanation-title{
  font-weight:800;
  color:var(--blue);
  margin-bottom:6px;
}
.auto-badge{
  display:inline-flex;
  margin-left:8px;
  padding:4px 8px;
  border-radius:999px;
  background:#eaf3ff;
  color:#1f5fbf;
  font-size:11px;
}
.quiz-hint{
  margin-top:8px;
  font-size:13px;
  color:var(--muted);
}
.vocab-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
  align-items:center;
}
.vocab-toolbar input,
.vocab-toolbar select{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  font:inherit;
  background:#fff;
}
.vocab-list{
  display:grid;
  gap:12px;
  margin-top:12px;
}
.vocab-item{
  border:1px solid var(--line);
  border-radius:16px;
  background:#fbfdff;
  padding:14px;
}
.vocab-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  margin-bottom:8px;
}
.vocab-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.vocab-word{
  font-size:20px;
  font-weight:800;
}
.vocab-reading{
  font-size:14px;
  color:var(--muted);
  font-weight:700;
  margin-left:6px;
}
.vocab-meaning{
  font-size:16px;
  font-weight:700;
  margin-bottom:8px;
}
.vocab-example{
  margin-bottom:4px;
}
.vocab-actions-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.vocab-mini-btn{
  padding:8px 12px;
  font-size:13px;
}
.vocab-quiz-wrap{
  margin-top:16px;
}

.related-vocab-box{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#fbfdff;
}
.related-head{margin-bottom:10px;}
.related-vocab-list{
  display:grid;
  gap:10px;
}
.related-vocab-chip{
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:12px 14px;
  cursor:pointer;
}
.related-vocab-chip:hover{background:#f7fbff;}
.related-vocab-main{display:block;font-weight:800;font-size:16px;margin-bottom:4px;}
.related-vocab-sub{display:block;color:var(--muted);font-size:13px;}
.related-vocab-state{display:inline-block;margin-top:8px;font-size:12px;font-weight:700;color:#42638a;background:#eef5ff;border-radius:999px;padding:5px 9px;}
.vocab-subtools{margin-top:-4px;}
.vocab-tool-title{font-weight:800;color:#34516f;}
.vocab-auto-status{
  margin:8px 0 10px;
  color:var(--muted);
  line-height:1.6;
}
.masked-text{
  display:inline-block;
  padding:8px 10px;
  border-radius:10px;
  background:#eef3f8;
  color:#607489;
  font-size:13px;
  font-weight:700;
}
.is-masked{cursor:pointer;}
.vocab-item.is-focus{
  border-color:#9fc4ff;
  box-shadow:0 0 0 3px rgba(47,128,237,.12);
}


/* v23 compact vocab layout */
#vocabView .quiz-shell{
  padding: 12px 14px;
}
#vocabView .header{
  margin-bottom: 10px;
}
#vocabView .header h2{
  margin: 0;
  line-height: 1.05;
}
#vocabView .vocab-toolbar{
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
  line-height: 1.1;
}
#vocabView .vocab-toolbar label{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}
#vocabView .vocab-toolbar input,
#vocabView .vocab-toolbar select{
  padding: 8px 10px;
  line-height: 1;
}
#vocabView .vocab-subtools{
  margin-top: 0;
}
#vocabView .vocab-tool-title{
  line-height: 1;
}
#vocabView .vocab-auto-status,
#vocabView #vocabSummary{
  margin: 4px 0 6px;
  line-height: 1.2;
}

#vocabView .vocab-auto-preview{
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--card);
  min-height: 112px;
  height: 112px;
  padding: 4px 0 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
#vocabView .vocab-auto-status{
  min-height: 72px;
  height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
#vocabView #vocabSummary{
  font-size: 13px;
}
#vocabView .vocab-list{
  margin-top: 6px;
  gap: 10px;
  max-height: calc(100vh - 330px);
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}
#vocabView .vocab-list::-webkit-scrollbar{
  width: 10px;
}
#vocabView .vocab-list::-webkit-scrollbar-thumb{
  background: #c6d6e6;
  border-radius: 999px;
  border: 2px solid #f6f9fc;
}
#vocabView .vocab-list::-webkit-scrollbar-track{
  background: #eef3f8;
  border-radius: 999px;
}
#vocabView .vocab-item{
  padding: 12px;
}
#vocabView .vocab-head{
  margin-bottom: 6px;
}
#vocabView .vocab-word{
  line-height: 1.05;
  margin-bottom: 2px;
}
#vocabView .vocab-meaning{
  margin-bottom: 4px;
  line-height: 1.15;
}
#vocabView .vocab-example,
#vocabView .vocab-example + div{
  line-height: 1.18;
  margin-bottom: 2px;
}
#vocabView .vocab-actions-row{
  margin-top: 8px;
}
#vocabView .vocab-mini-btn,
#vocabView .badge{
  padding-top: 7px;
  padding-bottom: 7px;
}
#vocabView .vocab-quiz-wrap{
  margin-top: 12px;
}


#vocabView .vocab-auto-preview{
  min-height: 248px;
  height: auto;
  gap: 6px;
}
#vocabView .vocab-auto-status{
  min-height: 0;
  height: auto;
  margin-bottom: 0;
}
.vocab-auto-card{
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg,#fafdff 0%, #f4f8fd 100%);
  padding: 14px 16px;
  min-height: 126px;
  box-shadow: var(--shadow);
  transition: opacity .18s ease, transform .18s ease;
}
.vocab-auto-card.is-idle{
  opacity: .92;
}
.vocab-auto-card.is-running{
  opacity: 1;
}
.vocab-auto-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.vocab-auto-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#eaf3ff;
  color:#2b6ed2;
  font-size:12px;
  font-weight:800;
}
.vocab-auto-word{
  font-size:26px;
  font-weight:800;
  line-height:1.15;
  margin-bottom:4px;
}
.vocab-auto-meaning{
  font-size:18px;
  font-weight:800;
  margin-bottom:8px;
}
.vocab-auto-example{
  font-size:18px;
  line-height:1.35;
  margin-bottom:4px;
}


/* v29 vocab auto card polish */
.section-mini-title{
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
  color:#5d7998;
  margin-bottom:6px;
}
#vocabView .vocab-auto-preview{
  margin-top:14px;
  margin-bottom:10px;
  padding:18px 18px 16px;
  border:1px solid #d9e6f4;
  border-radius:18px;
  background:linear-gradient(180deg,#fbfdff 0%, #f4f8fd 100%);
  box-shadow:0 8px 24px rgba(28,56,94,.06);
}
.vocab-auto-preview-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.vocab-auto-speed-group{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.vocab-speed-btn{
  min-width:72px;
  padding:8px 12px;
  font-size:13px;
}
.vocab-speed-btn.is-active{
  background:#2f7cf6;
  color:#fff;
  border-color:#2f7cf6;
}
#vocabView .vocab-auto-status{
  font-size:15px;
  line-height:1.4;
  color:#647c97;
}
.vocab-summary-row{
  margin:8px 0 10px;
}
.vocab-auto-card{
  padding:22px 22px 18px;
  min-height:170px;
  transform:translateY(0);
}
.vocab-auto-card.is-running{
  animation:vocabCardFade .28s ease;
}
@keyframes vocabCardFade{
  0%{opacity:.35; transform:translateY(4px);}
  100%{opacity:1; transform:translateY(0);}
}
.vocab-auto-card-head{
  margin-bottom:12px;
}
.vocab-auto-word{
  font-size:34px;
  margin-bottom:8px;
}
.vocab-auto-word .vocab-reading{
  font-size:18px;
  margin-left:8px;
}
.vocab-auto-meaning{
  font-size:24px;
  margin-bottom:12px;
}
.vocab-auto-example{
  font-size:21px;
  line-height:1.45;
  margin-bottom:8px;
}
#vocabView .vocab-list{
  margin-top:0;
}
@media (max-width: 980px){
  .vocab-auto-preview-head{
    flex-direction:column;
  }
  .vocab-auto-speed-group{
    width:100%;
  }
}


.vocab-auto-controls-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.vocab-audio-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--text);
  font-size:13px;
  font-weight:700;
}
.vocab-audio-toggle input{
  margin:0;
}
.vocab-auto-voice-hint{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
}
@media (max-width: 768px){
  .vocab-auto-preview-head{
    align-items:flex-start;
  }
  .vocab-auto-controls-wrap{
    justify-content:flex-start;
  }
}

.vocab-auto-detail-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px dashed #d9e6f4;
}
.vocab-auto-detail-controls label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  font-size:13px;
  color:var(--text);
  font-weight:700;
}
.vocab-auto-detail-controls select{
  border:1px solid var(--line);
  border-radius:8px;
  padding:4px 6px;
  background:#f8fbff;
  color:var(--text);
}
@media (max-width: 768px){
  .vocab-auto-detail-controls{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* v32 immersive auto-study polish */
#vocabView .vocab-subtools{
  padding:10px 12px;
  border:1px solid #dbe7f3;
  border-radius:16px;
  background:#f8fbff;
}
#vocabView .vocab-auto-preview{
  position:relative;
  padding:16px 18px 18px;
}
#vocabView .vocab-auto-preview::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  background:linear-gradient(135deg, rgba(47,128,237,.05), rgba(255,255,255,0));
  pointer-events:none;
}
.vocab-auto-preview-head,
.vocab-auto-card{
  position:relative;
  z-index:1;
}
.vocab-auto-controls-wrap{
  max-width:100%;
}
.vocab-auto-detail-controls{
  gap:8px 10px;
}
.vocab-auto-card{
  border:1px solid #d9e7f5;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 16px 36px rgba(31,67,107,.08);
}
.vocab-auto-card.is-running{
  animation:vocabCardFadeZoom .34s ease;
}
@keyframes vocabCardFadeZoom{
  0%{opacity:.2; transform:translateY(8px) scale(.985);} 
  100%{opacity:1; transform:translateY(0) scale(1);} 
}
.vocab-auto-stage-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}
.vocab-auto-stage{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  letter-spacing:.01em;
  color:#3e5874;
  background:#edf4fb;
}
.vocab-auto-stage.is-word{background:#e7f1ff; color:#2463bf;}
.vocab-auto-stage.is-example{background:#edf8ea; color:#2c7a48;}
.vocab-auto-stage.is-shadow{background:#fff6df; color:#9a6a00;}
.vocab-auto-stage.is-idle{background:#eef2f6; color:#708197;}
.vocab-auto-countdown{
  min-height:24px;
  font-size:13px;
  color:#6e8095;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}
.vocab-auto-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#ced9e6;
  opacity:.45;
  transform:scale(.9);
}
.vocab-auto-dot.is-on{
  background:#2f80ed;
  opacity:1;
  transform:scale(1.15);
  box-shadow:0 0 0 4px rgba(47,128,237,.12);
}
.vocab-auto-word,
.vocab-auto-example,
.vocab-auto-exampleKr,
.vocab-auto-meaning{
  transition:color .18s ease, transform .18s ease, opacity .18s ease;
}
.vocab-auto-word.is-speaking,
.vocab-auto-example.is-speaking{
  color:#1f63bf;
  transform:translateX(2px);
}
.vocab-auto-example.is-speaking{
  color:#1e7a47;
}
.vocab-auto-card.is-shadowing .vocab-auto-word,
.vocab-auto-card.is-shadowing .vocab-auto-example{
  opacity:.88;
}
.vocab-auto-card.is-shadowing .vocab-auto-exampleKr{
  color:#8a6b14;
}
.vocab-auto-voice-hint{
  margin-top:14px;
  padding-top:10px;
  border-top:1px dashed #d9e7f5;
}
@media (max-width: 980px){
  .vocab-auto-stage-row{align-items:flex-start; flex-direction:column;}
  .vocab-auto-countdown{justify-content:flex-start;}
}


/* v33 polish */
.vocab-auto-preview-head{
  gap: 12px 18px;
}
.vocab-auto-card{
  padding: 20px 26px;
}
.vocab-auto-card-head{
  margin-bottom: 10px;
}
.vocab-auto-stage-row{
  margin-bottom: 8px;
}
.vocab-auto-word{
  font-size: 32px;
  line-height: 1.18;
  margin-bottom: 4px;
}
.vocab-auto-word .vocab-reading{
  font-size: 17px;
  margin-left: 6px;
}
.vocab-auto-meaning{
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 10px;
  color:#245fbb;
}
.vocab-auto-example{
  font-size: 19px;
  line-height: 1.42;
  margin-bottom: 6px;
}
.vocab-auto-exampleKr{
  font-size: 14px;
  line-height: 1.4;
}
.vocab-auto-voice-hint{
  margin-top: 10px;
  padding-top: 8px;
  font-size: 13px;
}
.vocab-auto-stage{
  position: relative;
  gap: 6px;
}
.vocab-auto-stage.is-word,
.vocab-auto-stage.is-example,
.vocab-auto-stage.is-shadow{
  animation: vocabStagePulse 1.15s ease-in-out infinite;
}
@keyframes vocabStagePulse{
  0%,100%{ box-shadow: 0 0 0 0 rgba(47,128,237,0.00); transform: translateY(0); }
  50%{ box-shadow: 0 0 0 6px rgba(47,128,237,0.10); transform: translateY(-1px); }
}
.vocab-auto-stage.is-example{
  animation-name: vocabStagePulseExample;
}
@keyframes vocabStagePulseExample{
  0%,100%{ box-shadow: 0 0 0 0 rgba(44,122,72,0.00); transform: translateY(0); }
  50%{ box-shadow: 0 0 0 6px rgba(44,122,72,0.10); transform: translateY(-1px); }
}
.vocab-auto-stage.is-shadow{
  animation-name: vocabStagePulseShadow;
}
@keyframes vocabStagePulseShadow{
  0%,100%{ box-shadow: 0 0 0 0 rgba(154,106,0,0.00); transform: translateY(0); }
  50%{ box-shadow: 0 0 0 6px rgba(154,106,0,0.12); transform: translateY(-1px); }
}
.vocab-auto-countdown::before{
  content: '따라읽기';
  font-size: 12px;
  color:#7c8ea2;
  margin-right: 2px;
}
.vocab-auto-countdown:empty::before{
  content:'';
}
.vocab-auto-dot{
  width: 9px;
  height: 9px;
  transition: transform .18s ease, opacity .18s ease, background-color .18s ease;
}
.vocab-auto-dot.is-on{
  transform: scale(1.2);
}
@media (max-width: 980px){
  .vocab-auto-card{ padding:18px 18px; }
  .vocab-auto-word{ font-size:28px; }
  .vocab-auto-meaning{ font-size:19px; }
  .vocab-auto-example{ font-size:17px; }
}

/* v34 top controls merged into 2-line bar */
#vocabView .vocab-subtools.vocab-subtools-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:stretch;
  padding:12px 14px;
}
#vocabView .vocab-subtools-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
#vocabView .vocab-subtools-row-top{
  line-height:1;
}
#vocabView .vocab-subtools-row-bottom{
  justify-content:space-between;
  align-items:flex-start;
  gap:14px 18px;
  padding-top:10px;
  border-top:1px dashed #d9e6f4;
}
#vocabView .vocab-subtools-status-box{
  min-width:280px;
  max-width:460px;
  flex:1 1 280px;
}
#vocabView .vocab-subtools-control-box{
  flex:2 1 620px;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-end;
}
#vocabView .vocab-subtools-status-box .section-mini-title{
  margin-bottom:4px;
}
#vocabView .vocab-subtools-status-box .vocab-auto-status{
  margin:0;
  min-height:0;
  height:auto;
  font-size:14px;
  line-height:1.35;
}
#vocabView .vocab-subtools-control-box .vocab-auto-controls-wrap,
#vocabView .vocab-subtools-control-box .vocab-auto-detail-controls{
  margin:0;
  padding:0;
  border-top:none;
  justify-content:flex-end;
}
#vocabView .vocab-subtools-control-box .vocab-auto-detail-controls label{
  padding:6px 10px;
}
#vocabView .vocab-subtools-control-box .vocab-auto-detail-controls select{
  padding:4px 6px;
}
#vocabView .vocab-auto-preview{
  margin-top:10px;
  padding-top:12px;
}
#vocabView .vocab-auto-preview-head{
  display:none;
}
@media (max-width: 1180px){
  #vocabView .vocab-subtools-row-bottom{
    flex-direction:column;
    align-items:stretch;
  }
  #vocabView .vocab-subtools-control-box{
    align-items:flex-start;
  }
  #vocabView .vocab-subtools-control-box .vocab-auto-controls-wrap,
  #vocabView .vocab-subtools-control-box .vocab-auto-detail-controls{
    justify-content:flex-start;
  }
}


/* v35 split layout: left controls + right study card + 2-column vocab list */
#vocabView .quiz-shell{
  padding: 12px 14px 14px;
}
#vocabView .vocab-top-split{
  display:grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(480px, 1.3fr);
  gap:14px;
  align-items:stretch;
  margin-top:8px;
}
#vocabView .vocab-top-left,
#vocabView .vocab-top-right{
  min-width:0;
}
#vocabView .vocab-side-tools{
  height:100%;
  margin-bottom:0;
  padding:14px 16px;
  border:1px solid #d9e6f4;
  border-radius:18px;
  background:linear-gradient(180deg,#fbfdff 0%, #f4f8fd 100%);
  box-shadow:0 8px 24px rgba(28,56,94,.06);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
#vocabView .vocab-subtools-row-top{
  align-items:center;
  gap:12px;
}
#vocabView .vocab-subtools-row-actions{
  display:flex;
  gap:10px;
  margin:8px 0 10px;
  flex-wrap:wrap;
}
#vocabView .vocab-subtools-row-bottom{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:auto;
  padding-top:10px;
  border-top:1px dashed #d7e2ee;
}
#vocabView .vocab-subtools-status-box{
  min-height:64px;
}
#vocabView .vocab-auto-status{
  margin:4px 0 0;
  min-height:0;
  height:auto;
  line-height:1.35;
  font-size:14px;
}
#vocabView .vocab-subtools-control-box{
  display:flex;
  flex-direction:column;
  gap:10px;
}
#vocabView .vocab-auto-controls-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
#vocabView .vocab-auto-detail-controls{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 10px;
}
#vocabView .vocab-auto-detail-controls label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  font-size:13px;
  font-weight:700;
}
#vocabView .vocab-auto-detail-controls select{
  margin-left:auto;
  max-width:92px;
  padding:7px 8px;
}
#vocabView .vocab-auto-preview{
  position:relative;
  top:auto;
  z-index:auto;
  min-height:100%;
  height:100%;
  margin-top:0;
  margin-bottom:0;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
}
#vocabView .vocab-auto-card{
  min-height:100%;
  height:100%;
  padding:18px 20px 16px;
}
#vocabView .vocab-auto-card-head{
  margin-bottom:10px;
}
#vocabView .vocab-auto-stage-row{
  margin-bottom:10px;
}
#vocabView .vocab-auto-word{
  font-size:30px;
  margin-bottom:6px;
}
#vocabView .vocab-auto-word .vocab-reading{
  font-size:17px;
}
#vocabView .vocab-auto-meaning{
  font-size:21px;
  margin-bottom:10px;
}
#vocabView .vocab-auto-example{
  font-size:19px;
  line-height:1.4;
  margin-bottom:6px;
}
#vocabView #vocabSummary{
  margin:12px 0 8px;
}
#vocabView .vocab-list{
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:12px;
  max-height:calc(100vh - 355px);
  margin-top:8px;
}
#vocabView .vocab-item{
  height:100%;
  min-height:182px;
}
#vocabView .vocab-head{
  margin-bottom:8px;
}
#vocabView .vocab-word{
  font-size:24px;
  line-height:1.08;
}
#vocabView .vocab-reading{
  font-size:15px;
}
#vocabView .vocab-meaning{
  font-size:17px;
  margin-bottom:6px;
}
#vocabView .vocab-example,
#vocabView .vocab-example + div{
  line-height:1.28;
}
@media (max-width: 1180px){
  #vocabView .vocab-top-split{
    grid-template-columns:1fr;
  }
  #vocabView .vocab-list{
    grid-template-columns:1fr;
    max-height:none;
  }
}


/* v40 rebuilt layout: stable top split + separate bottom controls */
#vocabView .vocab-top-split{
  display:grid !important;
  grid-template-columns:minmax(280px,0.72fr) minmax(520px,1.28fr) !important;
  gap:14px !important;
  align-items:start !important;
  margin-top:8px !important;
  height:auto !important;
}
#vocabView .vocab-top-left,
#vocabView .vocab-top-right{
  min-width:0;
  align-self:start !important;
  height:auto !important;
}
#vocabView .vocab-side-tools{
  height:auto !important;
  min-height:0 !important;
  margin-bottom:0 !important;
  padding:14px 16px !important;
  border:1px solid #d9e6f4 !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#fbfdff 0%, #f4f8fd 100%) !important;
  box-shadow:0 8px 24px rgba(28,56,94,.06) !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
  gap:10px !important;
}
#vocabView .vocab-subtools-row-top{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}
#vocabView .vocab-subtools-row-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0;
  padding-bottom:10px;
  border-bottom:1px dashed #d7e2ee;
}
#vocabView .vocab-subtools-row-bottom{
  display:block !important;
  margin-top:0 !important;
  padding-top:0 !important;
  border-top:none !important;
}
#vocabView .vocab-subtools-status-box{
  min-height:0 !important;
}
#vocabView .vocab-auto-status{
  margin:4px 0 0 !important;
  min-height:0 !important;
  height:auto !important;
  line-height:1.38 !important;
  font-size:14px !important;
}
#vocabView .vocab-top-right{
  display:block !important;
}
#vocabView .vocab-auto-preview{
  position:relative !important;
  top:auto !important;
  z-index:auto !important;
  margin:0 !important;
  padding:0 !important;
  border:none !important;
  background:transparent !important;
  box-shadow:none !important;
  height:auto !important;
  min-height:0 !important;
}
#vocabView .vocab-auto-card{
  height:auto !important;
  min-height:220px !important;
  padding:18px 22px 16px !important;
}
#vocabView .vocab-bottom-controls{
  margin:12px 0 12px !important;
  padding:12px 14px !important;
  border:1px solid #d9e6f4 !important;
  border-radius:16px !important;
  background:linear-gradient(180deg,#fbfdff 0%, #f4f8fd 100%) !important;
  box-shadow:0 8px 24px rgba(28,56,94,.05) !important;
}
#vocabView .vocab-subtools-control-box-bottom{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px 18px !important;
  flex-wrap:wrap !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-controls-wrap{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-detail-controls{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-detail-controls label{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:8px 10px !important;
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:12px !important;
  font-size:13px !important;
  font-weight:700 !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-detail-controls select{
  margin-left:0 !important;
  max-width:none !important;
}
#vocabView #vocabSummary{
  margin:8px 0 8px !important;
}
#vocabView .vocab-list{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  align-items:start !important;
  gap:12px !important;
  margin-top:8px !important;
  max-height:calc(100vh - 430px) !important;
  overflow-y:auto !important;
}
#vocabView .vocab-item{
  min-height:182px !important;
}
@media (max-width: 1180px){
  #vocabView .vocab-top-split{
    grid-template-columns:1fr !important;
  }
  #vocabView .vocab-subtools-control-box-bottom{
    flex-direction:column !important;
    align-items:flex-start !important;
  }
  #vocabView .vocab-bottom-controls .vocab-auto-detail-controls{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    width:100% !important;
  }
  #vocabView .vocab-list{
    grid-template-columns:1fr !important;
    max-height:none !important;
  }
}


/* v41 micro-tuning: compact left panel, tighten bottom controls, rebalance top */
#vocabView .vocab-top-split{
  grid-template-columns:minmax(280px,0.65fr) minmax(520px,1.35fr) !important;
  gap:12px !important;
}
#vocabView .vocab-side-tools{
  padding:12px 14px !important;
  gap:8px !important;
}
#vocabView .vocab-subtools-row-top{
  gap:8px !important;
}
#vocabView .vocab-subtools-row-actions{
  margin:4px 0 6px !important;
  padding-bottom:8px !important;
}
#vocabView .vocab-subtools-status-box{
  margin-top:4px !important;
}
#vocabView .section-mini-title{
  margin-bottom:4px !important;
}
#vocabView .vocab-auto-status{
  line-height:1.32 !important;
}
#vocabView .vocab-bottom-controls{
  margin-top:8px !important;
  margin-bottom:6px !important;
  padding:10px 12px !important;
}
#vocabView .vocab-subtools-control-box-bottom{
  gap:10px 14px !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-controls-wrap{
  gap:8px !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-detail-controls{
  gap:8px !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-detail-controls label{
  padding:7px 9px !important;
}
#vocabView .vocab-auto-card{
  padding:16px 20px 14px !important;
}
#vocabView #vocabSummary{
  margin:6px 0 8px !important;
}
#vocabView .vocab-list{
  max-height:calc(100vh - 405px) !important;
}


/* v42: attach bottom controls directly to the lower-left of the left panel */
#vocabView .vocab-side-tools{
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
}
#vocabView .vocab-subtools-row-bottom{
  margin-bottom:0 !important;
}
#vocabView .vocab-bottom-controls{
  margin-top:auto !important;
  margin-bottom:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  width:100% !important;
  padding:10px 12px !important;
  border:1px solid #d9e6f4 !important;
  border-radius:16px !important;
  background:linear-gradient(180deg,#fbfdff 0%, #f4f8fd 100%) !important;
  box-shadow:none !important;
}
#vocabView .vocab-subtools-control-box-bottom{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:10px !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-controls-wrap{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  align-items:center !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-detail-controls{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  width:100% !important;
  gap:8px !important;
}
#vocabView .vocab-bottom-controls .vocab-auto-detail-controls label{
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  padding:7px 9px !important;
}
#vocabView .vocab-top-split{
  align-items:start !important;
}
#vocabView .vocab-list{
  max-height:calc(100vh - 360px) !important;
}
@media (max-width: 1180px){
  #vocabView .vocab-bottom-controls{
    margin-top:10px !important;
  }
}


/* v43: force 50:50 split between left and right panels */
#vocabView .vocab-top-split{
  display:grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap:12px !important;
}

/* ensure both sides stretch evenly */
#vocabView .vocab-side-tools,
#vocabView .vocab-auto-card{
  width:100% !important;
  min-width:0 !important;
}


/* v44: make left controls single-row to reduce left panel height */
#vocabView .vocab-side-tools{
  gap:6px !important;
}

#vocabView .vocab-subtools-row-top{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:12px !important;
  overflow-x:auto;
}

#vocabView .vocab-subtools-row-top label{
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  white-space:nowrap !important;
  flex:0 0 auto;
}

#vocabView .vocab-tool-title{
  white-space:nowrap !important;
  flex:0 0 auto;
}

#vocabView .vocab-subtools-row-actions{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 !important;
  padding-top:2px !important;
  padding-bottom:6px !important;
}

#vocabView .vocab-subtools-status-box{
  margin-top:2px !important;
}

#vocabView .vocab-auto-status{
  margin-top:2px !important;
  line-height:1.28 !important;
}

#vocabView .vocab-side-tools .ghost-btn,
#vocabView .vocab-side-tools .primary-btn{
  padding:9px 14px !important;
}

@media (max-width: 1180px){
  #vocabView .vocab-subtools-row-top{
    flex-wrap:wrap !important;
    overflow-x:visible;
  }
}


/* v45 compact mode labels */
#vocabView .vocab-tool-title{
  white-space:nowrap !important;
  margin-right:6px !important;
  font-weight:700 !important;
}
#vocabView .vocab-subtools-row-top{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  overflow-x:visible !important;
}
#vocabView .vocab-subtools-row-top label{
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  margin-right:4px !important;
  white-space:nowrap !important;
}
#vocabView .vocab-subtools-row-actions{
  padding-top:0 !important;
}
#vocabView .vocab-side-tools .primary-btn,
#vocabView .vocab-side-tools .ghost-btn{
  padding:8px 12px !important;
}


/* v46: place start/stop buttons inline with mode controls */
#vocabView .vocab-subtools-row-top{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
}
#vocabView .vocab-subtools-row-top .primary-btn,
#vocabView .vocab-subtools-row-top .ghost-btn{
  padding:8px 12px !important;
  margin-left:4px !important;
}
#vocabView .vocab-subtools-row-actions{
  display:none !important;
}

/* ===== v-scroll panel fix ===== */
html, body {
  height: 100%;
  overflow: hidden;
}

.shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.lesson-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.main {
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#studyView.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#studyView .header,
#studyView .top-info {
  flex: 0 0 auto;
}

#studyView .content-grid {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

#studyView .content-grid > .card {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#studyView .content-grid > .card .card-head {
  flex: 0 0 auto;
}

#studyView .page-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#studyView .content-grid > .card:last-child {
  overflow-y: auto;
}

#studyView .content-grid > .card:last-child::-webkit-scrollbar,
.lesson-list::-webkit-scrollbar,
#studyView .page-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#studyView .content-grid > .card:last-child::-webkit-scrollbar-thumb,
.lesson-list::-webkit-scrollbar-thumb,
#studyView .page-wrap::-webkit-scrollbar-thumb {
  background: #c5d5e6;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

#studyView .content-grid > .card:last-child::-webkit-scrollbar-track,
.lesson-list::-webkit-scrollbar-track,
#studyView .page-wrap::-webkit-scrollbar-track {
  background: #eef4fa;
  border-radius: 999px;
}

@media (max-width: 1024px){
  html, body {
    overflow: auto;
  }

  .shell,
  .sidebar,
  .main {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .lesson-list,
  #studyView .content-grid > .card:last-child,
  #studyView .page-wrap {
    overflow: visible;
    max-height: none;
  }

  #studyView.active {
    display: block;
  }
}


.modal-open{overflow:hidden;}
.modal-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15, 23, 42, 0.56);
  z-index:1200;
}
.modal-overlay.is-open{display:flex;}
.modal-panel{
  width:min(760px, 100%);
  max-height:min(86vh, 920px);
  overflow:auto;
  border-radius:20px;
  border:1px solid rgba(191, 204, 221, 0.95);
  background:#fff;
  box-shadow:0 18px 48px rgba(15,23,42,.22);
  padding:18px;
}
.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.modal-eyebrow{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:#eef5ff;
  color:#2b65c7;
  font-size:12px;
  font-weight:800;
  margin-bottom:8px;
}
.modal-head h3{margin:0 0 4px;font-size:24px;line-height:1.15;}
.modal-subcopy{color:var(--muted);font-size:14px;line-height:1.45;}
.modal-close-btn{white-space:nowrap;}
.vocab-quiz-modal-panel .quiz-card{margin:0; box-shadow:none;}
.vocab-quiz-modal-card{min-height:260px;}
.vocab-quiz-modal-panel{width:min(780px, 100%);}
.vocab-quiz-modal-panel .quiz-card{background:#fbfdff;}
@media (max-width: 720px){
  .modal-overlay{padding:12px;}
  .modal-panel{width:100%; max-height:92vh; border-radius:16px; padding:14px;}
  .modal-head{flex-direction:column; align-items:stretch;}
  .modal-close-btn{width:100%;}
  .quiz-result-grid{grid-template-columns:1fr;}
  .choice-btn{padding:12px;}
}


/* v20260405 vocab quiz modal compact two-column refinement */
.vocab-quiz-modal-panel{
  width:min(1080px, 96vw);
  height:min(82vh, 760px);
  max-height:min(82vh, 760px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.vocab-quiz-modal-panel .modal-head{
  flex:0 0 auto;
  align-items:center;
  margin-bottom:10px;
}
.vocab-quiz-modal-panel .modal-head h3,
.vocab-quiz-modal-panel .modal-head .modal-subcopy{
  display:none;
}
.vocab-quiz-modal-panel .modal-eyebrow{
  margin-bottom:0;
  font-size:13px;
}
.vocab-quiz-modal-card{
  flex:1 1 auto;
  min-height:0;
  height:100%;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.vocab-quiz-fixed-shell{
  height:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.vocab-quiz-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.vocab-quiz-body-grid{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(360px, 44%);
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}
.vocab-quiz-left-pane,
.vocab-quiz-right-pane{
  min-height:0;
  overflow:auto;
}
.vocab-quiz-left-pane{
  display:grid;
  grid-template-rows:auto auto 1fr;
  border-right:1px solid var(--line);
}
.vocab-quiz-right-pane{
  padding:22px;
}
.vocab-quiz-word-box,
.vocab-quiz-example-box,
.vocab-quiz-feedback-panel{
  padding:22px;
}
.vocab-quiz-example-box{
  border-top:1px solid var(--line);
}
.vocab-quiz-feedback-panel{
  border-top:1px solid var(--line);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
}
.vocab-quiz-feedback-title{
  font-size:13px;
  font-weight:800;
  color:#2b65c7;
}
.vocab-quiz-reading{
  font-size:22px;
  font-weight:800;
  color:#385275;
  margin-top:6px;
}
.vocab-quiz-example-jp{
  font-size:18px;
  line-height:1.75;
  color:#1d3557;
}
.vocab-quiz-example-kr{
  margin-top:10px;
  font-size:14px;
}
.vocab-quiz-choice-list{
  margin-top:14px;
}
.vocab-quiz-feedback-card{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px 16px;
  background:#f8fbff;
}
.vocab-quiz-feedback-card.is-correct{
  border-color:#86d4a3;
  background:#edf9f1;
}
.vocab-quiz-feedback-card.is-wrong{
  border-color:#f0a9a9;
  background:#fff3f3;
}
.vocab-quiz-answer-line{
  margin-top:10px;
  font-size:15px;
  color:#23364d;
}
#vocabQuizFeedback.is-empty{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  color:#6c7f95;
  background:#fbfdff;
}
.vocab-quiz-next-left{
  align-self:flex-start;
}
@media (max-width: 900px){
  .vocab-quiz-modal-panel{
    width:min(96vw, 96vw);
    height:min(92vh, 920px);
    max-height:min(92vh, 920px);
  }
  .vocab-quiz-body-grid{
    grid-template-columns:1fr;
  }
  .vocab-quiz-left-pane{
    border-right:none;
    border-bottom:1px solid var(--line);
    grid-template-rows:auto auto auto;
  }
}

.vocab-quiz-feedback-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vocab-quiz-answer-inline {
  white-space: nowrap;
}


.header-actions { flex-wrap: wrap; gap: 10px; }
.header-actions input[type="file"] { display:none; }
@media (max-width: 1100px) {
  .header-actions { gap: 8px; }
}
