/* ═══════════════════════════════════════════════════════════════
   Presisi · halaman kelompok "kana"
   Hub Hiragana/Katakana, tabel Kana, Baca Kana, Kuis Kana (+indeks),
   Tebak Hiragana/Katakana, Tulis Kana, Tebak Kanji, Tebak Angka, Kanji.
   Semua selector diawali .ps-ui dan di-scope ke pembungkus halaman
   (.kn-hub, .kn-tabel, .kn-baca, .kn-kuis, .kn-kuis-idx, .kn-tebak,
   .kn-tulis, .kn-tk, .kn-angka, .kn-kanji) karena nama kelas .th-* dan
   .kq-* dipakai dua halaman berbeda, dan .bs-* dipakai Bank Soal.
   ═══════════════════════════════════════════════════════════════ */

.ps-ui :is(.kn-kanji, .kn-tk) {
  /* glyph kanji tetap mincho (konten), seperti kerangka lama */
  --kn-mincho: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP",
               "Noto Serif CJK JP", "Source Han Serif JP", "BIZ UDPMincho", "MS PMincho", serif;
}
.ps-ui :is(.kn-baca, .kn-tk) {
  --kn-i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4l3 2'/%3E%3C/svg%3E");
  --kn-i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}


/* ── 0. Pola bersama ─────────────────────────────────────────────── */
/* kolom kuis: lebar baca terfokus, di tengah area konten */
.ps-ui .kn-col { max-width: 600px; margin-inline: auto; }

/* tautan kembali (sama dengan .s-back di shared.css; .kh-back di hub bukan .s-back) */
.ps-ui .kn-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 0 0 6px; padding: 0;
  font-size: var(--ps-fs-sm); font-weight: 700; color: var(--ps-tx-3); text-decoration: none;
  transition: color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-back:hover { color: var(--ps-tx); }
.ps-ui .kn-back .ps-i { width: 16px; height: 16px; }
.ps-ui .kn-back:active { transform: none; }
@media (pointer: coarse) { .ps-ui .kn-back { min-height: 44px; } }

/* baris atas: tautan kembali (+ tautan ganti aksara) */
.ps-ui .kn-toprow {
  display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap;
  margin: 0 0 8px;
}
.ps-ui .kn-toprow .kn-back { margin: 0; }
.ps-ui .kn-head { margin-bottom: 20px; }

/* kontrol segmen (gaya .ps-tabs) untuk tombol/tautan lama */
.ps-ui :is(.kn-hub .kh-switch, .kn-tabel .s-kn-tabs-wrap, .kn-kanji .s-kj-tabs, .kn-tulis .th-kana, .kn-tulis .th-modes) {
  display: inline-flex; gap: 2px; max-width: 100%; margin: 0; padding: 3px;
  border-radius: var(--ps-r); background: var(--ps-sunken); box-shadow: inset 0 0 0 1px var(--ps-bd-2);
  overflow-x: auto; scrollbar-width: none;
}
.ps-ui :is(.kn-hub .kh-switch-btn, .kn-tabel .s-kn-tab, .kn-kanji .s-kj-tab, .kn-tulis .th-kana-btn, .kn-tulis .th-mode) {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ps-tx-2); box-shadow: none;
  font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 700; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease), box-shadow var(--ps-t) var(--ps-ease);
}
.ps-ui :is(.kn-hub .kh-switch-btn, .kn-tabel .s-kn-tab, .kn-kanji .s-kj-tab, .kn-tulis .th-kana-btn, .kn-tulis .th-mode):hover {
  background: transparent; color: var(--ps-tx);
}
.ps-ui :is(.kn-hub .kh-switch-btn.is-on, .kn-tabel .s-kn-tab.is-active, .kn-kanji .s-kj-tab.is-active, .kn-tulis .th-kana-btn.is-on, .kn-tulis .th-mode.is-on) {
  background: var(--ps-surface); color: var(--ps-tx); border: 0; box-shadow: var(--ps-sh-1);
}
.ps-ui :is(.kn-hub .kh-switch-btn, .kn-tabel .s-kn-tab, .kn-kanji .s-kj-tab, .kn-tulis .th-kana-btn, .kn-tulis .th-mode):active { transform: none; }
@media (pointer: coarse) {
  .ps-ui :is(.kn-hub .kh-switch-btn, .kn-tabel .s-kn-tab, .kn-kanji .s-kj-tab, .kn-tulis .th-kana-btn, .kn-tulis .th-mode) { height: 40px; }
}

/* statistik kuis: strip 3 sel (label kecil di atas, angka di bawah) */
.ps-ui :is(.kn-kuis .kq-stats, .kn-angka .ta-stats) {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 14px;
  background: var(--ps-surface); border: 1px solid var(--ps-bd); border-radius: var(--ps-r-lg);
  box-shadow: var(--ps-sh-1); overflow: hidden; font-size: var(--ps-fs-xs); color: var(--ps-tx-3);
}
.ps-ui :is(.kn-kuis .kq-stats, .kn-angka .ta-stats) > span {
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 1px; padding: 10px 16px; min-width: 0;
}
.ps-ui :is(.kn-kuis .kq-stats, .kn-angka .ta-stats) > span + span { border-left: 1px solid var(--ps-bd-2); }
.ps-ui :is(.kn-kuis .kq-stats, .kn-angka .ta-stats) b {
  font-size: var(--ps-fs-xl); font-weight: 800; line-height: 1.25; color: var(--ps-tx); font-variant-numeric: tabular-nums;
}
.ps-ui :is(.kn-kuis .kq-stat-l, .kn-angka .ta-stat-l) { display: inline-flex; align-items: center; gap: 4px; }
.ps-ui :is(.kn-kuis .kq-stat-l, .kn-angka .ta-stat-l) .ps-i { width: 13px; height: 13px; color: var(--ps-kin-hi); }

/* pilihan jawaban (kuis kana, tebak angka) */
.ps-ui :is(.kn-kuis .kq-options, .kn-angka .ta-options) { gap: 10px; margin: 12px 0 0; }
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt) {
  min-height: 56px; padding: 12px 10px;
  border: 1px solid var(--ps-bd); border-radius: var(--ps-r);
  background: var(--ps-surface); color: var(--ps-tx); box-shadow: var(--ps-sh-1);
  font-family: var(--ps-font); font-size: 20px; font-weight: 700;
  transition: border-color var(--ps-t) var(--ps-ease), background-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease);
}
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt):hover:not(:disabled) { border-color: var(--ps-tx-3); }
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt):active:not(:disabled) { transform: translateY(1px); }
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt):focus-visible { border-radius: var(--ps-r); }
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt):disabled { cursor: default; }
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt):disabled:not(.correct):not(.wrong) { color: var(--ps-tx-3); box-shadow: none; }
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt).correct { background: var(--ps-ok-soft); border-color: var(--ps-ok); color: var(--ps-ok-tx); box-shadow: none; }
.ps-ui :is(.kn-kuis .kq-opt, .kn-angka .ta-opt).wrong { background: var(--ps-danger-soft); border-color: var(--ps-danger); color: var(--ps-danger-tx); box-shadow: none; }

/* umpan balik + tombol lanjut */
.ps-ui :is(.kn-kuis .kq-foot, .kn-angka .ta-foot) {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 52px; margin-top: 12px;
}
.ps-ui :is(.kn-kuis .kq-feedback, .kn-angka .ta-feedback) { min-width: 0; font-size: var(--ps-fs-md); font-weight: 700; color: var(--ps-tx-2); text-align: left; }
.ps-ui :is(.kn-kuis .kq-feedback, .kn-angka .ta-feedback).ok { color: var(--ps-ok-tx); }
.ps-ui :is(.kn-kuis .kq-feedback, .kn-angka .ta-feedback).no { color: var(--ps-danger-tx); }
.ps-ui :is(.kn-kuis .kq-next, .kn-angka .ta-next) {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; margin: 0; padding: 0 16px 0 20px; border: 0; border-radius: var(--ps-r);
  background: var(--ps-kon); color: var(--ps-kon-on);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), var(--ps-sh-1);
  font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 700;
  transition: background-color var(--ps-t) var(--ps-ease);
}
.ps-ui :is(.kn-kuis .kq-next, .kn-angka .ta-next):hover { background: var(--ps-kon-2); }
.ps-ui :is(.kn-kuis .kq-next, .kn-angka .ta-next) .ps-i { width: 16px; height: 16px; margin: 0; }
@media (max-width: 560px) {
  .ps-ui :is(.kn-kuis .kq-foot, .kn-angka .ta-foot) { flex-direction: column; align-items: stretch; }
  .ps-ui :is(.kn-kuis .kq-feedback, .kn-angka .ta-feedback) { text-align: center; }
}


