/* ============================================================
   免許Quiz V3 — style.css
   Mobile-first, dark landing/login + light dashboard
   ============================================================ */
:root {
  --bg: #0a0a0a;
  --white: #ffffff;
  --gray: #8a8a8a;
  --gray-dark: #4a4a4a;
  --border: #e5e5e5;
  --green: #16a34a;
  --green-light: #dcfce7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --yellow: #fef3c7;
  --yellow-dark: #92400e;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  background: var(--bg);
  color: var(--white);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ============== LANDING / LOGIN / EXPIRED (dark) ============== */
.screen-landing, .screen-login, .screen-expired {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px; background: var(--bg);
}
.brand-kanji { font-size: 64px; font-weight: 900; letter-spacing: -2px; color: var(--white); }
.brand-tagline { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

.landing-card {
  background: var(--white); color: #000;
  border-radius: var(--border-radius-lg);
  padding: 22px 18px; cursor: pointer;
  transition: transform .1s;
}
.landing-card:active { transform: scale(0.98); }
.landing-card-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.landing-card-sub { font-size: 12px; color: var(--gray); }

.landing-outline {
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--border-radius-lg);
  padding: 14px; text-align: center; color: var(--white); cursor: pointer;
}

.lang-pill {
  background: transparent; color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 6px 12px; font-size: 12px;
}
.lang-pill.active { background: var(--white); color: #000; border-color: var(--white); }

/* ============== LOGIN CARD ============== */
.login-card {
  background: var(--white); color: #000;
  border-radius: var(--border-radius-lg);
  padding: 24px 20px; width: 100%; max-width: 360px;
}
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--gray-dark); }
.field input {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; background: #fafafa; color: #000;
}
.field input:focus { outline: 2px solid var(--blue); border-color: var(--blue); background: #fff; }
.err-msg {
  margin-top: 10px; padding: 10px 12px;
  background: var(--red-light); color: var(--red);
  border-radius: 8px; font-size: 13px; min-height: 0;
  display: none;
}
.err-msg:not(:empty) { display: block; }

/* Login Google */
.btn-google {
  width: 100%; padding: 13px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--white); color: #000; border: 1.5px solid #000; border-radius: 10px;
  font-size: 15px; font-weight: 600;
}
.btn-google .g-badge {
  width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.login-hint { font-size: 12px; color: var(--gray); margin-top: 8px; line-height: 1.5; }
.login-warn { font-size: 12px; background: var(--yellow); color: var(--yellow-dark); border-radius: 8px; padding: 8px 10px; margin-top: 8px; line-height: 1.5; }
.login-divider { display: flex; align-items: center; gap: 8px; margin: 18px 0 14px; font-size: 12px; color: var(--gray); }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Garansi uang kembali (dashboard) */
.refund-box { margin-top: 24px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; color: var(--gray-dark); }
.refund-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.refund-desc { font-size: 12px; line-height: 1.6; }
.refund-btn { color: var(--red); padding: 8px 0 0; font-weight: 600; }

/* ============== BUTTONS ============== */
.btn-primary {
  width: 100%; padding: 13px;
  background: #000; color: #fff;
  border-radius: 10px; font-size: 15px; font-weight: 600;
  margin-top: 4px;
}
.btn-primary.black { background: #000; color: #fff; }
.btn-primary.blue  { background: var(--blue); }
.btn-primary:disabled { opacity: .5; }
.btn-secondary {
  width: 100%; padding: 13px;
  background: var(--white); color: #000;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; font-weight: 600;
}
.btn-link {
  background: transparent; color: var(--blue);
  font-size: 13px; padding: 8px;
}
.btn-back {
  background: transparent; color: var(--gray);
  font-size: 13px; padding: 8px 0; margin-bottom: 12px;
}
.btn-group { display: flex; flex-direction: column; gap: 8px; }

/* ============== TOP NAV (light) ============== */
.topnav {
  background: var(--white); color: #000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.nav-logo { font-weight: 700; font-size: 15px; }
.nav-logo .jp { font-weight: 900; }
.nav-right { display: flex; gap: 4px; }
.nav-btn {
  padding: 6px 10px; border-radius: 8px;
  font-size: 12px; color: var(--gray-dark);
  background: #f5f5f5;
}

/* ============== DASHBOARD / SETTINGS / LIST ============== */
.dash-body, .settings-body, .list-body, .admin-body, .quiz-body {
  background: #fafafa; color: #000;
  min-height: calc(100vh - 50px); min-height: calc(100dvh - 50px);
  padding: 16px; max-width: 600px; margin: 0 auto;
}
.hero-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--border-radius-lg); padding: 18px 16px; margin-bottom: 14px;
}
.hero-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.hero-card p { font-size: 12px; color: var(--gray); }

.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 14px;
}
.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 8px; text-align: center;
}
.stat-val { font-size: 20px; font-weight: 700; }
.stat-lbl { font-size: 11px; color: var(--gray); margin-top: 2px; }

