/* SHINHA Vocabulary page — scoped to .vocab-page only */

:root {
  --voc-navy: #17305c;
  --voc-blue: #4d73df;
  --voc-blue2: #72a7ff;
  --voc-cyan: #2dd4bf;
  --voc-mint: #e9fff8;
  --voc-cream: #fffaf0;
  --voc-sky: #edf6ff;
  --voc-bg: #f7fbff;
  --voc-card: rgba(255, 255, 255, .94);
  --voc-border: #dbe8ff;
  --voc-border-soft: rgba(77, 115, 223, .14);
  --voc-text: #17305c;
  --voc-text-brand: #294fc7;
  --voc-text-sub: #42618f;
  --voc-label: #365580;
  --voc-muted: #667085;
  --voc-green: #16a34a;
  --voc-orange: #f59e0b;
  --voc-red: #e11d48;
  --voc-shadow: 0 20px 48px rgba(41, 79, 199, .13);
  --voc-soft-shadow: 0 10px 28px rgba(41, 79, 199, .08);
  --voc-radius: 26px;
  --voc-font: "Segoe UI", Arial, "Helvetica Neue", sans-serif;
}

.vocab-page {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(111, 168, 255, .18), transparent 31%),
    radial-gradient(circle at 94% 20%, rgba(45, 212, 191, .12), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f3faff 52%, #f7fcfb 100%);
  color: var(--voc-text);
  font-weight: 600;
}

.vocab-shell,
.vocab-shell *,
.vocab-practice-view,
.vocab-practice-view * {
  font-family: var(--voc-font);
}

.vocab-page svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vocab-page .svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Shell + sidebar */
.vocab-shell {
  display: block;
  min-height: calc(100vh - 76px);
  width: 100%;
}

.vocab-sidebar {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--voc-border-soft);
  padding: 18px 14px;
  border-radius: var(--voc-radius);
}

.vocab-sidebar-block + .vocab-sidebar-block,
.vocab-sidebar-block + .vocab-mascot-box {
  margin-top: 18px;
}

.vocab-sidebar h3 {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--voc-muted);
  margin: 0 0 10px;
  font-weight: 800;
}

.vocab-side-levels,
.vocab-side-modes,
.vocab-level-list,
.vocab-mode-list {
  display: grid;
  gap: 8px;
}

/* Desktop: sidebar cột trái, nội dung chính cột phải */
@media (min-width: 1025px) {
  .vocab-main-inner {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    column-gap: 22px;
    align-items: start;
  }

  .vocab-breadcrumb {
    grid-column: 2;
    grid-row: 1;
  }

  .vocab-hero {
    grid-column: 2;
    grid-row: 2;
  }

  .vocab-sidebar--overview {
    grid-column: 1;
    grid-row: 1 / span 12;
    position: sticky;
    top: 76px;
    align-self: start;
    max-height: calc(100vh - 92px);
    overflow: auto;
    border-right: 1px solid var(--voc-border);
    border-radius: 20px;
    margin: 0;
    box-shadow: var(--voc-soft-shadow);
  }

  .vocab-stats,
  .vocab-panel,
  .vocab-daily-task,
  .vocab-new-words {
    grid-column: 2;
  }
}

.vocab-level-btn,
.vocab-side-mode {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--voc-muted);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.vocab-level-btn b,
.vocab-side-mode b {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--voc-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

.vocab-level-btn span,
.vocab-side-mode span {
  font-size: 12px;
  font-weight: 700;
}

.vocab-level-btn.is-active,
.vocab-level-btn:hover,
.vocab-side-mode.is-active,
.vocab-side-mode:hover {
  background: var(--voc-sky);
  color: var(--voc-text);
  border-color: var(--voc-border);
  box-shadow: var(--voc-soft-shadow);
}

.vocab-level-btn.is-soon b {
  background: #c5d4ef;
}

.vocab-level-btn.is-soon span {
  color: var(--voc-orange);
}

.vocab-side-mode svg {
  flex-shrink: 0;
  color: var(--voc-blue);
}
.vocab-side-mode.is-practice-entry small { display:none; }

.vocab-mascot-box {
  border: 1px solid var(--voc-border-soft);
  background: linear-gradient(180deg, var(--voc-mint), #fff);
  border-radius: var(--voc-radius);
  padding: 16px;
  text-align: center;
}

.vocab-mascot-placeholder {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border-radius: 20px;
  background: var(--voc-sky);
  display: grid;
  place-items: center;
  padding: 10px;
}

.vocab-mascot-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vocab-mascot-box b,
.vocab-mascot-box span {
  display: block;
}

.vocab-mascot-box span {
  color: var(--voc-muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
  font-weight: 600;
}

/* Main content */
.vocab-content {
  min-width: 0;
  width: 100%;
  padding: 22px 28px 48px;
}

.vocab-main-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.vocab-overview-view.is-active {
  width: 100%;
}

.vocab-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--voc-muted);
  font-size: 14px;
  font-weight: 700;
}

.vocab-breadcrumb a {
  color: var(--voc-text-brand);
  text-decoration: none;
}

/* Hero */
.vocab-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(77, 115, 223, .18);
  border-radius: 32px;
  padding: 18px 22px;
  background:
    radial-gradient(circle at 84% 24%, rgba(45, 212, 191, .18), transparent 27%),
    linear-gradient(135deg, #fff 0%, #f1f7ff 55%, #ecfff9 100%);
  box-shadow: var(--voc-shadow);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.vocab-hero::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -62px;
  bottom: -92px;
  border: 26px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  pointer-events: none;
}

.vocab-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--voc-text-brand);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--voc-border-soft);
}

.vocab-hero-copy h1 {
  font-size: clamp(25px, 4vw, 32px);
  line-height: 1;
  margin: 14px 0 10px;
  color: var(--voc-text-brand);
  letter-spacing: .4px;
  font-weight: 900;
}

.vocab-hero-copy p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--voc-text-sub);
  margin: 0 0 16px;
  max-width: 560px;
  font-weight: 600;
}

.vocab-hero-copy .vocab-resume-note {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -5px 0 15px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.7);
  color: #46618a;
  font-size: 12px;
  border: 1px solid rgba(77,115,223,.1);
}

.vocab-resume-note span { color: var(--voc-orange); font-size: 10px; }

.vocab-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vocab-hero-actions .vocab-btn-primary,
.vocab-hero-actions .vocab-btn-soft {
  flex: 0 1 auto;
}

.vocab-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.vocab-hero-mascot-wrap {
  width: clamp(110px, 16vw, 180px);
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vocab-hero-mascot {
  width: 100%;
  height: auto;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(34, 62, 126, .18));
  pointer-events: none;
}

.vocab-hero-mascot.is-fallback,
.vocab-hero-logo-fallback {
  width: 96px;
  height: 96px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(77, 115, 223, .16);
  filter: none;
}

/* Buttons */
.vocab-btn-primary,
.vocab-btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 15px 16px;
  border-radius: 19px;
  font-weight: 900;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: .15s ease;
}

.vocab-btn-primary {
  background: linear-gradient(135deg, var(--voc-blue), var(--voc-blue2));
  color: #fff;
  box-shadow: 0 10px 22px rgba(77, 115, 223, .26);
}

.vocab-btn-primary:focus-visible,
.vocab-btn-soft:focus-visible,
.vocab-side-mode:focus-visible,
.vocab-level-btn:focus-visible {
  outline: 3px solid rgba(77, 115, 223, .25);
  outline-offset: 3px;
}

.vocab-btn-soft {
  background: #eff6ff;
  color: var(--voc-text-brand);
  border-color: var(--voc-border);
  box-shadow: none;
}

.vocab-btn-soft.is-disabled,
.vocab-btn-soft:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.vocab-btn-primary:hover,
.vocab-btn-soft:hover:not(:disabled) {
  transform: translateY(-1px);
}

/* Stats */
.vocab-stats {
  margin-bottom: 20px;
}

.vocab-stats-head,
.vocab-daily-head,
.vocab-new-head,
.vocab-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vocab-stats-head h2,
.vocab-daily-head h2,
.vocab-new-head h2,
.vocab-section-title {
  margin: 0;
  font-size: 19px;
  color: var(--voc-text);
  font-weight: 900;
}

.vocab-demo-label {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--voc-sky);
  color: var(--voc-text-brand);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.vocab-demo-label--warm { background: #fff5dc; color: #a76100; }
.vocab-demo-label--success { background: #e9fbf3; color: #087b4b; }

.vocab-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.vocab-stat-card {
  background: var(--voc-card);
  border: 1px solid var(--voc-border-soft);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--voc-soft-shadow);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 6px;
}

.vocab-stat-card { position: relative; overflow: hidden; }
.vocab-stat-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -28px auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--stat-glow, rgba(77,115,223,.1));
}
.vocab-stat-card:nth-child(1) { --stat-glow: rgba(245,158,11,.16); }
.vocab-stat-card:nth-child(1) svg { color: #e58a00; }
.vocab-stat-card:nth-child(2) { --stat-glow: rgba(22,163,74,.14); }
.vocab-stat-card:nth-child(2) svg { color: #159150; }
.vocab-stat-card:nth-child(4) { --stat-glow: rgba(124,77,255,.13); }
.vocab-stat-card:nth-child(4) svg { color: #7558d6; }
.vocab-stat-card:nth-child(5) { --stat-glow: rgba(244,63,94,.13); }
.vocab-stat-card:nth-child(5) svg { color: #ef5a49; }

.vocab-stat-card svg {
  color: var(--voc-blue);
}

.vocab-stat-card b {
  font-size: 24px;
  color: var(--voc-text-brand);
  font-weight: 900;
}

.vocab-stat-card span {
  font-size: 12px;
  color: var(--voc-muted);
  font-weight: 900;
}

/* Level bar — sidebar only (main content selector removed in 01.9) */
.vocab-mode-section {
  margin-bottom: 18px;
}

/* Mode cards */
.vocab-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.vocab-mode-card {
  border: 1px solid var(--voc-border-soft);
  background: var(--voc-card);
  border-radius: var(--voc-radius);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: .15s ease;
  box-shadow: var(--voc-soft-shadow);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 8px;
}

.vocab-mode-card strong {
  font-size: 15px;
  color: var(--voc-text);
  font-weight: 900;
}

.vocab-mode-card em {
  font-size: 12px;
  color: var(--voc-muted);
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
}

.vocab-mode-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--voc-sky);
  color: var(--voc-blue);
  display: grid;
  place-items: center;
}

.vocab-mode-card.is-active,
.vocab-mode-card:hover {
  border-color: rgba(77, 115, 223, .28);
  background: #f8fbff;
  transform: translateY(-1px);
  box-shadow: var(--voc-soft-shadow);
}

/* Panel */
.vocab-panel {
  margin-bottom: 20px;
}

.vocab-panel-inner {
  background: var(--voc-card);
  border: 1px solid var(--voc-border-soft);
  border-radius: var(--voc-radius);
  padding: 20px;
  box-shadow: var(--voc-soft-shadow);
  backdrop-filter: blur(8px);
}

.vocab-panel-kicker {
  display: block;
  font-size: 12px;
  color: var(--voc-text-brand);
  font-weight: 800;
  margin-bottom: 4px;
}

.vocab-panel-head h3 {
  margin: 0;
  font-size: 19px;
  color: var(--voc-text);
  font-weight: 900;
}

.vocab-soon-panel {
  text-align: center;
  padding: 36px 20px;
  background: var(--voc-card);
  border: 1px dashed var(--voc-border);
  border-radius: var(--voc-radius);
  box-shadow: var(--voc-soft-shadow);
}

.vocab-soon-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.vocab-soon-panel h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--voc-text);
  font-weight: 900;
}

.vocab-soon-panel p {
  margin: 0 0 16px;
  color: var(--voc-muted);
  max-width: 420px;
  margin-inline: auto;
  line-height: 1.55;
  font-weight: 600;
}