/* ── 1. Hub Hiragana / Katakana (kana_hub.html) ─────────────────── */
.ps-ui .kn-hub { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: end; }
.ps-ui .kn-hub .kh-head { grid-column: 1; margin: 0; min-width: 0; }
.ps-ui .kn-hub .kh-title-row { gap: 14px; }
.ps-ui .kn-hub .kh-badge {
  width: 48px; height: 48px; border-radius: var(--ps-r-lg);
  background: var(--ps-bd-2); color: var(--ps-tx); box-shadow: none;
  font-family: var(--ps-font); font-size: 24px; font-weight: 700;
}
.ps-ui .kn-hub .kh-h1 {
  margin: 0; font-family: var(--ps-font); font-size: var(--ps-fs-3xl); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ps-tx);
}
.ps-ui .kn-hub .kh-sub { margin: 2px 0 0; max-width: 68ch; font-size: var(--ps-fs-md); line-height: 1.5; color: var(--ps-tx-2); }
.ps-ui .kn-hub .kh-switch { grid-column: 2; align-self: end; }
.ps-ui .kn-hub .kh-grid {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  max-width: none; margin: 24px 0 0;
}
.ps-ui .kn-hub .kh-card {
  background: var(--ps-surface); border: 1px solid var(--ps-bd); border-radius: var(--ps-r-lg);
  box-shadow: var(--ps-sh-1); color: var(--ps-tx);
  transition: border-color var(--ps-t) var(--ps-ease), box-shadow var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-hub .kh-card:hover { transform: none; border-color: var(--s-border-strong); box-shadow: var(--ps-sh-2); }
.ps-ui .kn-hub .kh-card:active { transform: none; }
.ps-ui .kn-hub .kh-card:focus-visible { outline: 2px solid var(--ps-kon-3); outline-offset: 2px; border-radius: var(--ps-r-lg); }
.ps-ui .kn-hub .kh-thumb { background: var(--ps-sunken); border-bottom: 1px solid var(--ps-bd-2); }
.ps-ui .kn-hub .kh-body { padding: 14px 16px 16px; }
.ps-ui .kn-hub .kh-card-title {
  font-family: var(--ps-font); font-size: var(--ps-fs-lg); font-weight: 700; letter-spacing: -0.005em; line-height: 1.35; color: var(--ps-tx);
}
.ps-ui .kn-hub .kh-card-desc { margin: 4px 0 0; font-size: var(--ps-fs-sm); line-height: 1.5; color: var(--ps-tx-2); }
.ps-ui .kn-hub .kh-card.is-soon { opacity: 1; }
.ps-ui .kn-hub .kh-card.is-soon .kh-thumb img { opacity: 0.55; }
.ps-ui .kn-hub .kh-soon-pill {
  top: 10px; right: 10px; display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border: 0; border-radius: 999px; background: var(--ps-surface); color: var(--ps-tx-2);
  box-shadow: inset 0 0 0 1px var(--ps-bd), var(--ps-sh-1);
  font-family: var(--ps-font); font-size: 11.5px; font-weight: 700; letter-spacing: 0;
}
@media (min-width: 1200px) {
  .ps-ui .kn-hub .kh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .ps-ui .kn-hub { grid-template-columns: minmax(0, 1fr); }
  .ps-ui .kn-hub .kh-h1 { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-hub .kh-badge { width: 44px; height: 44px; font-size: 22px; }
  .ps-ui .kn-hub .kh-switch { grid-column: 1; display: flex; width: 100%; margin-top: 16px; }
  .ps-ui .kn-hub .kh-switch-btn { flex: 1 1 0; }
  .ps-ui .kn-hub .kh-grid { margin-top: 16px; gap: 12px; }
}
@media (max-width: 560px) {
  .ps-ui .kn-hub .kh-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ps-ui .kn-hub .kh-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  .ps-ui .kn-hub .kh-thumb { aspect-ratio: auto; height: 100%; min-height: 88px; border-bottom: 0; border-right: 1px solid var(--ps-bd-2); }
  .ps-ui .kn-hub .kh-body { align-self: center; padding: 12px 14px; }
  .ps-ui .kn-hub .kh-card-title { font-size: var(--ps-fs-md); }
  .ps-ui .kn-hub .kh-card-desc { font-size: var(--ps-fs-xs); }
  .ps-ui .kn-hub .kh-soon-pill { top: 6px; right: auto; left: 6px; height: 20px; padding: 0 7px; font-size: 10.5px; }
}


/* ── 2. Tabel Kana (kana_index.html) ─────────────────────────────── */
.ps-ui .kn-tabel .s-kn-hero { display: grid; gap: 4px; max-width: none; margin: 0 0 16px; padding: 0; }
.ps-ui .kn-tabel .s-kn-title {
  margin: 0; font-family: var(--ps-font); font-size: var(--ps-fs-3xl); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ps-tx);
}
.ps-ui .kn-tabel .s-kn-lead { max-width: 68ch; font-size: var(--ps-fs-md); line-height: 1.55; color: var(--ps-tx-2); }
.ps-ui .kn-tabel .s-kn-tabs-wrap { margin: 0 0 16px; }
.ps-ui .kn-tabel .s-kn-panel { max-width: 760px; margin: 0; padding: 0; }
.ps-ui .kn-tabel .s-kn-quiz-cta {
  display: flex; width: max-content; max-width: 100%; align-items: center; gap: 6px;
  min-height: 40px; margin: 0 0 16px; padding: 0 12px 0 16px; border-radius: var(--ps-r);
  background: var(--ps-kon); color: var(--ps-kon-on);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), var(--ps-sh-1);
  font-size: var(--ps-fs-sm); font-weight: 700; text-decoration: none;
  transition: background-color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tabel .s-kn-quiz-cta:hover { background: var(--ps-kon-2); }
.ps-ui .kn-tabel .s-kn-quiz-cta .ps-i { width: 16px; height: 16px; }
@media (pointer: coarse) { .ps-ui .kn-tabel .s-kn-quiz-cta { min-height: 44px; } }

.ps-ui .kn-tabel .s-kn-section {
  margin: 0 0 16px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
  container-type: inline-size;
}
.ps-ui .kn-tabel .s-kn-section-h {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px;
  margin: 0 0 16px; padding: 14px 20px 12px; border-bottom: 1px solid var(--ps-bd-2);
}
.ps-ui .kn-tabel .s-kn-section-h h2 {
  font-family: var(--ps-font); font-size: var(--ps-fs-md); font-weight: 700; letter-spacing: 0;
  color: var(--ps-tx); overflow-wrap: normal; flex: none;
}
.ps-ui .kn-tabel .s-kn-section-h span { margin-left: auto; min-width: 0; font-size: var(--ps-fs-xs); color: var(--ps-tx-3); text-align: right; }
.ps-ui .kn-tabel .s-kn-row { gap: 8px; margin: 0 20px 8px; }
.ps-ui .kn-tabel .s-kn-row:last-child { margin-bottom: 20px; }
.ps-ui .kn-tabel .s-kn-card {
  aspect-ratio: 1 / 0.84; gap: 2px; padding: 6px 4px;
  background: var(--ps-surface); border: 1px solid var(--ps-bd-2); border-radius: var(--ps-r);
  box-shadow: none; transition: none;
}
.ps-ui .kn-tabel .s-kn-card:hover { transform: none; box-shadow: none; }
.ps-ui .kn-tabel .s-kn-card-char {
  font-family: var(--ps-font); font-weight: 400; letter-spacing: 0; color: var(--ps-tx);
  font-size: 34px; font-size: clamp(22px, calc(8cqi - 4px), 44px);
}
.ps-ui .kn-tabel .s-kn-card-char--multi {
  letter-spacing: -0.03em;
  font-size: 24px; font-size: clamp(15px, calc(5.4cqi - 3px), 32px);
}
.ps-ui .kn-tabel .s-kn-card-roma { font-size: var(--ps-fs-xs); color: var(--ps-tx-3); letter-spacing: 0.02em; }
@media (min-width: 1280px) {
  /* tabel dua kolom (berurutan: Dasar, Dakuten | Handakuten, Youon) */
  .ps-ui .kn-tabel .s-kn-panel { max-width: none; columns: 2; column-gap: 20px; }
  .ps-ui .kn-tabel .s-kn-quiz-cta { column-span: all; }
  .ps-ui .kn-tabel .s-kn-section { break-inside: avoid; }
}
@media (max-width: 767px) {
  .ps-ui .kn-tabel .s-kn-title { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-tabel .s-kn-tabs-wrap { display: flex; width: 100%; }
  .ps-ui .kn-tabel .s-kn-tab { flex: 1 1 0; padding: 0 8px; }
  .ps-ui .kn-tabel .s-kn-section { margin-bottom: 14px; }
  .ps-ui .kn-tabel .s-kn-section-h { margin-bottom: 12px; padding: 12px 16px 10px; }
  .ps-ui .kn-tabel .s-kn-row { gap: 6px; margin: 0 12px 6px; }
  .ps-ui .kn-tabel .s-kn-row:last-child { margin-bottom: 14px; }
  .ps-ui .kn-tabel .s-kn-card { padding: 4px 2px; }
  .ps-ui .kn-tabel .s-kn-card-char { font-size: 26px; font-size: clamp(20px, calc(8cqi - 4px), 44px); }
  .ps-ui .kn-tabel .s-kn-card-char--multi { font-size: 17px; font-size: clamp(13px, calc(5.4cqi - 3px), 32px); }
  .ps-ui .kn-tabel .s-kn-card-roma { font-size: 10.5px; }
}


/* ── 3. Baca Kana (kana_quiz.html, isi dirender student.js) ──────── */
.ps-ui .kn-baca .kq-statusbar { margin: 0 0 12px; }
.ps-ui .kn-baca .bs-statusbar-row { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin: 0 0 8px; }
.ps-ui .kn-baca .bs-level-num { font-size: var(--ps-fs-sm); font-weight: 800; color: var(--ps-tx); font-variant-numeric: tabular-nums; }
.ps-ui .kn-baca .bs-quota { font-size: var(--ps-fs-xs); color: var(--ps-tx-3); }
.ps-ui .kn-baca .bs-quota b { color: var(--ps-tx); font-variant-numeric: tabular-nums; }
.ps-ui .kn-baca .bs-quota-premium { font-weight: 700; color: var(--ps-kin-hi); }
.ps-ui .kn-baca .kq-segbar { gap: 3px; margin: 0; }
.ps-ui .kn-baca .kq-seg { height: 6px; border-radius: 3px; background: var(--ps-bd-2); }
.ps-ui .kn-baca .kq-seg.on { background: var(--ps-kin); }
.ps-ui .kn-baca .kq-card {
  padding: 24px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-baca .bs-q-meta { margin: 0 0 2px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--ps-tx-3); }
.ps-ui .kn-baca .kq-kana {
  padding: 8px 4px 6px; font-family: var(--ps-font); font-size: 52px; font-weight: 700; line-height: 1.3; color: var(--ps-tx);
}
.ps-ui .kn-baca .kq-prompt { margin: 0 0 8px; font-size: var(--ps-fs-sm); color: var(--ps-tx-2); }
.ps-ui .kn-baca .kq-input {
  min-height: 50px; padding: 10px 14px; border: 1px solid var(--ps-bd); border-radius: var(--ps-r);
  background: var(--ps-surface); color: var(--ps-tx); box-shadow: var(--ps-sh-1);
  font-family: var(--ps-font); font-size: 18px; text-align: center;
  transition: border-color var(--ps-t) var(--ps-ease), box-shadow var(--ps-t) var(--ps-ease), background-color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-baca .kq-input::placeholder { color: var(--ps-tx-3); }
.ps-ui .kn-baca .kq-input:focus { outline: none; border-color: var(--ps-kon-3); box-shadow: 0 0 0 3px oklch(34% 0.07 258 / 0.12); }
.ps-ui .kn-baca .kq-input.is-correct { border-color: var(--ps-ok); background: var(--ps-ok-soft); box-shadow: none; }
.ps-ui .kn-baca .kq-input.is-wrong { border-color: var(--ps-danger); background: var(--ps-danger-soft); box-shadow: none; }
.ps-ui .kn-baca .kq-submit { width: 100%; min-height: 46px; margin-top: 10px; padding: 10px 16px; font-size: var(--ps-fs-sm); }
.ps-ui .kn-baca .bs-feedback { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ps-bd-2); }
.ps-ui .kn-baca .bs-fb-head { margin-bottom: 4px; font-size: var(--ps-fs-md); font-weight: 800; }
.ps-ui .kn-baca .bs-fb-ok { color: var(--ps-ok-tx); }
.ps-ui .kn-baca .bs-fb-no { color: var(--ps-danger-tx); }
.ps-ui .kn-baca .kq-ans { margin-bottom: 14px; font-size: var(--ps-fs-md); color: var(--ps-tx-2); }
.ps-ui .kn-baca .kq-ans b { font-weight: 800; color: var(--ps-tx); }
.ps-ui .kn-baca .bs-next { min-height: 44px; padding: 10px 20px; font-size: var(--ps-fs-sm); }
/* kuota habis / tingkat dikuasai: emoji JS diganti ubin ikon */
.ps-ui .kn-baca .bs-quota-reached { padding: 12px 4px 4px; text-align: center; }
.ps-ui .kn-baca .bs-qr-icon {
  width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: var(--ps-r-lg); background: var(--ps-sunken); box-shadow: inset 0 0 0 1px var(--ps-bd-2);
  color: var(--ps-tx-2); font-size: 0; line-height: 0;
}
.ps-ui .kn-baca .bs-qr-icon::before {
  content: ""; width: 22px; height: 22px; background: currentColor;
  -webkit-mask: var(--kn-i-check) center / contain no-repeat; mask: var(--kn-i-check) center / contain no-repeat;
}
.ps-ui .kn-baca .bs-quota-reached:has(a) .bs-qr-icon::before {
  -webkit-mask-image: var(--kn-i-clock); mask-image: var(--kn-i-clock);
}
.ps-ui .kn-baca .bs-quota-reached h2 {
  margin: 0 0 8px; font-size: var(--ps-fs-xl); font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; color: var(--ps-tx);
}
.ps-ui .kn-baca .bs-quota-reached p { max-width: 46ch; margin: 0 auto 8px; font-size: var(--ps-fs-md); line-height: 1.6; color: var(--ps-tx-2); }
.ps-ui .kn-baca .bs-quota-reached p strong { color: var(--ps-tx); }
.ps-ui .kn-baca .bs-quota-reached .s-btn-primary { margin-top: 12px !important; padding: 11px 20px !important; font-size: var(--ps-fs-sm); }
@media (max-width: 767px) {
  .ps-ui .kn-baca .kq-card { padding: 20px 16px; }
  .ps-ui .kn-baca .kq-kana { font-size: 44px; }
}


/* ── 4. Kuis Kana pilihan ganda (kuis_kana.html) ───────────────────── */
.ps-ui .kn-kuis .kq-switch {
  display: inline-flex; align-items: center; gap: 2px; min-height: 32px;
  font-size: var(--ps-fs-sm); font-weight: 700; color: var(--ps-kin-hi); text-decoration: none;
  transition: color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-kuis .kq-switch:hover { color: var(--ps-tx); text-decoration: none; }
.ps-ui .kn-kuis .kq-switch .ps-i { width: 16px; height: 16px; }
@media (pointer: coarse) { .ps-ui .kn-kuis .kq-switch { min-height: 44px; } }
.ps-ui .kn-kuis .kq-wrap { max-width: none; margin: 0; text-align: left; }
.ps-ui .kn-kuis .kq-kicker {
  margin: 0; font-size: var(--ps-fs-3xl); font-weight: 800; letter-spacing: -0.015em; line-height: 1.25;
  text-transform: none; color: var(--ps-tx);
}
.ps-ui .kn-kuis .kq-lead { margin: 4px 0 0; max-width: 68ch; font-size: var(--ps-fs-md); line-height: 1.55; color: var(--ps-tx-2); }
.ps-ui .kn-kuis .kq-throne {
  max-width: none; margin: 18px 0 12px; padding: 10px 14px;
  border: 1px solid oklch(88% 0.05 84); border-radius: var(--ps-r);
  background: var(--ps-kin-tint); color: var(--ps-tx-2);
  font-size: var(--ps-fs-sm); line-height: 1.5; text-align: left;
}
.ps-ui .kn-kuis .kq-throne .ps-i { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; color: var(--ps-kin-hi); }
.ps-ui .kn-kuis .kq-throne b { color: var(--ps-tx); }
.ps-ui .kn-kuis .kq-throne.lead { background: var(--ps-ok-soft); border-color: oklch(86% 0.05 158); color: var(--ps-ok-tx); }
.ps-ui .kn-kuis .kq-throne.lead b { color: var(--ps-ok-tx); }
.ps-ui .kn-kuis .kq-card {
  padding: 26px 20px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1); text-align: center;
}
.ps-ui .kn-kuis .kq-char { font-family: var(--ps-font); font-size: 88px; font-weight: 700; line-height: 1.1; color: var(--ps-tx); }
.ps-ui .kn-kuis .kq-hint { margin-top: 12px; font-size: var(--ps-fs-xs); color: var(--ps-tx-3); text-align: center; }
.ps-ui .kn-kuis .kq-hint b { color: var(--ps-tx-2); }
@media (hover: none) and (pointer: coarse) { .ps-ui .kn-kuis .kq-hint { display: none; } }
@media (max-width: 767px) {
  .ps-ui .kn-kuis .kq-kicker { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-kuis .kq-char { font-size: 76px; }
}


/* ── 5. Indeks Kuis Kana (kuis_kana_index.html) ───────────────────── */
.ps-ui .kn-kuis-idx .kk-hero { display: grid; gap: 4px; max-width: none; margin: 0 0 20px; text-align: left; }
.ps-ui .kn-kuis-idx .kk-hero-title {
  margin: 0; font-family: var(--ps-font); font-size: var(--ps-fs-3xl); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ps-tx);
}
.ps-ui .kn-kuis-idx .kk-hero-lead { max-width: 68ch; font-size: var(--ps-fs-md); line-height: 1.55; color: var(--ps-tx-2); }
.ps-ui .kn-kuis-idx .kk-grid { max-width: 760px; margin: 0; gap: 16px; }
.ps-ui .kn-kuis-idx .kk-card {
  gap: 14px; padding: 16px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1); color: var(--ps-tx);
  transition: border-color var(--ps-t) var(--ps-ease), box-shadow var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-kuis-idx .kk-card:hover { transform: none; border-color: var(--s-border-strong); box-shadow: var(--ps-sh-2); }
.ps-ui .kn-kuis-idx .kk-card:active { transform: none; }
.ps-ui .kn-kuis-idx .kk-card:focus-visible { outline: 2px solid var(--ps-kon-3); outline-offset: 2px; border-radius: var(--ps-r-lg); }
.ps-ui .kn-kuis-idx .kk-card .kk-card-char {
  width: 52px; height: 52px; border-radius: var(--ps-r-lg);
  background: var(--ps-bd-2); color: var(--ps-tx);
  font-family: var(--ps-font); font-size: 26px; font-weight: 700;
  transition: background-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-kuis-idx .kk-card:hover .kk-card-char { background: var(--ps-kin-soft); color: var(--ps-kin-hi); }
.ps-ui .kn-kuis-idx .kk-card-title { font-size: var(--ps-fs-lg); font-weight: 700; line-height: 1.35; }
.ps-ui .kn-kuis-idx .kk-card-sub { margin-top: 2px; font-size: var(--ps-fs-sm); color: var(--ps-tx-3); }
.ps-ui .kn-kuis-idx .kk-card-arrow { display: inline-flex; color: var(--ps-tx-3); }
.ps-ui .kn-kuis-idx .kk-card-arrow .ps-i { width: 16px; height: 16px; }
.ps-ui .kn-kuis-idx .kk-card.kk-soon { opacity: 1; }
.ps-ui .kn-kuis-idx .kk-card.kk-soon .kk-card-char { color: var(--ps-tx-3); }
.ps-ui .kn-kuis-idx .kk-card-soon {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; margin-top: 8px; padding: 0 9px;
  border-radius: 999px; background: var(--ps-bd-2); color: var(--ps-tx-2);
  font-size: 11.5px; font-weight: 700;
}
.ps-ui .kn-kuis-idx .kk-card-soon .ps-i { width: 12px; height: 12px; }
@media (max-width: 767px) {
  .ps-ui .kn-kuis-idx .kk-hero-title { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-kuis-idx .kk-grid { gap: 10px; }
}


/* ── 6. Tebak Hiragana/Katakana (tebak_hiragana.html) ──────────────── */
.ps-ui .kn-tebak.th-wrap { max-width: 600px; margin-inline: auto; }
.ps-ui .kn-tebak .th-head { display: grid; gap: 4px; margin: 0 0 16px; text-align: left; }
.ps-ui .kn-tebak .th-title {
  margin: 0; font-family: var(--ps-font); font-size: var(--ps-fs-3xl); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ps-tx);
}
.ps-ui .kn-tebak .th-sub { margin: 0; max-width: 68ch; font-size: var(--ps-fs-md); line-height: 1.55; color: var(--ps-tx-2); }
.ps-ui .kn-tebak .th-bar { margin: 0 0 8px; font-size: var(--ps-fs-sm); font-weight: 700; color: var(--ps-tx-2); font-variant-numeric: tabular-nums; }
.ps-ui .kn-tebak .th-card {
  padding: 16px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-tebak .th-imgwrap { border-radius: var(--ps-r); background: var(--ps-sunken); }
.ps-ui .kn-tebak .th-badge {
  top: 12px; left: 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--ps-ok); color: oklch(99% 0.01 158); box-shadow: var(--ps-sh-1);
  font-size: var(--ps-fs-sm); font-weight: 800;
}
.ps-ui .kn-tebak .th-reveal { margin: 12px 4px 2px; font-size: var(--ps-fs-md); color: var(--ps-tx-2); }
.ps-ui .kn-tebak .th-reveal b { font-size: 20px; font-weight: 800; color: var(--ps-tx); }
.ps-ui .kn-tebak #th-form { margin-top: 14px; }
.ps-ui .kn-tebak #th-input {
  min-height: 50px; padding: 10px 14px; border: 1px solid var(--ps-bd); border-radius: var(--ps-r);
  background: var(--ps-surface); color: var(--ps-tx); box-shadow: var(--ps-sh-1);
  font-family: var(--ps-font); font-size: 18px;
  transition: border-color var(--ps-t) var(--ps-ease), box-shadow var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tebak #th-input::placeholder { color: var(--ps-tx-3); }
.ps-ui .kn-tebak #th-input:focus { outline: none; border-color: var(--ps-kon-3); box-shadow: 0 0 0 3px oklch(34% 0.07 258 / 0.12); }
.ps-ui .kn-tebak #th-input:disabled { background: var(--ps-sunken); color: var(--ps-tx-2); box-shadow: none; }
.ps-ui .kn-tebak .th-actions { gap: 8px; margin-top: 10px; }
.ps-ui .kn-tebak .th-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--ps-r);
  font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 700; line-height: 1.3; text-decoration: none;
  transition: background-color var(--ps-t) var(--ps-ease), border-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tebak .th-btn:active { transform: translateY(1px); }
.ps-ui .kn-tebak .th-btn .ps-i { width: 16px; height: 16px; margin: 0; }
.ps-ui .kn-tebak .th-btn-primary {
  background: var(--ps-kon); border-color: var(--ps-kon); color: var(--ps-kon-on);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), var(--ps-sh-1);
}
.ps-ui .kn-tebak .th-btn-primary:hover { background: var(--ps-kon-2); border-color: var(--ps-kon-2); }
.ps-ui .kn-tebak .th-btn-ghost { flex: 0 0 auto; padding: 0 18px; background: var(--ps-surface); border-color: var(--ps-bd); color: var(--ps-tx); box-shadow: var(--ps-sh-1); }
.ps-ui .kn-tebak .th-btn-ghost:hover { border-color: var(--ps-tx-3); }
.ps-ui .kn-tebak .th-feedback { margin-top: 10px; font-size: var(--ps-fs-md); font-weight: 700; }
.ps-ui .kn-tebak .th-feedback.ok { color: var(--ps-ok-tx); }
.ps-ui .kn-tebak .th-feedback.no { color: var(--ps-danger-tx); }
.ps-ui .kn-tebak .th-shake { animation: kn-shake 200ms var(--ps-ease); }
@keyframes kn-shake { 0%, 100% { transform: none; } 30% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }
.ps-ui .kn-tebak .th-done {
  padding: 28px 20px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1); text-align: center;
}
.ps-ui .kn-tebak .th-done h2 { margin: 0 0 8px; font-family: var(--ps-font); font-size: var(--ps-fs-2xl); font-weight: 800; letter-spacing: -0.01em; color: var(--ps-tx); }
.ps-ui .kn-tebak .th-done p { color: var(--ps-tx-2); }
.ps-ui .kn-tebak .th-done p b { color: var(--ps-tx); }
.ps-ui .kn-tebak .th-done .th-btn { min-width: 160px; }

