/* Hallmark: cambridge emerald word-deck workbench v1.3.0 */
:root {
  /* 1. Cambridge Botanical Emerald & Terracotta Palette (Unique to Minwoo Voca) */
  --bg-page: #F2F5F2;
  --bg-card: #FCFDFB;
  --bg-subtle: #E2EBE5;
  --bg-elevated: #F7F9F7;

  /* Deep Forest-Emerald Dock & Deck Header Tokens */
  --bg-stage: #0B3B2E;
  --bg-stage-panel: #124D3D;
  --border-stage: #236B57;
  --text-stage-main: #F5FAF7;
  --text-stage-sub: #C2D9D0;
  --text-stage-pill: #8CE8C8;

  /* Soft Semantic Tints */
  --bg-accent-soft: #E5F4EE;
  --bg-teal-soft: #DDF3EA;
  --bg-terracotta-soft: #FCECE8;
  --bg-warn-soft: #FDF2D0;
  --bg-ok-soft: #DAF8E6;
  --bg-err-soft: #FDE5E8;
  --bg-selection: #BCE8D6;

  /* Botanical Charcoal Typography Hierarchy (WCAG AAA/AA) */
  --text-main: #10241E;
  --text-sub: #2B443C;
  --text-muted: #506B62;
  --text-on-primary: #FCFDFB;

  /* Purposeful Brand & Terracotta Seal Accents */
  --brand-primary: #0F5240;
  --brand-primary-hover: #0B3B2E;
  --brand-teal: #146B53;
  --brand-coral: #A83119;
  --brand-amber: #AF500B;

  --status-ok: #167C3C;
  --status-ok-border: #82E8A8;
  --status-warn: #AF500B;
  --status-warn-border: #F8CE4E;
  --status-err: #BA163E;
  --status-err-border: #FA9EA9;

  /* Borders & Hairlines */
  --border-light: #CCD9D1;
  --border-strong: #93ADA0;

  /* Shapes & Typography */
  --radius-stage: 20px;
  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-field: 8px;
  --radius-pill: 999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;

  color-scheme: light;
  scrollbar-color: var(--border-strong) var(--bg-page);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body.font-large {
  font-size: 18px;
}

::selection {
  background-color: var(--bg-selection);
  color: var(--text-main);
}

button, input, select {
  font: inherit;
  touch-action: manipulation;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

input, select {
  caret-color: var(--brand-primary);
}

a {
  color: var(--brand-primary);
  text-underline-offset: 4px;
}

:is(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--brand-coral);
  outline-offset: 3px;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1, h2, h3, h4 {
  line-height: 1.32;
  letter-spacing: -0.025em;
  word-break: keep-all;
  text-wrap: balance;
}

p {
  max-width: 72ch;
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  padding: 12px 16px;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-field);
  z-index: 100;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* ==================== 2-COLUMN WORKBENCH SHELL (LEFT SIDEBAR DOCK + MAIN WORKSPACE) ==================== */
.voca-workbench-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

/* Forest-Emerald Vertical Studio Sidebar Dock */
.voca-sidebar {
  background-color: var(--bg-stage);
  color: var(--text-stage-main);
  border-right: 1px solid var(--border-stage);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-top-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-stage);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--bg-card);
  border: 2px solid var(--brand-coral);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-stage-main);
}

.series-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-field);
  background-color: var(--brand-coral);
  color: var(--text-on-primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.voca-sidebar .brand-subtitle {
  color: var(--text-stage-sub);
}

/* Vertical Navigation Stack inside Left Sidebar */
.bottom-nav {
  flex: 1;
}

.bottom-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-tab {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background-color: transparent;
  color: var(--text-stage-sub);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  transition: background-color 0.16s ease-out, color 0.16s ease-out, border-color 0.16s ease-out;
}

.nav-tab:hover {
  background-color: var(--bg-stage-panel);
  color: var(--text-stage-main);
}

.nav-tab.active {
  background-color: var(--bg-card);
  color: var(--brand-primary);
  border-color: var(--brand-coral);
  font-weight: 800;
}

.nav-tab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-tab-label {
  font-size: 0.92rem;
}

/* Dedicated Voice & Display Console Box in Sidebar Bottom */
.sidebar-console-box {
  background-color: var(--bg-stage-panel);
  border: 1px solid var(--border-stage);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.console-box-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-stage-pill);
}