/* Topics */
.vocab-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vocab-topic-card {
  border: 1px solid var(--voc-border-soft);
  border-radius: var(--voc-radius);
  padding: 18px;
  background: var(--voc-card);
  box-shadow: var(--voc-soft-shadow);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.vocab-topic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(77, 115, 223, .26);
  box-shadow: 0 18px 38px rgba(41, 79, 199, .13);
}

.vocab-topic-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vocab-topic-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--voc-sky);
  display: grid;
  place-items: center;
  font-size: 22px;
}

.vocab-topic-card:nth-child(4n + 1) .vocab-topic-icon { background: #eaf3ff; }
.vocab-topic-card:nth-child(4n + 2) .vocab-topic-icon { background: #eafff7; }
.vocab-topic-card:nth-child(4n + 3) .vocab-topic-icon { background: #fff5dc; }
.vocab-topic-card:nth-child(4n + 4) .vocab-topic-icon { background: #f3edff; }

.vocab-topic-count {
  font-size: 12px;
  color: var(--voc-text-sub);
  font-weight: 800;
  background: #f5f8fe;
  padding: 5px 8px;
  border-radius: 999px;
}

.vocab-topic-card h3 {
  margin: 0;
  font-size: 17px;
  color: var(--voc-text);
  font-weight: 900;
}

.vocab-topic-progress {
  height: 8px;
  border-radius: 99px;
  background: #e6eefb;
  overflow: hidden;
}

.vocab-topic-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6fa8ff, var(--voc-cyan));
  border-radius: 99px;
}

.vocab-topic-meta {
  font-size: 12px;
  color: var(--voc-muted);
  font-weight: 800;
}

.vocab-topic-btn {
  width: 100%;
  min-height: 44px;
  padding-block: 11px;
  border-radius: 15px;
  font-size: 14px;
}

@media (min-width: 981px) and (max-width: 1360px) {
  .vocab-page .sr-header { gap: 10px; padding-inline: 14px; }
  .vocab-page .sr-brand { min-width: 132px; }
  .vocab-page .sr-brand img { width: 128px; }
  .vocab-page .sr-nav a { padding-inline: 9px; font-size: 13px; }
  .vocab-page .sr-vip-btn { padding-inline: 11px; }
}

/* Lessons */
.vocab-lesson-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.vocab-lesson-overview-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--voc-border-soft);
  border-radius: 16px;
  background: var(--voc-card);
  box-shadow: var(--voc-soft-shadow);
}

.vocab-lesson-overview-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.vocab-lesson-overview-row label {
  font-size: 12px;
  font-weight: 800;
  color: var(--voc-muted);
}

.vocab-lesson-overview-row .vocab-practice-select {
  width: 100%;
  max-width: 100%;
}

.vocab-lesson-overview-hint {
  margin: 0;
  font-size: 12px;
  color: var(--voc-muted);
  font-weight: 700;
}

.vocab-filter-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--voc-border-soft);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  color: var(--voc-text-brand);
}

.vocab-filter-chip.is-active {
  border-color: var(--voc-border);
  color: var(--voc-text-brand);
  background: var(--voc-sky);
}

.vocab-lesson-list {
  display: grid;
  gap: 10px;
}

.vocab-lesson-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--voc-border-soft);
  border-radius: 18px;
  background: var(--voc-card);
  box-shadow: var(--voc-soft-shadow);
  backdrop-filter: blur(8px);
}

.vocab-lesson-card.is-locked {
  opacity: .72;
  background: #f8fafc;
}

.vocab-lesson-no {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--voc-sky);
  color: var(--voc-blue);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
}

.vocab-lesson-body h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--voc-text);
  font-weight: 900;
}

.vocab-lesson-body p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--voc-muted);
  font-weight: 600;
}

