:root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #17324e;
    background: #f5f7fb
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

button,
input {
    font: inherit
}

button {
    cursor: pointer
}

.wrap {
    max-width: 1040px;
    margin: auto;
    padding: 0 20px
}

.header {
    background: #123b63;
    color: white
}

.header .wrap {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.brand {
    font-size: 20px;
    font-weight: 800
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center
}

.btn {
    border: 0;
    border-radius: 11px;
    background: #f4bd37;
    color: #17324e;
    padding: 11px 17px;
    font-weight: 750
}

.btn.secondary {
    background: #e8eef5
}

.btn.ghost {
    background: transparent;
    border: 1px solid #ffffff70;
    color: white
}

.btn.small {
    padding: 8px 12px;
    font-size: 13px
}

.hero {
    background: #123b63;
    color: white;
    padding: 48px 0 60px
}

.hero h1 {
    font-size: clamp(28px, 5vw, 46px);
    max-width: 650px;
    margin: 18px 0 15px;
    line-height: 1.2
}

.hero p {
    color: #d6e3f0;
    max-width: 590px;
    line-height: 1.7
}

.hero .btn {
    margin: 12px 8px 0 0
}

.section {
    padding: 32px 0 48px
}

.section h2 {
    margin: 0 0 8px;
    font-size: 23px
}

.muted {
    color: #667b8f;
    font-size: 14px;
    line-height: 1.6
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 22px
}

.card {
    background: white;
    border: 1px solid #e3eaf1;
    border-radius: 15px;
    padding: 22px;
    box-shadow: 0 3px 14px #14375b08
}

.card .symbol {
    font-size: 28px
}

.card h3 {
    font-size: 16px;
    margin: 14px 0 6px
}

.card p {
    color: #667b8f;
    font-size: 13px;
    line-height: 1.6;
    margin: 0
}

.card.click {
    cursor: pointer;
    transition: transform .12s
}

.card.click:hover,
.card.click:focus {
    transform: translateY(-2px);
    border-color: #aac7e2;
    outline-color: #aac7e2
}

.pill {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 99px;
    background: #e8f1fa;
    color: #164a7c;
    font-size: 12px;
    font-weight: 750
}

.panel {
    max-width: 460px;
    margin: 48px auto;
    background: white;
    padding: 28px;
    border: 1px solid #e1e8f0;
    border-radius: 17px
}

.panel h2 {
    margin: 0 0 7px
}

.field {
    display: block;
    margin: 16px 0 0;
    font-weight: 650;
    font-size: 14px
}

.field input {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 7px;
    border: 1px solid #cbd7e2;
    border-radius: 10px
}

.full {
    width: 100%;
    margin-top: 20px
}

.notice {
    padding: 12px 14px;
    background: #eef4fa;
    border-radius: 10px;
    color: #4d657d;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 17px
}

.error {
    color: #b33131;
    font-size: 13px;
    margin-top: 12px
}

.topline {
    padding: 29px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.topline h1 {
    margin: 12px 0 0;
    font-size: 26px
}

.footer {
    border-top: 1px solid #e0e7ef;
    color: #71849a;
    text-align: center;
    padding: 23px;
    font-size: 12px
}

.back {
    border: 0;
    background: none;
    color: #2867a0;
    padding: 0;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;

}

.soon {
    font-size: 60px;
    text-align: center;
    margin: 10px 0
}

.center {
    text-align: center
}

.coming {
    display: inline-block;
    background: #fff2d2;
    color: #805500;
    padding: 7px 13px;
    border-radius: 20px;
    font-weight: 750;
    font-size: 12px;
    margin: 10px 0
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px
}

.actions .btn {
    margin: 0
}

.smallnote {
    font-size: 12px;
    color: #75879a;
    line-height: 1.6
}

.card .mini {
    display: inline-block;
    margin-top: 12px;
    font-size: 11px;
    background: #fff2d2;
    color: #805500;
    padding: 5px 9px;
    border-radius: 20px;
    font-weight: 700
}

@media(max-width:680px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .card {
        padding: 16px
    }

    .hero {
        padding: 37px 0 45px
    }

    .brand {
        font-size: 17px
    }

    .header .wrap {
        min-height: 62px
    }

    .topline h1 {
        font-size: 22px
    }

    .panel {
        margin: 26px auto
    }

    .nav .btn {
        padding: 8px 10px;
        font-size: 12px
    }
}

@media(max-width:380px) {
    .grid {
        grid-template-columns: 1fr
    }
}

.furigana-toggle {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    color: #173e68;
    cursor: pointer;
}

.furigana-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.furigana-switch {
    position: relative;
    width: 52px;
    height: 30px;
    background: #cbd5e1;
    border-radius: 30px;
    transition: background 0.25s ease;
}

.furigana-switch::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px #0002;
    transition: transform 0.25s ease;
}

.furigana-toggle input:checked+.furigana-switch {
    background: #173e68;
}

.furigana-toggle input:checked+.furigana-switch::before {
    transform: translateX(22px);
}

.furigana-toggle input:focus-visible+.furigana-switch {
    outline: 3px solid #f8bd35;
    outline-offset: 3px;
}

.teks-jepang {
    font-size: 18px;
    line-height: 1.9;
}

.materi-item .teks-jepang {
    margin-bottom: 0.1px;
}

.materi-item .teks-jepang+.muted {
    margin-top: 0;
}

.teks-jepang rt {
    font-size: 11px;
    font-weight: 400;
}

/* Footer tetap di bawah layar */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main#app {
    flex: 1;
}

