@font-face { font-family: 'KFGQPC Hafs'; src: url(assets/fonts/hafs.otf) format('opentype'); font-display: swap; }
:root {
  --navy: #1E2540;
  --navy-2: #39406A;
  /* Tema warna (lalai: lilac). Tema lain di bahagian "Tema warna" di hujung fail, dipilih dengan <html data-theme="..."> */
  --lilac: #8C7FD6;
  --lilac-soft: #E6E1F7;
  --lilac-rgb: 140,127,214;
  --deep-rgb: 90,76,184;
  --tint-rgb: 200,190,245;
  --rim-rgb: 185,174,240;
  --rim2-rgb: 247,194,174;
  --peach: #E2967A;
  --peach-soft: #FBE5DC;
  --peach-rgb: 226,150,122;
  --bg: #EEF0F8;
  --blob1: #B9AEF0;
  --blob2: #F7C2AE;
  --blob3: #9FB6EE;
  --blob4: #F4B9CF;
  --ink: #1E2540;
  --muted: #6E7393;
  --pink-book: #E80F8A;
  --green-book: #01A250;
  --glass: rgba(255, 255, 255, .46);
  --glass-strong: rgba(255, 255, 255, .68);
  --edge: rgba(255, 255, 255, .75);
  --radius: 26px;
  --ar: 'Amiri', serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Latar belakang berwarna yang kabur, supaya kaca nampak hidup */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: -1; }
.bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 360px; height: 360px; background: var(--blob1); top: -90px; left: -80px; }
.b2 { width: 300px; height: 300px; background: var(--blob2); top: 30%; right: -110px; animation-delay: -6s !important; }
.b3 { width: 340px; height: 340px; background: var(--blob3); bottom: -120px; left: -60px; animation-delay: -12s !important; }
.b4 { width: 220px; height: 220px; background: var(--blob4); top: 55%; left: 30%; opacity: .45 !important; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.12); } }

/* Kaca ala iOS */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.9), inset 0 -1px 2px rgba(255,255,255,.3), 0 12px 32px rgba(30,37,64,.10);
  border-radius: var(--radius);
}
.glass.strong { background: var(--glass-strong); }

#app { max-width: 460px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 18px) 18px 120px; min-height: 100vh; }
.screen { animation: enter .45s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.99); } }

.press { transition: transform .18s cubic-bezier(.3,.7,.4,1.4); }
.press:active { transform: scale(.95); }