.top-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chip-btn {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--radius-field);
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.16s ease-out, border-color 0.16s ease-out, color 0.16s ease-out;
}

.voca-sidebar .chip-btn {
  background-color: var(--bg-stage);
  border-color: var(--border-stage);
  color: var(--text-stage-sub);
}

.chip-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.voca-sidebar .chip-btn:hover {
  border-color: var(--text-stage-pill);
  color: var(--text-stage-main);
}

.chip-btn.active {
  background-color: var(--bg-accent-soft);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.voca-sidebar .chip-btn.active {
  background-color: var(--brand-coral);
  border-color: var(--brand-coral);
  color: var(--text-on-primary);
}

/* ==================== MAIN WORKBENCH CONTENT AREA ==================== */
.app-shell {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 96px;
}

/* ==================== 1. COMPACT MISSION RIBBON BAR ==================== */
.mission-ribbon-bar {
  background-color: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-stage);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.mission-ribbon-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.mission-course-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-course-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-terracotta-soft);
  color: var(--brand-coral);
  font-size: 0.78rem;
  font-weight: 800;
  width: fit-content;
}

.mission-course-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.mission-metrics-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mission-stat-pill {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-field);
  padding: 8px 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mission-stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.mission-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.mission-stat-val.highlight {
  color: var(--brand-coral);
}

.mission-ribbon-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pace-row {
  display: inline-flex;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

.stage-pace-btn {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: var(--radius-field);
  border: none;
  background-color: transparent;
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.stage-pace-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-subtle);
}

.stage-pace-btn.active {
  background-color: var(--brand-primary);
  color: var(--text-on-primary);
}

/* ==================== 2. INTERACTIVE WORD-DECK WORKBENCH & QUEUE PLAYLIST ==================== */
.workbench-deck-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.68fr);
  gap: 20px;
  margin-bottom: 28px;
  align-items: stretch;
}

/* Left: Giant Tactile Oxford/Cambridge Flashcard Stage */
.spotlight-deck-card {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius-stage);
  border: 2px solid var(--border-strong);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deck-card-header-band {
  background-color: var(--bg-stage);
  color: var(--text-stage-main);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.deck-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-stage-pill);
  font-variant-numeric: tabular-nums;
}

.deck-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deck-curtain-btn {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-stage);
  background-color: var(--bg-stage-panel);
  color: var(--text-stage-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.deck-curtain-btn.active {
  background-color: var(--brand-coral);
  border-color: var(--brand-coral);
  color: var(--text-on-primary);
}

.deck-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-field);
  border: 1px solid var(--border-stage);
  background-color: var(--bg-stage-panel);
  color: var(--text-stage-main);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.deck-nav-btn:hover {
  border-color: var(--text-stage-pill);
}

.deck-card-body {
  padding: 28px 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deck-headword-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.deck-headword {
  font-size: clamp(2.4rem, 4vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin: 0;
  line-height: 1.1;
}

.deck-phonetic-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.deck-pos-pill {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-accent-soft);
  color: var(--brand-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.deck-phonetic {
  font-size: 0.96rem;
  color: var(--text-sub);
  font-weight: 600;
}

.deck-meaning-stage {
  min-height: 56px;
  display: flex;
  align-items: center;
}

.deck-meaning {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin: 0;
}

.deck-meaning-curtain {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  border: 2px dashed var(--brand-coral);
  background-color: var(--bg-terracotta-soft);
  color: var(--brand-coral);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.deck-example-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  padding: 16px;
}

.deck-example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.deck-example-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-coral);
}

.deck-sentence-audio-btn {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-sub);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.deck-sentence-audio-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.deck-example-en {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
}

.deck-example-ko {
  font-size: 0.88rem;
  color: var(--text-sub);
  margin: 0;
}

.deck-actions-bar {
  background-color: var(--bg-elevated);
  border-top: 1px solid var(--border-light);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.deck-audio-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Right: Today's Word Queue Playlist Panel */
.word-playlist-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-stage);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playlist-panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.playlist-panel-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.playlist-panel-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.playlist-rows-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playlist-word-row {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-light);
  background-color: var(--bg-elevated);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
}