/* Merapikan tampilan isi materi */
.materi-isi {
    min-width: 0;
}

.materi-item {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    margin-bottom: 24px;
}

.materi-gambar {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    object-fit: contain;
    margin: 16px auto;
}

.materi-item .teks-jepang {
    font-size: 15px;
    line-height: 2.2;
    overflow-wrap: anywhere;
}

.materi-item rt {
    font-size: 9px;
}

.materi-item .muted {
    font-size: 14px;
    line-height: 1.8;
}

/* Kotak biru judul BAB */
.materi-bab {
    margin-bottom: 20px;
}

.materi-bab>summary {
    display: block;
    background: #173e68;
    color: white;
    padding: 16px 20px;
    border-radius: 14px;
    cursor: pointer;
    list-style: none;
}

.materi-bab[open]>summary {
    border-radius: 14px 14px 0 0;
}

.materi-bab>summary::-webkit-details-marker {
    display: none;
}

.materi-bab>summary span {
    display: block;
    color: #ffffff;
    margin-top: 5px;
}

.materi-bab>summary::before {
    content: "▸ ";
}

.materi-bab[open]>summary::before {
    content: "▾ ";
}

/* Font judul BAB lebih elegan */
.materi-bab>summary {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.materi-bab>summary span {
    font-family: "Inter", "Helvetica Neue", sans-serif;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 0.2px;
}

.materi-bab>summary {
    font-size: 15px;
    line-height: 1.8;
}

.materi-bab>summary ruby {
    ruby-position: over;
    ruby-align: center;
}

.materi-bab>summary rt {
    font-size: 9px;
    font-weight: 400;
    position: relative;
    top: -4px;
}

.materi-bab>summary ruby {
    ruby-position: over;
    ruby-align: center;
    line-height: 1;
}

.materi-bab>summary span {
    margin-top: 3px;
}

.materi-bagian>summary {
    line-height: 2.2;
    padding-top: 12px;
    padding-bottom: 8px;
}

.materi-bagian>summary rt {
    font-size: 9px;
    font-weight: 400;
    position: relative;
    top: -3px;
}

/* Garis pemisah antarbagian materi */
.materi-bagian+.materi-bagian {
    border-top: 1px solid #dce4ed;
}

/* Kotak untuk semua judul kecil materi */
.materi-item>h3 {
    background: #eaf1f8;
    color: #173e68;
    border-left: 4px solid #173e68;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin: 24px 0 18px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
}

.materi-judul-jp {
    display: block;
    font-size: 16px;
    line-height: 2;
}

.materi-judul-id {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #526b84;
    margin-top: 4px;
}

.materi-judul-jp {
    display: block;
    font-size: 16px;
    line-height: 2;
}

.materi-judul-jp rt {
    font-size: 9px;
    font-weight: 400;
    position: relative;
    top: -3px;
}

.materi-judul-id {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #526b84;
    margin-top: 5px;
}

/* Jarak kotak judul kecil dengan isi materi */
.materi-item h3.materi-judul {
    margin-bottom: 8px;
}

/* Jarak teks Indonesia di dalam kotak */
.materi-judul-id {
    margin-top: 0.2px;
    line-height: 1.5;
}

/* Jarak paragraf setelah kotak judul */
.materi-item h3.materi-judul+p {
    margin-top: 0;
}

.arti-bagian-inline {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 400;
    color: #718096;
}

/* Tombol Furigana mengambang saat scroll */
.furigana-toggle.furigana-floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
}
/* KONTAK ADMIN */