.vocab-lesson-card--game {
  --lesson-accent:#4f7bea;
  --lesson-accent-2:#66a4fa;
  --lesson-tint:#eef5ff;
  --lesson-border:#d5e3fb;
  position:relative;
  overflow:hidden;
  min-height:78px;
  padding:11px 12px;
  border-color:var(--lesson-border);
  background:linear-gradient(135deg,#fff 0%,#fff 50%,var(--lesson-tint) 100%);
  box-shadow:0 7px 20px rgba(38,80,166,.08);
  transition:transform .18s ease, box-shadow .18s ease;
}
.vocab-lesson-card--game:hover { transform:translateY(-2px); box-shadow:0 11px 25px rgba(38,80,166,.13); }
.vocab-lesson-list .vocab-lesson-card--game:nth-child(5n+1) { --lesson-accent:#12a879; --lesson-accent-2:#45cf9e; --lesson-tint:#eafbf5; --lesson-border:#ccefe2; }
.vocab-lesson-list .vocab-lesson-card--game:nth-child(5n+2) { --lesson-accent:#e89a19; --lesson-accent-2:#ffc45a; --lesson-tint:#fff7e8; --lesson-border:#f4dfb9; }
.vocab-lesson-list .vocab-lesson-card--game:nth-child(5n+3) { --lesson-accent:#8358df; --lesson-accent-2:#aa83f4; --lesson-tint:#f5efff; --lesson-border:#e3d6fa; }
.vocab-lesson-list .vocab-lesson-card--game:nth-child(5n+4) { --lesson-accent:#e65d82; --lesson-accent-2:#f792ad; --lesson-tint:#fff0f4; --lesson-border:#f7d5df; }
.vocab-lesson-list .vocab-lesson-card--game:nth-child(5n) { --lesson-accent:#2587cf; --lesson-accent-2:#58bee8; --lesson-tint:#edf9fe; --lesson-border:#cfeaf6; }
.vocab-lesson-card--game::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,var(--lesson-accent),var(--lesson-accent-2));
}
.vocab-lesson-card--game .vocab-lesson-no {
  width:46px;
  height:52px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0;
  text-align:center;
  border:1px solid var(--lesson-border);
  border-radius:14px;
  background:linear-gradient(145deg,var(--lesson-tint),#fff);
  box-shadow:inset 0 1px 0 #fff;
}
.vocab-lesson-card--game .vocab-lesson-no small { display:block; margin:0; font-size:8px; line-height:1.1; letter-spacing:.08em; color:#6f85a9; }
.vocab-lesson-card--game .vocab-lesson-no strong { color:var(--lesson-accent); font-size:18px; line-height:1; }
.vocab-lesson-card--game .vocab-lesson-body h4 { margin-bottom:2px; font-size:15px; }
.vocab-lesson-card--game .vocab-lesson-body p { margin-bottom:3px; font-size:11px; }
.vocab-lesson-word-count { display:block; margin-bottom:4px; color:#6b7e9d; font-size:9px; font-weight:700; }
.vocab-lesson-progress-row { display:flex; align-items:center; gap:7px; width:100%; }
.vocab-lesson-progress-row .vocab-topic-progress { flex:1 1 auto; width:auto; min-width:80px; margin:0; }
.vocab-lesson-progress-row .vocab-topic-progress i { background:linear-gradient(90deg,var(--lesson-accent),var(--lesson-accent-2)); }
.vocab-lesson-xp { flex:0 0 auto; color:#b27400; font-size:9px; font-weight:800; white-space:nowrap; }
.vocab-lesson-card--game .vocab-lesson-btn { min-height:40px; padding:8px 13px; border-radius:12px; border:0; color:#fff; background:linear-gradient(135deg,var(--lesson-accent),var(--lesson-accent-2)); box-shadow:0 7px 15px rgba(38,80,166,.16); white-space:nowrap; font-size:12px; }

@media (max-width:640px) {
  .vocab-lesson-card.vocab-lesson-card--game { grid-template-columns:44px minmax(0,1fr) auto; gap:11px; padding:11px 10px; text-align:left; }
  .vocab-lesson-card--game .vocab-lesson-no { width:44px; height:54px; align-self:center; }
  .vocab-lesson-card--game .vocab-lesson-btn { width:auto; min-width:70px; padding:7px 8px; font-size:10px; }
  .vocab-lesson-card--game .vocab-topic-progress { height:5px; }
  .vocab-lesson-progress-row .vocab-topic-progress { min-width:92px; }
}

.vocab-overview-back-top {
  position:fixed;
  right:18px;
  bottom:104px;
  z-index:55;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:8px 13px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg,rgba(46,96,220,.96),rgba(80,146,244,.96));
  box-shadow:0 10px 24px rgba(32,78,182,.28);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-family:inherit;
  cursor:pointer;
}
.vocab-overview-back-top[hidden] { display:none; }
.vocab-overview-back-top span { font-size:18px; line-height:1; }
.vocab-overview-back-top b { font-size:11px; font-weight:800; white-space:nowrap; }
.vocab-overview-back-top:active { transform:translateY(1px); }

@media (max-width:640px) {
  .vocab-overview-back-top { right:14px; bottom:96px; min-height:40px; padding:7px 11px; }
}

/* Flashcard */
.vocab-flashcard {
  position: relative;
  min-height: 280px;
  border: 2px solid #cfe0f8;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #eef6ff);
  box-shadow: var(--voc-soft-shadow);
  margin-bottom: 14px;
  cursor: pointer;
  perspective: 1000px;
}

.vocab-flashcard-face {
  padding: 28px 20px;
  text-align: center;
  min-height: 280px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
}

.vocab-flashcard-back {
  display: none;
}

.vocab-flashcard.is-flipped .vocab-flashcard-front {
  display: none;
}

.vocab-flashcard.is-flipped .vocab-flashcard-back {
  display: grid;
}

.vocab-flash-label {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--voc-muted);
  font-size: 11px;
  font-weight: 800;
}

.vocab-flash-jp {
  font-size: clamp(42px, 8vw, 64px);
  font-family: "Noto Sans JP", Inter, sans-serif;
  color: #07145a;
  font-weight: 900;
  line-height: 1.1;
}

.vocab-flash-kana {
  font-size: 20px;
  color: var(--voc-blue);
  font-weight: 800;
}

.vocab-flash-romaji {
  font-size: 15px;
  color: var(--voc-muted);
  font-weight: 700;
}

.vocab-flash-vi {
  font-size: 22px;
  color: var(--voc-green);
  font-style: normal;
  font-weight: 900;
}

.vocab-flash-example {
  margin: 8px 0 0;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.55;
  color: #324064;
  font-weight: 600;
}

.vocab-flash-example b {
  display: block;
  margin-bottom: 4px;
  font-family: "Noto Sans JP", Inter, sans-serif;
}

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

.vocab-flash-actions .vocab-btn-primary,
.vocab-flash-actions .vocab-btn-soft {
  width: 100%;
}

/* Quiz */
.vocab-quiz-question {
  font-size: 18px;
  line-height: 1.5;
  color: #25335f;
  margin: 0 0 14px;
  font-weight: 800;
}

.vocab-quiz-options {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.vocab-quiz-option {
  min-height: 48px;
  border: 1px solid #d7e6fb;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  color: #17245c;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: .15s ease;
}

.vocab-quiz-option:hover:not(:disabled) {
  border-color: var(--voc-blue);
  background: #f8fbff;
}

.vocab-quiz-option.is-selected {
  border-color: var(--voc-blue);
  background: var(--voc-sky);
}

.vocab-quiz-option.is-correct {
  border-color: var(--voc-green);
  background: #ecfdf5;
}

.vocab-quiz-option.is-wrong {
  border-color: var(--voc-red);
  background: #fff1f2;
}

.vocab-quiz-result {
  margin: 0 0 14px;
  color: var(--voc-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.vocab-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Daily + new words */
.vocab-daily-task,
.vocab-new-words {
  margin-bottom: 18px;
}

.vocab-daily-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vocab-daily-card {
  border: 1px solid var(--voc-border-soft);
  border-radius: 18px;
  padding: 12px;
  background: var(--voc-card);
  display: grid;
  gap: 6px;
  box-shadow: var(--voc-soft-shadow);
  backdrop-filter: blur(8px);
}

.vocab-daily-card.is-done {
  border-color: rgba(22, 163, 74, .35);
  background: #ecfdf3;
}

.vocab-daily-icon {
  font-size: 22px;
}

.vocab-daily-card b {
  font-size: 14px;
  color: var(--voc-text);
  font-weight: 900;
}

.vocab-daily-card span {
  font-size: 12px;
  color: var(--voc-muted);
  font-weight: 900;
}

.vocab-new-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.vocab-new-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--voc-border-soft);
  border-radius: 18px;
  background: var(--voc-card);
  box-shadow: var(--voc-soft-shadow);
  backdrop-filter: blur(8px);
}

.vocab-new-jp {
  font-size: 22px;
  color: var(--voc-text);
  font-weight: 900;
  line-height: 1.16;
  word-break: break-word;
}

.vocab-new-kana {
  font-size: 13px;
  color: var(--voc-text-brand);
  font-weight: 700;
}

.vocab-new-vi {
  font-size: 14px;
  color: var(--voc-muted);
  font-style: normal;
  font-weight: 700;
}

.vocab-empty-note {
  margin: 0;
  padding: 16px;
  color: var(--voc-muted);
  font-weight: 700;
}

/* Responsive */
/* Tablet + mobile responsive */
@media (max-width: 1024px) {
  .vocab-content {
    padding: 16px 18px 40px;
  }

  .vocab-sidebar--overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    padding: 10px 12px;
    margin: 0 0 14px;
    box-shadow: var(--voc-soft-shadow);
    background: var(--voc-card);
    backdrop-filter: blur(8px);
  }

  .vocab-sidebar-block + .vocab-sidebar-block,
  .vocab-sidebar-block + .vocab-mascot-box {
    margin-top: 0;
  }

  .vocab-sidebar--overview .vocab-mascot-box {
    display: none;
  }

  .vocab-sidebar--overview h3 {
    margin: 0 0 6px;
    font-size: 10px;
  }

  .vocab-side-levels,
  .vocab-side-modes,
  .vocab-level-list,
  .vocab-mode-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .vocab-level-btn,
  .vocab-side-mode {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 10px;
    min-height: 40px;
  }

  .vocab-level-btn {
    flex-direction: row;
    gap: 8px;
  }

  .vocab-level-btn b {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .vocab-level-btn span {
    display: none;
  }

  .vocab-side-mode svg {
    width: 18px;
    height: 18px;
  }

  .vocab-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    padding: 16px 18px;
  }

  .vocab-hero-visual {
    display: flex;
    align-items: center;
  }

  .vocab-hero-mascot-wrap {
    width: clamp(100px, 14vw, 150px);
  }

  .vocab-hero-mascot {
    max-width: 150px;
  }

  .vocab-hero-mascot.is-fallback {
    width: 72px;
    height: 72px;
    padding: 10px;
  }

  .vocab-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vocab-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vocab-daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .vocab-content {
    padding: 12px 14px 32px;
  }

  .vocab-sidebar--overview {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .vocab-hero {
    padding: 14px 16px;
    border-radius: 24px;
  }

  .vocab-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .vocab-hero-actions .vocab-btn-primary,
  .vocab-hero-actions .vocab-btn-soft {
    width: 100%;
    min-height: 44px;
    padding: 12px 10px;
    font-size: 14px;
  }

  .vocab-stat-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .vocab-stat-card {
    min-width: 132px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .vocab-topic-grid,
  .vocab-daily-grid,
  .vocab-mode-grid {
    grid-template-columns: 1fr;
  }

  .vocab-lesson-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .vocab-lesson-btn {
    width: 100%;
  }

  .vocab-new-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .vocab-flash-actions,
  .vocab-quiz-actions {
    grid-template-columns: 1fr;
  }

  .vocab-quiz-actions .vocab-btn-primary,
  .vocab-quiz-actions .vocab-btn-soft {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .vocab-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .vocab-hero-copy h1 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .vocab-hero-mascot-wrap {
    width: 92px;
  }

  .vocab-hero-mascot {
    max-width: 92px;
  }

  .vocab-hero-mascot.is-fallback {
    width: 64px;
    height: 64px;
    padding: 8px;
  }

  .vocab-hero-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .vocab-hero {
    grid-template-columns: 1fr;
  }

  .vocab-hero-visual {
    justify-content: flex-start;
    margin-top: 8px;
  }

  .vocab-hero-mascot-wrap {
    width: 88px;
  }
}

@media (max-width: 390px) {
  .vocab-breadcrumb {
    font-size: 12px;
  }

  .vocab-flash-jp,
  .vocab-flashcard-jp {
    font-size: 38px;
  }
}

/* View switching */
.vocab-view.is-hidden {
  display: none !important;
}

.vocab-view.is-active {
  display: block;
}

.vocab-practice-view.is-active {
  display: flex !important;
}

.vocab-launch-panel .vocab-launch-desc {
  margin: 0 0 14px;
  color: var(--voc-muted);
  line-height: 1.55;
  font-weight: 600;
}

/* Dedicated study views */
.vocab-study-shell {
  max-width: 920px;
  margin: 0 auto;
}

.vocab-study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}

.vocab-study-layout--single {
  grid-template-columns: 1fr;
}

.vocab-study-main {
  background: #fff;
  border: 1px solid var(--voc-border);
  border-radius: 24px;
  padding: 18px 20px 22px;
  box-shadow: var(--voc-soft-shadow);
}

.vocab-study-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.vocab-study-back {
  border: 1px solid var(--voc-border);
  background: #fff;
  color: var(--voc-blue);
  border-radius: 12px;
  min-height: 44px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.vocab-study-back:hover {
  background: var(--voc-sky);
}

.vocab-study-topbar-copy h2 {
  margin: 0;
  font-size: clamp(18px, 3vw, 24px);
  color: #07145a;
  font-weight: 900;
  line-height: 1.2;
}

.vocab-study-topbar-copy p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--voc-muted);
  font-weight: 600;
}

.vocab-study-counter {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--voc-sky);
  color: var(--voc-blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.vocab-study-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.vocab-study-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e7effc;
  overflow: hidden;
}

.vocab-study-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #0b63f6);
  border-radius: 999px;
  transition: width .25s ease;
}

.vocab-study-progress span {
  font-size: 12px;
  color: var(--voc-muted);
  font-weight: 800;
}

/* Study flashcard */
.vocab-flashcard {
  position: relative;
  min-height: 300px;
  border: 2px solid #cfe0f8;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #eef6ff);
  box-shadow: var(--voc-soft-shadow);
  margin-bottom: 12px;
  cursor: pointer;
  outline: none;
}

.vocab-flashcard:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 99, 246, .25), var(--voc-soft-shadow);
}

.vocab-flashcard-face {
  padding: 28px 18px;
  text-align: center;
  min-height: 300px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
}

.vocab-flashcard-back {
  display: none;
}

.vocab-flashcard.is-flipped .vocab-flashcard-front {
  display: none;
}

.vocab-flashcard.is-flipped .vocab-flashcard-back {
  display: grid;
}

.vocab-flashcard-label {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--voc-muted);
  font-size: 11px;
  font-weight: 800;
}

.vocab-flashcard-jp {
  font-size: clamp(44px, 9vw, 72px);
  font-family: "Noto Sans JP", Inter, sans-serif;
  color: #07145a;
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
}

.vocab-flashcard-hint {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--voc-muted);
  font-weight: 600;
}

.vocab-flashcard-kana {
  font-size: 20px;
  color: var(--voc-blue);
  font-weight: 800;
}

.vocab-flashcard-romaji {
  font-size: 15px;
  color: var(--voc-muted);
  font-weight: 700;
}

.vocab-flashcard-vi {
  font-size: 22px;
  color: var(--voc-green);
  font-style: normal;
  font-weight: 900;
}

.vocab-flashcard-example {
  margin: 10px 0 0;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.55;
  color: #324064;
  font-weight: 600;
  padding: 0 8px;
  word-break: break-word;
}

.vocab-flashcard-example b {
  display: block;
  margin-bottom: 4px;
  font-family: "Noto Sans JP", Inter, sans-serif;
}

.vocab-study-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 800;
}

.vocab-study-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vocab-study-actions--flash {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vocab-study-actions .vocab-btn-primary,
.vocab-study-actions .vocab-btn-soft {
  flex: 1 1 auto;
  min-width: 120px;
}

.vocab-study-demo-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--voc-muted);
  font-weight: 700;
}

.vocab-study-aside {
  position: sticky;
  top: 92px;
}

.vocab-study-tip {
  border: 1px solid #cce7d8;
  background: linear-gradient(180deg, #f2fff8, #fff);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
}

.vocab-study-tip-mascot {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: var(--voc-sky);
  display: grid;
  place-items: center;
  padding: 10px;
}

.vocab-study-tip-mascot img {
  width: 100%;
  object-fit: contain;
}

.vocab-study-tip b {
  display: block;
  font-size: 14px;
  color: #07145a;
  margin-bottom: 6px;
}

.vocab-study-tip p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--voc-muted);
  line-height: 1.5;
  font-weight: 600;
}

/* Study quiz */
.vocab-quiz-card {
  border: 1px solid var(--voc-border);
  border-radius: 18px;
  padding: 18px;
  background: #f8fbff;
  margin-bottom: 14px;
}

.vocab-quiz-card-label {
  display: block;
  font-size: 12px;
  color: var(--voc-blue);
  font-weight: 800;
  margin-bottom: 8px;
}

.vocab-quiz-card-question {
  margin: 0;
  font-size: clamp(18px, 4vw, 22px);
  line-height: 1.45;
  color: #25335f;
  font-weight: 900;
}

.vocab-answer-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.vocab-answer-option {
  min-height: 48px;
  width: 100%;
  border: 2px solid #d7e6fb;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  color: #17245c;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: .15s ease;
}

.vocab-answer-option:hover:not(:disabled) {
  border-color: var(--voc-blue);
  background: #f8fbff;
}

.vocab-answer-option.is-selected {
  border-color: var(--voc-blue);
  background: var(--voc-sky);
}

.vocab-answer-option.is-correct {
  border-color: var(--voc-green);
  background: #ecfdf5;
}

.vocab-answer-option.is-wrong {
  border-color: var(--voc-red);
  background: #fff1f2;
}

.vocab-answer-label {
  min-width: 22px;
  color: var(--voc-blue);
  font-weight: 900;
}

.vocab-answer-text {
  flex: 1;
}

.vocab-study-feedback {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.vocab-study-feedback.is-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.vocab-study-feedback.is-error {
  background: #fff1f2;
  color: #b91c1c;
  border: 1px solid #fecdd3;
}

.vocab-study-summary {
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed #cfe0f8;
  border-radius: 20px;
  background: #f8fbff;
}

.vocab-study-summary-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.vocab-study-summary h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #07145a;
  font-weight: 900;
}

.vocab-study-summary-score {
  margin: 0 0 8px;
  font-size: 16px;
  color: #324064;
  font-weight: 700;
}

.vocab-study-summary .vocab-study-actions {
  justify-content: center;
  margin-top: 16px;
}

/* Study view responsive */
@media (max-width: 1180px) {
  .vocab-study-layout {
    grid-template-columns: 1fr;
  }

  .vocab-study-aside {
    position: static;
  }
}

@media (max-width: 820px) {
  .vocab-study-shell {
    max-width: 100%;
  }

  .vocab-study-main {
    padding: 14px;
    border-radius: 20px;
  }

  .vocab-study-topbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vocab-study-counter {
    justify-self: start;
  }

  .vocab-study-actions--flash,
  .vocab-study-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vocab-study-actions .vocab-btn-primary,
  .vocab-study-actions .vocab-btn-soft {
    width: 100%;
    min-width: 0;
  }

  .vocab-flashcard {
    min-height: 260px;
  }

  .vocab-flashcard-face {
    min-height: 260px;
    padding: 22px 14px;
  }

  .vocab-study-tip {
    display: none;
  }
}