.playlist-word-row:hover {
  background-color: var(--bg-accent-soft);
  border-color: var(--brand-primary);
}

.playlist-word-row.active {
  background-color: var(--bg-stage);
  border-color: var(--bg-stage);
  color: var(--text-stage-main);
}

.playlist-word-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.playlist-idx-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-field);
  background-color: var(--bg-subtle);
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.playlist-word-row.active .playlist-idx-badge {
  background-color: var(--brand-coral);
  color: var(--text-on-primary);
}

.playlist-lemma-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.playlist-lemma {
  font-size: 1rem;
  font-weight: 800;
}

.playlist-pos {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.playlist-word-row.active .playlist-pos {
  color: var(--text-stage-sub);
}

.playlist-star-dot {
  color: var(--brand-amber);
  font-size: 0.85rem;
}

.playlist-meaning {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-top: 4px;
}

.playlist-word-row.active .playlist-meaning {
  color: var(--text-stage-pill);
}

.playlist-play-indicator {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-primary);
  white-space: nowrap;
}

.playlist-word-row.active .playlist-play-indicator {
  color: var(--text-stage-pill);
}

/* ==================== 3. 6-TRACK SENSORY TRAINING DOCK ==================== */
.section-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.section-heading {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.training-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.bento-mode-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.16s ease-out, background-color 0.16s ease-out, transform 0.1s ease-out;
}

.bento-mode-card:hover {
  border-color: var(--brand-primary);
  background-color: var(--bg-accent-soft);
}

.bento-mode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bento-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-field);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.bento-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-primary);
  background-color: var(--bg-accent-soft);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}

.bento-title {
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px;
}

.bento-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.5;
}

/* ==================== 4. 8-COURSE LEVEL MATRIX (4x2 GRID) ==================== */
.course-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.matrix-course-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.16s ease-out, background-color 0.16s ease-out;
}

.matrix-course-btn:hover {
  border-color: var(--brand-primary);
}

.matrix-course-btn[aria-pressed="true"] {
  border: 2px solid var(--brand-primary);
  background-color: var(--bg-accent-soft);
}

.matrix-course-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-coral);
}

.matrix-course-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.matrix-course-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ==================== GENERAL CARDS & BUTTONS ==================== */
.study-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 16px;
}

.hero-headline {
  margin: 12px 0 8px;
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.today-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.metric-val.warn { color: var(--brand-coral); }
.metric-val.primary { color: var(--brand-primary); }

.btn-primary {
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background-color: var(--brand-primary);
  color: var(--text-on-primary);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.16s ease-out, transform 0.1s ease-out;
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
}

.btn-secondary {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  word-break: keep-all;
  transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
}

.btn-secondary:hover {
  background-color: var(--bg-accent-soft);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* ==================== FOCUSED FLASHCARD SESSION ==================== */
.study-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.step-nav-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.step-dot {
  min-width: 36px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-field);
  border: 1px solid var(--border-light);
  background-color: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-dot.current {
  background-color: var(--bg-stage);
  border-color: var(--bg-stage);
  color: var(--text-stage-main);
}

.step-dot.done {
  background-color: var(--bg-teal-soft);
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}

.word-stage {
  text-align: center;
  padding: 24px 16px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  margin-bottom: 20px;
}

.word-pos-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-accent-soft);
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.word-headword {
  margin: 8px 0 12px;
  font-size: clamp(2.35rem, 4.5vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.12;
}

.word-phonetics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-sub);
  font-size: 0.96rem;
  margin-bottom: 16px;
}

.stress-badge {
  padding: 4px 12px;
  border-radius: var(--radius-field);
  background-color: var(--bg-terracotta-soft);
  border: 1px solid var(--status-err-border);
  color: var(--brand-coral);
  font-weight: 800;
  font-size: 0.82rem;
}

