/* ═══════════════════════════════════════════════════════════
   NIHONGO KISO — Lesson CSS
   Version: 1.0.0
   ═══════════════════════════════════════════════════════════ */

/* ─── Variables ─── */
#nk-app,
.nk-wrap {
  --bg: #0c0e14;
  --surface: #14171f;
  --card: #1a1e2a;
  --card-hover: #222738;
  --border: rgba(255,255,255,0.06);
  --primary: #6c5ce7;
  --primary-soft: rgba(108,92,231,0.15);
  --accent: #00cec9;
  --accent-soft: rgba(0,206,201,0.12);
  --gold: #fdcb6e;
  --success: #00b894;
  --danger: #e17055;
  --warning: #f39c12;
  --text: #eef0f6;
  --text-dim: #8892b0;
  --text-muted: #5a6380;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);

  font-family: 'Outfit', 'Noto Sans JP', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.nk-wrap * { box-sizing: border-box; }

/* ─── Typography ─── */
/* color pakai !important + ID #nk-app agar KEBAL dari pengaturan warna heading
   tema WordPress (mis. Astra Typography) yang sering meng-override h1-h4 global. */
#nk-app h1, #nk-app h2, #nk-app h3, #nk-app h4,
.nk-wrap h1, .nk-wrap h2, .nk-wrap h3, .nk-wrap h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
  color: var(--text) !important;
}
.nk-wrap p { margin: 0 0 14px; }

/* ─── Japanese Fonts ─── */
.nk-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 600;
}
.nk-jp-large {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
}

/* ─── Furigana ─── */
.nk-wrap ruby {
  ruby-align: center;
}
.nk-wrap ruby rt {
  font-size: 0.55em;
  color: var(--text-dim);
  font-weight: 400;
  user-select: none;
}

/* ─── Loading ─── */
.nk-loading {
  text-align: center;
  padding: 80px 20px;
  font-size: 20px;
  color: var(--text-dim);
  animation: nk-pulse 1.5s ease infinite;
}
@keyframes nk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ═══════════════════════════════════════════════════════════
   INDEX — Chapter Grid
   ═══════════════════════════════════════════════════════════ */

.nk-index-header {
  text-align: center;
  padding: 40px 20px 30px;
}
.nk-logo { font-size: 48px; margin-bottom: 8px; }
.nk-title {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent !important;
  background-clip: text;
}
.nk-subtitle {
  font-size: 16px;
  color: var(--text-dim);
  margin: 4px 0;
}
.nk-tagline {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nk-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 10px 0 40px;
}