.kontak-section {
  margin: 32px 0 15px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #dfe8f2;
  border-radius: 16px;
}

.kontak-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.kontak-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #edf5fd;
  color: #173b60;
  border-radius: 12px;
  font-size: 22px;
}

.kontak-info h2 {
  margin: 0 0 8px;
  font-size: 21px;
  color: #173b60;
}

.kontak-info p {
  margin: 0;
  color: #71839a;
  font-size: 14px;
  line-height: 1.7;
}

.kontak-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5ebf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kontak-description {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kontak-description strong {
  color: #173b60;
  font-size: 15px;
}

.kontak-description span {
  color: #71839a;
  font-size: 13px;
}

.kontak-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  background: #f5bf37;
  color: #173b60;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  white-space: nowrap;
  transition: 0.2s;
}

.kontak-button:hover {
  background: #e9ae22;
}

@media (max-width: 600px) {
  .kontak-section {
    padding: 20px;
  }

  .kontak-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .kontak-button {
    width: 100%;
    box-sizing: border-box;
  }
}
/* KONTAK ADMIN - VERSI COMPACT */

.kontak-section {
  margin: 12px 0 0;
  padding: 18px 22px;
  border-radius: 12px;
}

.kontak-info {
  gap: 12px;
  align-items: center;
}

.kontak-icon {
  width: 36px;
  height: 36px;
  font-size: 17px;
  border-radius: 9px;
}

.kontak-info h2 {
  font-size: 17px;
  margin-bottom: 4px;
}

.kontak-info p {
  font-size: 13px;
  line-height: 1.5;
}

.kontak-bottom {
  margin-top: 14px;
  padding-top: 14px;
  gap: 12px;
}

.kontak-description strong {
  font-size: 13px;
}

.kontak-description span {
  font-size: 12px;
}

.kontak-button {
  padding: 10px 16px;
  font-size: 12px;
  border-radius: 8px;
}