.heteronym-alert {
  background-color: var(--bg-warn-soft);
  border: 1px solid var(--status-warn-border);
  padding: 16px;
  border-radius: var(--radius-field);
  font-size: 0.92rem;
  color: var(--text-main);
  text-align: left;
  margin: 16px 0;
}

.audio-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.audio-btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
}

.audio-btn:hover {
  background-color: var(--bg-teal-soft);
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}

.audio-btn.active-accent {
  background-color: var(--bg-teal-soft);
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}

.audio-btn.recording {
  background-color: var(--bg-err-soft);
  border-color: var(--status-err-border);
  color: var(--status-err);
}

.meaning-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
}

.meaning-box.feedback-ok {
  border-color: var(--status-ok-border);
  background-color: var(--bg-ok-soft);
}

.meaning-box.feedback-warn {
  border-color: var(--status-warn-border);
  background-color: var(--bg-warn-soft);
}

.meaning-main {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin: 0 0 8px;
}

.example-en {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 12px 0 4px;
}

.example-ko {
  font-size: 0.94rem;
  color: var(--text-sub);
  margin: 0;
}

.nuance-box {
  background-color: var(--bg-accent-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-field);
  padding: 16px 20px;
  font-size: 0.94rem;
  color: var(--text-main);
  margin-bottom: 16px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.choice-btn {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  border: 2px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 1.02rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
}

.choice-btn:hover:not(:disabled) {
  background-color: var(--bg-accent-soft);
  border-color: var(--brand-primary);
}

.choice-btn.correct {
  border-color: var(--status-ok);
  background-color: var(--bg-ok-soft);
  color: var(--status-ok);
}

.choice-btn.wrong {
  border-color: var(--status-err);
  background-color: var(--bg-err-soft);
  color: var(--status-err);
}

.spelling-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.spelling-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border-radius: var(--radius-field);
  border: 2px solid var(--border-strong);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
}

.char-ok { color: var(--status-ok); font-weight: 700; }
.char-err {
  color: var(--status-err);
  background-color: var(--bg-err-soft);
  text-decoration: underline wavy var(--status-err);
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
}

.fsrs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.fsrs-btn {
  min-height: 56px;
  padding: 8px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 700;
}

.fsrs-btn.again { border-color: var(--status-err-border); background-color: var(--bg-err-soft); color: var(--status-err); }
.fsrs-btn.hard { border-color: var(--status-warn-border); background-color: var(--bg-warn-soft); color: var(--status-warn); }
.fsrs-btn.good { border-color: var(--brand-primary); background-color: var(--bg-accent-soft); color: var(--brand-primary); }
.fsrs-btn.easy { border-color: var(--status-ok-border); background-color: var(--bg-ok-soft); color: var(--status-ok); }

/* ==================== COURSES & VOCABOOK GRIDS ==================== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.course-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.course-item.selected {
  border: 2px solid var(--brand-primary);
  background-color: var(--bg-accent-soft);
}

.vocabook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.vocabook-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--brand-primary);
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
}

.stage-pill.needs_work { background-color: var(--bg-err-soft); color: var(--status-err); }
.stage-pill.relearned_today { background-color: var(--bg-warn-soft); color: var(--status-warn); }
.stage-pill.verifying_retention { background-color: var(--bg-accent-soft); color: var(--brand-primary); }
.stage-pill.mastered { background-color: var(--bg-ok-soft); color: var(--status-ok); }

.star-btn {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background-color: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.star-btn.starred {
  background-color: var(--bg-warn-soft);
  border-color: var(--status-warn-border);
  color: var(--brand-amber);
}

.voca-mask-hidden {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-field);
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  color: var(--text-sub);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.voca-mask-hidden:hover {
  background-color: var(--bg-accent-soft);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.picture-quiz-emoji {
  font-size: 4.5rem;
  line-height: 1.15;
  margin: 8px 0;
  display: block;
}

.print-sheet { display: none; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background-color: var(--bg-card); }
  .app-shell, .bottom-nav, .voca-sidebar, .no-print { display: none !important; }
  .print-sheet { display: block !important; padding: 12px; color: var(--text-main); }
  .print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
  .print-row { border-bottom: 1px solid var(--border-strong); padding: 8px 4px; font-size: 11pt; display: flex; justify-content: space-between; gap: 12px; }
}

@media (max-width: 1080px) {
  .workbench-deck-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .training-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .course-matrix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vocabook-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .voca-workbench-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .voca-sidebar {
    position: static;
    height: auto;
    padding: 16px;
    gap: 12px;
  }
  .sidebar-top-brand {
    padding-bottom: 8px;
  }
  .top-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .app-shell {
    padding: 16px 16px 96px;
  }
  .bottom-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-stage);
    border-top: 1px solid var(--border-stage);
    padding: 4px;
    z-index: 50;
  }
  .bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-tab {
    min-height: 52px;
    padding: 8px 4px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 4px;
  }
  .nav-tab-label { font-size: 0.72rem; }
  .training-bento-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }
  .fsrs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   Minwoo Unified Wardrobe & Guardian Feedback Studio (v1.4.0)
   ========================================================================== */