.nk-chapter-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}
.nk-chapter-card:hover { background: var(--card-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.nk-chapter-card.nk-locked { opacity: 0.4; pointer-events: none; }
.nk-chapter-card.nk-completed { border-color: var(--success); }
.nk-chapter-card.nk-inprogress { border-color: var(--gold); }

.nk-ch-num { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.nk-ch-title { font-size: 18px; font-weight: 700; }
.nk-ch-sub { font-size: 14px; color: var(--text-dim); font-family: 'Noto Sans JP', sans-serif; }
.nk-ch-status { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════
   CHAPTER VIEW — Top Bar & Navigation
   ═══════════════════════════════════════════════════════════ */

.nk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.nk-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nk-topbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  color: var(--text);
  padding: 0;
}
.nk-topbar-btn svg { display: block; }
.nk-topbar-btn:hover { border-color: var(--primary); background: var(--card-hover); color: var(--primary); }
.nk-back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nk-back-btn svg { display: inline-block; vertical-align: middle; }
.nk-back-btn:hover { background: var(--card); color: var(--text); border-color: var(--primary); }
.nk-topbar-title {
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  flex: 1;
  /* min-width:0 wajib — tanpa ini flex item menolak menyusut di bawah lebar
     kontennya, sehingga judul panjang mendorong & menimpa tombol di kanan. */
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Furigana di judul topbar membuat tinggi baris melar dan memakan ruang tombol.
   Judul lengkap beserta furigana tetap tampil utuh di kartu isi halaman. */
.nk-topbar-title ruby rt { display: none; }
@media (max-width: 480px) {
  .nk-topbar-title { font-size: 12px; padding: 0 4px; }
}
.nk-topbar-step {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 20px;
}

/* ─── Step Progress Bar ─── */
.nk-step-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.nk-step-dot {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--card);
  transition: background 0.4s ease, transform 0.2s ease, height 0.2s ease;
}
.nk-step-dot.active { background: var(--accent); }
.nk-step-dot.done { background: var(--success); }
.nk-step-dot[data-step-jump]:hover {
  transform: scaleY(1.6);
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* ═══════════════════════════════════════════════════════════
   STEP 1: Warmup / Intro
   ═══════════════════════════════════════════════════════════ */

.nk-step { animation: nk-fadeIn 0.4s ease; }
@keyframes nk-fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.nk-warmup-card {
  background: linear-gradient(145deg, #1a2040, #1e2a4a);
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}
.nk-warmup-emoji { font-size: 56px; margin-bottom: 12px; }
.nk-warmup-title { font-size: 28px; font-weight: 800; margin-bottom: 4px; color: var(--text) !important; }

/* Banner image */
.nk-banner-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  display: block;
}
.nk-warmup-sub { font-size: 18px; color: var(--text-dim); font-family: 'Noto Sans JP', sans-serif; margin-bottom: 20px; }
.nk-warmup-story {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  text-align: left;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  margin: 20px 0;
}

.nk-objectives {
  text-align: left;
  margin: 20px 0;
}
.nk-objectives h3 { color: var(--accent); font-size: 16px; margin-bottom: 10px; }
.nk-obj-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-dim);
}
.nk-obj-check { color: var(--success); font-size: 16px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   STEP 2: Vocabulary
   ═══════════════════════════════════════════════════════════ */

.nk-vocab-header {
  text-align: center;
  margin-bottom: 20px;
}
.nk-vocab-header h2 { font-size: 24px; color: var(--text) !important; }
.nk-vocab-count {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.nk-vocab-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.nk-vocab-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.nk-vocab-item:hover { background: var(--card-hover); border-color: var(--primary); }
.nk-vocab-item.expanded { background: var(--card-hover); border-color: var(--accent); }
.nk-vocab-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.nk-vocab-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 20px;
  font-weight: 700;
  min-width: 100px;
}
.nk-vocab-reading {
  font-size: 12px;
  color: var(--text-muted);
}
.nk-vocab-arti {
  flex: 1;
  font-size: 15px;
  color: var(--text-dim);
}
.nk-vocab-cat {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.nk-vocab-notes {
  display: none;
  padding: 10px 18px 14px 56px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  background: var(--card-hover);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-top: -8px;
  border: 1px solid var(--border);
  border-top: none;
}
.nk-vocab-item.expanded + .nk-vocab-notes { display: block; }

/* ═══════════════════════════════════════════════════════════
   STEP 3: Patterns / Lesson
   ═══════════════════════════════════════════════════════════ */

.nk-pattern-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.nk-pattern-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-soft), transparent);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.nk-pattern-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}
.nk-pattern-bunkei {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 22px;
  font-weight: 700;
  flex: 1;
}
.nk-pattern-toggle {
  color: var(--text-dim);
  font-size: 20px;
  transition: transform 0.3s;
}
.nk-pattern-card.open .nk-pattern-toggle { transform: rotate(180deg); }

.nk-pattern-badge {
  background: linear-gradient(135deg, #ff7675, #fdcb6e);
  color: white;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(255, 118, 117, 0.3);
  flex-shrink: 0;
}

/* ─── Extra Quiz (Drill Konjugasi, dll) ─── */
.nk-extra-quiz {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(0, 184, 148, 0.04));
  border: 2px solid var(--primary-soft);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
}
.nk-extra-header {
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.nk-extra-header h3 {
  color: var(--primary);
  margin: 0 0 6px;
  font-size: 20px;
}
.nk-extra-header p {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.nk-extra-result {
  text-align: center;
  padding: 30px 16px;
}
.nk-extra-score {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.nk-extra-pct {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin: 6px 0 14px;
}
.nk-extra-msg {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 20px;
}

/* ─── Mini Quiz per Pattern ─── */
.nk-mini-quiz {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 118, 117, 0.08), rgba(253, 203, 110, 0.05));
  border: 2px solid var(--primary-soft);
  border-radius: 14px;
}
.nk-mini-quiz h4 {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 16px;
}
.nk-mini-bar {
  height: 5px;
  background: var(--card);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}
.nk-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}
.nk-mini-q {
  font-size: 16px;
  line-height: 2.0;
  margin-bottom: 14px;
  color: var(--text);
  padding: 14px 16px;
  background: var(--card);
  border-radius: 8px;
}
.nk-mini-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nk-mini-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text);
  transition: all 0.2s;
}
.nk-mini-opt span:last-child {
  flex: 1;
  line-height: 1.8;
}
.nk-mini-opt:hover:not(.disabled) {
  border-color: var(--primary);
  background: var(--card-hover);
  transform: translateX(2px);
}
.nk-mini-opt.disabled { cursor: not-allowed; opacity: 0.85; }
.nk-mini-opt.correct {
  border-color: var(--success);
  background: rgba(40, 167, 69, 0.15);
}
.nk-mini-opt.wrong {
  border-color: var(--danger, #dc3545);
  background: rgba(220, 53, 69, 0.15);
}
.nk-mini-exp {
  margin-top: 12px;
  padding: 12px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.nk-mini-quiz-done {
  text-align: center;
}
.nk-mini-result { padding: 16px 0; }
.nk-mini-score {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.nk-mini-msg {
  color: var(--text-dim);
  margin-bottom: 16px;
  font-size: 14px;
}

.nk-pattern-body {
  padding: 24px;
  display: none;
}
.nk-pattern-card.open .nk-pattern-body { display: block; }

/* Explanation content */
.nk-pattern-body h4 { font-size: 18px; color: var(--accent); margin-bottom: 12px; }
.nk-pattern-body h5 { font-size: 14px; color: var(--text-dim); margin: 16px 0 8px; }
.nk-pattern-body p { font-size: 15px; line-height: 1.8; color: var(--text); }
.nk-pattern-body ol, .nk-pattern-body ul { padding-left: 20px; margin: 8px 0; }
.nk-pattern-body li { margin: 4px 0; font-size: 15px; }

/* Component box */
.nk-component-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
}
.nk-structure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.nk-structure-table th {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 10px 12px;
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.nk-structure-table td {
  padding: 8px 12px;
  text-align: center;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* Note boxes */
.nk-note-box {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.7;
}
.nk-note-warning {
  background: rgba(225,112,85,0.08);
  border-left: 4px solid var(--danger);
}
.nk-note-tip {
  background: rgba(0,206,201,0.08);
  border-left: 4px solid var(--accent);
}
.nk-note-compare {
  background: rgba(108,92,231,0.08);
  border-left: 4px solid var(--primary);
}

/* Examples */
.nk-examples-section {
  margin-top: 20px;
}
.nk-examples-section h4 { font-size: 16px; color: var(--gold); }
.nk-example-item {
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin: 8px 0;
  border-left: 3px solid var(--accent);
}
.nk-ex-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
}
.nk-ex-reading {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin: 2px 0;
}
.nk-ex-arti {
  font-size: 15px;
  color: var(--accent);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   STEP 4: Drills
   ═══════════════════════════════════════════════════════════ */

.nk-drill-header {
  text-align: center;
  margin-bottom: 24px;
}
.nk-drill-progress {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.nk-drill-bar {
  height: 6px;
  background: var(--card);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 20px;
}
.nk-drill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.nk-drill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.nk-drill-type {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.nk-drill-question {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.6;
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
}
.nk-drill-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nk-drill-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  color: var(--text);
  text-align: left;
  width: 100%;
}
.nk-drill-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.nk-drill-option.correct { border-color: var(--success); background: rgba(0,184,148,0.12); }
.nk-drill-option.wrong { border-color: var(--danger); background: rgba(225,112,85,0.12); }
.nk-drill-option.disabled { pointer-events: none; opacity: 0.6; }

.nk-drill-label {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  flex-shrink: 0;
}

.nk-drill-explanation {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  animation: nk-fadeIn 0.3s ease;
}

.nk-drill-result {
  text-align: center;
  padding: 40px 20px;
}
.nk-drill-score {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
}
.nk-drill-msg {
  font-size: 18px;
  color: var(--text-dim);
  margin: 12px 0;
}

/* ═══════════════════════════════════════════════════════════
   STEP 5: Kaiwa
   ═══════════════════════════════════════════════════════════ */

.nk-kaiwa-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.nk-kaiwa-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(0,206,201,0.08), transparent);
  border-bottom: 1px solid var(--border);
}
.nk-kaiwa-title { font-size: 18px; font-weight: 700; color: var(--text) !important; }
.nk-kaiwa-situation {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.6;
}

.nk-kaiwa-body { padding: 20px 24px; }

.nk-kaiwa-line {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.nk-kaiwa-line:last-child { border-bottom: none; }

.nk-kaiwa-speaker {
  width: 60px;
  text-align: center;
  flex-shrink: 0;
}
.nk-kaiwa-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 4px;
  background: var(--card);
  border: 2px solid var(--border);
}
.nk-kaiwa-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 4px;
  display: block;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,206,201,0.15);
}

/* Kaiwa scene illustration */
.nk-kaiwa-scene {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  display: block;
  margin-bottom: 16px;
}

/* Culture illustration */
.nk-culture-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 10px;
  margin: 12px 0;
  display: block;
}
.nk-kaiwa-name {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Noto Sans JP', sans-serif;
}

