@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
:root {
  --ink: #17202f;
  --muted: #5d6879;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --line: #dfe4ec;
  --primary: #2148d8;
  --primary-dark: #1937ab;
  --primary-soft: #e8edfd;
  --ok: #157347; --ok-soft: #e0f3e8;
  --warn: #8a5a00; --warn-soft: #fff1cf;
  --bad: #b3261e; --bad-soft: #fde6e4;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(23,32,47,.06), 0 1px 1px rgba(23,32,47,.04);
  --shadow-md: 0 10px 24px rgba(23,32,47,.10), 0 2px 6px rgba(23,32,47,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid #9db3ff; outline-offset: 2px; border-radius: 6px; }
.container { width: min(1080px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* Navbar publik: hanya tiga tautan, tanpa logo */
.nav { background: rgba(255,255,255,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav .container { display: flex; flex-wrap: wrap; gap: .25rem; padding-block: .5rem; }
.nav a { padding: .55rem 1rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1.15rem; border: 1px solid transparent; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--primary); color: #fff; min-height: 44px; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn-light:hover { background: var(--bg); }
.btn-ok { background: var(--ok); } .btn-ok:hover { background: #0f5a37; }
.btn-bad { background: var(--bad); } .btn-bad:hover { background: #8d1d17; }
.btn-sm { padding: .35rem .75rem; min-height: 36px; font-size: .9rem; }

/* Hero */
.hero { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 5vw, 3rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.hero p { max-width: 38rem; font-size: 1.15rem; color: var(--muted); }

/* Efek ketik pada judul besar hero. Teks asli tetap ada untuk pembaca
   layar (sr-only); yang terlihat adalah span yang diisi huruf demi huruf
   lewat JS. Kursor berkedip lewat ::after selama masih mengetik. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.typewriter::after { content: '|'; display: inline-block; margin-left: 2px; color: var(--primary); animation: tw-blink 1s step-end infinite; }
.typewriter.done::after { animation: tw-blink .9s step-end infinite; }
@keyframes tw-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .typewriter::after { animation: none; } }
/* Efek transisi pindah halaman (geser + pudar). Class "pt-enter" sudah
   ditulis langsung di HTML <body> supaya animasi masuk jalan tanpa kedipan;
   class "pt-exit" dipasang oleh transitions.js sesaat sebelum pindah halaman. */
.pt-enter { animation: pt-in .34s cubic-bezier(.22, .61, .36, 1) both; }
.pt-exit { animation: pt-out .22s ease-in both; }
@keyframes pt-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pt-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-18px); } }
@media (prefers-reduced-motion: reduce) { .pt-enter, .pt-exit { animation: none; } }

.section { padding: 2.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }

/* Kartu ebook */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card:active { transform: translateY(-1px) scale(.99); }
.card .body { padding: 1rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.05rem; }
.card-actions { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.card-actions .btn { flex: 1 1 auto; }
.cover { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; background: var(--bg); }
.tag { align-self: flex-start; background: var(--primary-soft); color: var(--primary-dark); font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; margin-bottom: .25rem; }
select { width: 100%; padding: .65rem .8rem; border: 1px solid #c3cad6; border-radius: 9px; font: inherit; background: #fff; min-height: 44px; }
/* Pilihan kategori di web publik */
.kat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.kat-card { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.kat-card strong { font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.kat-card:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kat-card:hover .kat-icon { transform: scale(1.08) rotate(-4deg); }
.kat-card:active { transform: translateY(-1px) scale(.99); }

/* Lencana bulat gradasi untuk emoji kategori, biar terasa seperti logo
   kecil, bukan sekadar emoji polos berjajar dengan teks. Warna gantian
   per kategori lewat nth-child, jadi kartu enggak monoton semua warna sama. */
.kat-icon { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.5rem; line-height: 1; box-shadow: var(--shadow-sm); transition: transform .18s ease; }
.tab-lg { padding: .6rem 1.2rem; font-size: 1rem; }

/* Pilihan kategori di form upload */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; margin: 0; font-weight: 600; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-block; padding: .5rem 1rem; border: 1px solid #c3cad6; border-radius: 999px; background: #fff; }
.chip:hover span { border-color: var(--primary); }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid #9db3ff; outline-offset: 2px; }
.byline { display: flex; align-items: center; gap: .5rem; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg); }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg); }
.titlerow { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: .5rem; }
.titlerow h1 { margin: 0; }
.cover-ph { aspect-ratio: 3 / 4; display: flex; align-items: flex-end; padding: 1rem 1rem 1rem 1.6rem; color: #fff; font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; font-weight: 700; position: relative; overflow: hidden; }
.cover-ph::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 12px; background: rgba(0,0,0,.22); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

.galeri-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.galeri-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.galeri-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.galeri-card img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--bg); cursor: zoom-in; }
.galeri-card figcaption { margin: 0; padding: .8rem .9rem 1rem; }
.galeri-card figcaption strong { display: block; font-size: 1rem; }

.ruang-switch { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tabs-kategori { margin-bottom: 1.5rem; }
.ruang-btn { flex: 1 1 220px; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: .8rem 1rem; font: inherit; cursor: pointer; color: var(--ink); }
.ruang-btn strong { display: block; font-size: 1.02rem; }
.ruang-btn span { display: block; margin-top: .15rem; }
.ruang-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.ruang-btn[aria-pressed="true"] strong { color: var(--primary-dark); }

/* Lightbox: buka foto galeri dalam ukuran penuh saat diklik */
.lightbox-card { background: transparent; box-shadow: none; padding: 0; width: min(920px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.lightbox-card img { max-width: 100%; max-height: 78vh; width: auto; border-radius: var(--radius); box-shadow: var(--shadow-md); background: var(--surface); object-fit: contain; }
.lightbox-caption { background: var(--surface); border-radius: var(--radius); padding: .7rem 1rem; width: 100%; box-shadow: var(--shadow-sm); }
.lightbox-caption strong { display: block; font-size: 1rem; color: var(--ink); }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: none; background: rgba(23,32,47,.55); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(23,32,47,.75); }
.galeri-thumb-wrap { position: relative; }
.galeri-del { position: absolute; top: .5rem; right: .5rem; }

/* Halaman About: rincian akronim SELOKA + kartu tim (guru pembimbing & developer). */
.acronym-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; margin-top: 1.1rem; }
.acronym-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem .75rem; text-align: center; }
.acronym-letter { display: flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; margin: 0 auto .5rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.acronym-word { display: block; font-size: .85rem; font-weight: 600; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.team-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; text-decoration: none; color: inherit; }
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.team-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.team-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.team-info h3 { margin: 0 0 .1rem; font-size: 1.05rem; font-family: var(--serif); }
.team-role { margin: 0 0 .7rem; color: var(--muted); font-size: .88rem; }

/* Status */
.badge { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.badge-published { background: var(--ok-soft); color: var(--ok); }
.badge-rejected { background: var(--bad-soft); color: var(--bad); }
.badge-revision { background: var(--primary-soft); color: var(--primary-dark); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-review { background: var(--line); color: var(--muted); }
.chip-rev { display: inline-block; margin-left: .4rem; padding: .05rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--primary); color: #fff; vertical-align: middle; white-space: nowrap; }
.btn-rev { background: #b45309; } .btn-rev:hover { background: #8f4207; }
.rev-form { flex: 1 1 100%; display: flex; flex-direction: column; gap: .5rem; border-top: 1px dashed var(--line); padding-top: .8rem; }
.rev-form textarea { min-height: 90px; }
.versi { flex: 1 1 100%; border-top: 1px dashed var(--line); padding-top: .6rem; }
.versi summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.versi ul { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.versi li { display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .4rem .7rem; }
.versi li.now { border-color: var(--primary); }
.rev-murid { flex: 1 1 100%; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

/* Form & panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=file], select { width: 100%; padding: .65rem .8rem; border: 1px solid #c3cad6; border-radius: 9px; font: inherit; background: #fff; min-height: 44px; }
input:focus, select:focus { border-color: var(--primary); }
.hint { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.alert { display: flex; align-items: flex-start; gap: .65rem; padding: .8rem .95rem; border-radius: 12px; margin-bottom: 1rem; font-size: .95rem; font-weight: 500; line-height: 1.45; border: 1px solid transparent; box-shadow: var(--shadow-sm); animation: alert-in .28s cubic-bezier(.2,.8,.2,1); }
.alert::before { content: ""; flex: none; width: 1.4rem; height: 1.4rem; margin-top: .05rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; color: #fff; }
.alert-bad { background: var(--bad-soft); color: var(--bad); border-color: rgba(179, 38, 30, .18); }
.alert-bad::before { content: "!"; background: var(--bad); }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(21, 115, 71, .18); }
.alert-ok::before { content: "\2713"; background: var(--ok); }
@keyframes alert-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .alert { animation: none; } }

textarea { width: 100%; padding: .65rem .8rem; border: 1px solid #c3cad6; border-radius: 9px; font: inherit; background: #fff; min-height: 110px; resize: vertical; line-height: 1.5; }
textarea:focus { border-color: var(--primary); }

/* Komentar guru untuk revisi */
.komentar-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.komentar { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 10px; padding: .6rem .8rem; }
.komentar .head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.komentar .teks { white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback { flex: 1 1 100%; display: flex; flex-direction: column; gap: .4rem; border-top: 1px dashed var(--line); padding-top: .8rem; margin-top: .1rem; }
.feedback .komentar-list { margin-bottom: 0; }

/* Halaman login / daftar */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-box { width: min(420px, 100%); }
.auth-box h1 { font-size: 1.9rem; }
.area-tag { display: inline-block; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; padding: .15rem .7rem; border-radius: 999px; font-size: .85rem; margin-bottom: .75rem; }

/* Dashboard */
.topbar { background: rgba(255,255,255,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding-block: .75rem; }
.topbar strong { font-family: var(--serif); font-size: 1.15rem; }
.topbar .who { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.layout-2 { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; align-items: start; padding-block: 1.5rem 3rem; }
@media (max-width: 860px) { .layout-2 { grid-template-columns: 1fr; } }

.list { display: flex; flex-direction: column; gap: .75rem; }
.row { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 2.4rem .9rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row .info { min-width: 0; flex: 1 1 220px; }
.row .info strong { display: block; overflow-wrap: anywhere; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Tombol hapus di pojok baris: sengaja kecil & pudar, bukan tombol aksi utama. */
.row-del { position: absolute; top: .5rem; right: .6rem; width: 1.6rem; height: 1.6rem; padding: 0; display: flex; align-items: center; justify-content: center; border: none; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; opacity: .45; }
.row-del:hover, .row-del:focus-visible { opacity: 1; background: var(--bad-soft); color: var(--bad); }

/* Dropdown "Login" di nav publik: pilih login sebagai Guru atau Penulis. */
.login-menu { position: relative; margin-left: auto; }
.login-menu > summary { list-style: none; }
.login-menu > summary::-webkit-details-marker { display: none; }
.login-menu > summary::marker { content: ''; }
.login-menu-panel { position: absolute; right: 0; top: calc(100% + .4rem); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); padding: .4rem; display: flex; flex-direction: column; min-width: 190px; z-index: 20; }
.login-menu-panel a { padding: .6rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.login-menu-panel a:hover { background: var(--bg); }
.tab { border: 1px solid var(--line); background: var(--surface); padding: .45rem .9rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Ruang publik: Kurasi (belum izin terbit) vs Terbitan (sudah izin terbit).
   Dua ruang ini tidak boleh tercampur, jadi tampil sebagai switch besar
   di atas filter kategori, bukan ikut dalam baris tab kategori. */

.preview { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1.25rem; }
.meta dt { color: var(--muted); } .meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.footer { padding: 2rem 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 2rem; }
@media (prefers-reduced-motion: no-preference) { .btn, .tab, .nav a { transition: background .15s, color .15s; } }
@media (prefers-reduced-motion: reduce) { .card, .kat-card, .card:hover, .kat-card:hover, .btn, .bottom-nav a { transition: none !important; transform: none !important; } }

/* Navbar bawah gaya WhatsApp: dipakai khusus tampilan HP, disembunyikan di laptop */
.bottom-nav { display: none; }
.bottom-nav .container { display: flex; justify-content: space-around; align-items: stretch; padding: 0; }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; padding: .5rem 0 .4rem; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; }
.bottom-nav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a[aria-current="page"] { color: var(--primary); }
.bottom-nav a:active { transform: scale(.94); }

/* Item "Login" di navbar bawah (HP): dropdown ke ATAS supaya tetap
   kelihatan di layar, isinya pilihan login Guru / Penulis. */
.bottom-nav details.bottom-login { flex: 1; position: relative; }
.bottom-nav details.bottom-login summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; padding: .5rem 0 .4rem; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; cursor: pointer; list-style: none; }
.bottom-nav details.bottom-login summary::-webkit-details-marker { display: none; }
.bottom-nav details.bottom-login summary svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav details.bottom-login[open] summary { color: var(--primary); }
.bottom-login-panel { position: absolute; bottom: 100%; right: .25rem; margin-bottom: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); padding: .4rem; display: flex; flex-direction: column; min-width: 190px; }
.bottom-login-panel a { padding: .6rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.bottom-login-panel a:hover { background: var(--bg); }

/* ===== Perbaikan tampilan mobile ===== */
@media (max-width: 640px) {
  .container { width: min(1080px, 100% - 1.5rem); }

  /* Topbar dashboard: judul di atas, aksi (nama/tombol) melebar di bawah */
  .topbar .container { flex-direction: column; align-items: stretch; }
  .topbar .who { width: 100%; justify-content: space-between; }
  .topbar .who .btn { flex: 1 1 auto; }

  /* Baris daftar ebook: info di atas, tombol aksi melebar & rapi di bawah */
  .row { flex-direction: column; align-items: stretch; }
  .row .actions { width: 100%; justify-content: flex-start; }
  .row .actions .btn { flex: 1 1 auto; }

  /* Judul detail ebook: avatar mengecil, judul turun ke bawah kalau perlu */
  .titlerow { gap: .6rem .75rem; }
  .avatar-lg { width: 56px; height: 56px; }

  /* Panel detail: tombol aksi melebar penuh agar mudah disentuh */
  .panel .actions { flex-direction: column; align-items: stretch; }
  .panel .actions .btn { width: 100%; }

  /* Info ebook (dt/dd) ditumpuk agar tidak sempit */
  .meta { grid-template-columns: 1fr; row-gap: .15rem; }
  .meta dt { margin-top: .6rem; font-size: .85rem; }
  .meta dt:first-child { margin-top: 0; }

  /* Tab filter kategori/status: geser horizontal, bukan bertumpuk padat */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .35rem; margin-inline: -.25rem; padding-inline: .25rem; }
  .tab { flex: none; }

  /* Filter kategori (bisa sampai 7+ ikon & nama): lipat jadi beberapa baris kecil,
     supaya semua kategori langsung kelihatan tanpa geser ke samping */
  .tabs-kategori { flex-wrap: wrap; overflow-x: visible; margin-inline: 0; padding-inline: 0; gap: .4rem; }
  .tabs-kategori .tab-lg { flex: none; padding: .4rem .7rem; font-size: .8rem; }

  /* Preview file lebih ringkas di layar kecil */
  .preview { height: min(70vh, 620px); }

  /* Auth (login/daftar): kurangi padding luar */
  .auth-wrap { padding: 1rem .85rem; }

  /* Cegah kartu kategori nempel ke tepi layar */
  .kat-card { padding: .85rem .8rem; gap: .3rem; }
  .kat-card strong { font-size: .98rem; }
  .kat-icon { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }

  /* Kategori (jumlahnya tetap, bukan feed panjang): grid 2 kolom yang langsung
     kelihatan semua, bukan carousel geser seperti "Ebook terbaru" */
  .kat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }

  /* Grid ebook: 2 kolom sejajar di HP, seperti rak buku */
  .grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .card .body { padding: .7rem .65rem; gap: .2rem; }
  .card h3 { font-size: .92rem; line-height: 1.3; }
  .tag { font-size: .68rem; padding: .1rem .5rem; }
  .byline { font-size: .72rem; gap: .35rem; }
  .avatar { width: 20px; height: 20px; }
  .card-actions { flex-direction: column; gap: .4rem; }
  .card-actions .btn { width: 100%; font-size: .8rem; padding: .5rem .6rem; min-height: 38px; }

  /* Navbar pindah ke bawah gaya WhatsApp, nav atas disembunyikan */
  .nav { display: none; }
  .bottom-nav {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(23,32,47,.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body.has-bottom-nav { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }

  /* Efek geser (swipe) untuk strip kategori & ebook terbaru di beranda */
  .scroll-row {
    display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    gap: .8rem; margin-inline: -1rem; padding-inline: 1rem; padding-bottom: .35rem;
    /* Pinggir kanan memudar (bukan kepotong tegas jadi garis) supaya jelas
       ini baris yang bisa digeser, bukan konten yang terpotong. */
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent 100%);
  }
  .scroll-row::-webkit-scrollbar { display: none; }
  .scroll-row > * { scroll-snap-align: start; flex: 0 0 auto; }
  .scroll-row.kat-grid > .kat-card { width: 60%; max-width: 230px; }
  .scroll-row.grid > .card { width: 66%; max-width: 250px; }
}

/* ===== Area murid: menu, beranda, status, revisi (halaman terpisah) ===== */
.tabs-nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.tabs-nav a { padding: .45rem .9rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.tabs-nav a:hover { background: var(--bg); }
.tabs-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); }
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: #b45309; color: #fff; font-size: .72rem; font-weight: 700; line-height: 1; }
.bottom-nav a { position: relative; }
.bottom-nav .nav-count { position: absolute; top: .25rem; left: calc(50% + .45rem); }
.page-narrow { width: min(720px, 100% - 2rem); margin-inline: auto; padding-block: 1.5rem 3rem; }
.page-wide { width: min(900px, 100% - 2rem); margin-inline: auto; padding-block: 1.5rem 3rem; }
.page-title { margin: 0 0 .25rem; font-size: clamp(1.5rem, 4vw, 2rem); }
.page-sub { color: var(--muted); margin: 0 0 1.25rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.stat b { display: block; font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .875rem; }
.alert-rev { background: #fff6e8; color: #8f4207; border: 1px solid #f2d3a6; display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.alert-rev::before { content: "\26A0"; background: #b45309; }

/* Modal pilihan tujuan upload (guru): dipakai di web/guru/upload.html */
.modal-overlay { position: fixed; inset: 0; background: rgba(23,32,47,.55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; animation: modal-fade .18s ease; }
.modal-overlay.hidden { display: none; }
.modal-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 1.5rem; width: min(420px, 100%); animation: modal-pop .22s cubic-bezier(.2,.8,.2,1); }
.modal-card h2 { font-size: 1.25rem; margin: 0 0 .15rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-overlay, .modal-card { animation: none; } }

/* Alert modal modern (pengganti alert() bawaan browser) — dibuat lewat modalAlert() di common.js */
.alert-modal-card { text-align: center; }
.alert-modal-icon { width: 3.4rem; height: 3.4rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; color: #fff; margin: 0 auto .9rem; animation: modal-pop .32s cubic-bezier(.2,.8,.2,1) .05s backwards; }
.alert-modal-icon.ok { background: var(--ok); box-shadow: 0 0 0 8px var(--ok-soft); }
.alert-modal-icon.bad { background: var(--bad); box-shadow: 0 0 0 8px var(--bad-soft); }
.alert-modal-icon.warn { background: #b45309; box-shadow: 0 0 0 8px #fff1cf; }
.alert-modal-card p { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.5; }
.alert-modal-card .modal-actions { justify-content: center; margin-top: 1.4rem; }
.alert-modal-card .modal-actions .btn { min-width: 7rem; }

/* Kartu profil di About (link ke halaman /about/:id) */
.team-card { cursor: pointer; }
.team-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== Halaman detail profil (/about/:id) ===== */
.profil-back { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: 1.6rem; }
.profil-back:hover { color: var(--primary); }
.profil-grid { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.profil-photo-btn { display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-md); position: relative; }
.profil-photo-btn.no-zoom { cursor: default; }
.profil-photo, .profil-photo-fallback { width: 100%; aspect-ratio: 4 / 5; border-radius: 22px; display: block; }
.profil-photo { object-fit: cover; transition: transform .3s ease; }
.profil-photo-btn:hover .profil-photo { transform: scale(1.04); }
.profil-photo-fallback { display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-weight: 700; font-size: clamp(3rem, 8vw, 4.5rem); box-shadow: var(--shadow-md); }
.profil-zoom-hint { position: absolute; right: .7rem; bottom: .7rem; background: rgba(23,32,47,.6); color: #fff; font-size: .74rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.profil-tag { display: inline-block; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: .82rem; padding: .35rem .8rem; border-radius: 999px; margin-bottom: .7rem; }
.profil-info-col h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.profil-detail { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.1rem; margin: 0 0 1.4rem; padding: 1rem 1.2rem; background: var(--bg-soft, #f5f6fa); border-radius: calc(var(--radius) - 4px); font-size: .95rem; }
.profil-detail dt { color: var(--muted); font-weight: 600; }
.profil-detail dd { margin: 0; }
.profil-bio { font-size: 1.02rem; line-height: 1.75; max-width: 56ch; }
.profil-actions { margin-top: 1.3rem; }
@media (max-width: 720px) { .profil-grid { grid-template-columns: 1fr; } .profil-photo, .profil-photo-fallback { aspect-ratio: 1 / 1; max-width: 320px; margin: 0 auto; } }

/* Lightbox: klik foto profil untuk melihat versi besar */
.profil-lightbox { background: rgba(10,14,22,.94); }
.profil-lightbox img { max-width: min(90vw, 640px); max-height: 82vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: modal-pop .22s cubic-bezier(.2,.8,.2,1); }
.profil-lightbox-close { position: fixed; top: 1.1rem; right: 1.1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.profil-lightbox-close:hover { background: rgba(255,255,255,.24); }


.steps { flex: 1 1 100%; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: .7rem; }
.steps .st { display: inline-flex; align-items: center; gap: .35rem; }
.steps .dot { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--line); color: #fff; font-size: .68rem; font-weight: 700; }
.steps .st.done { color: var(--ink); } .steps .st.done .dot { background: var(--ok); }
.steps .st.now { color: var(--ink); font-weight: 700; } .steps .st.now .dot { background: var(--warn); }
.steps .st.now-rev .dot { background: #b45309; } .steps .st.now-bad .dot { background: var(--bad); }
.steps .bar { width: 22px; height: 2px; background: var(--line); }
.status-note { flex: 1 1 100%; margin: 0; font-size: .92rem; }

.tabs .tab .n { margin-left: .35rem; opacity: .7; font-weight: 700; }

.rev-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.rev-card.focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rev-card > header { display: flex; gap: .5rem 1rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: .75rem; }
.rev-card h3 { margin: 0; overflow-wrap: anywhere; }
.rev-send { border-top: 1px dashed var(--line); margin-top: 1rem; padding-top: 1rem; }
.rev-send label { margin-bottom: .4rem; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 1rem; }
.timeline > li { position: relative; }
.timeline > li::before { content: ""; position: absolute; left: calc(-1.4rem - 7px); top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.timeline > li.k::before { border-color: #b45309; }
.timeline > li.now::before { background: var(--primary); }
.tl-file { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .75rem; display: flex; gap: .5rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.tl-file.now { border-color: var(--primary); }
.tl-title { font-weight: 700; }

@media (max-width: 640px) {
  .tabs-nav { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .rev-card { padding: 1rem; }
  .tl-file .actions { width: 100%; }
  .tl-file .actions .btn { flex: 1 1 auto; }
}

/* ===== Login/Daftar murid: tab besar + efek geser ===== */
.auth-box { overflow: hidden; }
.auth-tabs { display: flex; gap: .6rem; margin-bottom: 1.25rem; }
.auth-tab { flex: 1; padding: .9rem .5rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; font-weight: 700; font-size: 1.05rem; color: var(--muted); cursor: pointer; text-align: center; transition: border-color .15s, background .15s, color .15s, transform .1s; }
.auth-tab:hover { border-color: var(--primary); color: var(--ink); }
.auth-tab:active { transform: scale(.97); }
.auth-tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.auth-slide-wrap { overflow: hidden; }
.auth-slide { display: flex; width: 200%; transition: transform .32s cubic-bezier(.22,.61,.36,1); }
.auth-slide.to-register { transform: translateX(-50%); }
.auth-slide > .auth-pane { width: 50%; flex: none; min-width: 0; }
.auth-slide > .auth-pane:first-child { padding-right: .1rem; }
.auth-slide > .auth-pane:last-child { padding-left: .1rem; }
@media (prefers-reduced-motion: reduce) { .auth-slide { transition: none; } }

/* ===== Brand SELOKA ===== */
.nav .container { justify-content: space-between; align-items: center; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; padding: .5rem .25rem; white-space: nowrap; }
.brand:hover { color: var(--primary-dark); background: none; }
.brand-full { display: block; font-family: var(--serif); font-weight: 700; }
.brand-tagline { display: block; color: var(--muted); font-weight: 400; font-size: .58em; margin-top: .15rem; }

/* ===== Kartu ebook: cover saja (klik -> halaman detail) ===== */
.ecard { cursor: pointer; }
.ecard-link { display: block; position: relative; text-decoration: none; color: inherit; }
.ecard-badge { position: absolute; top: .5rem; left: .5rem; z-index: 2; box-shadow: var(--shadow-sm); }

/* ===== Halaman detail ebook (cover kiri, deskripsi kanan di laptop) ===== */
.detail-cover img, .detail-cover .cover-ph, .detail-cover .cover-blank { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.detail-info { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.detail-info h1 { margin: .2rem 0 .3rem; font-size: clamp(1.5rem, 3vw, 2rem); }

/* ===== Tombol like ===== */
.like-btn { display: inline-flex; align-items: center; gap: .5rem; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: .55rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.like-btn svg { width: 20px; height: 20px; fill: #fff; stroke: var(--muted); stroke-width: 1.6; transition: fill .15s ease, stroke .15s ease, transform .15s ease; }
.like-btn.liked { border-color: var(--bad); color: var(--bad); }
.like-btn.liked svg { fill: var(--bad); stroke: var(--bad); }
.like-btn:active svg { transform: scale(1.2); }
.like-btn:disabled { opacity: .65; cursor: default; }

/* ===== Cover polos (kartu publik) & halaman detail ===== */
.cover-blank { display: block; position: relative; }
.ecard-link .cover { border-radius: var(--radius); display: block; }
.detail-left { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.detail-left .detail-cover { width: 100%; }
.detail-info h1 { margin: 0 0 1.25rem; line-height: 1.2; }


/* =====================================================================
   TAMPILAN MODERN -- SATU WARNA (biru), TANPA GRADASI
   Lapisan terakhir: menimpa token & gaya di atas.
   ===================================================================== */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --line: #e3e7ef;
  --primary: #2148d8;
  --primary-dark: #1937ab;
  --primary-soft: #e8edfd;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 14px 30px -14px rgba(15,23,42,.28);
  --serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans:  "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.025em; }
:focus-visible { outline: 3px solid #b9c8ff; }

/* Navbar: tautan berbentuk pil, aktif = biru penuh */
.nav { background: rgba(255,255,255,.9); }
.nav a { border-radius: 999px; padding: .5rem 1.05rem; font-weight: 600; }
.nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.nav a[aria-current="page"] { background: var(--primary); color: #fff; }
.brand { font-weight: 800; letter-spacing: -.03em; font-size: 1.3rem; }
.brand:hover { background: none !important; color: var(--primary) !important; }

/* Tombol: biru polos */
.btn { border-radius: 12px; box-shadow: none; }
.btn-light:hover { background: var(--primary-soft); border-color: #b9c8ff; }

/* Hero: satu warna datar, tanpa hiasan */
.hero { background: var(--primary-soft); border-bottom: 1px solid var(--line); }
.hero h1 { font-weight: 800; letter-spacing: -.035em; line-height: 1.12; color: var(--ink); }
.hero p { color: #475569; }

/* Judul hero: tinggi dikunci supaya halaman tidak naik-turun saat mengetik */
.tw-stack { display: grid; }
.tw-stack > * { grid-area: 1 / 1; }
.tw-ghost { visibility: hidden; }
.hero .typewriter { justify-self: start; width: fit-content; max-width: 100%; }
/* Kursor tanpa margin supaya lebarnya persis sama dengan teks "hantu" pengunci tinggi */
.hero .typewriter::after { margin-left: 0; color: var(--primary); }

/* Judul bagian: garis aksen biru polos */
.section-head h2 { position: relative; padding-left: .95rem; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px; border-radius: 99px; background: var(--primary); }
.section-head a { font-weight: 600; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }

/* Kartu kategori + ikon SVG (semua ikon satu warna) */
.kat-card { border-radius: 18px; padding: 1.35rem; border: 1px solid var(--line); box-shadow: none; }
.kat-card:hover { background: var(--surface); border-color: var(--primary); box-shadow: var(--shadow-md); }
.kat-icon { border-radius: 12px; font-size: 1.4rem; color: #fff; box-shadow: none; }
.kat-grid .kat-card:nth-of-type(n) .kat-icon { background: var(--primary); }
.kat-icon svg, .kat-svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab-ico { width: 1.05em; height: 1.05em; margin-right: .4rem; vertical-align: -.17em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Tab & pilihan ruang */
.tab:hover { border-color: #b9c8ff; background: var(--primary-soft); }
.tab[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.ruang-btn { border-radius: 14px; }
.ruang-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: none; }

/* Kartu ebook: hanya cover, naik sedikit saat disorot */
.ecard { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.ecard .cover { border-radius: 14px; box-shadow: 0 10px 22px -12px rgba(15,23,42,.5); transition: transform .2s ease, box-shadow .2s ease; }
.ecard:hover { transform: none; box-shadow: none; }
.ecard:hover .cover { transform: translateY(-5px); box-shadow: 0 20px 32px -14px rgba(15,23,42,.5); }

/* Halaman detail */
.detail-cover img, .detail-cover .cover-ph, .detail-cover .cover-blank { border-radius: 16px; box-shadow: 0 24px 40px -20px rgba(15,23,42,.55); }
.like-btn:hover:not(:disabled) { border-color: var(--bad); }

.empty { border-radius: 16px; }

@media (prefers-reduced-motion: reduce) { .ecard .cover { transition: none !important; } }

/* ============================================================
   POLES TAMPILAN HP
   ============================================================ */
html { scroll-behavior: smooth; }
body { -webkit-tap-highlight-color: transparent; }
table { max-width: 100%; }
.table-wrap, .panel table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
img { max-width: 100%; }

@media (max-width: 640px) {
  /* 16px mencegah iPhone memperbesar layar sendiri saat mengetik */
  input, select, textarea { font-size: 16px !important; min-height: 46px; }
  textarea { min-height: 96px; }
  .field { margin-bottom: 1.1rem; }

  h1 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
  .hero { padding: 2rem 0 1.5rem; }
  .hero p { font-size: 1rem; }
  .section { padding: 1.5rem 0; }
  .section-head { margin-bottom: .9rem; }

  /* Kartu ebook/galeri: 2 kolom, rapat tapi tetap terbaca */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .card { border-radius: 12px; }
  .card h3 { font-size: .98rem; }

  /* Tombol & tautan mudah disentuh */
  .btn { min-height: 46px; }
  .btn-sm { min-height: 40px; }
  .nav a { padding: .6rem .85rem; }

  /* Jendela pop-up penuh lebar, tidak menempel tepi layar */
  .modal-card { width: 100%; max-height: 88vh; overflow-y: auto; padding: 1.25rem; border-radius: 16px; }
}

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

/* ============================================================
   HALAMAN ABOUT: sejajar dengan navbar, 6 huruf SELOKA rata
   ============================================================ */
.about-page { padding-top: 2.5rem; padding-bottom: 3rem; }
.about-page h1 { margin-bottom: .6rem; }
.acronym-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.acronym-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem .5rem; }
.team-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem 1.5rem; align-items: start; margin-bottom: 2.75rem; }
.team-card { align-items: center; }
.team-role { margin-bottom: 0; }

@media (max-width: 760px) {
  .acronym-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-page { padding-top: 1.5rem; }
}
@media (max-width: 380px) {
  .acronym-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .team-wrap { grid-template-columns: 1fr; }
}

/* ============================================================
   DETAIL EBOOK: tombol suka di bawah tombol Baca/Download
   ============================================================ */
#detail { grid-template-columns: minmax(240px, 340px) 1fr; gap: 2rem; }
#detail .detail-left { align-items: stretch; gap: .75rem; }
#detail .like-btn { margin-top: .35rem; min-height: 46px; font-size: 1rem; }
#detail .card-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (min-width: 861px) {
  #detail .detail-left { position: sticky; top: 5rem; }
}

@media (max-width: 860px) {
  #detail { grid-template-columns: 1fr; gap: 1.25rem; }
  /* Cover + tombol suka jadi satu kolom rapi di tengah, tidak melebar penuh */
  #detail .detail-left { width: min(300px, 100%); margin-inline: auto; }
  #detail .detail-info { align-items: stretch; text-align: center; }
  #detail .card-actions { flex-direction: column; }
  #detail .card-actions .btn { width: 100%; }
  #detail .like-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   BANNER DI BALIK KARYA: judul di atas beberapa foto galeri
   ============================================================ */
.bk-hero { position: relative; overflow: hidden; background: #17317f; color: #fff; }
.bk-hero-bg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n, 1), 1fr); }
.bk-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.bk-hero::after { content: ""; position: absolute; inset: 0; background: rgba(15, 32, 92, .55); }
.bk-hero-in { position: relative; z-index: 1; padding-block: clamp(2.75rem, 8vw, 5rem) clamp(2.25rem, 6vw, 3.75rem); }
.bk-hero h1 { margin: 0 0 .6rem; color: #fff; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.03em; }
.bk-hero p { margin: 0; max-width: 36rem; color: rgba(255, 255, 255, .9); font-size: 1.1rem; }
@media (max-width: 640px) {
  .bk-hero-bg[data-n="3"], .bk-hero-bg[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
  .bk-hero-bg[data-n="3"] img:last-child { grid-column: span 2; }
}