/* layar terkunci (paywall / belum masuk) */
.ps-ui .kn-tebak-lock { max-width: 880px; margin: 0 auto; text-align: left; }
.ps-ui .kn-tebak-lock .th-lock-head { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.ps-ui .kn-tebak-lock .th-lock-emoji {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; margin: 0;
  border-radius: var(--ps-r-lg); background: var(--ps-bd-2); color: var(--ps-tx);
  font-family: var(--ps-font); font-size: 24px; font-weight: 700; line-height: 1;
}
.ps-ui .kn-tebak-lock .th-lock-tx { display: grid; gap: 4px; min-width: 0; }
.ps-ui .kn-tebak-lock .th-lock-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ps-ui .kn-tebak-lock .th-slideshow {
  position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  width: auto; max-width: none; aspect-ratio: auto; margin: 0; padding: 16px;
  background: var(--ps-sunken); border: 1px solid var(--ps-bd); border-radius: var(--ps-r-lg);
}
.ps-ui .kn-tebak-lock .th-slide {
  position: static; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 3 / 4;
  object-fit: cover; object-position: top; transform: none;
  border: 1px solid var(--ps-bd); border-radius: var(--ps-r); background: var(--ps-surface); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-tebak-lock .th-slide-b { animation: none; opacity: 1; }
.ps-ui .kn-tebak-lock .th-lock-card {
  margin: 0; padding: 20px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-tebak-lock .th-lock-note { margin: 0 0 14px; font-size: var(--ps-fs-md); line-height: 1.5; color: var(--ps-tx-2); }
.ps-ui .kn-tebak-lock .th-lock-card .th-btn { display: flex; width: 100%; margin: 0 0 8px; text-align: center; }
.ps-ui .kn-tebak-lock .th-btn-outline {
  flex-direction: column; gap: 2px; height: auto; min-height: 54px; padding: 8px 14px;
  background: var(--ps-surface); border-color: var(--ps-bd); color: var(--ps-tx); box-shadow: var(--ps-sh-1); white-space: normal;
}
.ps-ui .kn-tebak-lock .th-btn-outline:hover { border-color: var(--ps-tx-3); }
.ps-ui .kn-tebak-lock .th-btn-outline small { font-size: var(--ps-fs-xs); font-weight: 400; color: var(--ps-tx-3); opacity: 1; }
.ps-ui .kn-tebak-lock .th-btn-ghost2 { background: transparent; border-color: transparent; color: var(--ps-tx-2); box-shadow: none; }
.ps-ui .kn-tebak-lock .th-btn-ghost2:hover { background: var(--ps-sunken); color: var(--ps-tx); }
.ps-ui .kn-tebak-lock #checkout-result:empty { display: none; }
.ps-ui .kn-tebak-lock #checkout-result .s-checkout-msg { margin: 6px 0 0; }
@media (max-width: 1100px) {
  .ps-ui .kn-tebak-lock { max-width: 600px; }
  .ps-ui .kn-tebak-lock .th-lock-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 767px) {
  .ps-ui .kn-tebak .th-title { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-tebak-lock .th-lock-head { align-items: flex-start; }
  .ps-ui .kn-tebak-lock .th-lock-emoji { width: 44px; height: 44px; font-size: 22px; }
  .ps-ui .kn-tebak-lock .th-slideshow { gap: 10px; padding: 12px; }
  .ps-ui .kn-tebak-lock .th-lock-card { padding: 16px; }
}


/* ── 7. Tulis Kana (tulis_hiragana.html; papan SVG dari hiragana-player/trace.mjs) ── */
.ps-ui .kn-tulis { max-width: 1080px; margin-inline: auto; }
.ps-ui .kn-tulis-grid { display: grid; gap: 20px; max-width: 560px; margin-inline: auto; }
.ps-ui .kn-tulis-main { display: grid; gap: 10px; min-width: 0; align-content: start; }
.ps-ui .kn-tulis .th-kana,
.ps-ui .kn-tulis .th-modes { display: flex; width: 100%; }
.ps-ui .kn-tulis .th-kana-btn,
.ps-ui .kn-tulis .th-mode { flex: 1 1 0; }
.ps-ui .kn-tulis .th-board-card {
  max-width: none; margin: 4px 0 0; padding: 16px 20px 20px;
  background: var(--ps-surface); border: 1px solid var(--ps-bd); border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-tulis .th-current { gap: 8px; margin-bottom: 2px; }
.ps-ui .kn-tulis .th-current-char { font-family: var(--ps-font); font-size: 28px; font-weight: 700; color: var(--ps-tx); }
.ps-ui .kn-tulis .th-current-romaji { font-size: var(--ps-fs-md); font-weight: 700; letter-spacing: 0.04em; color: var(--ps-kin-hi); }
.ps-ui .kn-tulis .th-board { min-height: 300px; }
.ps-ui .kn-tulis .th-status { margin: 8px 0 14px; font-size: var(--ps-fs-sm); font-weight: 700; color: var(--ps-tx-2); }
.ps-ui .kn-tulis .th-status.is-ok { color: var(--ps-ok-tx); }
.ps-ui .kn-tulis .th-status.is-bad { color: var(--ps-danger-tx); }
.ps-ui .kn-tulis .th-controls { gap: 8px; }
.ps-ui .kn-tulis .th-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border: 1px solid var(--ps-bd); border-radius: var(--ps-r);
  background: var(--ps-surface); color: var(--ps-tx); box-shadow: var(--ps-sh-1);
  font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 700;
  transition: background-color var(--ps-t) var(--ps-ease), border-color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tulis .th-btn:hover { background: var(--ps-surface); border-color: var(--ps-tx-3); }
.ps-ui .kn-tulis .th-btn:active { transform: translateY(1px); }
.ps-ui .kn-tulis .th-btn .ps-i { width: 12px; height: 12px; margin: 0; }
.ps-ui .kn-tulis .th-btn-primary {
  background: var(--ps-kon); border-color: var(--ps-kon); color: var(--ps-kon-on);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), var(--ps-sh-1);
}
.ps-ui .kn-tulis .th-btn-primary:hover { background: var(--ps-kon-2); border-color: var(--ps-kon-2); }
.ps-ui .kn-tulis .th-steps { gap: 6px; margin-top: 12px; }
.ps-ui .kn-tulis .th-step {
  width: 32px; height: 32px; border: 1px solid var(--ps-bd); border-radius: var(--ps-r-sm);
  background: var(--ps-surface); color: var(--ps-tx-2);
  font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 800; font-variant-numeric: tabular-nums;
  transition: background-color var(--ps-t) var(--ps-ease), border-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tulis .th-step:hover { background: var(--ps-surface); border-color: var(--ps-tx-3); color: var(--ps-tx); }
.ps-ui .kn-tulis .th-step.is-on { background: var(--ps-kon); border-color: var(--ps-kon); color: var(--ps-kon-on); }
.ps-ui .kn-tulis .th-latih-hint { margin: 12px 0 0; font-size: var(--ps-fs-xs); line-height: 1.5; color: var(--ps-tx-3); }
.ps-ui .kn-tulis .th-latih-hint b { color: var(--ps-tx-2); }
.ps-ui .kn-tulis-pick {
  min-width: 0; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-tulis .th-grid-title {
  margin: 0; padding: 14px 20px 12px; border-bottom: 1px solid var(--ps-bd-2);
  font-family: var(--ps-font); font-size: var(--ps-fs-md); font-weight: 700; color: var(--ps-tx); text-align: left;
}
.ps-ui .kn-tulis .th-grid {
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px;
  max-width: none; margin: 0; padding: 16px 20px 20px;
}
.ps-ui .kn-tulis .th-tile {
  border: 1px solid var(--ps-bd-2); border-radius: var(--ps-r); background: var(--ps-surface); box-shadow: none;
  transition: border-color var(--ps-t) var(--ps-ease), background-color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tulis .th-tile:hover { border-color: var(--ps-tx-3); box-shadow: none; }
.ps-ui .kn-tulis .th-tile:active { transform: none; }
.ps-ui .kn-tulis .th-tile:focus-visible { border-radius: var(--ps-r); }
.ps-ui .kn-tulis .th-tile.is-active { border-color: var(--ps-kin); background: var(--ps-kin-tint); box-shadow: inset 0 0 0 1px var(--ps-kin); }
.ps-ui .kn-tulis .th-tile-char { font-family: var(--ps-font); font-size: 22px; font-weight: 400; color: var(--ps-tx); }
.ps-ui .kn-tulis .th-tile-romaji { font-size: 10.5px; font-weight: 700; color: var(--ps-tx-3); }
/* Tulis Kanji: petak lebih lebar karena label = arti (bukan romaji). */
.ps-ui .kn-tulis .th-grid.is-kanji { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.ps-ui .kn-tulis .th-grid.is-kanji .th-tile-char { font-size: 24px; }
.ps-ui .kn-tulis .th-readings { color: var(--ps-tx-2); }
.ps-ui .kn-tulis .th-credit { max-width: none; margin: 16px 0 0; font-size: var(--ps-fs-xs); color: var(--ps-tx-3); text-align: left; }
@media (min-width: 1200px) {
  .ps-ui .kn-tulis-grid { max-width: none; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); align-items: start; gap: 24px; }
  .ps-ui .kn-tulis .th-credit { padding-left: calc(460px + 24px); }
}
@media (pointer: coarse) {
  .ps-ui .kn-tulis .th-btn { min-height: 44px; }
  .ps-ui .kn-tulis .th-step { width: 40px; height: 40px; }
}
@media (max-width: 767px) {
  .ps-ui .kn-tulis .th-board-card { padding: 14px 16px 16px; }
  .ps-ui .kn-tulis .th-board { min-height: 260px; }
  .ps-ui .kn-tulis .th-grid-title { padding: 12px 16px 10px; }
  .ps-ui .kn-tulis .th-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; padding: 12px 16px 16px; }
  .ps-ui .kn-tulis .th-tile-char { font-size: 19px; }
  .ps-ui .kn-tulis .th-grid.is-kanji { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .ps-ui .kn-tulis .th-grid.is-kanji .th-tile-char { font-size: 22px; }
}


/* ── 8. Tebak Kanji (tebak_kanji.html; state diatur style.display di JS) ── */
.ps-ui .kn-tk.tk-wrap { max-width: 600px; margin-inline: auto; }
.ps-ui .kn-tk .tk-head { display: grid; gap: 4px; margin: 0 0 20px; text-align: left; }
.ps-ui .kn-tk .tk-title {
  margin: 0; font-family: var(--ps-font); font-size: var(--ps-fs-3xl); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ps-tx);
}
.ps-ui .kn-tk .tk-jp { margin-left: 2px; font-size: 0.86em; font-weight: 700; color: var(--ps-kin-hi); }
.ps-ui .kn-tk .tk-sub { max-width: 68ch; font-size: var(--ps-fs-md); line-height: 1.55; color: var(--ps-tx-2); }
/* beranda kuis: kartu "Pilih materi" + meter di kepala kartu */
.ps-ui .kn-tk #tk-home {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label meter" "levels levels" "note note";
  align-items: center; overflow: hidden;
  background: var(--ps-surface); border: 1px solid var(--ps-bd); border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-tk .tk-pick-label { grid-area: label; margin: 0; padding: 14px 20px; font-size: var(--ps-fs-md); font-weight: 700; color: var(--ps-tx); text-align: left; }
.ps-ui .kn-tk .tk-meter {
  grid-area: meter; min-height: 0; margin: 0; padding: 14px 20px;
  font-size: var(--ps-fs-xs); font-weight: 700; color: var(--ps-tx-3); text-align: right;
}
.ps-ui .kn-tk .tk-meter:empty { padding: 0; }
.ps-ui .kn-tk .tk-meter b { color: var(--ps-tx); font-variant-numeric: tabular-nums; }
.ps-ui .kn-tk .tk-meter .tk-inf { color: var(--ps-kin-hi); }
.ps-ui .kn-tk .tk-levels { grid-area: levels; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--ps-bd-2); }
.ps-ui .kn-tk .tk-lvl {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "b t g" "b m g";
  column-gap: 14px; row-gap: 0; align-items: center; justify-items: start;
  width: 100%; padding: 14px 20px; border: 0; border-bottom: 1px solid var(--ps-bd-2); border-radius: 0;
  background: transparent; box-shadow: none; color: var(--ps-tx); text-align: left;
  font-family: var(--ps-font); transform: none;
  transition: background-color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tk .tk-lvl:last-child { border-bottom: 0; }
.ps-ui .kn-tk .tk-lvl:hover { background: var(--ps-hover); transform: none; box-shadow: none; }
.ps-ui .kn-tk .tk-lvl:active { transform: none; }
.ps-ui .kn-tk .tk-lvl:focus-visible { outline-offset: -2px; border-radius: 0; }
.ps-ui .kn-tk .tk-lvl-badge {
  grid-area: b; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; line-height: 1;
  border-radius: 10px; background: var(--ps-bd-2); color: var(--ps-tx);
  font-size: var(--ps-fs-sm); font-weight: 800;
  transition: background-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tk .tk-lvl:hover .tk-lvl-badge { background: var(--ps-kin-soft); color: var(--ps-kin-hi); }
.ps-ui .kn-tk .tk-lvl-badge .ps-i { width: 18px; height: 18px; }
.ps-ui .kn-tk .tk-lvl h3 { grid-area: t; align-self: end; margin: 0; font-size: var(--ps-fs-md); font-weight: 700; color: var(--ps-tx); }
.ps-ui .kn-tk .tk-lvl-meta { grid-area: m; align-self: start; font-size: var(--ps-fs-xs); color: var(--ps-tx-3); }
.ps-ui .kn-tk .tk-go { grid-area: g; display: block; width: 16px; height: 16px; color: var(--ps-tx-3); }
.ps-ui .kn-tk .tk-note {
  grid-area: note; margin: 0; padding: 12px 20px 14px; border-top: 1px solid var(--ps-bd-2);
  font-size: var(--ps-fs-xs); line-height: 1.5; color: var(--ps-tx-3); text-align: left;
}
.ps-ui .kn-tk .tk-note:empty { display: none; }
.ps-ui .kn-tk .tk-note b { color: var(--ps-tx); }
/* kuis */
.ps-ui .kn-tk .tk-bar { gap: 12px; margin: 0 0 10px; font-size: var(--ps-fs-sm); font-weight: 700; color: var(--ps-tx-3); font-variant-numeric: tabular-nums; }
.ps-ui .kn-tk .tk-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-right: auto; padding: 0;
  color: var(--ps-tx-3); font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 700;
  transition: color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tk .tk-back:hover { color: var(--ps-tx); }
.ps-ui .kn-tk .tk-back .ps-i { width: 16px; height: 16px; margin: 0; }
@media (pointer: coarse) { .ps-ui .kn-tk .tk-back { min-height: 44px; } }
.ps-ui .kn-tk #tk-streak { color: var(--ps-kin-hi); }
.ps-ui .kn-tk .tk-card {
  padding: 24px 20px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-tk .tk-prompt-label { margin-bottom: 8px; font-size: var(--ps-fs-sm); font-weight: 700; color: var(--ps-tx-2); }
.ps-ui .kn-tk .tk-prompt { min-height: 88px; margin-bottom: 20px; }
.ps-ui .kn-tk .tk-prompt.kanji { font-family: var(--kn-mincho); font-size: 80px; font-weight: 600; color: var(--ps-tx); }
.ps-ui .kn-tk .tk-prompt.arti { font-family: var(--ps-font); font-size: var(--ps-fs-3xl); font-weight: 700; line-height: 1.35; color: var(--ps-tx); }
.ps-ui .kn-tk .tk-options { gap: 10px; }
.ps-ui .kn-tk .tk-opt {
  min-height: 56px; padding: 12px; border: 1px solid var(--ps-bd); border-radius: var(--ps-r);
  background: var(--ps-surface); color: var(--ps-tx); box-shadow: var(--ps-sh-1);
  font-family: var(--ps-font); font-weight: 700;
  transition: border-color var(--ps-t) var(--ps-ease), background-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tk .tk-opt.kanji { font-family: var(--kn-mincho); font-size: 32px; font-weight: 600; }
.ps-ui .kn-tk .tk-opt.arti { font-size: var(--ps-fs-md); line-height: 1.35; }
.ps-ui .kn-tk .tk-opt.romaji { font-size: var(--ps-fs-xl); }
.ps-ui .kn-tk .tk-opt:hover:not(:disabled) { border-color: var(--ps-tx-3); }
.ps-ui .kn-tk .tk-opt:active:not(:disabled) { transform: translateY(1px); }
.ps-ui .kn-tk .tk-opt:focus-visible { border-radius: var(--ps-r); }
.ps-ui .kn-tk .tk-opt:disabled:not(.correct):not(.wrong) { color: var(--ps-tx-3); box-shadow: none; }
.ps-ui .kn-tk .tk-opt.correct { background: var(--ps-ok-soft); border-color: var(--ps-ok); color: var(--ps-ok-tx); box-shadow: none; }
.ps-ui .kn-tk .tk-opt.wrong { background: var(--ps-danger-soft); border-color: var(--ps-danger); color: var(--ps-danger-tx); box-shadow: none; }
.ps-ui .kn-tk .tk-explain {
  margin-top: 16px; padding: 14px 16px; background: var(--ps-sunken);
  border: 1px solid var(--ps-bd-2); border-radius: var(--ps-r);
}
.ps-ui .kn-tk .tk-ex-verdict { margin-bottom: 10px; font-size: var(--ps-fs-sm); font-weight: 800; }
.ps-ui .kn-tk .tk-ex-verdict.ok { color: var(--ps-ok-tx); }
.ps-ui .kn-tk .tk-ex-verdict.no { color: var(--ps-danger-tx); }
.ps-ui .kn-tk .tk-ex-char { font-family: var(--kn-mincho); font-size: 40px; font-weight: 600; color: var(--ps-tx); }
.ps-ui .kn-tk .tk-ex-arti { font-size: var(--ps-fs-lg); font-weight: 700; color: var(--ps-tx); }
.ps-ui .kn-tk .tk-ex-read { gap: 6px; }
.ps-ui .kn-tk .tk-ex-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px;
  border: 1px solid var(--ps-bd); border-radius: 999px; background: var(--ps-surface);
  font-size: var(--ps-fs-xs); color: var(--ps-tx-2);
}
.ps-ui .kn-tk .tk-ex-chip b { font-weight: 700; color: var(--ps-tx); }
.ps-ui .kn-tk .tk-ex-ex { font-size: var(--ps-fs-sm); line-height: 1.5; color: var(--ps-tx-2); }
.ps-ui .kn-tk .tk-ex-ex b { color: var(--ps-tx); }
.ps-ui .kn-tk .tk-next {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 46px; margin-top: 16px; padding: 0 16px; border: 0; border-radius: var(--ps-r);
  background: var(--ps-kon); color: var(--ps-kon-on);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), var(--ps-sh-1);
  font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 700;
  transition: background-color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tk .tk-next:hover { background: var(--ps-kon-2); }
.ps-ui .kn-tk .tk-next .ps-i { width: 16px; height: 16px; margin: 0; }
/* segera hadir & batas harian */
.ps-ui .kn-tk :is(.tk-soon, .tk-limit) {
  padding: 32px 24px 28px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1); text-align: center;
}
.ps-ui .kn-tk .tk-soon-ico {
  width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: var(--ps-r-lg); background: var(--ps-sunken); box-shadow: inset 0 0 0 1px var(--ps-bd-2);
  color: var(--ps-tx-2); font-size: 0; line-height: 0;
}
.ps-ui .kn-tk .tk-soon-ico .ps-i { width: 22px; height: 22px; }
.ps-ui .kn-tk .tk-limit .tk-soon-ico::before {
  content: ""; width: 22px; height: 22px; background: currentColor;
  -webkit-mask: var(--kn-i-clock) center / contain no-repeat; mask: var(--kn-i-clock) center / contain no-repeat;
}
.ps-ui .kn-tk :is(.tk-soon, .tk-limit) h2 {
  margin: 0 0 8px; font-family: var(--ps-font); font-size: var(--ps-fs-2xl); font-weight: 800; letter-spacing: -0.01em; color: var(--ps-tx);
}
.ps-ui .kn-tk :is(.tk-soon, .tk-limit) p { max-width: 46ch; margin: 0 auto; font-size: var(--ps-fs-md); line-height: 1.6; color: var(--ps-tx-2); }
.ps-ui .kn-tk .tk-limit p b { color: var(--ps-tx); }
.ps-ui .kn-tk .tk-limit .tk-btnrow { gap: 8px; margin-top: 20px; }
.ps-ui .kn-tk .tk-limit :is(a, button) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: var(--ps-r); font-family: var(--ps-font); font-size: var(--ps-fs-sm); font-weight: 700;
  transition: background-color var(--ps-t) var(--ps-ease), border-color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-tk .tk-b-primary { background: var(--ps-kon); color: var(--ps-kon-on); box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), var(--ps-sh-1); }
.ps-ui .kn-tk .tk-b-primary:hover { background: var(--ps-kon-2); }
.ps-ui .kn-tk .tk-b-ghost { background: var(--ps-surface); color: var(--ps-tx); box-shadow: var(--ps-sh-1); }
.ps-ui .kn-tk .tk-b-ghost:hover { border-color: var(--ps-tx-3) !important; }
@media (max-width: 767px) {
  .ps-ui .kn-tk .tk-title { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-tk .tk-pick-label, .ps-ui .kn-tk .tk-meter { padding: 12px 16px; }
  .ps-ui .kn-tk .tk-lvl { padding: 12px 16px; }
  .ps-ui .kn-tk .tk-note { padding: 12px 16px; }
  .ps-ui .kn-tk .tk-card { padding: 20px 16px; }
  .ps-ui .kn-tk .tk-prompt.kanji { font-size: 72px; }
  .ps-ui .kn-tk .tk-prompt.arti { font-size: var(--ps-fs-2xl); }
}


/* ── 9. Tebak Angka (tebak_angka.html) ───────────────────────────── */
.ps-ui .kn-angka .ta-wrap { max-width: none; margin: 0; text-align: left; }
.ps-ui .kn-angka .ta-h1 {
  margin: 0; font-size: var(--ps-fs-3xl); font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; color: var(--ps-tx);
}
.ps-ui .kn-angka .ta-intro { max-width: 68ch; margin: 4px 0 16px; font-size: var(--ps-fs-md); line-height: 1.55; color: var(--ps-tx-2); }
.ps-ui .kn-angka .ta-tiers { justify-content: flex-start; gap: 6px; margin: 0 0 14px; }
.ps-ui .kn-angka .ta-tier {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border: 1px solid var(--ps-bd); border-radius: 999px; background: var(--ps-surface); color: var(--ps-tx-2);
  font-size: var(--ps-fs-sm); font-weight: 700; cursor: pointer; user-select: none;
  transition: background-color var(--ps-t) var(--ps-ease), border-color var(--ps-t) var(--ps-ease), color var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-angka .ta-tier:hover { border-color: var(--ps-tx-3); color: var(--ps-tx); }
.ps-ui .kn-angka .ta-tier.on { background: var(--ps-kon); border-color: var(--ps-kon); color: var(--ps-kon-on); }
@media (pointer: coarse) { .ps-ui .kn-angka .ta-tier { height: 40px; } }
.ps-ui .kn-angka .ta-card {
  padding: 26px 20px 20px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1); text-align: center;
}
.ps-ui .kn-angka .ta-play {
  display: inline-grid; place-items: center; width: 72px; height: 72px; border: 0; border-radius: 50%;
  background: var(--ps-kin); color: var(--ps-on-kin); box-shadow: var(--ps-glow-kin);
  font-size: 0; animation: none;
  transition: background-color var(--ps-t) var(--ps-ease), box-shadow var(--ps-t) var(--ps-ease), transform var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-angka .ta-play:hover { background: oklch(71% 0.125 78); }
.ps-ui .kn-angka .ta-play:active { transform: scale(0.96); }
.ps-ui .kn-angka .ta-play:focus-visible { border-radius: 50%; }
.ps-ui .kn-angka .ta-play .ps-i { width: 30px; height: 30px; stroke-width: 1.8; }
/* sedang diputar: cincin tenang, tanpa denyut */
.ps-ui .kn-angka .ta-play.playing { animation: none; box-shadow: 0 0 0 6px var(--ps-kin-soft), var(--ps-glow-kin); }
.ps-ui .kn-angka .ta-play-label { margin-top: 12px; font-size: var(--ps-fs-sm); color: var(--ps-tx-2); }
.ps-ui .kn-angka .ta-fallback { min-height: 18px; margin-top: 6px; font-size: var(--ps-fs-xs); color: var(--ps-warn-tx); }
.ps-ui .kn-angka .ta-opt { min-height: 64px; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* batas tercapai (kotak dari JS di dalam grid pilihan) */
.ps-ui .kn-angka #ta-options > div { grid-column: 1 / -1; padding: 6px 0 2px; }
.ps-ui .kn-angka #ta-options > div p { font-size: var(--ps-fs-md) !important; }
.ps-ui .kn-angka #ta-options > div a {
  display: inline-flex !important; align-items: center; min-height: 44px; padding: 0 20px !important;
  border-radius: var(--ps-r) !important; background: var(--ps-kon) !important; color: var(--ps-kon-on) !important;
  font-size: var(--ps-fs-sm); font-weight: 700 !important;
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.08), var(--ps-sh-1);
}
.ps-ui .kn-angka #ta-options > div a:hover { background: var(--ps-kon-2) !important; }
@media (max-width: 767px) {
  .ps-ui .kn-angka .ta-h1 { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-angka .ta-play { width: 64px; height: 64px; }
  .ps-ui .kn-angka .ta-opt { min-height: 60px; font-size: 22px; }
}


/* ── 10. Kanji (kanji.html; tab + lightbox dari student.js) ──────── */
.ps-ui .kn-kanji .s-kj-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  max-width: none; margin: 0 0 20px; padding: 0;
}
.ps-ui .kn-kanji .s-kj-title {
  margin: 0; font-family: var(--ps-font); font-size: var(--ps-fs-3xl); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ps-tx);
}
.ps-ui .kn-kanji .s-kj-status {
  display: inline-flex; align-items: center; height: 24px; margin: 0; padding: 0 9px;
  border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--ps-bd);
  color: var(--ps-tx-2); font-size: 11.5px; font-weight: 700; letter-spacing: 0;
}
.ps-ui .kn-kanji .s-kj-lead { flex-basis: 100%; max-width: 68ch; margin: 0; font-size: var(--ps-fs-md); line-height: 1.55; color: var(--ps-tx-2); }
.ps-ui .kn-kanji .kj-layout { display: grid; gap: 20px; }
/* contoh kartu: ringkas di atas grid; jadi kolom samping (sticky) di layar lebar */
.ps-ui .kn-kanji .s-kj-sample {
  max-width: none; margin: 0; padding: 14px 16px;
  background: var(--ps-surface); border: 1px solid var(--ps-bd); border-radius: var(--ps-r-lg); box-shadow: var(--ps-sh-1);
}
.ps-ui .kn-kanji .s-kj-sample-fig { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 16px; }
.ps-ui .kn-kanji .s-kj-sample-img {
  width: 96px; max-width: none; border: 1px solid var(--ps-bd-2); border-radius: var(--ps-r);
  background: var(--ps-sunken); box-shadow: none;
}
.ps-ui .kn-kanji .s-kj-sample-cap { max-width: none; margin: 0; font-size: var(--ps-fs-sm); line-height: 1.5; color: var(--ps-tx-2); text-align: left; }
.ps-ui .kn-kanji .s-kj-cards-wrap { min-width: 0; max-width: none; margin: 0; padding: 0; }
.ps-ui .kn-kanji .s-kj-tabs { margin: 0 0 14px; }
.ps-ui .kn-kanji .s-kj-tab { font-variant-numeric: tabular-nums; }
.ps-ui .kn-kanji .s-kj-soon-banner {
  align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 14px;
  background: var(--ps-sunken); border: 1px solid var(--ps-bd); border-radius: var(--ps-r);
  color: var(--ps-tx-2); font-size: var(--ps-fs-sm); line-height: 1.5;
}
.ps-ui .kn-kanji .s-kj-soon-icon { display: inline-flex; margin-top: 2px; font-size: 0; color: var(--ps-tx-3); }
.ps-ui .kn-kanji .s-kj-soon-icon .ps-i { width: 16px; height: 16px; }
.ps-ui .kn-kanji .s-kj-cards-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ps-ui .kn-kanji .s-kj-card {
  padding: 12px 6px 8px; background: var(--ps-surface); border: 1px solid var(--ps-bd);
  border-radius: var(--ps-r); box-shadow: var(--ps-sh-1);
  container-type: inline-size;
  transition: border-color var(--ps-t) var(--ps-ease), box-shadow var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-kanji .s-kj-card:not(.is-disabled):hover { transform: none; border-color: var(--ps-tx-3); box-shadow: var(--ps-sh-2); }
.ps-ui .kn-kanji .s-kj-card:active { transform: none; }
.ps-ui .kn-kanji .s-kj-card:not(.is-disabled):focus-visible { outline: 2px solid var(--ps-kon-3); outline-offset: 2px; border-radius: var(--ps-r); }
.ps-ui .kn-kanji .s-kj-card.is-disabled { opacity: 0.5; background: var(--ps-sunken); border-color: var(--ps-bd-2); box-shadow: none; }
.ps-ui .kn-kanji .s-kj-card.is-disabled:hover { border-color: var(--ps-bd-2); box-shadow: none; }
.ps-ui .kn-kanji .s-kj-card-char {
  font-family: var(--kn-mincho); font-weight: 600; line-height: 1.05; color: var(--ps-tx);
  font-size: 34px; font-size: clamp(24px, 36cqi, 40px);
}
.ps-ui .kn-kanji .s-kj-card-romaji { margin-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--ps-tx); }
.ps-ui .kn-kanji .s-kj-card-arti { font-size: 11px; color: var(--ps-tx-3); }
.ps-ui .kn-kanji .s-kj-card-lvl { top: 6px; left: 7px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--ps-tx-3); opacity: 1; }
.ps-ui .kn-kanji .s-kj-card-lock { top: 6px; right: 6px; display: inline-flex; font-size: 0; color: var(--ps-tx-3); opacity: 1; }
.ps-ui .kn-kanji .s-kj-card-lock .ps-i { width: 13px; height: 13px; }
.ps-ui .kn-kanji .s-kj-card.is-premium-locked :is(.s-kj-card-char, .s-kj-card-romaji, .s-kj-card-arti, .s-kj-card-lvl) { opacity: 0.4; }
/* lightbox: scrim Kon, kontrol putih tenang, tanpa blur */
.ps-ui .kn-kanji .s-kj-modal {
  background: oklch(15% 0.04 258 / 0.82); -webkit-backdrop-filter: none; backdrop-filter: none;
  animation-duration: 160ms;
}
.ps-ui .kn-kanji .s-kj-modal-inner { animation-duration: 200ms; }
.ps-ui .kn-kanji :is(.s-kj-modal-close, .s-kj-modal-nav) {
  background: var(--ps-surface); color: var(--ps-tx); box-shadow: var(--ps-sh-pop);
  transition: background-color var(--ps-t) var(--ps-ease), opacity var(--ps-t) var(--ps-ease);
}
.ps-ui .kn-kanji .s-kj-modal-close:hover { background: var(--ps-sunken); transform: none; }
.ps-ui .kn-kanji .s-kj-modal-nav:hover:not(:disabled) { background: var(--ps-sunken); transform: translateY(-50%); }
.ps-ui .kn-kanji :is(.s-kj-modal-close, .s-kj-modal-nav):focus-visible { outline: 2px solid var(--ps-kin); outline-offset: 3px; border-radius: 50%; }
.ps-ui .kn-kanji .s-kj-modal-img { border-radius: var(--ps-r-lg); background: var(--ps-surface); box-shadow: var(--ps-sh-pop); }
.ps-ui .kn-kanji .s-kj-modal-spinner { color: var(--ps-kon-tx); font-size: var(--ps-fs-sm); }
.ps-ui .kn-kanji .s-kj-modal-spinner-dot { border-color: oklch(100% 0 0 / 0.18); border-top-color: var(--ps-kin); }
.ps-ui .kn-kanji .s-kj-modal-meta {
  font-family: var(--ps-font); font-size: var(--ps-fs-xs); font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  color: var(--ps-kon-tx); background: oklch(100% 0 0 / 0.08);
}
@media (min-width: 1200px) {
  .ps-ui .kn-kanji .kj-layout { grid-template-columns: minmax(0, 1fr) 248px; align-items: start; gap: 24px; }
  .ps-ui .kn-kanji .s-kj-cards-wrap { grid-column: 1; grid-row: 1; }
  .ps-ui .kn-kanji .s-kj-sample { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--s-nav-h) + 20px); padding: 16px; }
  .ps-ui .kn-kanji .s-kj-sample-fig { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ps-ui .kn-kanji .s-kj-sample-img { width: 100%; }
}
@media (max-width: 767px) {
  .ps-ui .kn-kanji .s-kj-title { font-size: var(--ps-fs-2xl); }
  .ps-ui .kn-kanji .s-kj-tabs { display: flex; width: 100%; }
  .ps-ui .kn-kanji .s-kj-tab { flex: 1 1 0; padding: 0 8px; }
  .ps-ui .kn-kanji .s-kj-sample-fig { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; }
  .ps-ui .kn-kanji .s-kj-sample-img { width: 80px; }
  .ps-ui .kn-kanji .s-kj-cards-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
}