/* ============================================================
   Vocabulary Practice View — scoped .vocab-practice-*
   UI reference: shinha_jsc_vocab_bai1_final_v3.html
   ============================================================ */

.vocab-content.is-practice-mode {
  max-width: none;
  width: 100%;
  padding: 28px 20px 56px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.vocab-shell.is-practice-mode .vocab-sidebar--overview {
  display: none;
}

.vocab-practice-view {
  scroll-margin-top: 92px;
  width: 100%;
}

.vocab-practice-view.is-active {
  width: 100%;
  flex: 1 1 100%;
  min-height: calc(100vh - var(--voc-header-height, 76px) - 40px);
  padding: 28px 16px 56px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(111, 168, 255, .22), transparent 34%),
    radial-gradient(circle at 90% 12%, rgba(45, 212, 191, .18), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, #effffb 54%, #fffaf0 100%);
  border-radius: 20px;
}

.vocab-practice-shell {
  --practice-blue: #4d73df;
  --practice-blue-2: #72a7ff;
  --practice-cyan: #2dd4bf;
  --practice-mint: #e9fff8;
  --practice-cream: #fffaf0;
  --practice-text: #17305c;
  --practice-muted: #667085;
  --practice-green: #16a34a;
  --practice-red: #e11d48;
  --practice-shadow: 0 18px 45px rgba(77, 115, 223, .18);
  --practice-radius: 26px;
  --voc-header-height: 76px;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 0;
  font-family: "Segoe UI", Arial, "Helvetica Neue", sans-serif;
  color: var(--practice-text);
  font-weight: 600;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.vocab-practice-shell,
.vocab-practice-shell * {
  font-family: "Segoe UI", Arial, "Helvetica Neue", sans-serif;
}

.vocab-practice-inner {
  display: grid;
  gap: 14px;
}

.vocab-practice-brand {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 18px;
  min-height: 170px;
  background: linear-gradient(135deg, #fff 0%, #eef6ff 48%, #eafffb 100%);
  box-shadow: var(--practice-shadow);
  border: 1px solid rgba(77, 115, 223, .18);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

.vocab-practice-brand::before {
  content: "";
  position: absolute;
  right: -52px;
  top: -58px;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(77, 115, 223, .16);
}

.vocab-practice-brand::after {
  content: "";
  position: absolute;
  left: -40px;
  bottom: -52px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(45, 212, 191, .16);
}

.vocab-practice-brand-top {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
  padding-right: 112px;
}

.vocab-practice-brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 20px;
  padding: 6px;
  box-shadow: 0 8px 22px rgba(77, 115, 223, .16);
}

.vocab-practice-brand-copy b,
.vocab-practice-brand-title {
  display: block;
  font-size: 25px;
  line-height: 1;
  color: #294fc7;
  font-weight: 900;
  letter-spacing: -.5px;
  text-shadow: 0 3px 14px rgba(41,79,199,.15);
}

.vocab-practice-brand-copy span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #42618f;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: .05px;
}

.vocab-practice-mascot {
  position: absolute;
  right: 0;
  bottom: -18px;
  width: 145px;
  height: auto;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(34, 62, 126, .18));
  pointer-events: none;
}

.vocab-practice-mascot.is-fallback {
  width: 96px;
  opacity: .82;
  bottom: 4px;
  right: 8px;
}

.vocab-practice-tip {
  border: 1px solid rgba(77, 115, 223, .14);
  background: linear-gradient(180deg, #f2fff8, #fff);
  border-radius: var(--practice-radius);
  padding: 16px 18px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(77, 115, 223, .08);
}

.vocab-practice-tip-mascot {
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(34, 62, 126, .14));
}

.vocab-practice-tip-mascot.is-fallback {
  width: 64px;
  height: 64px;
  padding: 8px;
  border-radius: 16px;
  background: #edf6ff;
}

.vocab-practice-tip b {
  display: block;
  font-size: 15px;
  color: var(--practice-text);
  font-weight: 900;
  margin-bottom: 6px;
}

.vocab-practice-tip p {
  margin: 0;
  font-size: 13px;
  color: var(--practice-muted);
  line-height: 1.5;
  font-weight: 700;
}

.vocab-practice-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
  position: relative;
  z-index: 3;
}

.vocab-practice-badge {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding: 7px 10px;
  border-radius: 11px;
  background: linear-gradient(135deg,rgba(255,255,255,.96),rgba(243,248,255,.94));
  color: #244aa8;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: -.05px;
  border: 1px solid rgba(70,112,215,.18);
  box-shadow: inset 0 1px 0 #fff, 0 5px 14px rgba(48,88,180,.08);
}

.vocab-practice-badge svg {
  width:15px;
  height:15px;
  flex:0 0 15px;
  color:#3274e8;
  stroke:currentColor;
}

.vocab-practice-demo-label {
  position: relative;
  z-index: 3;
  margin-top: 10px;
  display: inline-flex;
}

/* Scoped practice buttons — no global button selector */
.vocab-practice-button,
.vocab-practice-action-btn,
.vocab-practice-back-btn,
.vocab-practice-speak-btn,
.vocab-practice-start-btn,
.vocab-practice-quick-btn,
.vocab-practice-choice {
  font-family: "Segoe UI", Arial, "Helvetica Neue", sans-serif;
  font-weight: 900;
}

.vocab-practice-button {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 19px;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: .15s ease;
}

.vocab-practice-button--primary,
.vocab-practice-start-btn,
.vocab-practice-action-btn.is-primary {
  background: linear-gradient(135deg, var(--practice-blue, #4d73df), var(--practice-blue-2, #72a7ff));
  color: #fff;
  box-shadow: 0 10px 22px rgba(77, 115, 223, .26);
}

.vocab-practice-button--secondary,
.vocab-practice-quick-btn,
.vocab-practice-action-btn.is-soft {
  background: #eff6ff;
  color: #294fc7;
  border: 1px solid #dbe8ff;
  box-shadow: none;
}

.vocab-practice-button--ghost,
.vocab-practice-back-btn {
  background: #fff;
  color: #365580;
  border: 1px solid #dbe8ff;
  box-shadow: none;
  width: auto;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
}

.vocab-practice-button--danger,
.vocab-practice-action-btn.is-danger {
  background: #fff1f2;
  color: var(--practice-red, #e11d48);
  border: none;
  box-shadow: none;
}

.vocab-practice-button:disabled,
.vocab-practice-action-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.vocab-practice-start-btn {
  margin-top: 16px;
}

.vocab-practice-quick-btn {
  width: auto;
  min-height: 40px;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 13px;
}

.vocab-practice-back-btn--setup {
  width: 100%;
  margin-bottom: 4px;
}

.vocab-practice-top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.vocab-practice-top-actions .vocab-practice-button {
  width: auto;
}

.vocab-practice-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(77, 115, 223, .14);
  border-radius: var(--practice-radius, 26px);
  padding: 18px;
  box-shadow: 0 12px 30px rgba(77, 115, 223, .1);
  backdrop-filter: blur(8px);
  margin-top: 14px;
}

.vocab-practice-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.vocab-practice-setup-title {
  margin: 0;
  font-size: 19px;
  color: #17305c;
  font-weight: 900;
}

.vocab-practice-pill {
  background: #edf6ff;
  color: #294fc7;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.vocab-practice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vocab-practice-field {
  display: block;
  margin-bottom: 0;
}

.vocab-practice-field.is-hidden {
  display: none !important;
}

.vocab-practice-path-row {
  margin-bottom: 4px;
}

.vocab-practice-filter-group {
  display: grid;
  gap: 0;
}

.vocab-practice-filter-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #edf6ff;
  color: #294fc7;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.vocab-practice-field label {
  display: block;
  font-size: 13px;
  color: #365580;
  font-weight: 900;
  margin: 14px 0 7px;
}

.vocab-practice-select,
.vocab-practice-input {
  min-height: 48px;
  width: 100%;
  border: 1.5px solid #dbe8ff;
  border-radius: 18px;
  padding: 14px 15px;
  font-size: 17px;
  font-weight: 600;
  color: #17305c;
  background: #fff;
  font-family: inherit;
  line-height: 1.35;
}

.vocab-practice-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #365580 50%), linear-gradient(135deg, #365580 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(50% + 2px), calc(100% - 16px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.vocab-practice-select:focus {
  outline: none;
  border-color: #4d73df;
  box-shadow: 0 0 0 4px rgba(77, 115, 223, .14);
}

.vocab-practice-start-btn:hover {
  transform: translateY(-1px);
}

.vocab-practice-quick {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.vocab-practice-quick-btn:hover {
  background: #eaf2ff;
}

.vocab-practice-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #edf6ff;
  color: #294fc7;
  font-size: 13px;
  font-weight: 900;
  max-width: 100%;
  line-height: 1.35;
}

.vocab-practice-progress {
  margin-bottom: 14px;
}

.vocab-practice-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.vocab-practice-bar {
  flex: 1;
  height: 12px;
  border-radius: 99px;
  background: #e6eefb;
  overflow: hidden;
}

.vocab-practice-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6fa8ff, #2dd4bf);
  border-radius: 99px;
  transition: width .25s ease;
}

.vocab-practice-counter {
  font-size: 13px;
  color: #667085;
  font-weight: 900;
  min-width: 70px;
  text-align: right;
}

.vocab-practice-progress-note {
  display: block;
  font-size: 12px;
  color: #667085;
  font-weight: 800;
  margin-bottom: 10px;
}

.vocab-practice-image-box {
  width: 92%;
  max-width: 440px;
  aspect-ratio: 1.08 / 1;
  border: 2px dashed #c9dbff;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f2f8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 8px auto 14px;
}

.vocab-practice-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.vocab-practice-image-box.is-empty span {
  font-size: 14px;
  color: #8aa1d6;
  font-weight: 900;
}