.section-title { font-size: 13px; font-weight: 700; color: var(--gray-dark); margin: 8px 0 8px; text-transform: uppercase; letter-spacing: .04em; }

.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 12px; cursor: pointer;
  transition: transform .1s;
}
.menu-card:active { transform: scale(0.98); }
.menu-icon { font-size: 22px; margin-bottom: 6px; }
.menu-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.menu-desc { font-size: 11px; color: var(--gray); }

/* ============== SETTINGS / OPTIONS ============== */
.opt-group { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.opt-group-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.opt-group-desc { font-size: 12px; color: var(--gray); margin-bottom: 10px; line-height: 1.5; }
.opt-btn {
  display: block; width: 100%; text-align: left;
  padding: 11px 12px; background: #fafafa; color: #000;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; margin-bottom: 6px;
}
.opt-btn.sel { background: #000; color: #fff; border-color: #000; }
.info-box { background: var(--blue-light); color: var(--blue); padding: 10px 12px; border-radius: 8px; font-size: 12px; margin-top: 6px; line-height: 1.5; }

/* ============== QUIZ ============== */
.quiz-header { background: var(--white); border-bottom: 1px solid var(--border); padding: 12px 16px; position: sticky; top: 0; z-index: 5; color: #000; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quiz-counter { font-size: 13px; font-weight: 600; color: var(--gray-dark); }
.quiz-timer { font-size: 13px; font-weight: 700; color: var(--red); padding: 4px 8px; background: var(--red-light); border-radius: 6px; }
.prog-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--blue); transition: width .3s; }

.quiz-body {
  padding-top: 16px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
.q-card, .study-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 16px; margin-bottom: 14px;
}
.q-label { font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.q-text { font-size: 16px; line-height: 1.7; color: #000; }
.q-img { border-radius: 10px; max-height: 240px; margin-bottom: 12px; object-fit: contain; }
.q-fallback-badge { font-size: 11px; background: var(--yellow); color: var(--yellow-dark); padding: 4px 8px; border-radius: 6px; margin-bottom: 10px; display: inline-block; }
.trans-toggle { font-size: 12px; color: var(--blue); margin-top: 10px; cursor: pointer; text-decoration: underline; }
.trans-box { display: none; background: var(--blue-light); color: var(--blue); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-top: 6px; line-height: 1.6; }
.trans-box.show, .trans-box.always { display: block; }

.marubatsu-btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.maru-btn {
  background: var(--white); border: 2px solid var(--border);
  border-radius: 14px;
  padding: 30px 0; text-align: center;
  font-size: 60px; font-weight: 900; line-height: 1;
  cursor: pointer; transition: transform .1s, border-color .15s;
}
.maru-btn:active { transform: scale(0.97); }

.explain-box { display: none; background: #f3f4f6; border-radius: 10px; padding: 12px; margin-top: 12px; color: #000; }
#btn-next, #fq-btn-next {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 568px);
  z-index: 20;
  margin-top: 0 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

/* ============== STUDY ============== */
.study-ans-box { background: var(--green-light); border-radius: 10px; padding: 12px; margin-top: 8px; }
.study-ans-label { font-size: 11px; font-weight: 700; color: var(--gray-dark); text-transform: uppercase; margin-bottom: 4px; }
.study-ans-val { font-size: 18px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.study-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 250, 250, .96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .1);
  z-index: 20;
}
@supports (backdrop-filter: blur(10px)) {
  .study-nav { backdrop-filter: blur(10px); }
}
.study-nav button { padding: 12px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: #000; }
.study-nav .s-next { background: #000; color: #fff; border-color: #000; }

/* ============== RESULT ============== */
.screen-result { background: #fafafa; min-height: 100vh; padding: 30px 16px; }
.result-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--border-radius-lg); padding: 28px 22px; max-width: 380px; margin: 0 auto; text-align: center; color: #000; }
.score-ring { padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.score-ring .sv { font-size: 48px; font-weight: 900; }
.score-ring .sl { font-size: 13px; color: var(--gray); margin-top: 4px; }
.premium-box { text-align: left; background: var(--blue-light); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.premium-box-title { font-size: 11px; font-weight: 700; color: var(--blue); margin-bottom: 8px; letter-spacing: .04em; }
.premium-box ul { padding-left: 18px; font-size: 13px; line-height: 1.7; color: #000; }

/* ============== HISTORY / WRONG ============== */
.list-body h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: #000; }
.history-item, .wrong-item { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; color: #000; }
.history-item { display: flex; justify-content: space-between; align-items: center; }
.h-date { font-size: 13px; font-weight: 600; }
.h-mode { font-size: 11px; color: var(--gray); margin-top: 2px; }
.h-score { font-size: 18px; font-weight: 700; }
.h-score.pass { color: var(--green); }
.h-score.fail { color: var(--red); }
.h-detail { font-size: 11px; color: var(--gray); margin-top: 2px; }
/* Soal salah: tiap soal jadi kartu terpisah yang jelas (jarak lebar, garis merah di kiri, nomor). */
.wrong-item { margin-bottom: 20px; padding: 16px; border-left: 4px solid var(--red); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.wrong-item .q-img { margin-bottom: 10px; }
.wi-no { font-size: 11px; font-weight: 700; color: var(--gray); letter-spacing: .5px; margin-bottom: 6px; }
.wi-q { font-size: 15px; font-weight: 600; line-height: 1.6; margin-bottom: 8px; }
.wi-trans { font-size: 12px; color: var(--blue); margin-bottom: 6px; }
.wi-your { font-size: 12px; color: var(--red); }
.wi-correct { font-size: 12px; color: var(--green); margin-top: 2px; }
.wi-explain { font-size: 12px; color: var(--gray-dark); margin-top: 6px; line-height: 1.6; padding-top: 6px; border-top: 1px dashed var(--border); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); }
.empty-icon { font-size: 40px; margin-bottom: 8px; }

/* ============== ADMIN ============== */
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 6px; }
.admin-tab { white-space: nowrap; padding: 8px 12px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--gray-dark); }
.admin-tab.active { background: #000; color: #fff; border-color: #000; }
.admin-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; color: #000; }
.admin-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.admin-form { display: flex; flex-direction: column; gap: 10px; }
.admin-form-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--gray-dark); }
.admin-form-field input, .admin-form-field textarea, .admin-form-field select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; background: #fafafa; color: #000;
}
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-list-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; background: var(--white); }
.admin-filter { padding: 6px 10px; background: var(--white); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; color: var(--gray-dark); }
.admin-filter.active { background: #000; color: #fff; border-color: #000; }

/* ============== UTILITIES ============== */
.loader-inline { padding: 40px; text-align: center; color: var(--gray); }
#global-loader { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9999; align-items: center; justify-content: center; }
.spinner { width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#toast-host { position: fixed; left: 0; right: 0; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 10000; pointer-events: none; padding: 0 16px; }
.toast { background: rgba(0,0,0,0.92); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; max-width: 90vw; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: auto; }
.toast.show { opacity: 1; transform: translateY(0); }


/* Furigana / Ruby text support. Input format in XLSX: {漢字|かな}
   Designed for mobile readability: small rt, extra line-height, and compact long readings. */
ruby.furigana-ruby {
  ruby-position: over;
  line-height: 2.05;
  margin: 0 0.04em;
  padding-top: 0.12em;
  white-space: nowrap;
}

ruby.furigana-ruby rt {
  font-size: 0.46em;
  line-height: 1;
  color: #6b7280;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
}

ruby.furigana-ruby.furigana-long rt {
  font-size: 0.40em;
  letter-spacing: -0.07em;
}

.q-text ruby.furigana-ruby {
  line-height: 2.15;
}

.q-text ruby.furigana-ruby rt {
  font-size: 0.44em;
}

.q-text ruby.furigana-ruby.furigana-long rt {
  font-size: 0.38em;
}

.wi-q ruby.furigana-ruby,
.wi-trans ruby.furigana-ruby,
.wi-explain ruby.furigana-ruby,
.trans-box ruby.furigana-ruby {
  line-height: 2;
}

@media (max-width: 480px) {
  ruby.furigana-ruby {
    line-height: 2.15;
    margin: 0 0.03em;
  }

  ruby.furigana-ruby rt {
    font-size: 0.42em;
    letter-spacing: -0.055em;
  }

  ruby.furigana-ruby.furigana-long rt {
    font-size: 0.36em;
    letter-spacing: -0.08em;
  }

  .q-text ruby.furigana-ruby rt {
    font-size: 0.40em;
  }

  .q-text ruby.furigana-ruby.furigana-long rt {
    font-size: 0.34em;
  }
}

/* ============== MATERI PENUNJANG ============== */
.mt-lang { padding: 6px 9px; border-radius: 8px; font-size: 12px; color: var(--gray-dark); background: #f5f5f5; }
.mt-lang.active { background: #000; color: #fff; }
.mt-body { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.mt-h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.mt-src { font-size: 11px; color: var(--gray); margin-top: 18px; line-height: 1.5; }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mt-chip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--white); font-size: 12px; color: #000; }
.mt-chip.active { background: #000; color: #fff; border-color: #000; }
.mt-search { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: #000; font-size: 14px; margin-bottom: 6px; }
.mt-count { font-size: 12px; color: var(--gray); min-height: 16px; margin-bottom: 4px; }
.mt-sec { margin-bottom: 18px; }
.mt-sec-title { font-size: 15px; font-weight: 800; margin: 6px 0 4px; }
.mt-jp { font-weight: 600; color: var(--gray); font-size: 13px; }
.mt-sec-intro { font-size: 12px; color: var(--gray-dark); line-height: 1.6; margin-bottom: 10px; }
.mt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mt-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.mt-img { height: 92px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.mt-img img { max-height: 92px; width: auto; object-fit: contain; }
.mt-code { font-size: 11px; font-weight: 700; color: var(--blue); }
.mt-jpname { font-size: 11px; color: var(--gray); line-height: 1.4; }
.mt-name { font-size: 13px; font-weight: 800; line-height: 1.35; margin: 2px 0 4px; }
.mt-exp { font-size: 12px; line-height: 1.55; color: #222; }
.mt-tip { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: var(--red-light); color: #7c1f15; font-size: 11.5px; line-height: 1.5; }
.mt-intro { margin: 0 0 12px; font-size: 13px; }
.mt-case { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.mt-case-h { font-size: 15px; font-weight: 800; line-height: 1.4; margin-bottom: 6px; }
.mt-num { display: inline-block; background: #000; color: #fff; border-radius: 6px; padding: 0 7px; margin-right: 6px; font-size: 13px; }
.mt-sit { font-size: 13px; color: var(--gray-dark); line-height: 1.6; margin-bottom: 8px; }
.mt-case-img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px; }
.mt-hint { font-size: 12px; color: var(--gray); margin-bottom: 6px; }
.mt-qs { list-style: none; }
.mt-q { border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; margin-bottom: 7px; }
.mt-q.right { border-color: #86efac; background: #f0fdf4; }
.mt-q.wrong { border-color: #fca5a5; background: #fef2f2; }
.mt-q-row { display: flex; gap: 6px; font-size: 13px; line-height: 1.55; }
.mt-q-n { font-weight: 800; color: var(--blue); }
.mt-q-btns { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.mt-ox { width: 44px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: #fafafa; color: #000; font-size: 17px; font-weight: 800; }
.mt-ox.sel { background: #000; color: #fff; border-color: #000; }
.mt-ox:disabled { opacity: .55; }
.mt-key { margin-left: auto; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 8px; }
.mt-key.ok { background: var(--green-light); color: var(--green); }
.mt-key.ng { background: var(--red-light); color: var(--red); }
.mt-why { font-size: 12px; color: var(--gray-dark); margin-top: 6px; line-height: 1.55; }
.mt-score { font-size: 13px; font-weight: 800; padding: 8px 10px; border-radius: 8px; margin: 4px 0 10px; }
.mt-score.ok { background: var(--green-light); color: var(--green); }
.mt-score.ng { background: var(--red-light); color: var(--red); }
.mt-hz-title { font-size: 13px; font-weight: 800; margin: 4px 0 6px; }
.mt-hz { list-style: none; margin-bottom: 8px; }
.mt-hz li { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.55; margin-bottom: 5px; }
.mt-b { flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.mt-lesson { background: var(--green-light); color: #14532d; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.55; margin-bottom: 6px; }
.mt-link { color: var(--blue); font-size: 13px; font-weight: 700; padding: 8px 0 0; }

/* ============== EBOOK GENTSUKI ============== */
.eb-cover { background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; border-radius: 16px; padding: 22px 18px; margin-bottom: 16px; }
.eb-cover-jp { font-size: 12px; font-weight: 800; letter-spacing: .2em; opacity: .7; }
.eb-cover-t { font-size: 24px; font-weight: 900; margin: 4px 0 6px; }
.eb-cover-s { font-size: 13px; opacity: .85; line-height: 1.5; }
.eb-cover-langs { font-size: 11px; margin-top: 8px; opacity: .65; }
.eb-prog { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.eb-prog i { display: block; height: 100%; background: #facc15; }
.eb-prog-t { font-size: 11px; margin-top: 4px; opacity: .75; }
.eb-cover-btn { margin-top: 12px; background: #facc15; color: #000; }
.eb-toc { display: flex; flex-direction: column; gap: 8px; }
.eb-toc-item { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: #000; }
.eb-toc-ic { font-size: 24px; flex: 0 0 auto; }
.eb-toc-tx { flex: 1; min-width: 0; }
.eb-toc-tx b { display: block; font-size: 14px; }
.eb-toc-tx small { display: block; font-size: 11.5px; color: var(--gray); line-height: 1.4; }
.eb-toc-ck { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #f1f5f9; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.eb-ch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.eb-ch-ic { font-size: 30px; }
.eb-ch-n { font-size: 11px; color: var(--gray); font-weight: 700; }
.eb-jump { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.eb-jump .mt-chip { flex: 0 0 auto; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.eb-sec { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 12px; scroll-margin-top: 64px; }
.eb-h { font-size: 15.5px; font-weight: 800; margin-bottom: 8px; line-height: 1.4; }
.eb-pts { padding-left: 18px; }
.eb-pts li { font-size: 13.5px; line-height: 1.65; margin-bottom: 6px; color: #1f2937; }
.eb-pts li b, .eb-tbl b, .eb-fig figcaption b, .eb-rows b, .eb-tiles b { color: #b91c1c; }
.eb-tip { margin-top: 8px; background: var(--yellow); color: var(--yellow-dark); border-radius: 8px; padding: 9px 10px; font-size: 12.5px; line-height: 1.55; }
.eb-tip b { color: var(--yellow-dark); }
.eb-cta { display: block; width: 100%; margin-top: 8px; padding: 11px; border-radius: 10px; background: var(--red-light); color: #7c1f15; font-size: 13px; font-weight: 800; }
.eb-fig { margin: 4px 0 12px; }
.eb-fig svg { width: 100%; height: auto; display: block; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; }
.eb-fig figcaption { font-size: 12px; line-height: 1.6; color: var(--gray-dark); margin-top: 6px; }
.eb-rows { display: flex; flex-direction: column; gap: 6px; }
.eb-row { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.eb-ico { flex: 0 0 34px; width: 34px; height: 34px; }
.eb-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.eb-tile { position: relative; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 8px 8px 8px 30px; font-size: 12px; line-height: 1.45; }
.eb-tile-n { position: absolute; left: 8px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.eb-tile-i { display: block; font-size: 18px; margin-bottom: 2px; }
.eb-bars { display: flex; flex-direction: column; gap: 9px; }
.eb-bar-top { display: flex; align-items: center; gap: 8px; }
.eb-m { font-size: 14px; min-width: 42px; }
.eb-tag { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.eb-tag.p { background: var(--blue-light); color: var(--blue); }
.eb-tag.ps { background: var(--red-light); color: var(--red); }
.eb-bar { height: 8px; background: #f1f5f9; border-radius: 4px; margin: 4px 0 3px; overflow: hidden; }
.eb-bar i { display: block; height: 100%; border-radius: 4px; }
.eb-bar i.p { background: var(--blue); }
.eb-bar i.ps { background: var(--red); }
.eb-bar-t { font-size: 12px; color: #374151; line-height: 1.45; }
.eb-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; margin-bottom: 6px; }
.eb-legend i, .eb-sd-bar i { display: inline-block; height: 10px; }
.eb-legend i { width: 14px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.eb-legend i.r, .eb-sd-bar i.r { background: #f59e0b; }
.eb-legend i.b, .eb-sd-bar i.b { background: #dc2626; }
.eb-sd { display: flex; flex-direction: column; gap: 5px; }
.eb-sd-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.eb-sd-v { flex: 0 0 58px; color: var(--gray-dark); font-weight: 700; }
.eb-sd-bar { flex: 1; display: flex; height: 14px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.eb-sd-bar i { height: 100%; }
.eb-sd-t { flex: 0 0 40px; text-align: right; font-weight: 800; }
.eb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.eb-stat { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; text-align: center; }
.eb-stat-i { font-size: 18px; }
.eb-stat-v { font-size: 16px; font-weight: 900; }
.eb-stat-l { font-size: 10px; color: var(--gray-dark); line-height: 1.3; }
.eb-tbl-wrap { overflow-x: auto; margin-bottom: 10px; }
.eb-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.5; }
.eb-tbl th { background: #0f172a; color: #fff; text-align: left; padding: 7px 8px; font-weight: 700; }
.eb-tbl td { border-bottom: 1px solid var(--border); padding: 7px 8px; vertical-align: top; }
.eb-tbl tr:nth-child(even) td { background: #f8fafc; }
.eb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.eb-pager .btn-primary, .eb-pager .btn-secondary { font-size: 13px; padding: 12px 8px; }
@media (max-width: 360px) { .eb-tiles { grid-template-columns: 1fr; } .eb-stats { grid-template-columns: 1fr 1fr; } }
/* Ebook v2: furigana, ringkasan, langkah */
ruby.eb-rb { ruby-position: over; }
ruby.eb-rb rt { font-size: .5em; font-weight: 500; color: #64748b; letter-spacing: 0; }
.eb-pts li, .eb-tbl td, .eb-fig figcaption, .eb-row, .eb-tile, .eb-bar-t, .eb-key li { line-height: 1.9; }
.eb-key { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.eb-key-h { font-size: 13px; font-weight: 800; color: #1e40af; margin-bottom: 4px; }
.eb-key ol { padding-left: 18px; }
.eb-key li { font-size: 13.5px; color: #1e293b; }
.eb-key li b { color: #b91c1c; }
.eb-key-f { font-size: 11px; color: #64748b; margin-top: 4px; }
.eb-steps { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; }
.eb-step { flex: 1 1 0; min-width: 64px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.eb-step-n { width: 18px; height: 18px; border-radius: 50%; background: #1e3a8a; color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.eb-step-i { font-size: 20px; }
.eb-step-t { font-size: 11.5px; line-height: 1.6; }
.eb-step-ar { align-self: center; color: #94a3b8; font-weight: 800; }
.eb-tiles.g .eb-tile, .eb-tile.g { background: #f0fdf4; border-color: #bbf7d0; padding-left: 8px; }
@media (max-width: 420px) { .eb-step-ar { display: none; } .eb-step { flex: 1 1 40%; } }

/* ============== KOSAKATA ============== */
.kk-head { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.kk-sub { font-size: 12.5px; color: var(--gray-dark); line-height: 1.6; }
.kk-prog { background: #e5e7eb; }
.kk-prog i { background: var(--green); }
.kk-prog-t { font-size: 11.5px; color: var(--gray-dark); margin-top: 4px; }
.kk-tip { background: var(--yellow); color: var(--yellow-dark); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; line-height: 1.55; margin-bottom: 12px; }
.kk-groups { display: flex; flex-direction: column; gap: 8px; }
.kk-group { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; color: #000; }
.kk-g-n { flex: 0 0 22px; height: 22px; border-radius: 50%; background: #0f172a; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.kk-g-ic { font-size: 22px; }
.kk-g-tx { flex: 1; min-width: 0; }
.kk-g-tx b { display: block; font-size: 14px; }
.kk-g-tx small { display: block; font-size: 12px; color: var(--gray); }
.kk-g-c { font-size: 12px; font-weight: 800; color: var(--gray-dark); background: #f1f5f9; border-radius: 999px; padding: 3px 9px; }
.kk-g-c.full { background: var(--green-light); color: var(--green); }
.kk-gjp { font-size: 13px; color: var(--gray-dark); }
.kk-modes { display: flex; gap: 6px; margin: 4px 0 8px; }
.kk-hint { font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.kk-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.kk-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.kk-card.ok { border-color: #86efac; background: #f0fdf4; }
.kk-top { display: flex; align-items: center; gap: 8px; }
.kk-no { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--gray); min-width: 18px; }
.kk-jp { flex: 1; font-size: 21px; font-weight: 700; line-height: 1.9; }
.kk-ck { flex: 0 0 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: #fafafa; font-size: 16px; font-weight: 800; color: var(--gray); }
.kk-ck.on { background: var(--green); border-color: var(--green); color: #fff; }
.kk-ans { padding-left: 26px; }
.kk-id { font-size: 15px; font-weight: 800; color: #1e3a8a; }
.kk-ex { font-size: 13px; color: #374151; line-height: 1.9; margin-top: 1px; }
.kk-tap { display: none; padding-left: 26px; font-size: 12px; color: var(--blue); font-weight: 700; }
.kk-card.hide .kk-ans { display: none; }
.kk-card.hide .kk-tap { display: block; }
.kk-card.hide { cursor: pointer; }

/* ============== EBOOK & KOSAKATA: huruf lebih besar ============== */
.eb-cover-t { font-size: 27px; }
.eb-cover-s, .eb-toc-tx small { font-size: 15px; }
.eb-toc-tx b { font-size: 17px; }
.eb-toc-tx small { font-size: 14px; }
.eb-ch-n { font-size: 13px; }
.eb-h { font-size: 18px; line-height: 1.45; }
.eb-pts li { font-size: 16px; line-height: 1.8; }
.eb-tip { font-size: 15px; }
.eb-tbl { font-size: 15px; }
.eb-tbl th, .eb-tbl td { padding: 9px 9px; }
.eb-row { font-size: 15px; }
.eb-tile { font-size: 14.5px; }
.eb-fig figcaption { font-size: 15px; }
.eb-bar-t { font-size: 14.5px; }
.eb-m { font-size: 16px; }
.eb-tag { font-size: 12px; }
.eb-step-t { font-size: 14px; }
.eb-step-i { font-size: 24px; }
.eb-sd-row { font-size: 13.5px; }
.eb-legend { font-size: 13.5px; }
.eb-key-h { font-size: 16px; }
.eb-key li { font-size: 16px; }
.eb-key-f { font-size: 13px; }
.eb-cta { font-size: 15px; }
ruby.eb-rb rt { font-size: .62em; }
.kk-head h2, .kk-head .mt-h2 { font-size: 22px; }
.kk-sub { font-size: 15px; }
.kk-prog-t { font-size: 13.5px; }
.kk-tip { font-size: 15px; }
.kk-hint { font-size: 14px; }
.kk-g-tx b { font-size: 17px; }
.kk-g-tx small { font-size: 14px; }
.kk-g-c { font-size: 13.5px; }
.kk-gjp { font-size: 15px; }
.kk-no { font-size: 13px; }
.kk-jp { font-size: 24px; }
.kk-id { font-size: 19px; }
.kk-ex { font-size: 16.5px; }
.kk-tap { font-size: 14.5px; }
.kk-ck { font-size: 18px; }
ruby.furigana-ruby rt { font-size: .6em; }