.nk-kaiwa-content { flex: 1; }
.nk-kaiwa-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
}
.nk-kaiwa-reading-text {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 2px 0;
}
.nk-kaiwa-arti-text {
  font-size: 14px;
  color: var(--accent);
}
.nk-kaiwa-audio-btn {
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nk-culture-box {
  margin-top: 20px;
  padding: 20px;
  background: rgba(253,203,110,0.06);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
}
.nk-culture-box h4 { color: var(--gold); font-size: 15px; margin-bottom: 10px; }
.nk-culture-box p { font-size: 14px; line-height: 1.7; color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════
   STEP 6: Final Test
   ═══════════════════════════════════════════════════════════ */

.nk-test-header {
  text-align: center;
  margin-bottom: 24px;
}
.nk-test-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--danger), #c0392b);
  color: #fff;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════
   STEP 7: Complete
   ═══════════════════════════════════════════════════════════ */

.nk-complete {
  text-align: center;
  padding: 40px 20px;
}
.nk-complete-emoji { font-size: 64px; margin-bottom: 16px; }
.nk-complete-title { font-size: 32px; font-weight: 800; color: var(--success) !important; }
.nk-complete-msg { font-size: 16px; color: var(--text-dim); margin: 12px 0 24px; }
.nk-complete-score {
  display: inline-block;
  background: var(--card);
  border: 2px solid var(--success);
  padding: 16px 32px;
  border-radius: var(--radius);
  font-size: 24px;
  font-weight: 800;
  color: var(--success);
  margin: 16px 0;
}
.nk-complete-summary {
  text-align: left;
  max-width: 400px;
  margin: 20px auto;
}
.nk-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */

.nk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}
.nk-btn-primary {
  background: linear-gradient(135deg, var(--primary), #5a4bd1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(108,92,231,0.3);
}
.nk-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(108,92,231,0.4); }
.nk-btn-accent {
  background: linear-gradient(135deg, var(--accent), #00a8a5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,206,201,0.3);
}
.nk-btn-ghost {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-dim);
}
.nk-btn-ghost:hover { border-color: var(--primary); color: var(--text); }

.nk-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.nk-step-nav {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .nk-wrap { padding: 12px; font-size: 15px; }
  .nk-title { font-size: 28px; }
  .nk-warmup-title { font-size: 22px; }
  .nk-warmup-card { padding: 24px 18px; }
  .nk-pattern-bunkei { font-size: 18px; }
  .nk-pattern-body { padding: 18px; }
  /* Video full-width mentok kiri-kanan layar di mobile */
  .nk-pattern-card { overflow: visible; }
  .nk-pattern-body .nk-ivl {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    box-shadow: none;
  }
  .nk-pattern-body .nk-ivl-self { border-radius: 0; }
  .nk-ex-jp { font-size: 17px; }
  .nk-drill-card { padding: 20px; }
  .nk-drill-question { font-size: 16px; }
  .nk-drill-option { padding: 12px 14px; font-size: 14px; }
  .nk-kaiwa-jp { font-size: 16px; }
  .nk-chapter-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .nk-vocab-jp { font-size: 17px; min-width: 80px; }
  .nk-vocab-arti { font-size: 13px; }
  .nk-jp-large { font-size: 22px; }
  .nk-complete-title { font-size: 24px; }
  .nk-btn { padding: 12px 22px; font-size: 14px; }
  .nk-structure-table th { font-size: 15px; padding: 8px; }
  .nk-structure-table td { font-size: 12px; padding: 6px; }
}

/* ═══════════════════════════════════════════════════════════
   FLASHCARD
   ═══════════════════════════════════════════════════════════ */

.nk-fc-wrap { text-align: center; max-width: 400px; margin: 0 auto; }
.nk-fc-progress { font-size: 14px; color: var(--text-dim); margin-bottom: 16px; }

/* 3D Flip Card */
.nk-fc-card {
  perspective: 1200px;
  -webkit-perspective: 1200px;
  cursor: pointer;
  height: 280px;
  margin-bottom: 20px;
  user-select: none;
  -webkit-user-select: none;
}
.nk-fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
}
.nk-fc-card.flipped .nk-fc-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}
.nk-fc-front, .nk-fc-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
  box-sizing: border-box;
  overflow: hidden;
}
.nk-fc-back {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  border-color: var(--accent);
  background: var(--card-hover);
}
.nk-fc-jp { font-family: 'Noto Sans JP', sans-serif; font-size: 36px; font-weight: 700; margin: 0 0 8px; line-height: 1.2; }
.nk-fc-reading { font-size: 14px; color: var(--text-muted); margin: 0; }
.nk-fc-hint { font-size: 13px; color: var(--text-muted); margin-top: 18px; }
.nk-fc-arti { font-size: 22px; color: var(--accent); font-weight: 700; margin: 10px 0; line-height: 1.3; }
.nk-fc-cat { font-size: 11px; color: var(--primary); background: var(--primary-soft); display: inline-block; padding: 3px 10px; border-radius: 10px; margin-top: 4px; }
.nk-fc-notes { font-size: 12px; color: var(--text-muted); margin-top: 10px; line-height: 1.4; padding: 0 8px; }