/* Splash */
.splash { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; }
.splash .hero { width: 210px; height: 210px; display: grid; place-items: center; border-radius: 56px; animation: float 4s ease-in-out infinite; }
.splash .hero img { width: 140px; }
.splash h1 { font-size: 30px; margin: 10px 0 0; letter-spacing: -.02em; }
.splash p { margin: 0; color: var(--muted); }
.partner { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 20px; margin-top: 8px; }
.partner img { width: 44px; }
.partner small { display: block; color: var(--muted); font-size: 11px; text-align: left; }
.partner b { font-size: 12px; font-weight: 600; text-align: left; display: block; }
@keyframes float { 50% { transform: translateY(-10px); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 26px; border-radius: 999px; font-weight: 600; background: var(--navy); color: #fff; box-shadow: 0 10px 24px rgba(30,37,64,.25); }
.btn.ghost { background: var(--glass-strong); color: var(--ink); box-shadow: inset 0 1px 1px #fff, 0 6px 18px rgba(30,37,64,.08); border: 1px solid var(--edge); }
.btn.wide { width: 100%; }

/* Header */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.top .logo { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; }
.top .logo img { width: 34px; }
.top h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.top p { margin: 0; font-size: 12px; color: var(--muted); }
.top .chip { margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip .ti { color: var(--peach); }
.back { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; }

h3.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 24px 4px 10px; }

/* Kad sambung belajar */
.hero-card { padding: 18px; display: flex; gap: 16px; align-items: center; }
.hero-card .thumb { width: 92px; height: 120px; border-radius: 18px; background: #fff; padding: 6px; flex: none; box-shadow: 0 6px 16px rgba(30,37,64,.10); }
.hero-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.hero-card small { color: var(--muted); font-size: 12px; }
.hero-card h4 { margin: 2px 0 4px; font-size: 22px; letter-spacing: -.02em; }
.bar { height: 7px; border-radius: 9px; background: rgba(30,37,64,.08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 9px; background: var(--lilac); transition: width .6s; }

/* Grid buku Iqra */
.books { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.book { padding: 16px; position: relative; text-align: left; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.book .num { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-weight: 700; font-size: 22px; color: #fff; }
.book b { font-size: 16px; }
.book small { color: var(--muted); font-size: 12px; display: block; }
.book .lock { position: absolute; top: 14px; right: 14px; color: var(--muted); font-size: 18px; }
.book.locked .num { filter: grayscale(1); opacity: .35; }
.book .ar { position: absolute; right: -6px; bottom: -22px; font: 700 84px/1 var(--ar); opacity: .09; }

/* Senarai kapsul */
.path { display: flex; flex-direction: column; gap: 10px; }
.cap { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; text-align: left; width: 100%; }
.cap .n { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; font-weight: 700; flex: none; background: var(--glass-strong); }
.cap.done .n { background: var(--lilac); color: #fff; }
.cap.current .n { background: var(--navy); color: #fff; box-shadow: 0 0 0 5px rgba(var(--lilac-rgb),.25); }
.cap.locked { opacity: .55; }
.cap .t { flex: 1; min-width: 0; }
.cap .t b { display: block; font-size: 15px; }
.cap .t small { color: var(--muted); font-size: 12px; }
.cap .ar { font: 700 24px/1 var(--ar); color: var(--lilac); direction: rtl; }
.cap .st { font-size: 20px; color: var(--muted); }
.cap.done .st { color: var(--lilac); }
.final { margin-top: 6px; padding: 16px; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; }
.final .n { background: linear-gradient(135deg, var(--peach), var(--blob4)); color: #fff; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; }

/* Segmen langkah dalam kapsul */
.seg { display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); padding: 5px; border-radius: 999px; margin-bottom: 16px; position: relative; }
.seg button { position: relative; z-index: 1; padding: 10px 0; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; gap: 5px; align-items: center; justify-content: center; transition: color .25s; }
.seg button.on { color: var(--ink); }
.seg .pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / var(--steps, 4)); border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 4px 14px rgba(30,37,64,.12); transition: transform .4s cubic-bezier(.3,.7,.3,1.15); }

.video { padding: 8px; }
.video video { width: 100%; border-radius: 20px; background: #000; display: block; max-height: 62vh; object-fit: contain; }
.page { padding: 10px; }
.page img { border-radius: 18px; background: #fff; width: 100%; }
.letters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; direction: rtl; margin-top: 14px; }
.letter { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 22px; }
.letter .ar { font: 700 40px/1.3 var(--ar); color: var(--navy); }
.letter small { font-size: 12px; color: var(--lilac); font-weight: 600; direction: ltr; }
.letters.mini { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.letters.mini .letter { border-radius: 16px; }
.letters.mini .letter .ar { font-size: 28px; }
.letters.mini .letter small { font-size: 10px; }
.full { margin-top: 12px; }
.full summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--lilac); list-style: none; text-align: center; }
.full summary::-webkit-details-marker { display: none; }
.full img { margin-top: 10px; border-radius: 16px; background: #fff; }
.pop { animation: pop .45s cubic-bezier(.3,.7,.3,1.5); }
@keyframes pop { 40% { transform: scale(1.15) rotate(-3deg); } }
.tip { padding: 14px 16px; margin-top: 12px; display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.tip .ti { color: var(--lilac); font-size: 20px; }

/* Rakam */
.rec { padding: 28px 20px; text-align: center; }
.rec h4 { margin: 0 0 4px; font-size: 19px; }
.rec p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.mic { width: 108px; height: 108px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 42px; display: inline-grid; place-items: center; position: relative; box-shadow: 0 14px 30px rgba(30,37,64,.3); }
.mic.on { background: var(--peach); }
.mic.on::before, .mic.on::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--peach); animation: ring 1.6s infinite; }
.mic.on::after { animation-delay: .8s; }
@keyframes ring { to { transform: scale(1.5); opacity: 0; } }
.level { display: flex; gap: 5px; justify-content: center; align-items: center; height: 44px; margin-top: 18px; }
.level i { width: 6px; border-radius: 6px; background: var(--lilac); height: 6px; transition: height .08s; }
.clips { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.clip { padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: left; }
.clip .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; flex: none; }
.clip audio { display: none; }

/* Kuiz */
.dots { display: flex; gap: 6px; margin-bottom: 18px; }
.dots i { flex: 1; height: 8px; border-radius: 8px; background: rgba(30,37,64,.1); transition: background .3s; }
.dots i.ok { background: var(--lilac); }
.dots i.no { background: var(--peach); }
.q { padding: 26px 18px; text-align: center; margin-bottom: 14px; }
.q small { color: var(--muted); font-size: 13px; font-weight: 500; display: block; }
/* Ruang atas yang cukup supaya hamzah dan baris tidak bertindih dengan teks soalan */
.q .big { font: 700 84px/1.25 var(--ar); color: var(--navy); padding-top: 34px; margin-top: 6px; }
.q .big.word { font-size: 60px; }
.q .say { font-size: 40px; font-weight: 700; letter-spacing: -.02em; margin: 14px 0 6px; color: var(--navy); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { padding: 18px 8px; border-radius: 22px; font-size: 22px; font-weight: 700; text-align: center; transition: background .25s, transform .18s; }
.opt.ar { font: 700 46px/1.25 var(--ar); }
.opt.ok { background: rgba(var(--lilac-rgb),.9); color: #fff; border-color: transparent; }
.opt.no { background: rgba(var(--peach-rgb),.85); color: #fff; animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.result { text-align: center; padding: 34px 20px; }
.result .medal { width: 130px; height: 130px; border-radius: 40px; display: inline-grid; place-items: center; font-size: 62px; margin-bottom: 14px; animation: float 3.5s ease-in-out infinite; }
.result h4 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; }
.result p { margin: 0 0 18px; color: var(--muted); }
.stars3 { display: flex; gap: 8px; justify-content: center; font-size: 34px; color: var(--peach); margin-bottom: 22px; }
.stars3 .off { color: rgba(30,37,64,.15); }
.row-btns { display: flex; flex-direction: column; gap: 10px; }

/* Tab bar terapung */
/* Tab bawah: tiga butang sama lebar dalam semua bahasa, bar di tengah skrin */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 16px); display: grid; grid-template-columns: repeat(3, 1fr); width: min(330px, calc(100% - 40px)); gap: 4px; padding: 6px; border-radius: 999px; z-index: 10; }
.tabbar[hidden] { display: none; }
.tabbar button { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 0; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); transition: background .25s, color .25s; }
.tabbar button .ti { font-size: 22px; }
.tabbar button.on { background: rgba(255,255,255,.85); color: var(--navy); box-shadow: 0 4px 12px rgba(30,37,64,.1); }

/* Pencapaian dan tetapan */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 16px 10px; text-align: center; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat small { color: var(--muted); font-size: 12px; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { padding: 16px 8px; text-align: center; font-size: 12px; font-weight: 600; }
.badge .ic { width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; color: #fff; }
.badge.off { opacity: .45; }
.badge.off .ic { background: rgba(30,37,64,.15) !important; }
.list { padding: 6px 16px; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(30,37,64,.07); width: 100%; text-align: left; }
.item:last-child { border: 0; }
.item .ti { font-size: 20px; color: var(--lilac); }
.item span { flex: 1; }
.item input[type=text] { border: 0; background: transparent; font: inherit; text-align: right; color: var(--muted); width: 50%; outline: none; }
.switch { width: 50px; height: 30px; border-radius: 30px; background: rgba(30,37,64,.15); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .3s cubic-bezier(.3,.7,.3,1.3); }
.switch.on { background: var(--lilac); }
.switch.on::after { transform: translateX(20px); }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 16px); transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 30; animation: enter .4s; display: flex; gap: 8px; align-items: center; }

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
#fx i { position: absolute; top: -30px; font-size: 22px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(420deg); opacity: .2; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Perkataan panjang (Iqra 2 hingga 6) */
.letters.wide { grid-template-columns: 1fr 1fr; }
.letters.wide .letter { aspect-ratio: auto; padding: 12px 6px 10px; }
.letters.wide .letter .ar { font-size: 30px; line-height: 1.7; }
.letters.wide .letter small { font-size: 12px; }
.opt.ar.long { font-size: 28px; line-height: 1.8; padding: 12px 6px; }
.opt.text { font-size: 15px; line-height: 1.35; padding: 16px 10px; }
.q .say { word-break: break-word; }
.cap .ar { max-width: 40%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Langkah Baca: kandungan teks berhalaman */
.note { margin: 0 0 12px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.slide { padding: 18px 12px; min-height: 300px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.krow, .rrow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; direction: rtl; }
.rrow { flex-wrap: nowrap; gap: 0 calc(var(--fs, 36px) * .35); }
.rrow .rc .ar { font-size: var(--fs, 36px); }
.krow { padding-bottom: 14px; border-bottom: 1px dashed rgba(var(--lilac-rgb),.35); margin-bottom: 4px; }
.rc { display: flex; flex-direction: column; align-items: center; padding: 2px 8px; border-radius: 16px; cursor: default; transition: background .2s, transform .15s; }
.rc.press { cursor: pointer; }
.rc.press:hover { background: rgba(var(--lilac-rgb),.10); }
.rc.press:active { background: rgba(var(--lilac-rgb),.22); transform: scale(.97); }
.rc .ar { font: 400 34px/1.9 'KFGQPC Hafs', 'Noto Naskh Arabic', var(--ar); color: var(--navy); white-space: nowrap; }
.rc.lg .ar { font-size: 28px; }
.rc.xl .ar { font-size: 23px; white-space: normal; text-align: center; }
/* Baris utama (contoh): kotak putih */
.rc.key { background: rgba(255,255,255,.72); padding: 4px 14px 8px; box-shadow: inset 0 1px 1px #fff, 0 4px 14px rgba(30,37,64,.07); }
.rc.key.press:hover { background: rgba(255,255,255,.9); }
.rc.key.press:active { background: #fff; }
.rc small { direction: ltr; font-size: 13px; font-weight: 700; color: var(--pink-book); margin-top: 2px; line-height: 1.2; white-space: nowrap; }
.rc.one .ar { font-size: 46px; line-height: 2.5; margin-top: -10px; }
.rc.key .ar { line-height: 2.3; }
/* Rumi di bawah setiap perkataan */
.cols { display: flex; direction: rtl; align-items: flex-end; gap: 0 .45em; }
.col { display: flex; flex-direction: column; align-items: center; }
.col .sep { font: 400 34px/1.9 'KFGQPC Hafs', var(--ar); padding: 0 .1em; }
.col small { min-height: 1.2em; }
.rrow .col .sep { font-size: var(--fs, 36px); }
/* Pemisah antara butang (=, ←, —) */
.rsep { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 22px; line-height: 1; padding: 0 2px; }
.rsep small { font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.rsep .hl { color: var(--pink-book); }
.krow .br { flex-basis: 100%; height: 0; }
.rc.long .ar { white-space: normal; text-align: center; }
.rrow .rsep { font-size: calc(var(--fs, 36px) * .6); }
/* Senarai tanda waqaf */
.krow.legend { flex-direction: column; align-items: stretch; gap: 4px; }
.lg { display: flex; align-items: center; gap: 10px; direction: rtl; font-size: 14px; color: var(--muted); }
.lg .ar { font: 400 30px/1.6 'KFGQPC Hafs', var(--ar); color: var(--navy); min-width: 56px; text-align: center; }
.lg span:last-child { direction: ltr; }
.rc small .ti { font-size: 13px; vertical-align: -2px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 4px; }
.pager .pg { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; }
.pager span { display: flex; align-items: center; gap: 6px; flex-direction: row; flex-wrap: wrap; justify-content: center; }
.pager span i { width: 8px; height: 8px; border-radius: 8px; background: rgba(30,37,64,.15); transition: width .3s, background .3s; }
.pager span i.on { width: 22px; background: var(--lilac); }
.pager small { width: 100%; text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; }

.tok { border-radius: 12px; padding: 0 4px; transition: background .2s; }
.tok.press { cursor: pointer; }
.tok.press:hover { background: rgba(var(--lilac-rgb),.12); }
.tok.press:active { background: rgba(var(--lilac-rgb),.25); }
.sep { color: var(--muted); padding: 0 6px; font-size: .7em; }
.sep.hl { color: var(--pink-book); }
.slide { overflow: hidden; }

/* Ucapan tahniah */
.modal { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 24px; background: rgba(30,37,64,.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: enter .35s; }
.modal .sheet { width: min(380px, 100%); padding: 30px 22px 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.modal .medal { width: 110px; height: 110px; border-radius: 34px; margin: 0 auto 6px; display: grid; place-items: center; font-size: 54px; animation: float 3s ease-in-out infinite; }
.modal small { color: var(--peach); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.modal h4 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.modal p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

/* Meter ketepatan */
.meter { margin-top: 12px; padding: 16px; display: flex; gap: 14px; align-items: center; }
.meter > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.meter small { color: var(--muted); font-size: 12px; font-weight: 600; }
.meter b { font-size: 22px; letter-spacing: -.02em; }
.meter span { font-size: 13px; color: var(--muted); }
.meter em { font-style: normal; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.letter.hit { box-shadow: inset 0 0 0 2px var(--lilac); }
.letter.miss { box-shadow: inset 0 0 0 2px var(--peach); }
.letter.hit small::after { content: ' ✓'; color: var(--lilac); }
.letter.miss small::after { content: ' ✗'; color: var(--peach); }
.arn { font-family: 'KFGQPC Hafs', 'Noto Naskh Arabic', var(--ar); font-size: 1.55em; line-height: 1; color: var(--navy); unicode-bidi: isolate; -webkit-text-stroke: .35px currentColor; padding: 0 .08em; }



/* Bahagian berwarna dalam latihan (ikut warna merah dalam buku) */
.hl { color: var(--pink-book); }
.gr { color: var(--green-book); }
.stk { position: relative; display: inline-block; }
.stk-t { position: absolute; inset: 0; color: var(--navy); white-space: nowrap; }
.gsvg { overflow: visible; }
.nk { font-family: 'Noto Naskh Arabic', 'Amiri', serif; }
.rc .ar .khat { display: inline-block; height: 1.45em; width: auto; vertical-align: middle; }
/* Butang utama dua sebaris (kapsul 12) */
.krow.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.krow.grid .rc { padding: 4px 6px 8px; }
.krow.grid .rc .ar, .krow.grid .col .sep { font-size: 28px; }
/* Latihan berjarak lebih luas */
.rrow.roomy { gap: 0 calc(var(--fs, 36px) * 1.2); margin: 6px 0; }
.krow.grid:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

/* ===== Liquid glass: semua butang Baca (kapsul 1-69) ===== */
.slide.liquid { gap: 16px; }
.slide.liquid .krow, .slide.liquid .rrow:not(.still) { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 12px; direction: rtl; }
.slide.liquid .krow.grid { display: grid; grid-template-columns: auto auto; justify-content: center; }
.slide.liquid .krow { padding-bottom: 16px; }
.slide.liquid .rc:not(.still .rc) {
  position: relative; overflow: hidden; isolation: isolate; justify-content: center;
  padding: 10px 10px 12px;
  border: 1.5px solid transparent; border-radius: 22px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.55), rgba(255,255,255,.16) 55%, rgba(var(--tint-rgb),.24)) padding-box,
    linear-gradient(150deg, rgba(255,255,255,1), rgba(255,255,255,.3) 40%, rgba(var(--rim-rgb),.65) 75%, rgba(var(--rim2-rgb),.8)) border-box;
  -webkit-backdrop-filter: blur(10px) saturate(220%) brightness(1.06); backdrop-filter: blur(10px) saturate(220%) brightness(1.06);
  box-shadow:
    inset 0 2px 1px rgba(255,255,255,.9),
    inset 0 -2px 6px rgba(var(--lilac-rgb),.16),
    inset 6px 0 14px -8px rgba(255,255,255,.9),
    inset -6px 0 14px -8px rgba(var(--rim2-rgb),.4),
    0 12px 26px -8px rgba(var(--deep-rgb),.22),
    0 3px 8px rgba(30,37,64,.07);
  transition: transform .3s cubic-bezier(.3,1.7,.5,1), box-shadow .3s;
}
/* kilauan kaca melengkung di atas dan titik cahaya di penjuru */
.slide.liquid .rc:not(.still .rc)::before {
  content: ''; position: absolute; left: 6%; right: 6%; top: 3px; height: 40%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,0));
  border-radius: 18px 18px 50% 50% / 18px 18px 16px 16px;
}
.slide.liquid .rc:not(.still .rc)::after {
  content: ''; position: absolute; top: 6px; right: 12px; width: 24px; height: 9px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, #fff, transparent); filter: blur(1px); transform: rotate(-12deg);
}
.slide.liquid .rc.press:hover { background:
    linear-gradient(150deg, rgba(255,255,255,.7), rgba(255,255,255,.26) 55%, rgba(var(--tint-rgb),.3)) padding-box,
    linear-gradient(150deg, #fff, rgba(255,255,255,.3) 40%, rgba(var(--rim-rgb),.65) 75%, rgba(var(--rim2-rgb),.8)) border-box; }
.slide.liquid .rc.press:active { transform: scale(.94); box-shadow: inset 0 2px 1px rgba(255,255,255,.9), inset 0 0 26px rgba(255,255,255,.7), 0 4px 12px rgba(var(--deep-rgb),.18); }
/* tulisan sama besar dalam satu halaman (--fs ditetapkan oleh fitSlide) */
.slide.liquid .rc .ar, .slide.liquid .rc.one .ar, .slide.liquid .krow.grid .rc .ar,
.slide.liquid .rc .col .sep, .slide.liquid .rrow .rc .ar { font-size: var(--fs, 34px); line-height: 1.9; margin-top: 0; }
.slide.liquid .rc.span { width: 100%; }
.slide.liquid .rc.span .ar { white-space: normal; text-align: center; }
.slide.liquid .rsep { font-size: calc(var(--fs, 34px) * .55); }
.slide.liquid .krow:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
/* sengkang di hujung kanan baris (sambungan baris sebelumnya) tidak perlu bila butang tersusun dalam kotak */
.slide.liquid .rrow > .rsep:first-child { display: none; }
/* Susunan menegak bagi pasangan yang tidak muat sebaris: pemisah di barisnya sendiri, anak panah menunjuk ke bawah */
.slide.liquid.stack .krow .rsep.turn, .slide.liquid.stack .rrow .rsep.turn { flex-basis: 100%; flex-direction: row; direction: ltr; justify-content: center; gap: 6px; padding: 0; }
.slide.liquid.stack .rsep small { margin: 0; }
.slide.liquid.stack .rsep.turn span { display: inline-block; transform: rotate(-90deg); }

/* ===== Rakam: fon dan warna sama seperti Baca; semua kotak sama besar; lajur ikut panjang teks ===== */
.letters.rk { grid-auto-rows: 1fr; gap: 10px; }
.letters.rk .letter { aspect-ratio: auto; min-height: 92px; padding: 10px 8px; gap: 2px; overflow: hidden; }
.letters.rk .letter .ar { font: 400 34px/1.9 'KFGQPC Hafs', 'Noto Naskh Arabic', var(--ar); color: var(--navy); white-space: normal; text-align: center; max-width: 100%; }
.letters.rk .letter small { font-size: 12px; font-weight: 700; color: var(--pink-book); text-align: center; line-height: 1.25; }
.letters.rk.g4 { grid-template-columns: repeat(4, 1fr); }
.letters.rk.g3 { grid-template-columns: repeat(3, 1fr); }

.letters.rk.g2 { grid-template-columns: repeat(2, 1fr); }

.letters.rk.g1 { grid-template-columns: 1fr; }
.letters.rk.s3 .letter .ar { font-size: 28px; }
.letters.rk.s2 .letter .ar, .letters.rk.s1 .letter .ar { font-size: 26px; }
.letters.rk .gsvg, .q .gsvg, .opt .gsvg { max-width: 100%; }

/* ===== Ujian: fon dan warna sama seperti Baca; saiz tulisan ikut panjang teks ===== */
.q .big { font: 400 64px/1.7 'KFGQPC Hafs', 'Noto Naskh Arabic', var(--ar); color: var(--navy); padding-top: 20px; white-space: normal; overflow-wrap: anywhere; }
.q .big.s2 { font-size: 46px; }
.q .big.s3 { font-size: 34px; }
.q .big.s4 { font-size: 26px; line-height: 1.9; }
.q .big.hl { color: var(--pink-book); }
.q .say { font-size: 30px; }
.opt.ar { font: 400 38px/1.6 'KFGQPC Hafs', 'Noto Naskh Arabic', var(--ar); padding: 12px 6px; overflow: hidden; }
.opt.ar.s2 { font-size: 30px; }
.opt.ar.s3 { font-size: 24px; line-height: 1.8; }
.opt.ar.s4 { font-size: 19px; line-height: 1.9; }
.opt { overflow-wrap: anywhere; }
/* Tanda waqaf (gambar dari buku) */
/* Tanda waqaf (SVG dari fon): kotak sama saiz; mim dan jim dikecilkan supaya tebal garisan sama dengan tanda lain */
.lg .ar { width: 66px; min-width: 66px; display: flex; justify-content: center; align-items: center; min-height: 40px; }
.lg .ar .khat { height: calc(34px * var(--k, 1)); max-width: 66px; width: auto; object-fit: contain; }
.q .big .khat { display: block; height: calc(72px * var(--k, 1)); max-width: 120px; width: auto; margin: 0 auto; object-fit: contain; }
.k-x60_mim { --k: .68; } .k-x60_jim { --k: .88; }
/* Rakam: flex supaya baris terakhir yang tidak penuh berada di tengah */
.letters.rk { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; }
.letters.rk .letter { flex: 0 0 calc((100% - (var(--c) - 1) * 10px) / var(--c)); }
.letters.rk.g4 { --c: 4; } .letters.rk.g3 { --c: 3; } .letters.rk.g2 { --c: 2; } .letters.rk.g1 { --c: 1; }
/* Ujian: pilihan jawapan sama besar; jika bilangan ganjil, yang terakhir di tengah */
.opts { display: flex; flex-wrap: wrap; justify-content: center; }
.opts .opt { flex: 0 0 calc(50% - 6px); display: flex; align-items: center; justify-content: center; min-height: 64px; }

/* Muka depan: logo Iqra' baharu, kredit penerbit (Darul Fikir) dan kerjasama (Yayasan As'ad Humam) */
.splash2 { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.splash2 .logo-main { width: 100%; max-width: 240px; padding: 18px 16px 16px; border-radius: 28px; margin-top: 100px; animation: float 4s ease-in-out infinite; }
.splash2 .logo-main img { width: 100%; display: block; }
.splash2 p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.splash2 .btn { margin-top: 2px; padding: 11px 20px; font-size: 14px; }
.splash2 .grow { flex: 1; }
.credits { width: 100%; max-width: 240px; margin-bottom: 56px; display: grid; grid-template-columns: 1fr 1px 1fr; gap: 8px; align-items: start; }
.credits > div { display: flex; flex-direction: column; }
.credits > div > :last-child { flex: 1; display: flex; align-items: center; min-height: 34px; }
.credits .line { background: rgba(var(--lilac-rgb),.25); align-self: stretch; }
.credits small { display: block; color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 5px; line-height: 1.2; }
.credits .df { width: 100%; border-radius: 8px; display: block; box-shadow: 0 4px 12px rgba(160,14,20,.18); }
.credits .ya { display: flex; align-items: center; gap: 8px; text-align: left; }
.credits .ya img { width: 24px; flex: none; }
.credits .ya b { font-size: 7.5px; font-weight: 600; line-height: 1.3; }
/* Halaman Utama: logo Iqra' baharu di kepala */
.top .brand { height: 46px; width: auto; display: block; }

/* ===== Tema warna (Tetapan). Warna merah jambu dan hijau tulisan Arab (hukum tajwid) tidak berubah. ===== */
html[data-theme="firus"] { --lilac: #1597A3; --lilac-soft: #D2EEF0; --lilac-rgb: 21,151,163; --deep-rgb: 12,104,116; --tint-rgb: 168,224,228; --rim-rgb: 130,206,212;
  --bg: #EBF4F5; --blob1: #8ED1D6; --blob2: #F7C9AE; --blob3: #93C4EC; --blob4: #BDE6D7; }
html[data-theme="oren"] { --lilac: #E27D22; --lilac-soft: #FCE5CF; --lilac-rgb: 226,125,34; --deep-rgb: 186,92,18; --tint-rgb: 250,212,172; --rim-rgb: 246,184,126;
  --bg: #F8F1EA; --blob1: #F7C08E; --blob2: #F5A98A; --blob3: #F8DCA0; --blob4: #F4B9CF; }
html[data-theme="biru"] { --lilac: #4A82DD; --lilac-soft: #DCE7FA; --lilac-rgb: 74,130,221; --deep-rgb: 38,88,176; --tint-rgb: 186,210,246; --rim-rgb: 158,192,240;
  --bg: #EDF2FA; --blob1: #A7C4F2; --blob2: #F7C2AE; --blob3: #9ED6EE; --blob4: #C6D2F7; }
html[data-theme="mawar"] { --lilac: #D3628C; --lilac-soft: #F8DDE8; --lilac-rgb: 211,98,140; --deep-rgb: 168,58,100; --tint-rgb: 245,200,218; --rim-rgb: 234,168,196;
  --bg: #F8EEF2; --blob1: #F1B1C9; --blob2: #F7C2AE; --blob3: #D6C1F2; --blob4: #F4B9CF; }
/* Pilihan tema dalam Tetapan */
.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px 10px; border-radius: var(--radius); }
.themes .sw { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.themes .sw i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 2px 2px rgba(255,255,255,.45), 0 4px 10px rgba(30,37,64,.15); transition: transform .2s; }
.themes .sw.on i { box-shadow: 0 0 0 3px #fff, 0 0 0 5px currentColor, 0 4px 10px rgba(30,37,64,.15); transform: scale(1.05); }
.themes .sw b { color: #fff; font-size: 20px; }
.themes .sw small { font-size: 10.5px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.themes .sw.on small { color: var(--ink); }
/* Tulisan tiga bahasa bertindih (i18n.js LS/L3): kotak mengambil saiz terjemahan paling panjang, hanya bahasa semasa kelihatan */
/* !important: gaya lain seperti ".pager span { display: flex }" tidak boleh memecahkan susunan bertindih ini */
.t3 { display: inline-grid !important; vertical-align: top; }
.t3 > * { grid-area: 1 / 1 !important; }
.t3 > :not(:first-child) { visibility: hidden !important; }
/* Pilihan bahasa dalam Tetapan (nama bahasa ditulis dalam bahasa itu sendiri) */
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; border-radius: 20px; }
.langs button { padding: 12px 4px; border-radius: 15px; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.25; transition: background .25s, color .25s; }
.langs button.on { background: var(--lilac); color: #fff; box-shadow: 0 6px 14px rgba(var(--lilac-rgb), .35); }

/* ===== Ciri tambahan (ciri.js) ===== */
/* Streak dan matlamat harian */
.streak { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #E2632A; }
.streak .ti { color: #F08A24; font-size: 17px; }
.streak.off { color: var(--muted); }
.streak.off .ti { color: rgba(30,37,64,.3); }
.goal { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0 0 14px; }
.goal .ring { width: 58px; height: 58px; flex: none; position: relative; }
.goal .ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; }
.goal small { color: var(--muted); font-size: 12px; display: block; }
.goal h4 { margin: 2px 0; font-size: 16px; }
.week { display: flex; gap: 5px; margin-top: 6px; }
.week i { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); background: rgba(30,37,64,.06); }
.week i.on { background: linear-gradient(135deg, #F7B267, #F08A24); color: #fff; }
.week i.today { box-shadow: 0 0 0 2px #F08A24; }
/* Ulang kaji */
.review, .report-btn { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; width: 100%; text-align: left; border-radius: var(--radius); }
.review .ic, .report-btn .ic { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--peach-soft); color: var(--peach); font-size: 22px; flex: none; }
.report-btn .ic { background: var(--lilac-soft); color: var(--lilac); }
.review b, .report-btn b { display: block; font-size: 15px; }
.review small, .report-btn small { color: var(--muted); font-size: 12px; }
.report-btn { margin: 14px 0 0; }
.wrong { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; direction: rtl; }
.wrong.four { grid-template-columns: repeat(4, 1fr); }
.wrong .w { padding: 10px 4px 8px; border-radius: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.wrong .w .ar { font: 400 28px/1.7 'KFGQPC Hafs', 'Noto Naskh Arabic', var(--ar); color: var(--navy); max-width: 100%; overflow: hidden; }
.wrong .w .ar .khat { height: 30px; }
.wrong .w small { direction: ltr; font-size: 11px; color: var(--pink-book); font-weight: 700; }
.wrong .w em { direction: ltr; font-style: normal; font-size: 10px; color: var(--muted); margin-top: 2px; }
.rep .wrong .w { background: rgba(255,255,255,.55); }
/* Lencana usaha */
.badge small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; margin-top: 3px; line-height: 1.3; }
/* Ikut ustaz */
.follow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 0 10px; border-radius: 999px; }
.follow .play { width: 34px; height: 34px; font-size: 17px !important; border-radius: 50%; background: var(--lilac); color: #fff; display: grid; place-items: center; font-size: 20px; flex: none; box-shadow: 0 6px 14px rgba(var(--lilac-rgb), .35); }
.follow b { font-size: 14px; display: block; }
.follow small { color: var(--muted); font-size: 11.5px; }
.follow .prog { font-size: 12px; font-weight: 700; color: var(--lilac); white-space: nowrap; }
.speed-chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--lilac); flex: none; }
.slide.liquid .rc.now { box-shadow: 0 0 0 3px var(--lilac), 0 0 26px rgba(var(--lilac-rgb), .55) !important; transform: scale(1.05); background: #fff !important; z-index: 2; }
.slide.liquid .rc.done { opacity: .55; }
/* Kelajuan dalam Tetapan */
.langs.speed button small { display: block; font-size: 10.5px; font-weight: 500; }
/* Laporan */
.rep { padding: 16px; margin-bottom: 12px; }
.rep h5 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.rep .line { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.rep .line span { width: 52px; font-weight: 600; }
.rep .line .bar { flex: 1; }
.rep .line em { width: 40px; text-align: right; font-style: normal; color: var(--muted); font-size: 12px; }
.rep .empty { margin: 0; color: var(--muted); font-size: 13px; }
.scores { display: flex; align-items: flex-end; gap: 8px; height: 90px; padding-top: 16px; }
.scores i { flex: 0 1 42px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--lilac), rgba(var(--lilac-rgb), .5)); position: relative; }
.scores i b { position: absolute; top: -16px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); font-style: normal; }
.scores-x { display: flex; gap: 8px; font-size: 10px; color: var(--muted); margin-top: 4px; }
.scores-x span { flex: 0 1 42px; text-align: center; }
@media print { #tabs, .back, .noprint, .bg { display: none !important; } body { background: #fff; } }
/* Profil */
.who-title { text-align: center; margin: 4px 0 4px; font-size: 22px; }
.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.prof { padding: 18px 10px; text-align: center; border-radius: 26px; display: flex; flex-direction: column; align-items: center; }
.prof .av { width: 74px; height: 74px; border-radius: 26px; margin: 0 auto 10px; display: grid; place-items: center; font-size: 34px; color: #fff; }
.prof b { display: block; font-size: 15px; }
.prof small { color: var(--muted); font-size: 12px; }
.prof.on { box-shadow: 0 0 0 3px var(--lilac), 0 10px 26px rgba(var(--lilac-rgb), .25); }
.prof.add .av { background: rgba(30,37,64,.06); color: var(--muted); border: 2px dashed rgba(30,37,64,.18); }
.field { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(30,37,64,.12); background: #fff; font: 500 16px/1.2 inherit; color: var(--ink); outline: none; }
.field:focus { border-color: var(--lilac); box-shadow: 0 0 0 3px rgba(var(--lilac-rgb), .2); }
/* Kunci ibu bapa */
.sheet.solid { background: rgba(255,255,255,.95) !important; }
.lockq { font-size: 34px; font-weight: 700; letter-spacing: .02em; margin: 2px 0; }
.pin { display: flex; justify-content: center; gap: 10px; margin: 4px 0 10px; }
.pin i { width: 46px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-style: normal; font-size: 22px; font-weight: 700; background: var(--lilac-soft); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button { padding: 13px 0; border-radius: 16px; font-size: 20px; font-weight: 600; background: rgba(30,37,64,.05); }
.keys button.small { font-size: 14px; }
.week i.later { opacity: .45; }

/* Keterangan ringkas di bawah butang utama Baca (part.knote dalam read.js) */
.kw { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.knote { direction: ltr; text-align: center; line-height: 1.25; }
.knote b { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.knote > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.tiwal { height: .75em; width: 1.6em; vertical-align: .1em; color: var(--navy); margin: 0 .15em; }

/* Lencana Iqra: setiap Iqra ikon dan warna sendiri, nombor kecil di sudut */
.badge.ib .ic { position: relative; background: linear-gradient(145deg, color-mix(in srgb, var(--t) 70%, #fff), var(--t)); box-shadow: 0 6px 14px color-mix(in srgb, var(--t) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.5); }
.badge.ib .ic b { position: absolute; right: -6px; top: -6px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: #fff; color: var(--t); font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(30,37,64,.18); }
.badge.ib.off { opacity: .6; }
.badge.ib.off .ic { background: rgba(30,37,64,.12) !important; box-shadow: none; color: rgba(30,37,64,.35); }
.badge.ib.off .ic b { color: rgba(30,37,64,.4); }

/* Kad Buku Iqra: nombor dalam cincin kemajuan, peratus di sebelah */
.book .nrow { display: flex; align-items: center; gap: 8px; position: relative; }
.book .ring { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--t) calc(var(--p) * 1%), color-mix(in srgb, var(--t) 16%, transparent) 0); }
.book .ring .num { width: 44px; height: 44px; border-radius: 50%; font-size: 21px; box-shadow: 0 0 0 3px rgba(255,255,255,.9); }
.book .pct { font-size: 14px; font-weight: 800; }
.book.locked .ring { filter: grayscale(1); opacity: .35; }
.book.locked .ring .num { filter: none; opacity: 1; }

/* iPad / tablet: seluruh app dibesarkan (zoom) supaya memenuhi skrin besar; iPhone tidak terjejas */
@media (min-width: 700px) and (min-height: 700px) { html { zoom: 1.5; } #app { max-width: 500px; } }
@media (min-width: 1000px) and (min-height: 700px) { html { zoom: 1.25; } #app { max-width: 720px; } .books { grid-template-columns: repeat(3, 1fr); } }

/* Panduan membaca semasa merakam: kad giliran menyala dan berdenyut */
.letters.rk .letter.now { background: rgba(var(--lilac-rgb), .16) !important; box-shadow: 0 0 0 3px var(--lilac), 0 0 22px rgba(var(--lilac-rgb), .55); transform: scale(1.06); animation: nowPulse 1.1s ease-in-out infinite; z-index: 1; }
.letters.rk .letter { transition: transform .25s, box-shadow .25s, opacity .25s; }
@keyframes nowPulse { 50% { box-shadow: 0 0 0 3px var(--lilac), 0 0 32px rgba(var(--lilac-rgb), .8); } }

/* Ikut & Ulang */
.letters.ik .letter { cursor: default; }
.letters.ik .letter.wait { opacity: .55; }
.letters.ik .letter.hit small::after { content: ' 👍'; }
.letters.ik .letter.now { background: rgba(var(--lilac-rgb), .16) !important; box-shadow: 0 0 0 3px var(--lilac), 0 0 22px rgba(var(--lilac-rgb), .55); transform: scale(1.06); animation: nowPulse 1.1s ease-in-out infinite; z-index: 1; }
.ikst { padding: 18px 16px; text-align: center; display: grid; gap: 10px; justify-items: center; min-height: 190px; align-content: center; margin-bottom: 4px; }
.ikst h4 { margin: 0; font-size: 18px; }
.ikst p { margin: 0; color: var(--muted); font-size: 14px; }
.ikorb { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--lilac); position: relative; }
.ikorb.mic { background: var(--pink-book); }
.ikorb.live::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--lilac); opacity: .35; animation: ikRing 1.2s ease-out infinite; }
.ikorb.mic.live::before { border-color: var(--pink-book); }
@keyframes ikRing { from { transform: scale(.85); opacity: .6; } to { transform: scale(1.35); opacity: 0; } }
.ikbar { width: 100%; max-width: 220px; height: 8px; border-radius: 4px; background: rgba(232,15,138,.15); overflow: hidden; }
.ikbar i { display: block; height: 100%; width: 0; background: var(--pink-book); border-radius: 4px; }
.ikchips { display: flex; gap: 8px; }
.ikchip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(var(--lilac-rgb), .14); color: var(--lilac); display: inline-flex; gap: 4px; align-items: center; }
.ikchip.on { background: var(--lilac); color: #fff; }
.ikchip.kid.on { background: var(--pink-book); }
.ikbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.ikbtns .btn { justify-content: center; }
.btn.ok { background: #3FA77A; color: #fff; }
.btn.ghost { background: rgba(255,255,255,.8); color: var(--navy); }
.ikstars { font-size: 30px; letter-spacing: 4px; }
.seg button { white-space: nowrap; letter-spacing: -.01em; gap: 4px; }
/* Telefon: ikon langkah disembunyikan supaya label (termasuk "Ikut & Ulang") muat dalam pil yang sama lebar */
@media (max-width: 500px) { .seg button { font-size: 12px; padding: 10px 0; letter-spacing: -.02em; } .seg button .ti { display: none; } }