@media (max-width: 600px) {
  .kontak-section {
    padding: 16px;
  }

  .kontak-bottom {
    gap: 10px;
  }

  .kontak-button {
    width: 100%;
  }
}
.kontak-wrapper {
  padding-top: 0 !important;
  padding-bottom: 24px !important;
}
.login-wa {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 20px;
  background: #edf4fb;
  border: 1px solid #cbdceb;
  border-radius: 10px;
  color: #173b60;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.login-wa:hover {
  background: #dcecf9;
}
.pilihan-bahasa {
  position: fixed;
  right: 15px;
  bottom: 83px;
  z-index: 1001;

  display: flex;
  align-items: center;
  gap: 4px;

  background: white;
  border: 1px solid #d9e2ec;
  border-radius: 30px;
  padding: 5px 9px;

  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

.pilihan-bahasa select {
  border: none;
  background: transparent;
  color: #173f6d;
  font-weight: 700;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* =========================================
   MATERI BELAJAR — HORIZONTAL TABS
   SIM JEPANG / NAVY + SOFT BLUE + GOLD
========================================= */

/* Panel pembahasan */
.materi-tabs-panel {
  margin-top: 18px;
  padding: 16px 16px 0;
  background: #ffffff;
  border: 1px solid #d4e1ed;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.materi-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: #193f69;
  font-size: 14px;
}

.materi-tabs-counter {
  color: #7890a8;
  font-size: 13px;
}

/* Tab geser horizontal */
.materi-tabs-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.materi-tab {
  flex: 0 0 auto;
  max-width: 280px;
  padding: 11px 17px;
  border: 1px solid #dce6f1;
  border-radius: 999px;
  background: #e9f0f8;
  color: #466581;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .2s, color .2s;
}

.materi-tab:hover {
  background: #d8e7f5;
  color: #193f69;
}

.materi-tab.aktif {
  background: #193f69;
  border-color: #193f69;
  color: #ffffff;
}

/* Satu pembahasan yang terlihat */
.materi-isi[data-tab-aktif="true"] {
  background: #ffffff;
  border-left: 1px solid #d4e1ed;
  border-right: 1px solid #d4e1ed;
  padding: 0 16px;
}

.materi-isi[data-tab-aktif="true"] > .materi-item[hidden] {
  display: none !important;
}

.materi-isi[data-tab-aktif="true"] > .materi-item-aktif {
  display: block;
  background: #f0f6fc;
  border: 0;
  border-left: 3px solid 0;
  border-radius: 14px;
  padding: 18px;
  margin: 0;
  color: #254866;
}

.materi-nomor-pembahasan {
  color: #b5821d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 12px;
}

.materi-item-aktif .materi-judul {
  color: #193f69;
}

.materi-item-aktif .materi-judul-id,
.materi-item-aktif .muted {
  color: #557594;
}

.materi-item-aktif .teks-jepang {
  color: #254866;
}

/* Tombol Sebelumnya / Berikutnya */
.materi-tabs-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #d4e1ed;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  margin-bottom: 18px;
}

.materi-tabs-nav button {
  border: 0;
  border-radius: 999px;
  padding: 11px 17px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.materi-nav-prev {
  color: #193f69;
  background: #e9f0f8;
}

.materi-nav-next {
  color: #ffffff;
  background: #193f69;
}

.materi-tabs-nav button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Gambar tetap proporsional */
.materi-item-aktif .materi-gambar {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Tampilan HP */
@media (max-width: 600px) {
  .materi-tabs-panel {
    padding: 12px 12px 0;
  }

  .materi-isi[data-tab-aktif="true"] {
    padding: 0 12px;
  }

  .materi-isi[data-tab-aktif="true"] > .materi-item-aktif {
    padding: 14px;
  }

  .materi-tabs-nav {
    padding: 12px;
  }

  .materi-tabs-nav button {
    padding: 10px 13px;
    font-size: 12px;
  }
}
/* Ukuran gambar materi dalam tab */
.materi-isi[data-tab-aktif="true"] .materi-item-aktif img {
  display: block;
  width: auto !important;
  max-width: min(100%, 480px) !important;
  max-height: 320px !important;
  height: auto !important;
  object-fit: contain;
  margin: 18px auto;
}
/* Hilangkan garis biru di kiri judul materi */
.materi-item-aktif .materi-judul,
.materi-item-aktif .materi-judul-jp,
.materi-item-aktif h3 {
  border-left: none !important;
}
/* =========================================
   MATERI — TEKS KIRI, GAMBAR KANAN
========================================= */

.materi-item-aktif .materi-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
}

.materi-layout-teks {
  min-width: 0;
  overflow-wrap: break-word;
}

.materi-layout-gambar {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.materi-layout-gambar img {
  display: block;
  width: 100% !important;
  max-width: 360px !important;
  max-height: 340px !important;
  height: auto !important;
  object-fit: contain;
  margin: 0 auto;
}

/* HP dan layar sempit */
@media (max-width: 850px) {
  .materi-item-aktif .materi-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .materi-layout-gambar img {
    max-width: 340px !important;
  }
}
/* Rapikan posisi gambar di kanan */
.materi-item-aktif .materi-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.materi-item-aktif .materi-layout-teks,
.materi-item-aktif .materi-layout-gambar {
  min-width: 0;
}

.materi-item-aktif .materi-layout-gambar {
  align-self: start;
  align-items: flex-start;
  margin-top: 0;
  padding-top: 0;
}

.materi-item-aktif .materi-layout-gambar img {
  display: block;
  width: 100% !important;
  max-width: 380px !important;
  max-height: 300px !important;
  height: auto !important;
  margin: 0 auto !important;
  object-fit: contain;
}

/* Jarak judul materi */
.materi-item-aktif .materi-layout-teks > h3:first-child {
  margin-top: 0;
}

/* HP: gambar kembali di bawah teks */
@media (max-width: 850px) {
  .materi-item-aktif .materi-layout {
    grid-template-columns: 1fr;
  }
}
.materi-item-aktif .materi-layout-gambar {
  padding-top: 70px !important;
}