/* ═══════════════════════════════════════════════════════════
   DRILL TABS
   ═══════════════════════════════════════════════════════════ */

.nk-drill-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.nk-drill-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.nk-drill-tab:hover { border-color: var(--primary); color: var(--text); }
.nk-drill-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════
   SENTENCE BUILD
   ═══════════════════════════════════════════════════════════ */

.nk-build-result {
  min-height: 60px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nk-build-placeholder { color: var(--text-muted); font-size: 14px; }
.nk-build-word {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  cursor: pointer;
}
.nk-build-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}
.nk-build-word-btn {
  padding: 10px 18px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.nk-build-word-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.nk-build-word-btn.used { opacity: 0.3; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════
   TRANSLATE INPUT
   ═══════════════════════════════════════════════════════════ */

.nk-trans-input {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 18px;
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  color: var(--text);
  outline: none;
  resize: none;
  margin: 12px 0;
  transition: border-color 0.2s;
}
.nk-trans-input:focus { border-color: var(--accent); }
.nk-trans-input::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   MATCHING GAME
   ═══════════════════════════════════════════════════════════ */

.nk-match-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}
.nk-match-card {
  padding: 16px 10px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nk-match-card:hover { border-color: var(--primary); }
.nk-match-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 12px rgba(0,206,201,0.2); }
.nk-match-card.matched { border-color: var(--success); background: var(--success-soft); opacity: 0.6; pointer-events: none; }
.nk-match-card.wrong { border-color: var(--danger); background: rgba(225,112,85,0.12); animation: nk-shake 0.4s ease; }
@keyframes nk-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@media (max-width: 600px) {
  .nk-match-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .nk-match-card { padding: 12px 8px; font-size: 13px; min-height: 50px; }
  .nk-fc-jp { font-size: 28px; }
  .nk-fc-arti { font-size: 20px; }
  .nk-build-word-btn { padding: 8px 14px; font-size: 16px; }
  .nk-drill-tabs { gap: 4px; }
  .nk-drill-tab { padding: 6px 12px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   FULLSCREEN MODE (Real + Pseudo for iPhone)
   ═══════════════════════════════════════════════════════════ */

.nk-wrap.nk-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  max-width: 100%;
  margin: 0;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nk-wrap.nk-fullscreen .nk-step {
  max-width: 900px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════════════════ */

#nk-app.nk-light,
.nk-wrap.nk-light {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --card: #ffffff;
  --card-hover: #f0f2f8;
  --border: rgba(0,0,0,0.08);
  --primary: #6c5ce7;
  --primary-soft: rgba(108,92,231,0.08);
  --accent: #00a8a5;
  --accent-soft: rgba(0,168,165,0.08);
  --gold: #d4a017;
  --success: #00875a;
  --success-soft: rgba(0,135,90,0.08);
  --danger: #d63031;
  --text: #1a1a2e;
  --text-dim: #555770;
  --text-muted: #8e90a6;
  color: var(--text);
  background: var(--bg);
}

.nk-light .nk-title {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nk-light .nk-warmup-card {
  background: linear-gradient(145deg, #e8eaf6, #f5f6fa);
  border: 1px solid var(--border);
}
.nk-light .nk-pattern-header {
  background: linear-gradient(135deg, rgba(108,92,231,0.06), transparent);
}
.nk-light .nk-fc-front,
.nk-light .nk-fc-back {
  background: var(--card);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.nk-light .nk-drill-option {
  background: var(--card);
  border-color: rgba(0,0,0,0.1);
}
.nk-light .nk-drill-option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.nk-light .nk-chapter-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.nk-light .nk-chapter-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.nk-light .nk-match-card {
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.nk-light .nk-build-word-btn {
  background: var(--card);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.nk-light .nk-trans-input {
  background: var(--card);
  border-color: rgba(0,0,0,0.1);
}
.nk-light .nk-note-warning {
  background: rgba(214,48,49,0.04);
}
.nk-light .nk-note-tip {
  background: rgba(0,168,165,0.04);
}
.nk-light .nk-note-compare {
  background: rgba(108,92,231,0.04);
}
.nk-light .nk-warmup-story {
  background: rgba(0,168,165,0.06);
}
.nk-light .nk-topbar-btn {
  background: var(--surface);
}

/* ═══════════════════════════════════════════════════════════
   PATTERN ABBREVIATION LEGEND
   ═══════════════════════════════════════════════════════════ */
.nk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-dim);
}
.nk-legend strong { color: var(--primary); font-size: 13px; }

.nk-legend-item {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nk-legend-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.nk-legend-item.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.nk-legend-item b {
  color: var(--accent);
  font-weight: 800;
}
.nk-legend-item.active b {
  color: #fff;
}

/* Glossary explanation box */
.nk-glossary {
  position: relative;
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  animation: nk-fadeIn 0.3s ease;
}
.nk-glossary h4 {
  color: var(--accent);
  font-size: 16px;
  margin: 0 0 10px;
  padding-right: 28px;
}
.nk-glossary p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 12px;
}
.nk-glossary code {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Noto Sans JP', monospace;
  font-size: 13px;
}
.nk-glos-examples {
  background: var(--surface);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 10px 0;
}
.nk-glos-examples strong {
  display: block;
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 6px;
}
.nk-glos-ex {
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.6;
}
.nk-glos-ex .nk-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.nk-glos-ex small {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}
.nk-glos-usage {
  font-size: 13px !important;
  background: var(--accent-soft);
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 8px !important;
}
.nk-glos-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.nk-glos-close:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* Light theme */
.nk-light .nk-legend { background: rgba(108,92,231,0.06); }
.nk-light .nk-legend-item { background: #fff; }

/* Mobile flashcard tweaks */
@media (max-width: 600px) {
  .nk-fc-card { height: 260px; }
  .nk-fc-jp { font-size: 28px; }
  .nk-fc-arti { font-size: 18px; }
  .nk-fc-reading { font-size: 13px; }
  .nk-fc-hint { font-size: 12px; margin-top: 14px; }
  .nk-fc-notes { font-size: 11px; }
  .nk-legend { font-size: 12px; padding: 10px 12px; gap: 6px 10px; }
}

/* ═══════════════════════════════════════════════════════════
   TRANSLATE — Self-Evaluate Compare View
   ═══════════════════════════════════════════════════════════ */
.nk-trans-compare {
  margin: 16px 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.nk-trans-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.nk-trans-row:last-of-type { border-bottom: none; }
.nk-trans-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.nk-trans-user {
  font-size: 17px;
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  color: var(--text);
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  word-break: break-word;
}
.nk-trans-correct {
  font-size: 18px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  color: var(--success);
  padding: 10px 14px;
  background: var(--success-soft);
  border: 1px solid var(--success);
  border-radius: 8px;
  word-break: break-word;
}
.nk-trans-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.nk-trans-eval {
  margin-top: 20px;
  text-align: center;
}
.nk-trans-eval-q {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-weight: 600;
}
.nk-btn-eval {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.nk-btn-eval-correct {
  background: linear-gradient(135deg, var(--success), #00875a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,184,148,0.3);
}
.nk-btn-eval-correct:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,184,148,0.4);
}
.nk-btn-eval-wrong {
  background: var(--card);
  color: var(--danger);
  border-color: var(--danger);
}
.nk-btn-eval-wrong:hover {
  background: rgba(225,112,85,0.1);
}

@media (max-width: 600px) {
  .nk-btn-eval { padding: 12px 20px; font-size: 14px; }
  .nk-trans-user, .nk-trans-correct { font-size: 15px; padding: 8px 12px; }
}

/* ═══════════════════════════════════════════════════════════
   TEST REVIEW (Setelah selesai tes)
   ═══════════════════════════════════════════════════════════ */
.nk-review-wrap {
  text-align: left;
  margin-top: 24px;
  border-top: 2px solid var(--border);
  padding-top: 24px;
}
.nk-review-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.nk-review-item.correct { border-left-color: var(--success); }
.nk-review-item.wrong { border-left-color: var(--danger); background: rgba(225,112,85,0.04); }

.nk-review-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.nk-review-item.correct .nk-review-num { color: var(--success); }
.nk-review-item.wrong .nk-review-num { color: var(--danger); }

.nk-review-q {
  font-size: 15px;
  font-weight: 600;
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 10px;
}
.nk-review-answers {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.nk-review-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  color: var(--text-dim);
}
.nk-review-opt .nk-drill-label {
  width: 22px;
  height: 22px;
  font-size: 11px;
  background: var(--surface);
}
.nk-review-opt.is-correct {
  background: rgba(0,184,148,0.10);
  color: var(--success);
  font-weight: 700;
}
.nk-review-opt.is-correct .nk-drill-label { background: var(--success); color: #fff; }
.nk-review-opt.is-wrong {
  background: rgba(225,112,85,0.10);
  color: var(--danger);
  font-weight: 700;
  text-decoration: line-through;
}
.nk-review-opt.is-wrong .nk-drill-label { background: var(--danger); color: #fff; }

.nk-review-exp {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .nk-review-item { padding: 12px 14px; }
  .nk-review-q { font-size: 14px; }
  .nk-review-opt { font-size: 13px; padding: 5px 8px; }
}

/* ═══════════════════════════════════════════════════════════
   AUDIO BUTTON STYLES — Web Speech API
   ═══════════════════════════════════════════════════════════ */
.nk-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  background: rgba(108, 92, 231, 0.12);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 50%;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  flex-shrink: 0;
  margin-right: 4px;
  user-select: none;
}

.nk-audio-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4);
}

.nk-audio-btn:active {
  transform: scale(0.95);
}

.nk-audio-btn.playing {
  background: var(--primary);
  color: white;
  animation: nk-audio-pulse 1s infinite;
  box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.7);
}

@keyframes nk-audio-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.6);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(108, 92, 231, 0);
  }
}

/* Audio glow effect on active cards */
.nk-audio-active {
  box-shadow: 0 0 16px rgba(108, 92, 231, 0.3) !important;
  border-color: var(--primary) !important;
  transition: all 0.3s ease;
}

/* ─── Vocab list audio button ─── */
.nk-vocab-audio {
  margin: 0 8px 0 0;
}

/* ─── Flashcard audio button (top-right of back card) ─── */
.nk-fc-audio {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.95);
  z-index: 10;
}

.nk-fc-back {
  position: relative;
}

/* ─── Example audio (inline before kalimat) ─── */
.nk-ex-audio,
.nk-example-item .nk-audio-btn {
  margin-right: 8px;
}

.nk-example-item {
  position: relative;
}

/* ─── Drill audio (in question) ─── */
.nk-drill-question .nk-audio-btn {
  margin-right: 6px;
}

.nk-drill-option .nk-audio-btn,
.nk-opt-audio {
  margin-left: 8px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  font-size: 11px;
}

/* ─── Match game audio ─── */
.nk-match-audio {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  font-size: 10px;
}

.nk-match-card {
  position: relative;
}

/* ─── Kaiwa TTS audio button ─── */
.nk-kaiwa-tts {
  margin-right: 6px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  font-size: 11px;
}

.nk-kaiwa-jp {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* ─── Review audio ─── */
.nk-review-q .nk-audio-btn,
.nk-review-opt .nk-audio-btn {
  margin-left: 6px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  font-size: 10px;
}

/* ─── Translate correct answer audio ─── */
.nk-trans-correct .nk-audio-btn {
  margin-right: 6px;
}

/* ─── Build correct answer audio ─── */
.nk-drill-explanation .nk-audio-btn {
  margin: 0 4px;
}

/* Light mode adjustments */
.nk-light .nk-audio-btn {
  background: rgba(108, 92, 231, 0.08);
  border-color: rgba(108, 92, 231, 0.25);
}

.nk-light .nk-fc-audio {
  background: white;
  border-color: var(--primary);
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .nk-audio-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 12px;
  }
  .nk-fc-audio {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 13px;
    top: 10px;
    right: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════
   INTERACTIVE VIDEO BLOCK (untuk plugin IVL atau player lain)
   ═══════════════════════════════════════════════════════════ */
.nk-kaiwa-interactive {
  background: linear-gradient(135deg, #f6f3ff 0%, #fff4f8 100%);
  border: 1px solid #e2d4f0;
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 24px;
  box-shadow: 0 4px 18px rgba(123, 70, 200, 0.06);
}
.nk-kaiwa-interactive::before {
  content: "🎬 Video Pembelajaran Interaktif";
  display: block;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #7b46c8;
  margin-bottom: 12px;
  text-transform: uppercase;
}
/* Pastikan player IVL responsif penuh di dalam container */
.nk-kaiwa-interactive .ivl-player,
.nk-kaiwa-interactive iframe {
  max-width: 100%;
  width: 100%;
}
@media (max-width: 640px) {
  .nk-kaiwa-interactive {
    padding: 12px;
    margin-bottom: 16px;
  }
  .nk-kaiwa-interactive::before {
    font-size: 12px;
  }
}

/* ===== IVL Video Player (YouTube IFrame API + kontrol custom) ===== */
.nk-ivl{
  margin:0 0 6px;
  border-radius:14px;
  overflow:hidden;
  background:#000;
  box-shadow:0 4px 18px rgba(0,0,0,.18);
}
.nk-ivl-stage{ position:relative; width:100%; aspect-ratio:16/9; background:#000; overflow:hidden; }
/* Frame: iframe TIDAK menerima pointer event -> hover tak pernah sampai ke YouTube,
   sehingga overlay judul/nama channel TIDAK pernah muncul (teknik clean-yt-player). */
.nk-ivl-frame{ position:absolute; inset:0; width:100%; height:100%; border:0; pointer-events:none; }
.nk-ivl-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; transform:scale(var(--nk-ivl-zoom, 1)); transform-origin:center center; }
/* Shield: tutup seluruh video agar klik tak pernah sampai ke YouTube; klik = play/pause */
.nk-ivl-shield{ position:absolute; inset:0; z-index:5; cursor:default; background:transparent; }
/* Cover: poster buram menutup branding YouTube (tombol merah, "Watch on YouTube", nama channel) sebelum play */
.nk-ivl-cover{
  position:absolute; inset:0; z-index:7;
  background-color:#000; background-size:cover; background-position:center;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:opacity .25s ease;
}
.nk-ivl-cover::before{ content:""; position:absolute; inset:0; background:rgba(0,0,0,.28); }
.nk-ivl-hidden{ opacity:0; pointer-events:none; }
.nk-ivl-bigplay{
  position:relative; z-index:1;
  width:68px; height:68px; border:none; border-radius:50%;
  background:rgba(0,0,0,.6); color:#fff; font-size:26px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:transform .15s, background .15s;
}
.nk-ivl-bigplay:hover{ transform:scale(1.08); background:rgba(0,184,212,.9); }
/* Control bar custom — overlay transparan ala Tutor LMS, auto-hide saat playing */
.nk-ivl-cc{
  position:absolute; left:0; right:0; bottom:0; z-index:20;
  display:flex; align-items:center; gap:10px;
  padding:10px 12px 8px; color:#fff;
  background:linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.65) 60%, rgba(0,0,0,0) 100%);
  opacity:0; transform:translateY(6px);
  transition:opacity .2s ease, transform .2s ease;
  pointer-events:none;
}
/* Tampilkan bar saat hover stage, saat di-"poke", atau saat belum/tidak playing */
.nk-ivl-stage:hover .nk-ivl-cc,
.nk-ivl.nk-ivl-active .nk-ivl-cc,
.nk-ivl:not(.nk-ivl-playing) .nk-ivl-cc{
  opacity:1; transform:translateY(0); pointer-events:auto;
}
/* Saat playing + idle, sembunyikan lagi */
.nk-ivl.nk-ivl-playing.nk-ivl-idle .nk-ivl-cc{
  opacity:0; pointer-events:none;
}
.nk-ivl-play, .nk-ivl-rate, .nk-ivl-mute, .nk-ivl-fs, .nk-ivl-cc-btn{
  background:transparent; border:none; color:#fff; cursor:pointer;
  font-size:14px; padding:4px 6px; border-radius:6px; flex:none;
  line-height:1; transition:color .15s, background .15s;
}
.nk-ivl-rate{ border:1px solid rgba(255,255,255,.3); font-size:12px; min-width:38px; }
.nk-ivl-cc-btn{ border:1px solid rgba(255,255,255,.3); font-size:11px; font-weight:700; min-width:32px; letter-spacing:.5px; }
.nk-ivl-play:hover, .nk-ivl-rate:hover, .nk-ivl-mute:hover, .nk-ivl-fs:hover, .nk-ivl-cc-btn:hover{ background:rgba(255,255,255,.15); color:#00b8d4; }
/* State CC AKTIF: tombol menyala biru agar jelas caption sedang ON */
.nk-ivl.nk-ivl-cc-on .nk-ivl-cc-btn{ background:#00b8d4; color:#04222a; border-color:#00b8d4; }
.nk-ivl-cur, .nk-ivl-dur{ font-size:12px; font-variant-numeric:tabular-nums; flex:none; min-width:36px; text-align:center; }
.nk-ivl-track{ position:relative; flex:1; height:6px; background:rgba(255,255,255,.25); border-radius:3px; cursor:pointer; }
.nk-ivl-buffer{ position:absolute; left:0; top:0; height:100%; width:0; background:rgba(255,255,255,.25); border-radius:3px; }
.nk-ivl-fill{ position:absolute; left:0; top:0; height:100%; width:0; background:#00b8d4; border-radius:3px; z-index:1; }
.nk-ivl-handle{ position:absolute; top:50%; left:0; z-index:2; transform:translate(-50%,-50%) scale(0); width:13px; height:13px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.4); transition:transform .12s ease; }
.nk-ivl-track:hover .nk-ivl-handle{ transform:translate(-50%,-50%) scale(1); }
/* Volume */
.nk-ivl-vol{ display:flex; align-items:center; gap:4px; flex:none; }
.nk-ivl-voltrack{ position:relative; width:0; opacity:0; height:5px; border-radius:3px; background:rgba(255,255,255,.25); cursor:pointer; transition:width .2s ease, opacity .2s ease; }
.nk-ivl-vol:hover .nk-ivl-voltrack{ width:60px; opacity:1; }
.nk-ivl-volfill{ position:absolute; left:0; top:0; height:100%; width:100%; border-radius:3px; background:#fff; }
.nk-ivl-self{ display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#000; }
/* Fullscreen: container mengisi layar */
.nk-ivl.nk-ivl-fs{ border-radius:0; }
.nk-ivl:fullscreen{ width:100%; height:100%; background:#000; display:flex; align-items:center; justify-content:center; border-radius:0; }
.nk-ivl:fullscreen .nk-ivl-stage{ width:100%; max-height:100%; }
.nk-ivl:-webkit-full-screen{ width:100%; height:100%; background:#000; }
.nk-ivl.nk-ivl-playing.nk-ivl-idle{ cursor:none; }

/* Watermark Overlays (Bab 1-133 Pola 1-5) */
.nk-ivl-wm{
  position:absolute;
  pointer-events:none;
  transition:opacity .25s ease, visibility .25s ease, transform .25s ease;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
}
.nk-ivl-wm-corner{
  right:0;
  bottom:0;
  width:16%;
  height:12%;
  z-index:9;
  background:#ffffff;
  border-top-left-radius:6px;
  box-shadow:0 -2px 10px rgba(0,0,0,.3);
  opacity:1;
  visibility:visible;
}
.nk-ivl-wm-corner.nk-wm-hide{
  opacity:0 !important;
  visibility:hidden !important;
}
.nk-ivl-wm-center{
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:49%;
  height:48%;
  z-index:25;
  background:#ffffff;
  border-radius:12px;
  box-shadow:0 12px 36px rgba(0,0,0,.7);
  border:2px solid rgba(255,255,255,.5);
  opacity:0;
  visibility:hidden;
}
.nk-ivl-wm-center.nk-wm-active{
  opacity:1 !important;
  visibility:visible !important;
}
.nk-ivl-wm-img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

/* Judul pola di bawah video */
.nk-pattern-title-below{
  font-size:1.15em; font-weight:700; text-align:center;
  margin:4px 0 16px; padding:10px 14px;
  color:var(--text, #e8e8e8);
  border-bottom:2px solid var(--accent, #5b8def);
}

/* (topstrip dihapus — judul/channel YouTube sudah ditangani oleh
   iframe pointer-events:none, mengikuti teknik clean-yt-player) */

/* Pseudo-fullscreen (FullscreenKit): beri ruang aman bawah agar tombol navigasi
   tidak ke-mepet/terpotong oleh home indicator iOS & tombol fullscreen melayang.
   !important untuk menimpa padding inline 48px dari kit. */
#nk-app.fsk-fullscreen{
  padding-top: calc(28px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
  padding-left: calc(20px + env(safe-area-inset-left, 0px)) !important;
  padding-right: calc(20px + env(safe-area-inset-right, 0px)) !important;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   MULTI-BAHASA (i18n) — bar pemilih bahasa + dukungan RTL
   ═══════════════════════════════════════════════════════════ */
.nk-langbar{
  display:flex;flex-wrap:wrap;gap:6px;
  padding:10px 14px;
  background:var(--card);
  border-bottom:1px solid var(--border);
}
.nk-langbtn{
  display:inline-flex;align-items:center;gap:4px;
  padding:5px 10px;
  font-size:.82rem;line-height:1.2;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--bg);
  color:var(--primary);
  cursor:pointer;
  transition:background .15s,border-color .15s,transform .1s;
}
.nk-langbtn:hover{background:var(--card-hover);transform:translateY(-1px)}
.nk-langbtn.active{
  background:var(--accent);
  border-color:var(--accent);
  color:#1a1407;
  font-weight:700;
}
/* RTL: balikkan arah untuk konten materi (Urdu). Tombol & angka tetap natural. */
#nk-app[dir="rtl"] .nk-vocab-arti,
#nk-app[dir="rtl"] .nk-fc-arti,
#nk-app[dir="rtl"] .nk-ex-arti,
#nk-app[dir="rtl"] .nk-kaiwa-arti-text,
#nk-app[dir="rtl"] .nk-drill-explanation,
#nk-app[dir="rtl"] .nk-trans-hint,
#nk-app[dir="rtl"] .nk-review-exp{
  direction:rtl;
  text-align:right;
}

/* ═══ Layar Pilih Bahasa (mode multibahasa) ═══ */
.nk-langpick{display:flex;align-items:center;justify-content:center;min-height:60vh;padding:32px 16px}
.nk-langpick-inner{text-align:center;max-width:560px;width:100%}
.nk-langpick-icon{font-size:48px;margin-bottom:8px}
.nk-langpick-title{font-size:1.6em;color:var(--text) !important;margin:8px 0 4px}
.nk-langpick-sub{color:var(--text-dim);margin-bottom:24px;font-size:1.05em}
.nk-langpick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.nk-langpick-btn{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 12px;
  background:var(--card,#161922);border:1.5px solid rgba(255,255,255,.1);border-radius:14px;
  color:var(--text);cursor:pointer;transition:all .15s;font-size:1em}
.nk-langpick-btn:hover{background:var(--card-hover,#1d2230);border-color:var(--accent);transform:translateY(-2px)}
.nk-langpick-flag{font-size:2em;line-height:1}
.nk-langpick-name{font-weight:600}

/* ═══ Tombol kecil "Ganti bahasa" (saat belajar, mode multi) ═══ */
.nk-change-lang{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;margin:0 0 4px;
  background:var(--card,#161922);border:1px solid rgba(255,255,255,.12);border-radius:20px;
  color:var(--text-dim);cursor:pointer;font-size:.85em;transition:all .15s}
.nk-change-lang:hover{background:var(--card-hover,#1d2230);border-color:var(--accent);color:var(--text)}
.nk-change-lang-txt{font-weight:500}
@media(max-width:480px){.nk-change-lang-txt{display:none}}

/* ═══════════════════════════════════════════════════════════
   MODUL LMS & VIDEO PEMBELAJARAN (THEME 1: MODERN DARK INDIGO)
   ═══════════════════════════════════════════════════════════ */
.nk-lms-card {
  background: var(--card, #161922);
  border: 1px solid rgba(108, 92, 231, 0.28);
  border-radius: 18px;
  padding: 28px 24px;
  margin: 16px 0 24px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 20px rgba(108, 92, 231, 0.08);
  box-sizing: border-box;
}

.nk-lms-header {
  margin-bottom: 22px;
  text-align: left;
}

.nk-lms-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(108, 92, 231, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(108, 92, 231, 0.35);
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.15);
  margin-bottom: 12px;
}

.nk-lms-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text, #f8fafc) !important;
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.nk-lms-sub {
  font-size: 0.98rem;
  color: var(--text-dim, #94a3b8);
  line-height: 1.65;
  margin: 0;
}

/* Video Section */
.nk-lms-video-wrap {
  margin: 24px 0;
  border-radius: 14px;
  overflow: hidden;
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.nk-lms-video-caption {
  padding: 12px 18px;
  background: rgba(22, 25, 34, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.94rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nk-lms-video-icon {
  font-size: 1.1rem;
}

.nk-lms-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nk-lms-video-container iframe,
.nk-lms-video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

/* Custom HTML Content & Callout Boxes */
.nk-lms-content {
  margin: 24px 0;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text, #e2e8f0);
}
.nk-lms-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text, #fff);
  margin: 20px 0 10px;
}
.nk-lms-content h4 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text, #fff);
  margin: 16px 0 8px;
}
.nk-lms-content p {
  margin: 0 0 14px;
}
.nk-lms-content ul,
.nk-lms-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.nk-lms-content li {
  margin-bottom: 6px;
}

.nk-callout {
  padding: 16px 20px;
  border-radius: 12px;
  margin: 18px 0;
  border-left: 4px solid;
  line-height: 1.6;
}
.nk-callout h4 {
  margin: 0 0 6px !important;
  font-size: 1.02rem;
  font-weight: 700;
  color: inherit !important;
}
.nk-callout p {
  margin: 0 !important;
  font-size: 0.94rem;
  color: inherit !important;
  opacity: 0.95;
}
.nk-callout-info {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3b82f6;
  color: #bfdbfe;
}
.nk-callout-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: #fde68a;
}
.nk-callout-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #a7f3d0;
}

/* Custom Table in LMS HTML */
.nk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.94rem;
}
.nk-table thead th {
  background: rgba(108, 92, 231, 0.22);
  color: #c4b5fd;
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1.5px solid rgba(108, 92, 231, 0.35);
  letter-spacing: 0.03em;
}
.nk-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text, #f1f5f9);
  background: rgba(22, 25, 34, 0.6);
  transition: background 0.15s;
}
.nk-table tbody tr:last-child td {
  border-bottom: none;
}
.nk-table tbody tr:hover td {
  background: rgba(108, 92, 231, 0.1);
}

/* In-Content Download Card */
.nk-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 18px 0;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}
.nk-download-info strong {
  display: block;
  font-size: 0.98rem;
  color: #f8fafc;
  margin-bottom: 2px;
}
.nk-download-info span {
  font-size: 0.82rem;
  color: #94a3b8;
}
.nk-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.nk-btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

/* External Shortcode Wrapper */
.nk-lms-shortcode-wrap {
  margin: 24px 0;
  padding: 22px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* File Attachments */
.nk-lms-attachments {
  margin: 28px 0 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.nk-lms-att-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #f1f5f9);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nk-lms-attachment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.nk-lms-download-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: var(--text, #f8fafc) !important;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nk-lms-download-btn:hover {
  background: rgba(108, 92, 231, 0.16);
  border-color: rgba(108, 92, 231, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.nk-lms-att-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.nk-lms-att-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.nk-lms-att-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nk-lms-att-sub {
  font-size: 0.77rem;
  color: var(--text-dim, #94a3b8);
  margin-top: 1px;
}
.nk-lms-att-arrow {
  font-size: 1.1rem;
  color: #a29bfe;
  transition: transform 0.2s;
}
.nk-lms-download-btn:hover .nk-lms-att-arrow {
  transform: translateY(2px);
}

/* Standalone Embed Wrapper */
.nk-lms-standalone {
  max-width: 880px;
  margin: 28px auto;
  padding: 0 16px;
  box-sizing: border-box;
}
.nk-lms-standalone .nk-lms-card {
  margin: 0;
}

@media (max-width: 600px) {
  .nk-lms-card {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .nk-lms-title {
    font-size: 1.35rem;
  }
  .nk-lms-attachment-list {
    grid-template-columns: 1fr;
  }
  .nk-download-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════
   PAYWALL VIDEO TERKUNCI (FREEMIUM SYSTEM)
   ═══════════════════════════════════════════════════════════ */
.nk-video-locked-card {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  background: linear-gradient(145deg, #090d16 0%, #1a2234 50%, #0f172a 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(239, 68, 68, 0.06);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.nk-video-locked-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 65%);
  pointer-events: none;
}
.nk-locked-icon {
  width: 56px;
  height: 56px;
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.45);
  animation: nk-pulse-lock 2.5s infinite ease-in-out;
  position: relative;
  z-index: 1;
}
@keyframes nk-pulse-lock {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.06); box-shadow: 0 0 32px rgba(239, 68, 68, 0.65); }
}
.nk-locked-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 8px;
  line-height: 1.4;
  max-width: 500px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 1;
}
.nk-locked-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.nk-locked-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 24px;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.nk-locked-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

.nk-video-locked-card.nk-content-locked-card {
  aspect-ratio: auto;
  min-height: 220px;
  max-height: none;
  padding: 36px 24px;
  margin: 16px 0;
}


/* ═══════════════════════════════════════════════════════════
   UNIT SISIPAN KURIKULUM DI INDEKS BAB
   ═══════════════════════════════════════════════════════════ */
.nk-unit-card {
  border: 2px dashed #6366f1 !important;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.02) 100%) !important;
  position: relative;
}
.nk-unit-card:hover {
  border-color: #4f46e5 !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2) !important;
  transform: translateY(-2px);
}
.nk-unit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.nk-unit-tag {
  font-size: 11px;
  font-weight: 800;
  color: #4f46e5;
  background: #e0e7ff;
  padding: 2px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nk-unit-access-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}
.nk-unit-access-badge.free {
  background: #dcfce7;
  color: #15803d;
}
.nk-unit-access-badge.locked {
  background: #fee2e2;
  color: #b91c1c;
}
.nk-unit-locked {
  border-color: #fca5a5 !important;
}