.vocab-practice-word {
  display: block;
  font-size: clamp(32px, 9.5vw, 58px);
  color: var(--practice-text, #17305c);
  font-weight: 900;
  line-height: 1.16;
  text-align: center;
  margin: 0 0 8px;
  word-break: break-word;
  overflow-wrap: anywhere;
  letter-spacing: .3px;
  padding: 12px 6px 8px;
  max-width: 100%;
}

.vocab-practice-subword,
.vocab-practice-jp-hint-small {
  display: block;
  text-align: center;
  font-size: 15px;
  color: var(--practice-muted, #667085);
  font-weight: 700;
  min-height: 22px;
  margin-bottom: 8px;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  white-space: normal;
}

.vocab-practice-jp-hint {
  display: block;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.16;
}

.vocab-practice-example {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #324064;
  font-weight: 600;
  text-align: center;
  word-break: break-word;
}

.vocab-practice-example b {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  line-height: 1.16;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.vocab-practice-flashcard {
  border: 2px solid #cfe0f8;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #eef6ff);
  padding: 22px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  text-align: center;
}

.vocab-practice-flashcard-front,
.vocab-practice-flashcard-back {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.vocab-practice-flashcard.is-revealed .vocab-practice-flashcard-front {
  display: none;
}

.vocab-practice-flashcard:not(.is-revealed) .vocab-practice-flashcard-back {
  display: none;
}

.vocab-practice-flashcard-back {
  padding-top: 4px;
}

.vocab-practice-flashcard .vocab-practice-word {
  padding: 8px 6px 4px;
  margin: 0;
}

.vocab-practice-word-meaning {
  display: block;
  font-size: 22px;
  color: var(--practice-green, #16a34a);
  font-style: normal;
  font-weight: 900;
  margin-bottom: 8px;
}

.vocab-practice-choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
}

.vocab-practice-choice {
  min-height: 48px;
  width: 100%;
  border: 1.5px solid #dbe8ff;
  border-radius: 19px;
  background: #fff;
  color: #17305c;
  font-size: 16px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  text-align: left;
  transition: .15s ease;
  box-shadow: none;
  line-height: 1.35;
}

.vocab-practice-choice:hover:not(:disabled) {
  border-color: var(--practice-blue, #4d73df);
  background: #f8fbff;
}

.vocab-practice-choice.is-selected {
  border-color: var(--practice-blue, #4d73df);
  background: #eaf2ff;
}

.vocab-practice-choice.is-correct {
  border-color: rgba(22, 163, 74, .45);
  background: #ecfdf3;
  color: var(--practice-green, #16a34a);
}

.vocab-practice-choice.is-wrong {
  border-color: rgba(225, 29, 72, .45);
  background: #fff1f2;
  color: var(--practice-red, #e11d48);
}

.vocab-practice-choice.is-correct .vocab-practice-choice-label,
.vocab-practice-choice.is-wrong .vocab-practice-choice-label {
  color: inherit;
}

.vocab-practice-choice-label {
  min-width: 24px;
  color: #294fc7;
  font-weight: 900;
}

.vocab-practice-input-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.vocab-practice-input:focus {
  outline: none;
  border-color: #4d73df;
  box-shadow: 0 0 0 4px rgba(77, 115, 223, .14);
}

.vocab-practice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.vocab-practice-actions--flash {
  grid-template-columns: 1fr 1fr;
}

.vocab-practice-quiz.is-flashcard-mode .vocab-practice-stats,
.vocab-practice-quiz.is-flashcard-mode .vocab-practice-result {
  display: none !important;
}

.vocab-practice-score-screen {
  aspect-ratio: 1 / 1;
  border: none !important;
  background: linear-gradient(180deg, #f2faff 0%, #fff 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(77, 115, 223, .08);
  font-size: 42px;
}

.vocab-practice-stat b {
  display: block;
  font-size: 24px;
  color: #294fc7;
  font-weight: 900;
}

.vocab-practice-wrong-item {
  padding: 12px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #dbe8ff;
  line-height: 1.45;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.vocab-practice-result {
  margin: 14px 0 12px;
  padding: 14px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
  border: none;
}

.vocab-practice-result.is-success {
  background: #ecfdf3;
  color: var(--practice-green, #16a34a);
}

.vocab-practice-result.is-error {
  background: #fff1f2;
  color: var(--practice-red, #e11d48);
}

.vocab-practice-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.vocab-practice-stat {
  background: #f8fbff;
  border: 1px solid #dbe8ff;
  border-radius: 18px;
  padding: 12px;
  text-align: center;
}

.vocab-practice-stat span {
  display: block;
  font-size: 12px;
  color: #667085;
  font-weight: 900;
  margin-top: 2px;
}

.vocab-practice-summary {
  text-align: center;
}

.vocab-practice-summary-head {
  font-size: 42px;
  margin-bottom: 8px;
}

.vocab-practice-summary h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #07145a;
  font-weight: 900;
}

.vocab-practice-summary-score {
  margin: 0 0 8px;
  font-size: 16px;
  color: #324064;
  font-weight: 700;
}

.vocab-practice-wrong-title {
  margin: 18px 0 10px;
  font-size: 15px;
  color: #07145a;
  font-weight: 900;
  text-align: left;
}

.vocab-practice-wrong-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
}

.vocab-practice-wrong-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  background: #fff8f8;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.vocab-practice-wrong-list b,
.vocab-practice-wrong-item b {
  color: var(--practice-text, #17305c);
  font-weight: 900;
}

.vocab-practice-wrong-list span {
  color: #677394;
  font-weight: 700;
}

.vocab-practice-empty-wrong {
  margin: 0;
  font-size: 13px;
  color: #677394;
  text-align: left;
  font-weight: 600;
}

.vocab-practice-footer {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  color: #667085;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .vocab-content.is-practice-mode {
    padding: 16px 12px 40px;
  }

  .vocab-practice-view.is-active {
    padding: 16px 10px 40px;
    border-radius: 0;
    min-height: calc(100vh - var(--voc-header-height, 72px) - 24px);
  }

  .vocab-practice-shell {
    width: 100%;
  }

  .vocab-practice-brand-top {
    padding-right: 96px;
  }

  .vocab-practice-mascot {
    width: 110px;
  }

  .vocab-practice-row {
    grid-template-columns: 1fr;
  }

  .vocab-practice-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vocab-practice-actions,
  .vocab-practice-actions--flash,
  .vocab-practice-actions--input,
  .vocab-practice-actions--next {
    grid-template-columns: 1fr;
  }

  .vocab-practice-tip-mascot {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 380px) {
  .vocab-practice-view.is-active {
    padding: 14px 8px 32px;
  }

  .vocab-practice-brand {
    min-height: 164px;
    padding: 15px;
  }

  .vocab-practice-brand-copy b,
  .vocab-practice-brand-title {
    font-size: 22px;
  }

  .vocab-practice-card {
    padding: 15px;
  }

  .vocab-practice-row {
    grid-template-columns: 1fr;
  }

  .vocab-practice-button,
  .vocab-practice-choice,
  .vocab-practice-select,
  .vocab-practice-input {
    min-height: 44px;
  }

  .vocab-practice-quick-btn {
    min-height: 44px;
    padding: 10px 12px;
  }

  .vocab-practice-mascot {
    width: 96px;
    bottom: -8px;
  }

  .vocab-practice-brand-top {
    padding-right: 84px;
  }

  .vocab-practice-tip {
    display: none;
  }
}
.vocab-dictionary-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #eef5ff;
  color: #17305c;
}

.vocab-dictionary-form small {
  color: #667085;
  font-weight: 700;
}

.vocab-conjugation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 12px 0;
}

.vocab-conjugation-grid span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #dbe7fb;
  border-radius: 10px;
  background: #fff;
  color: #17305c;
}

.vocab-conjugation-grid small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .vocab-page .sr-header {
    transition:transform .22s ease, opacity .22s ease;
    will-change:transform;
  }
  .vocab-page.vocab-book-header-hidden .sr-header {
    transform:translateY(-105%);
    opacity:0;
    pointer-events:none;
  }
  .vocab-conjugation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* UI refinement: softer type, clean brand assets, calmer surfaces */
.vocab-page,
.vocab-shell,
.vocab-shell *,
.vocab-practice-view,
.vocab-practice-view * {
  font-family: "Segoe UI Variable Text", "Segoe UI", "Noto Sans", Arial, sans-serif;
}

.vocab-page { font-weight: 500; letter-spacing: -.006em; }
.vocab-page .sr-vip-btn { display: none !important; }

.vocab-page .sr-brand {
  min-width: 164px;
  gap: 10px;
}

.vocab-page .sr-brand-fallback {
  display: inline-block;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.045em;
  color: #103fa9;
}

.vocab-page .sr-brand img.vocab-official-logo {
  width: 40px;
  height: 50px;
  max-height: 50px;
  flex: 0 0 40px;
  object-fit: contain;
  display: block;
}

.vocab-mascot-placeholder {
  background: transparent;
  padding: 0;
  height: 56px;
}

.vocab-mascot-placeholder img.vocab-official-logo {
  width: 52px;
  height: 66px;
  object-fit: contain;
  display: block;
}

.vocab-hero-mascot {
  filter: drop-shadow(0 16px 20px rgba(34, 62, 126, .16));
}

.vocab-hero-copy h1 {
  font-weight: 760;
  letter-spacing: -.035em;
}

.vocab-hero-copy p,
.vocab-topic-card p,
.vocab-mascot-box span {
  font-weight: 500;
}

.vocab-stats-head h2,
.vocab-daily-head h2,
.vocab-new-head h2,
.vocab-panel-head h3,
.vocab-topic-card h3,
.vocab-lesson-body h4 {
  font-weight: 720;
  letter-spacing: -.025em;
}

.vocab-btn-primary,
.vocab-btn-soft,
.vocab-side-mode,
.vocab-level-btn,
.vocab-demo-label,
.vocab-filter-chip,
.vocab-topic-meta,
.vocab-stat-card span {
  font-weight: 650;
}

.vocab-stat-card b {
  font-weight: 740;
  letter-spacing: -.025em;
}

.vocab-topic-card,
.vocab-stat-card,
.vocab-panel-inner {
  border-color: rgba(60, 100, 185, .12);
}

.vocab-topic-card { border-radius: 22px; }
.vocab-btn-primary,
.vocab-btn-soft { border-radius: 15px; }

.vocab-practice-brand-logo.vocab-official-logo {
  width: 42px;
  height: 54px;
  padding: 0;
  object-fit: contain;
}

@media (max-width: 640px) {
  .vocab-page .sr-brand { min-width: auto; }
  .vocab-page .sr-brand-fallback { font-size: 21px; }
}

/* Topic library: clear title/content hierarchy and one cohesive icon family */
.vocab-panel-inner[data-panel="topic"] {
  padding: 22px;
  background: rgba(255, 255, 255, .96);
}

.vocab-panel-inner[data-panel="topic"] .vocab-panel-head {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e7eef9;
}

.vocab-panel-inner[data-panel="topic"] .vocab-panel-kicker {
  margin-bottom: 6px;
  color: #5270a4;
  font-size: 11px;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.vocab-panel-inner[data-panel="topic"] .vocab-panel-head h3 {
  font-size: 21px;
  color: #102b5d;
}

.vocab-topic-grid { gap: 14px; }

.vocab-topic-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-height: 260px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(35, 70, 140, .07);
}

.vocab-topic-heading {
  min-height: 82px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--topic-tint, #f4f8ff);
  border-bottom: 1px solid var(--topic-line, #e1eafa);
}

.vocab-topic-heading h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  color: #102b5d;
}

.vocab-topic-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--topic-line, #dce8fb);
  border-radius: 15px;
  background: rgba(255,255,255,.88) !important;
  color: var(--topic-color, #356de0);
  box-shadow: 0 6px 14px rgba(38, 75, 145, .07);
}

.vocab-topic-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.8;
}

.vocab-topic-count {
  align-self: start;
  margin-top: 3px;
  background: rgba(255,255,255,.82);
  color: #526b96;
  border: 1px solid var(--topic-line, #dce8fb);
  font-size: 11px;
  padding: 5px 8px;
}

.vocab-topic-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.vocab-topic-content > p {
  min-height: 42px;
  margin: 0 0 17px;
  color: #536785;
  font-size: 14px;
  line-height: 1.55;
}

.vocab-topic-status {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 13px;
}

.vocab-topic-status .vocab-topic-meta {
  color: #71809a;
  font-size: 11px;
  white-space: nowrap;
}

.vocab-topic-status .vocab-topic-progress {
  height: 6px;
  background: #e9eff8;
}

.vocab-topic-status.is-quest {
  grid-template-columns: 24px auto minmax(48px, 1fr) auto;
  gap: 7px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #e7e2c7;
  border-radius: 12px;
  background: linear-gradient(90deg, #fffdf5, #fff9e7);
}

.vocab-quest-start {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #ffb72f, #f28b16);
  box-shadow: 0 4px 10px rgba(242, 139, 22, .24);
  font-size: 12px;
}

.vocab-topic-status.is-quest .vocab-topic-meta {
  color: #8b6418;
  font-weight: 700;
}

.vocab-quest-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: #f4e8c7;
}

.vocab-quest-track i {
  position: absolute;
  left: 0;
  top: -2px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ffad24;
  box-shadow: 0 0 0 1px #e6b34e;
}

.vocab-quest-track b {
  position: absolute;
  right: -2px;
  top: -8px;
  color: #db9219;
  font-size: 12px;
  line-height: 1;
}

.vocab-xp-reward {
  padding: 4px 7px;
  border-radius: 8px;
  color: #805100;
  background: #ffe8a3;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(211, 145, 18, .15);
}

.vocab-topic-card:hover .vocab-quest-start {
  animation: vocab-quest-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes vocab-quest-pulse {
  to { transform: translateY(-1px) scale(1.06); box-shadow: 0 6px 14px rgba(242, 139, 22, .32); }
}

@media (prefers-reduced-motion: reduce) {
  .vocab-topic-card:hover .vocab-quest-start { animation: none; }
}

.vocab-topic-btn {
  justify-content: space-between;
  min-height: 42px;
  padding-inline: 14px;
  background: #f6f9fe;
  border-color: #dfe9f8;
  color: #234fac;
  box-shadow: none;
}

.vocab-topic-btn span { font-size: 17px; font-weight: 500; }
.vocab-topic-card--tone-1 { --topic-tint:#f2f7ff; --topic-line:#dce8fb; --topic-color:#3972df; }
.vocab-topic-card--tone-2 { --topic-tint:#f0fbf7; --topic-line:#d6f1e6; --topic-color:#16956d; }
.vocab-topic-card--tone-3 { --topic-tint:#fff8ea; --topic-line:#f7e8c5; --topic-color:#d78a17; }
.vocab-topic-card--tone-4 { --topic-tint:#f7f3ff; --topic-line:#e7dcfa; --topic-color:#7b5aca; }
.vocab-topic-card--tone-5 { --topic-tint:#fff3f5; --topic-line:#f5dce2; --topic-color:#d65a74; }
.vocab-topic-card--tone-6 { --topic-tint:#f0f9fb; --topic-line:#d7edf2; --topic-color:#2787a3; }

@media (max-width: 767px) {
  .vocab-panel-inner[data-panel="topic"] { padding: 16px; }
  .vocab-topic-card { min-height: 0; }
  .vocab-topic-heading { min-height: 74px; }
  .vocab-topic-content > p { min-height: 0; }
}

/* Daily mission board */
.vocab-daily-task {
  padding: 19px;
  border: 1px solid rgba(60, 100, 185, .12);
  border-radius: 24px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 10px 28px rgba(41,79,199,.07);
}

.vocab-daily-head {
  padding-bottom: 13px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e7eef9;
}

.vocab-daily-kicker {
  display: block;
  margin-bottom: 5px;
  color: #5270a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
}

.vocab-daily-grid { gap: 12px; }

.vocab-daily-card {
  position: relative;
  gap: 10px;
  min-height: 154px;
  padding: 14px;
  overflow: hidden;
  border-color: var(--mission-line, #dce8fb);
  border-radius: 18px;
  background: linear-gradient(160deg, #fff 45%, var(--mission-tint, #f3f7ff));
  box-shadow: 0 7px 18px rgba(35,70,140,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.vocab-daily-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 25px rgba(35,70,140,.11);
}

.vocab-daily-card.is-done {
  border-color: #9ee1bd;
  background: linear-gradient(160deg, #fff 38%, #ebfbf2);
}

.vocab-daily-card-top,
.vocab-daily-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vocab-daily-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--mission-line, #dce8fb);
  border-radius: 13px;
  color: var(--mission-color, #3972df) !important;
  background: rgba(255,255,255,.9);
  box-shadow: 0 5px 12px rgba(35,70,140,.07);
}

.vocab-daily-icon svg { width: 20px; height: 20px; stroke-width: 1.9; }

.vocab-daily-xp {
  padding: 5px 8px;
  border-radius: 9px;
  color: #8a5a00 !important;
  background: #ffedb5;
  font-size: 10px !important;
  font-weight: 800 !important;
  box-shadow: inset 0 0 0 1px rgba(211,145,18,.12);
}

.vocab-daily-card > b {
  min-height: 36px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.015em;
}

.vocab-daily-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef8;
  box-shadow: inset 0 1px 2px rgba(50,80,130,.08);
}

.vocab-daily-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mission-color, #3972df), #75a7ff);
}

.vocab-daily-card.is-done .vocab-daily-progress i {
  background: linear-gradient(90deg, #16a36a, #5bd59c);
}

.vocab-daily-foot span { font-size: 10px; font-weight: 650; }
.vocab-daily-state { color: #64738c !important; }
.vocab-daily-count { color: #40577f !important; }
.vocab-daily-card.is-done .vocab-daily-state { color: #098653 !important; }
.vocab-daily-card--1 { --mission-tint:#f2f7ff; --mission-line:#dce8fb; --mission-color:#3972df; }
.vocab-daily-card--2 { --mission-tint:#f7f3ff; --mission-line:#e6dcfa; --mission-color:#7958ca; }
.vocab-daily-card--3 { --mission-tint:#eefbf4; --mission-line:#d2efdf; --mission-color:#16956d; }
.vocab-daily-card--4 { --mission-tint:#fff6ed; --mission-line:#f5dfc9; --mission-color:#e07325; }

@media (prefers-reduced-motion: reduce) {
  .vocab-daily-card { transition: none; }
  .vocab-daily-card:hover { transform: none; }
}

@media (max-width: 767px) {
  .vocab-daily-task { padding: 15px; }
  .vocab-daily-card { min-height: 146px; }
}

/* Mobile-first density and overflow repair */
@media (max-width: 767px) {
  .vocab-page { overflow-x: clip; }
  .vocab-shell,
  .vocab-content,
  .vocab-main-inner,
  .vocab-overview-view,
  .vocab-sidebar--overview,
  .vocab-sidebar-block,
  .vocab-panel,
  .vocab-panel-inner,
  .vocab-stats,
  .vocab-daily-task {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .vocab-content { padding: 8px 10px 26px; }
  .vocab-breadcrumb { display: none; }

  .vocab-sidebar--overview {
    display: block;
    padding: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 16px;
  }

  .vocab-sidebar-block { overflow: hidden; }
  .vocab-sidebar-block + .vocab-sidebar-block { margin-top: 7px; }
  .vocab-sidebar--overview h3 { display: none; }

  .vocab-side-levels,
  .vocab-side-modes,
  .vocab-level-list,
  .vocab-mode-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .vocab-side-levels::-webkit-scrollbar,
  .vocab-side-modes::-webkit-scrollbar,
  .vocab-level-list::-webkit-scrollbar,
  .vocab-mode-list::-webkit-scrollbar { display: none; }

  .vocab-level-btn,
  .vocab-side-mode {
    min-height: 36px;
    padding: 6px 9px;
    border-radius: 12px;
    font-size: 12px;
  }

  .vocab-level-btn b { width: 27px; height: 27px; border-radius: 9px; }

  .vocab-hero {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
    padding: 13px;
    margin-bottom: 13px;
    border-radius: 20px;
  }

  .vocab-hero-kicker { padding: 6px 9px; font-size: 10px; }
  .vocab-hero-copy h1 { margin: 10px 0 6px; font-size: 23px; }
  .vocab-hero-copy > p:not(.vocab-resume-note) { margin-bottom: 9px; font-size: 12px; }
  .vocab-hero-copy .vocab-resume-note { display: none; }
  .vocab-hero-mascot-wrap { width: 76px; }
  .vocab-hero-mascot { max-width: 76px; }
  .vocab-hero-actions { display: flex; gap: 7px; }
  .vocab-hero-actions .vocab-btn-primary,
  .vocab-hero-actions .vocab-btn-soft {
    width: auto;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 12px;
  }

  .vocab-stats { margin-bottom: 13px; }
  .vocab-stats-head { margin-bottom: 8px; }
  .vocab-stats-head h2 { font-size: 17px; }
  .vocab-stats-head .vocab-demo-label { display: none; }
  .vocab-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
    padding: 0;
  }

  .vocab-stat-card {
    min-width: 0;
    min-height: 78px;
    padding: 10px;
    gap: 3px;
    border-radius: 14px;
  }

  .vocab-stat-card:last-child { grid-column: auto; min-height: 78px; }
  .vocab-stat-card svg { width: 18px; height: 18px; }
  .vocab-stat-card b { font-size: 19px; }
  .vocab-stat-card span { font-size: 10px; }

  .vocab-panel-inner[data-panel="topic"] { padding: 13px; border-radius: 20px; }
  .vocab-panel-inner[data-panel="topic"] .vocab-panel-head {
    padding-bottom: 11px;
    margin-bottom: 11px;
  }
  .vocab-panel-inner[data-panel="topic"] .vocab-panel-kicker { font-size: 9px; }
  .vocab-panel-inner[data-panel="topic"] .vocab-panel-head h3 { font-size: 18px; }
  .vocab-panel-head .vocab-demo-label { padding: 6px 8px; font-size: 10px; }
  .vocab-topic-grid { gap: 9px; }
  .vocab-topic-card { min-height: 0; border-radius: 16px; }
  .vocab-topic-heading {
    min-height: 64px;
    grid-template-columns: 38px minmax(0,1fr) auto;
    gap: 9px;
    padding: 11px;
  }
  .vocab-topic-icon { width: 38px; height: 38px; border-radius: 12px; }
  .vocab-topic-icon svg { width: 20px; height: 20px; }
  .vocab-topic-heading h3 { font-size: 14px; }
  .vocab-topic-count { margin: 0; padding: 4px 6px; font-size: 9px; }
  .vocab-topic-content { padding: 11px; }
  .vocab-topic-content > p {
    display: -webkit-box;
    min-height: 0;
    margin-bottom: 10px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.45;
  }
  .vocab-topic-status { margin-bottom: 9px; }
  .vocab-topic-btn { min-height: 38px; padding: 8px 11px; font-size: 12px; }

  .vocab-daily-task { padding: 13px; border-radius: 20px; }
  .vocab-daily-head { padding-bottom: 10px; margin-bottom: 10px; }
  .vocab-daily-kicker { font-size: 9px; }
  .vocab-daily-head h2 { font-size: 17px; }
  .vocab-daily-head .vocab-demo-label { padding: 6px 8px; font-size: 9px; }
  .vocab-daily-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .vocab-daily-card { min-height: 126px; padding: 10px; gap: 7px; border-radius: 15px; }
  .vocab-daily-icon { width: 32px; height: 32px; border-radius: 10px; }
  .vocab-daily-icon svg { width: 17px; height: 17px; }
  .vocab-daily-xp { padding: 4px 6px; font-size: 9px !important; }
  .vocab-daily-card > b { min-height: 31px; font-size: 12px; }
  .vocab-daily-foot span { font-size: 9px; }
}

@media (max-width: 360px) {
  .vocab-content { padding-inline: 8px; }
  .vocab-hero { grid-template-columns: minmax(0,1fr) 66px; }
  .vocab-hero-mascot-wrap,
  .vocab-hero-mascot { width: 66px; max-width: 66px; }
  .vocab-hero-actions .vocab-btn-soft { display: none; }
  .vocab-daily-grid { grid-template-columns: 1fr; }
  .vocab-daily-card { min-height: 112px; }
}

/* Textbook-style two-column vocabulary list */
.vocab-book-inner { max-width: 980px; }
.vocab-book-back { width: 100%; margin: 0 0 14px; }
.vocab-book-shell {
  overflow: visible;
  border: 1px solid #dce7f7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(34,70,140,.1);
}

.vocab-book-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  background: linear-gradient(135deg,#f4f8ff,#f0fffa);
  border-bottom: 1px solid #dce7f7;
  border-radius: 23px 23px 0 0;
}

.vocab-book-head h1 { margin: 4px 0 6px; color: #112f64; font-size: 24px; line-height: 1.2; }
.vocab-book-head p { margin: 0; color: #61728e; font-size: 13px; }
.vocab-book-intro { min-width:0; }
.vocab-book-guide { max-width:620px; line-height:1.55; }
.vocab-book-guide strong { color:#244d9b; font-weight:750; }
.vocab-book-tools {
  position:sticky;
  top:calc(var(--voc-header-height, 72px) + 6px);
  z-index:20;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
  padding:9px 12px;
  background:rgba(247,250,255,.94);
  border-bottom:1px solid #dce7f7;
  box-shadow:0 8px 22px rgba(26,62,126,.10);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.vocab-book-tools button,
.vocab-book-hide,
.vocab-book-reveal,
.vocab-book-check {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d5e3f8;
  border-radius: 12px;
  color: #2853ac;
  background: #fff;
  font: 700 13px/1.2 inherit;
  cursor: pointer;
}
.vocab-book-tools button.is-primary { color:#fff; border-color:transparent; background:linear-gradient(135deg,#416ce1,#68a0fa); box-shadow:0 5px 12px rgba(55,103,218,.2); }
.vocab-book-tools button.is-off { color:#7d8da8; background:#eef2f8; box-shadow:inset 0 0 0 1px rgba(130,151,187,.08); }
.vocab-book-columns,
.vocab-book-row { display:grid; grid-template-columns:minmax(0,42%) minmax(0,58%); }
.vocab-book-columns {
  color: #526782;
  background: #f8faff;
  border-bottom: 1px solid #dfe8f5;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.vocab-book-columns span { padding: 11px 16px; }
.vocab-book-columns span + span { border-left: 1px solid #dfe8f5; }
.vocab-book-row { min-height: 92px; border-bottom: 1px solid #e5ecf7; }
.vocab-book-row:last-child { border-bottom: 0; }
.vocab-book-row:nth-child(even) { background: #fbfdff; }
.vocab-book-japanese,
.vocab-book-meaning { min-width:0; padding: 14px 16px; }
.vocab-book-japanese {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap: 5px;
  overflow:hidden;
}
.vocab-book-japanese ruby { max-width:100%; color:#102d61; font-size:25px; font-weight:700; line-height:1.45; ruby-align:center; white-space:normal; overflow-wrap:anywhere; word-break:break-all; }
.vocab-book-japanese ruby span { max-width:100%; white-space:normal; overflow-wrap:anywhere; word-break:break-all; }
.vocab-book-japanese.is-long ruby { font-size:20px; line-height:1.4; }
.vocab-book-japanese.is-very-long ruby { font-size:17px; line-height:1.38; }
.vocab-book-japanese rt { color:#4770ce; font-size:11px; font-weight:600; transition:opacity .15s ease; }
.vocab-book-japanese ruby.is-furigana-hidden rt { opacity:0; user-select:none; }
.vocab-book-japanese small { max-width:100%; color:#8995aa; font-size:10px; font-weight:500; overflow-wrap:anywhere; word-break:break-all; }
.vocab-book-meaning {
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 7px;
  border-left:1px solid #e2eaf6;
}
.vocab-book-meaning-text { color:#203b6d; font-size:14px; line-height:1.45; font-weight:600; }
.vocab-book-hide,
.vocab-book-reveal { align-self:flex-start; min-height:30px; padding:5px 9px; color:#66799b; background:#f6f9fe; font-size:10px; }
.vocab-book-answer { display:flex; align-items:center; gap:7px; }
.vocab-book-input {
  width:100%;
  min-width:0;
  min-height:40px;
  padding:9px 10px;
  border:1px solid #bfd3f5;
  border-radius:11px;
  color:#17305c;
  background:#fff;
  font:600 13px/1.3 inherit;
  outline:none;
}
.vocab-book-input:focus { border-color:#5c88ec; box-shadow:0 0 0 3px rgba(77,115,223,.12); }
.vocab-book-input.is-correct { border-color:#36b77b; background:#f1fff8; }
.vocab-book-input.is-wrong { border-color:#ee7284; background:#fff6f7; }
.vocab-book-check { flex:0 0 auto; color:#fff; border-color:transparent; background:#4774df; }
.vocab-book-result { margin:0; font-size:11px; font-weight:700; }
.vocab-book-result.is-correct { color:#078450; }
.vocab-book-result.is-wrong { color:#c63e55; }
.vocab-book-grade { display:flex; align-items:center; justify-content:flex-end; gap:16px; padding:18px; border-top:1px solid #e2eaf6; background:#f8fbff; }
.vocab-book-score { display:flex; flex-direction:column; align-items:flex-start; color:#61728e; font-size:11px; }
.vocab-book-score strong { color:#12356f; font-size:16px; }
.vocab-book-grade-button { min-height:44px; padding:10px 20px; border:0; border-radius:13px; color:#fff; background:linear-gradient(135deg,#3768df,#6598f7); box-shadow:0 8px 18px rgba(56,102,215,.2); font-weight:800; cursor:pointer; }

@media (max-width: 640px) {
  .vocab-book-inner .vocab-practice-brand { min-height: 158px; padding: 15px; }
  .vocab-book-inner .vocab-practice-mascot { width: 112px; right:-5px; bottom:-10px; }
  .vocab-book-inner .vocab-practice-brand-top { padding-right:105px; }
  .vocab-book-inner .vocab-practice-brand-title { font-size:23px; }
  .vocab-book-inner .vocab-practice-brand-copy span { margin-top:5px; font-size:12px; }
  .vocab-book-inner .vocab-practice-badges { max-width:calc(100% - 92px); gap:6px; margin-top:14px; }
  .vocab-book-inner .vocab-practice-badge { padding:6px 8px; font-size:9px; border-radius:9px; }
  .vocab-book-inner .vocab-practice-badge svg { width:13px; height:13px; flex-basis:13px; }
  .vocab-book-inner .vocab-practice-demo-label { font-size:10px; }
  .vocab-book-shell { border:0; border-radius:0; background:transparent; box-shadow:none; }
  .vocab-book-head { display:block; padding:16px; border:1px solid #dce7f7; border-radius:18px; background:linear-gradient(145deg,#f7faff,#f1fffb); box-shadow:0 8px 22px rgba(30,69,137,.07); }
  .vocab-book-head h1 { font-size:18px; }
  .vocab-book-head p { font-size:11px; }
  .vocab-book-guide { line-height:1.5; }
  .vocab-book-tools { top:calc(var(--voc-header-height, 64px) + 5px); display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:8px 0; padding:6px; gap:5px; border:1px solid rgba(190,210,242,.9); border-radius:13px; transition:top .22s ease; }
  .vocab-book-header-hidden .vocab-book-tools { top:5px; }
  .vocab-book-tools button { min-width:0; min-height:32px; padding:4px 2px; border-radius:8px; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .vocab-book-toggle-action { display:none; }
  .vocab-book-tools #openBookPracticeBtn,
  .vocab-book-tools #bookToTopBtn { grid-column:span 2; font-size:11px; }
  .vocab-book-columns,
  .vocab-book-row { grid-template-columns:minmax(0,43%) minmax(0,57%); }
  .vocab-book-columns { margin:0 4px 6px; border:0; border-radius:11px; background:#eef4fd; }
  .vocab-book-columns span { padding:9px 10px; font-size:10px; }
  .vocab-book-columns span + span { border-left:0; }
  .vocab-book-list { display:grid; gap:7px; }
  .vocab-book-row { min-height:82px; margin:0 4px; border:1px solid #dfe8f5; border-radius:14px; background:rgba(255,255,255,.96); box-shadow:0 4px 13px rgba(35,70,135,.055); overflow:hidden; }
  .vocab-book-row:last-child { border-bottom:1px solid #dfe8f5; }
  .vocab-book-row:nth-child(even) { background:rgba(249,252,255,.98); }
  .vocab-book-japanese,
  .vocab-book-meaning { padding:10px; }
  .vocab-book-japanese ruby { font-size:20px; }
  .vocab-book-japanese.is-long ruby { font-size:16px; line-height:1.38; }
  .vocab-book-japanese.is-very-long ruby { font-size:13px; line-height:1.35; }
  .vocab-book-japanese.is-long rt { font-size:8px; }
  .vocab-book-japanese.is-very-long rt { font-size:7px; }
  .vocab-book-japanese rt { font-size:9px; }
  .vocab-book-japanese small { display:block; margin-top:2px; color:#687c9d; font-size:10px; line-height:1.2; }
  .vocab-book-meaning { border-left:1px solid #edf1f8; }
  .vocab-book-meaning-text { font-size:12px; }
  .vocab-book-answer { align-items:stretch; flex-direction:column; gap:5px; }
  .vocab-book-input { min-height:36px; padding:7px 8px; font-size:11px; }
  .vocab-book-check { min-height:32px; padding:6px 9px; }
  .vocab-book-hide,
  .vocab-book-reveal { min-height:28px; padding:4px 7px; font-size:9px; }
  .vocab-book-grade { position:sticky; bottom:0; z-index:4; display:block; padding:10px; box-shadow:0 -8px 22px rgba(20,54,110,.1); }
  .vocab-book-score { align-items:center; margin-top:8px; text-align:center; }
  .vocab-book-score strong { font-size:14px; }
  .vocab-book-grade-button { width:100%; min-height:46px; }
}

@media (max-width:640px) {
  .vocab-sidebar--overview .vocab-side-modes.vocab-mode-list {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    overflow:visible;
    padding-bottom:0;
  }
  .vocab-sidebar--overview .vocab-side-mode {
    width:100%;
    justify-content:center;
  }
  .vocab-sidebar--overview .vocab-side-mode.is-practice-entry {
    grid-column:1 / -1;
    min-height:50px;
    color:#fff;
    border-color:transparent;
    background:linear-gradient(135deg,#426fe5,#66a4fa);
    box-shadow:0 8px 18px rgba(54,104,219,.22);
  }
  .vocab-sidebar--overview .vocab-side-mode.is-practice-entry:hover,
  .vocab-sidebar--overview .vocab-side-mode.is-practice-entry.is-active {
    color:#fff;
    border-color:transparent;
    background:linear-gradient(135deg,#315fd9,#5999f5);
  }
  .vocab-sidebar--overview .vocab-side-mode.is-practice-entry svg { width:21px; height:21px; color:#fff; }
  .vocab-sidebar--overview .vocab-side-mode.is-practice-entry span { font-size:13px; font-weight:800; }
  .vocab-sidebar--overview .vocab-side-mode.is-practice-entry small { display:block; margin-top:2px; color:rgba(255,255,255,.82); font-size:9px; font-weight:600; }
}

/* Compact mobile practice setup: denser without sacrificing touch comfort. */
.vocab-practice-shell,
.vocab-practice-shell * {
  font-family:"Segoe UI Variable Text","Segoe UI","Noto Sans",Arial,sans-serif;
}
.vocab-practice-setup { margin-top:0; backdrop-filter:none; }

@media (max-width:820px) {
  .vocab-content.is-practice-mode { padding:10px 10px 30px; }
  .vocab-practice-view.is-active { padding:10px 8px 32px; }
  .vocab-practice-inner { gap:9px; }
  .vocab-practice-back-btn--setup { margin:0; min-height:42px; padding:8px 12px; }
  .vocab-practice-setup { padding:14px; border-radius:20px; box-shadow:0 8px 22px rgba(42,82,160,.08); }
  .vocab-practice-section-title { gap:8px; margin-bottom:8px; }
  .vocab-practice-setup-title { font-size:18px; line-height:1.25; letter-spacing:-.25px; }
  .vocab-practice-pill { padding:6px 9px; font-size:11px; }
  .vocab-practice-filter-note { margin:0 0 8px; padding:8px 10px; border-radius:11px; font-size:12px; line-height:1.35; }
  .vocab-practice-field label { margin:9px 0 4px; font-size:12px; line-height:1.25; letter-spacing:.01em; }
  .vocab-practice-path-row { margin-bottom:0; }
  .vocab-practice-select,
  .vocab-practice-input { min-height:44px; padding:10px 12px; border-width:1px; border-radius:13px; font-size:15px; line-height:1.25; }
  .vocab-practice-select { background-position:calc(100% - 19px) 50%,calc(100% - 14px) 50%; background-size:5px 5px,5px 5px; padding-right:32px; }
  .vocab-practice-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .vocab-practice-start-btn { min-height:46px; margin-top:11px; padding:11px 14px; border-radius:14px; }
  .vocab-practice-quick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:8px; }
  .vocab-practice-quick-btn { width:100%; min-height:40px; padding:7px 5px; border-radius:11px; font-size:10px; line-height:1.2; }
  .vocab-practice-footer { margin-top:2px; }
}

@media (max-width:380px) {
  .vocab-practice-card { padding:13px; }
  .vocab-practice-view.is-active { padding:8px 7px 28px; }
}

.vocab-practice-setup-title {
  display:flex;
  align-items:center;
  gap:9px;
  font-family:"Segoe UI Variable Display","Segoe UI Variable Text","Segoe UI",sans-serif;
  font-weight:760;
  letter-spacing:-.025em;
}
.vocab-practice-setup-icon {
  width:32px;
  height:32px;
  flex:0 0 32px;
  display:grid;
  place-items:center;
  border:1px solid rgba(65,111,218,.18);
  border-radius:10px;
  color:#3265d4;
  background:linear-gradient(145deg,#f9fbff,#eaf2ff);
  box-shadow:inset 0 1px 0 #fff,0 4px 12px rgba(47,91,188,.1);
}
.vocab-practice-setup-icon svg {
  width:17px;
  height:17px;
  stroke-width:1.8;
}

@media (max-width:380px) {
  .vocab-practice-setup-title { gap:8px; font-size:17px; }
  .vocab-practice-setup-icon { width:30px; height:30px; flex-basis:30px; border-radius:9px; }
}

.vocab-practice-quick-btn {
  position:relative;
  overflow:hidden;
  border-color:rgba(91,132,220,.22);
  color:#315bba;
  background:linear-gradient(155deg,#fff 0%,#f7faff 48%,#eaf2ff 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 -1px 0 rgba(93,134,220,.08),0 5px 13px rgba(44,86,174,.1);
  font-family:"Segoe UI Variable Text","Segoe UI",sans-serif;
  font-weight:500;
  letter-spacing:.005em;
  text-shadow:0 1px 0 rgba(255,255,255,.85);
}
.vocab-practice-quick-btn::before {
  content:"";
  position:absolute;
  inset:1px 1px auto;
  height:42%;
  border-radius:inherit;
  background:linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,255,255,0));
  pointer-events:none;
}
.vocab-practice-quick-btn:hover {
  color:#244fae;
  background:linear-gradient(155deg,#fff,#f1f6ff 52%,#e4edff);
  box-shadow:inset 0 1px 0 #fff,0 7px 16px rgba(44,86,174,.14);
}

.vocab-practice-setup .vocab-practice-select,
.vocab-practice-setup .vocab-practice-select option {
  color:#4f6484;
  font-family:"Segoe UI Variable Text","Segoe UI","Noto Sans",Arial,sans-serif;
  font-weight:400;
  letter-spacing:0;
}
.vocab-practice-setup #practicePathNote {
  color:#587092;
  background:#f1f6fc;
  border:1px solid rgba(91,124,181,.08);
  font-weight:450;
  letter-spacing:0;
}

.vocab-login-progress-note {
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:9px 12px;
  border:1px solid rgba(70,112,215,.14);
  border-radius:13px;
  color:#526b91;
  background:linear-gradient(135deg,#f7faff,#eff6ff);
  font-size:12px;
  font-weight:500;
  line-height:1.35;
  text-decoration:none;
}
.vocab-login-progress-note svg {
  width:17px;
  height:17px;
  flex:0 0 17px;
  color:#4774df;
}

@media (max-width:767px) {
  .vocab-login-progress-note { width:100%; flex:0 0 100%; padding:8px 10px; font-size:11px; }
}
/* 2026-08 mobile overview: compact missions, predictable icons and short lists. */
.vocab-mission-toggle {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #fde0a0;
  border-radius: 17px;
  background: linear-gradient(135deg, #fffaf0, #fff4d6);
  color: #173568;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(184, 126, 13, .1);
  cursor: pointer;
}

.vocab-mission-toggle-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, #ffbc38, #f28b17);
  box-shadow: 0 5px 12px rgba(242, 139, 23, .25);
}

.vocab-mission-toggle > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.vocab-mission-toggle b { font-size: 14px; }
.vocab-mission-toggle small { color: #7a879c; font-size: 11px; font-weight: 600; }
.vocab-mission-toggle-arrow { font-size: 20px; transition: transform .2s ease; }
.vocab-mission-toggle[aria-expanded="true"] .vocab-mission-toggle-arrow { transform: rotate(180deg); }
.vocab-mission-panel { padding-top: 10px; }
.vocab-mission-panel[hidden] { display: none !important; }

.vocab-list-toggle {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f2f7ff);
  color: #2658bd;
  font: 700 13px/1.2 inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 15px rgba(38, 88, 189, .08);
  cursor: pointer;
}

.vocab-topic-icon svg {
  width: 23px;
  height: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.vocab-header-message {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 3000;
  max-width: calc(100vw - 28px);
  padding: 10px 14px;
  border: 1px solid #d9e6ff;
  border-radius: 13px;
  background: rgba(255, 255, 255, .97);
  color: #173568;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 12px 28px rgba(21, 66, 143, .18);
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.vocab-header-message.is-visible { opacity: 1; transform: translate(-50%, 0); }

.vocab-coming-soon-level .vocab-breadcrumb,
.vocab-coming-soon-level .vocab-hero,
.vocab-coming-soon-level .vocab-stats,
.vocab-coming-soon-level .vocab-sidebar--overview,
.vocab-coming-soon-level .vocab-new-words { display: none !important; }

.vocab-coming-soon-level .vocab-main-inner { display: block; }
.vocab-coming-soon-level .vocab-panel { max-width: 640px; margin: 28px auto; }

@media (max-width: 760px) {
  .sr-menu-toggle,
  .sr-icon-btn,
  .sr-user-chip { position: relative; z-index: 4; pointer-events: auto; touch-action: manipulation; }
  .vocab-stats { padding: 13px; }
  .vocab-stat-grid { gap: 8px; }
  .vocab-mission-panel .vocab-daily-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .vocab-mission-panel .vocab-daily-card { min-width: 0; padding: 10px; }
  .vocab-coming-soon-level .vocab-panel { margin: 18px 0; }
  .vocab-soon-panel { min-height: min(62vh, 520px); display: grid; align-content: center; }
}

@media (max-width: 360px) {
  .vocab-mission-panel .vocab-daily-grid { grid-template-columns: 1fr; }
}

/* Mobile learning focus V5: one question fits the usable phone viewport. */
@media (max-width: 640px) {
  .vocab-book-input { font-size:16px!important; line-height:1.25; }

  body.vocab-practice-focus-mode { overflow:hidden; background:#f5f6f8; }
  body.vocab-practice-focus-mode .sr-header,
  body.vocab-practice-focus-mode .vocab-practice-brand,
  body.vocab-practice-focus-mode .shinha-feedback-root { display:none!important; }
  body.vocab-practice-focus-mode .vocab-shell,
  body.vocab-practice-focus-mode .vocab-content { width:100%!important; max-width:none!important; margin:0!important; padding:0!important; }
  body.vocab-practice-focus-mode .vocab-practice-view.is-active {
    position:fixed;
    inset:0;
    z-index:1000;
    height:100dvh;
    min-height:100dvh;
    padding:0!important;
    border-radius:0;
    overflow:hidden;
    background:#f5f6f8;
  }
  body.vocab-practice-focus-mode .vocab-practice-shell,
  body.vocab-practice-focus-mode .vocab-practice-inner { width:100%; height:100%; }
  body.vocab-practice-focus-mode .vocab-practice-inner { display:block; }
  body.vocab-practice-focus-mode .vocab-practice-card {
    height:100dvh;
    min-height:0;
    margin:0;
    padding:9px 10px max(9px,env(safe-area-inset-bottom));
    border:0;
    border-radius:0;
    box-shadow:none;
    background:#fff;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  body.vocab-practice-focus-mode .vocab-practice-top-actions { flex:0 0 auto; gap:7px; margin-bottom:6px; }
  body.vocab-practice-focus-mode .vocab-practice-top-actions .vocab-practice-button {
    min-height:38px;
    padding:7px 10px;
    border-radius:11px;
    font-size:12px;
  }
  body.vocab-practice-focus-mode .vocab-practice-type-pill { flex:0 0 auto; align-self:flex-start; padding:6px 9px; font-size:11px; }
  body.vocab-practice-focus-mode .vocab-practice-progress { flex:0 0 auto; margin:6px 0; }
  body.vocab-practice-focus-mode .vocab-practice-progress-wrap { margin-bottom:2px; }
  body.vocab-practice-focus-mode .vocab-practice-bar { height:8px; }
  body.vocab-practice-focus-mode .vocab-practice-counter { min-width:46px; font-size:12px; }
  body.vocab-practice-focus-mode .vocab-practice-progress-note { margin:0 0 5px; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.vocab-practice-focus-mode .vocab-practice-image-box {
    flex:0 0 auto;
    width:min(100%,280px);
    height:min(21dvh,156px);
    aspect-ratio:auto;
    margin:3px auto 6px;
    border-radius:14px;
  }
  body.vocab-practice-focus-mode .vocab-practice-image-box.is-empty { display:none; }
  body.vocab-practice-focus-mode .vocab-practice-image-box img { padding:6px; }
  body.vocab-practice-focus-mode .vocab-practice-word { flex:0 0 auto; padding:4px; margin:0 0 2px; font-size:clamp(25px,8vw,38px); line-height:1.12; }
  body.vocab-practice-focus-mode .vocab-practice-subword { flex:0 0 auto; min-height:0; margin:0 0 4px; font-size:12px; }
  body.vocab-practice-focus-mode .vocab-practice-result { flex:0 0 auto; margin:3px 0; padding:7px 9px; font-size:11px; }
  body.vocab-practice-focus-mode .vocab-practice-answer-block { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }
  body.vocab-practice-focus-mode .vocab-practice-choice-grid { gap:6px; margin:2px 0 5px; }
  body.vocab-practice-focus-mode .vocab-practice-choice { min-height:43px; padding:8px 11px; border-radius:12px; font-size:13px; line-height:1.25; }
  body.vocab-practice-focus-mode .vocab-practice-flashcard { min-height:120px; margin:2px 0 6px; padding:13px 10px; border-radius:16px; }
  body.vocab-practice-focus-mode .vocab-practice-flashcard .vocab-practice-word { font-size:clamp(28px,9vw,42px); }
  body.vocab-practice-focus-mode .vocab-practice-word-meaning { font-size:18px; margin-bottom:4px; }
  body.vocab-practice-focus-mode .vocab-practice-example { font-size:11px; line-height:1.35; }
  body.vocab-practice-focus-mode .vocab-practice-actions,
  body.vocab-practice-focus-mode .vocab-practice-actions--flash,
  body.vocab-practice-focus-mode .vocab-practice-actions--input,
  body.vocab-practice-focus-mode .vocab-practice-actions--next {
    flex:0 0 auto;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    margin:5px 0 0;
  }
  body.vocab-practice-focus-mode .vocab-practice-actions .vocab-practice-button { min-height:42px; padding:8px 7px; border-radius:11px; font-size:12px; }
  body.vocab-practice-focus-mode .vocab-practice-input-wrap { gap:6px; margin:3px 0; }
  body.vocab-practice-focus-mode .vocab-practice-input { min-height:44px; padding:9px 11px; font-size:16px!important; }
  body.vocab-practice-focus-mode .vocab-practice-stats { display:none!important; }
}