.uw-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-surface-soft);
  margin-bottom: 16px;
}
.uw-wallet {
  display: grid;
  gap: 4px;
}
.uw-points-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-primary, #0B3B2E);
}
.uw-points-rule {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.uw-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.uw-meta-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}
.uw-status {
  padding: 12px 16px;
  border-radius: 10px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 16px;
}
.uw-status-error {
  background: #FEE2E2;
  color: #991B1B;
}
.uw-review-section {
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-card);
  margin-bottom: 18px;
}
.uw-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.uw-review-list {
  display: grid;
  gap: 10px;
}
.uw-review-card {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-surface-soft);
  display: grid;
  gap: 8px;
}
.uw-review-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.uw-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
}
.uw-review-empty {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.uw-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .uw-grid {
    grid-template-columns: 1fr;
  }
}
.uw-stage-col,
.uw-catalog-col {
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-card);
  display: grid;
  gap: 14px;
}
.uw-avatar-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 270px;
  padding: 12px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}
.uw-avatar-stage svg,
.uw-avatar-stage img,
.uw-avatar-stage canvas {
  width: 210px;
  height: 262px;
  object-fit: contain;
}
.uw-stage-caption {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.uw-action-stack {
  display: grid;
  gap: 8px;
}
.uw-coupon-row {
  display: flex;
  gap: 8px;
}
.uw-fusion-box {
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: grid;
  gap: 8px;
}
.uw-subhead {
  font-size: 0.92rem;
  font-weight: 800;
  display: block;
}
.uw-fusion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.82rem;
}
.uw-fusion-stock {
  color: var(--text-muted);
  margin-right: auto;
  margin-left: 6px;
}
.uw-char-list,
.uw-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.uw-char-btn,
.uw-chip-btn {
  padding: 6px 12px;
  min-height: 34px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface-soft);
  color: var(--text-main);
  cursor: pointer;
}
.uw-char-btn.is-active,
.uw-chip-btn.is-active {
  background: var(--brand-primary, #0B3B2E);
  border-color: var(--brand-primary, #0B3B2E);
  color: #fff;
  font-weight: 700;
}
.uw-owned-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  margin-left: auto;
  cursor: pointer;
}
.uw-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 12px;
}
.uw-item-card {
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-surface-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uw-item-card.is-owned {
  background: var(--bg-card);
  border-color: #B49248;
}
.uw-item-card.is-equipped {
  border-color: var(--brand-primary, #0B3B2E);
  box-shadow: 0 0 0 2px rgba(11, 59, 46, 0.22);
}
.uw-item-thumb {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.uw-item-meta {
  display: grid;
  gap: 4px;
}
.uw-grade-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.72rem;
  font-weight: 800;
}
.uw-item-name {
  font-size: 0.86rem;
  line-height: 1.35;
}
.uw-item-slot {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.uw-item-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.uw-primary-btn,
.uw-secondary-btn {
  padding: 8px 12px;
  min-height: 36px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
.uw-primary-btn {
  background: var(--brand-primary, #0B3B2E);
  color: #fff;
  border: 1px solid var(--brand-primary, #0B3B2E);
}
.uw-secondary-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}
.uw-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.85rem;
}
