/* =====================================================================
   Al-Qur'an Rukunislam — memakai token warna & font tema utamaRukunislam.id
   ===================================================================== */
:root {
  --deep: #0a3d3a;
  --deep-2: #0f514c;
  --leaf: #16806f;
  --link: #0f6f61;
  --gold: #d6a23a;
  --gold-soft: #f3e3bd;
  --bg: #f3f7f5;
  --card: #ffffff;
  --ink: #0f2420;
  --muted: #4f635d;
  --line: #d9e5e0;
  --tint: #e7f0ec;
  --chrome: #0a3d3a;
  --btn: #0b3f3b;
  --btn-hover: #11534d;
  --on-deep: #e8f3f0;
  --on-deep-2: #b9d3cd;
  --on-gold: #f6e7be;
  --ink-on-gold: #2b2006;
  --badge-bg: #f3e3bd;
  --badge-fg: #6b4d0b;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 22px;
  --f-head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-ar: "Amiri Quran", "Scheherazade New", "Traditional Arabic", serif;
  --wrap: 1200px;
  --ar-size: 2.2rem;
  /* warna tajwid */
  --tj-h: #8a9a96;
  --tj-n: #c26a00;
  --tj-p: #d98e00;
  --tj-o: #d0521a;
  --tj-m: #c62828;
  --tj-q: #1e78d2;
  --tj-f: #c2185b;
  --tj-c: #d6457f;
  --tj-a: #2e8b3a;
  --tj-u: #8c8a12;
  --tj-w: #7048c9;
  --tj-d: #4a5bc0;
  --tj-i: #0a97ac;
  --tj-g: #1f7a2c;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 0l8 20 20 8-20 8-8 20-8-20L0 28l20-8z' fill='none' stroke='%23ffffff' stroke-opacity='.07'/%3E%3C/svg%3E");
}
[data-theme="dark"] {
  --bg: #0b1715;
  --card: #12231f;
  --ink: #e6f0ed;
  --muted: #9cb4ac;
  --line: #25423b;
  --tint: #1a302a;
  --chrome: #06110f;
  --deep: #0f4a44;
  --deep-2: #15605a;
  --btn: #177e6c;
  --btn-hover: #1e9480;
  --link: #5fd8bc;
  --gold-soft: #3a2f14;
  --badge-bg: #3a2f14;
  --badge-fg: #f0cb78;
  --tj-h: #7c8f8a;
  --tj-n: #f0a04b;
  --tj-p: #f2b93b;
  --tj-o: #ff8a5c;
  --tj-m: #ff6b6b;
  --tj-q: #5baaf2;
  --tj-f: #f06fa6;
  --tj-c: #f27daa;
  --tj-a: #68c873;
  --tj-u: #cfcb45;
  --tj-w: #a58bf0;
  --tj-d: #8795f0;
  --tj-i: #4cd0e4;
  --tj-g: #58c06a;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
svg {
  max-width: 100%;
}
img {
  height: auto;
  display: block;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3 {
  font-family: var(--f-head);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p {
  margin: 0 0 1em;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--deep);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 300;
}
.skip:focus {
  left: 8px;
  top: 8px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

/* tombol */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  transition: background 0.15s;
}
.btn:hover {
  background: var(--btn-hover);
  color: #fff;
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: var(--tint);
  color: var(--ink);
}
.btn--gold {
  background: var(--gold);
  color: var(--ink-on-gold);
}
.btn--gold:hover {
  background: #e4b24b;
  color: var(--ink-on-gold);
}
.btn--block {
  display: flex;
  width: 100%;
}
.btn--s {
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.icon-btn:hover {
  background: var(--tint);
}
.icon-btn--s {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600;
  font-size: 0.875rem;
}
.chip[aria-pressed="true"] {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}
.chip svg {
  flex: none;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}
.brand__link--logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(62vw, 240px);
}
.logo--dark {
  display: none;
}
[data-theme="dark"] .site-header .logo--light {
  display: none;
}
[data-theme="dark"] .site-header .logo--dark {
  display: block;
}
.logo--footer {
  height: 52px;
  margin-bottom: 0.4rem;
}
.nav {
  margin-left: auto;
}
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
}
.nav a:hover,
.nav a.is-current {
  background: var(--tint);
  color: var(--link);
  text-decoration: none;
}
.nav-toggle,
.nav-close {
  display: none;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 14, 12, 0.55);
  z-index: 55;
}
.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
#themeToggle .ico-sun {
  display: none;
}
[data-theme="dark"] #themeToggle .ico-sun {
  display: inline-flex;
}
[data-theme="dark"] #themeToggle .ico-moon {
  display: none;
}

/* hero hijau */
.hero-band {
  background: var(--deep) var(--pattern);
  background-image: var(--pattern), linear-gradient(180deg, var(--deep), var(--deep-2));
  color: #fff;
  padding: 2rem 0 2.2rem;
}
.hero-band__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-band h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 0.3rem;
  color: #fff;
}
.hero-band p {
  margin: 0;
  color: var(--on-deep-2);
  max-width: 40rem;
}
.hero-band .crumbs,
.hero-band .crumbs a {
  color: var(--on-deep-2);
}
.hero-band .crumbs [aria-current] {
  color: #fff;
}
.hero-band__search {
  flex: 0 1 460px;
  min-width: min(100%, 280px);
}
.hero-band__search small {
  display: block;
  margin-top: 0.45rem;
  color: var(--on-deep-2);
  font-size: 0.78rem;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.15rem 1rem;
}
.searchbox input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.65rem 0;
  outline: 0;
  color: var(--ink);
}
.searchbox:focus-within {
  box-shadow: 0 0 0 3px var(--gold);
}

.crumbs {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  margin: 0;
  padding: 0;
}
.crumbs li {
  display: inline-flex;
  gap: 0.5rem;
}
.crumbs li + li::before {
  content: "/";
  opacity: 0.55;
}
.crumbs a {
  color: inherit;
}

.app-page {
  padding: 1.5rem 0 4rem;
}

/* tab + grid kartu (daftar surat) */
.tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.tabs {
  display: inline-flex;
  background: var(--tint);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted);
}
.tabs button[aria-selected="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.sortbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--muted);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.surah-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--r-m);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color 0.15s;
}
.surah-card:hover {
  border-color: var(--gold);
  text-decoration: none;
}
.surah-card[hidden] {
  display: none;
}
.num {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--tint);
  color: var(--ink);
  font: 700 0.8rem var(--f-head);
  line-height: 1;
}
.surah-card:hover .num {
  background: var(--gold-soft);
}
.meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.meta b {
  font-weight: 700;
  font-size: 0.95rem;
}
.meta small {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ar {
  font-family: var(--f-ar);
  font-size: 1.35rem;
  flex: none;
  color: var(--leaf);
}
[data-theme="dark"] .ar {
  color: var(--link);
}
.empty {
  color: var(--muted);
  padding: 1rem 0;
}
.resume {
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-m);
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.intro-text {
  margin-top: 3rem;
  max-width: 62rem;
  color: var(--muted);
}
.intro-text h2 {
  color: var(--ink);
  font-size: 1.25rem;
}

/* toolbar baca */
.toolbar {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
}
.toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  align-items: center;
}
.grp {
  display: inline-flex;
  gap: 0.3rem;
}
.qori {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.qori select,
.field {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--bg);
  max-width: 210px;
}
.field {
  width: 100%;
  max-width: 320px;
  border-radius: 999px;
  padding: 0.6rem 1rem;
}
.tj-legend {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}
.tj-legend summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}
.tj-legend ul {
  list-style: none;
  margin: 0.6rem 0 0.2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.3rem 0.8rem;
}
.tj-legend i {
  font: normal 1.25rem var(--f-ar);
  margin-right: 0.3rem;
}

/* kepala surat */
.surah-head {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: var(--r-l);
  background: var(--deep) var(--pattern);
  color: #fff;
  margin-bottom: 1.25rem;
}
.surah-head .ar {
  font: 400 clamp(2.4rem, 7vw, 3.6rem)/1.5 var(--f-ar);
  color: var(--gold);
  margin: 0;
}
.surah-head h2 {
  margin: 0.1rem 0;
  font-size: 1.5rem;
}
.surah-head p {
  margin: 0;
  color: #bfe0d9;
}
.bismillah {
  font: 400 calc(var(--ar-size) + 0.2rem)/2 var(--f-ar);
  text-align: center;
  margin: 0 0 1rem;
}

/* ayat */
.ayah {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 1rem 1.2rem 1.2rem;
  margin-bottom: 0.8rem;
  scroll-margin-top: 150px;
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}
.ayah--single {
  content-visibility: visible;
}
.ayah.is-playing {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold) inset;
}
.ayah.is-last {
  border-left: 5px solid var(--gold);
}
.ayah__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.ayah__num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: var(--gold);
  font: 700 0.85rem var(--f-head);
  box-shadow: 0 0 0 2px var(--gold) inset;
  text-decoration: none !important;
}
.ayah__actions {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-wrap: wrap;
}
.ayah__actions button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.ayah__actions button:hover,
.ayah__actions button[aria-pressed="true"] {
  background: var(--tint);
  color: var(--link);
}
.ayah__actions button[aria-pressed="true"] svg path {
  fill: currentColor;
}
.ayah__tafsir-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.ayah__tafsir-link:hover {
  background: var(--tint);
  color: var(--link);
  text-decoration: none;
}
.ayah__ar {
  font-family: var(--f-ar);
  font-size: var(--ar-size);
  line-height: 2.3;
  direction: rtl;
  text-align: right;
  margin: 0.3rem 0 0.6rem;
}
.ayah__lat {
  color: var(--link);
  font-style: italic;
  font-size: 0.975rem;
  margin: 0 0 0.4rem;
}
.ayah__id {
  margin: 0;
}
html[data-lat="0"] .ayah__lat {
  display: none;
}
html[data-id="0"] .ayah__id {
  display: none;
}
/* tajwid */
html[data-tj="1"] .tj-h,
html[data-tj="1"] .tj-s,
html[data-tj="1"] .tj-l {
  color: var(--tj-h);
}
html[data-tj="1"] .tj-n {
  color: var(--tj-n);
}
html[data-tj="1"] .tj-p {
  color: var(--tj-p);
}
html[data-tj="1"] .tj-o {
  color: var(--tj-o);
}
html[data-tj="1"] .tj-m {
  color: var(--tj-m);
}
html[data-tj="1"] .tj-q {
  color: var(--tj-q);
}
html[data-tj="1"] .tj-f {
  color: var(--tj-f);
}
html[data-tj="1"] .tj-c {
  color: var(--tj-c);
}
html[data-tj="1"] .tj-a {
  color: var(--tj-a);
}
html[data-tj="1"] .tj-u {
  color: var(--tj-u);
}
html[data-tj="1"] .tj-w {
  color: var(--tj-w);
}
html[data-tj="1"] .tj-d,
html[data-tj="1"] .tj-b {
  color: var(--tj-d);
}
html[data-tj="1"] .tj-i {
  color: var(--tj-i);
}
html[data-tj="1"] .tj-g {
  color: var(--tj-g);
}
.tj-legend .tj-h {
  color: var(--tj-h);
}
.tj-legend .tj-n {
  color: var(--tj-n);
}
.tj-legend .tj-p {
  color: var(--tj-p);
}
.tj-legend .tj-o {
  color: var(--tj-o);
}
.tj-legend .tj-m {
  color: var(--tj-m);
}
.tj-legend .tj-q {
  color: var(--tj-q);
}
.tj-legend .tj-f {
  color: var(--tj-f);
}
.tj-legend .tj-c {
  color: var(--tj-c);
}
.tj-legend .tj-a {
  color: var(--tj-a);
}
.tj-legend .tj-u {
  color: var(--tj-u);
}
.tj-legend .tj-w {
  color: var(--tj-w);
}
.tj-legend .tj-d {
  color: var(--tj-d);
}
.tj-legend .tj-i {
  color: var(--tj-i);
}
.tj-legend .tj-g {
  color: var(--tj-g);
}

.ayah--single .ayah__ar {
  font-size: calc(var(--ar-size) * 1.25);
}
.tafsir {
  margin: 2rem 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 1.25rem 1.4rem;
}
.tafsir h2 {
  font-size: 1.25rem;
}
.tafsir__body p {
  line-height: 1.85;
}
.tafsir__src {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 1rem 0 0;
}
.notice {
  padding: 1rem 1.2rem;
  border-radius: var(--r-m);
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.surah-kisah {
  margin: 2rem 0;
  line-height: 1.8;
  color: var(--muted);
}
.surah-kisah h2 {
  color: var(--ink);
}
.ayat-grid {
  margin: 2rem 0;
}
.ayat-grid ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.ayat-grid a {
  display: block;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--ink);
  font-size: 0.875rem;
}
.ayat-grid a:hover,
.ayat-grid a.is-current {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
  text-decoration: none;
}
.bm-list {
  display: grid;
  gap: 0.6rem;
}
.bm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 0.8rem 1rem;
}
.bm-item a {
  font-weight: 700;
}
.bm-item button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
}
.notfound {
  text-align: center;
  padding: 4rem 0;
}
.notfound strong {
  display: block;
  font: 800 clamp(4rem, 14vw, 8rem)/1 var(--f-head);
  color: var(--deep-2);
}

/* murottal */
.mu-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.mu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.mu-item {
  display: flex;
  align-items: stretch;
  border-radius: var(--r-m);
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.mu-item[hidden] {
  display: none;
}
.mu-item:hover {
  border-color: var(--gold);
}
.mu-item.is-active {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}
.mu-item__play {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}
.mu-item.is-active .num {
  background: var(--gold);
  color: #2b2006;
}
.mu-item.is-active small {
  color: #bfe0d9;
}
.mu-item.is-active .ar {
  color: var(--gold);
}
.mu-item__read {
  display: grid;
  place-items: center;
  width: 48px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}
.mu-item.is-active .mu-item__read {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.mu-item__read:hover {
  background: var(--tint);
  color: var(--link);
}

/* player */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--deep);
  color: #fff;
  border-top: 2px solid var(--gold);
  padding: 0.65rem 0 calc(0.65rem + env(safe-area-inset-bottom, 0px));
}
.player__wrap {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 2fr minmax(120px, 1fr);
  gap: 1rem;
  align-items: center;
}
.player__title {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}
.player__title b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__title small {
  color: #bfe0d9;
}
.player__ctrl {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.player__btns {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  align-items: center;
}
.player__btns button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
}
.player__btns button:hover {
  background: rgba(255, 255, 255, 0.12);
}
.player__btns .play {
  width: 48px;
  height: 48px;
  background: var(--gold);
  color: #2b2006;
  border: 0;
}
.player__seek {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.player__seek input {
  flex: 1;
  accent-color: var(--gold);
}
.player__side {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.player__side button {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}
.player__side button[aria-pressed="true"] {
  background: var(--gold);
  color: #2b2006;
  border-color: var(--gold);
}
body.has-player {
  padding-bottom: 120px;
}

/* footer */
.site-footer {
  margin-top: 3rem;
  background: var(--chrome);
  color: var(--on-deep-2);
}
.site-footer a {
  color: var(--on-deep-2);
}
.site-footer a:hover {
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}
.footer-grid h3 {
  font: 700 1.1rem/1.2 var(--f-head);
  color: #fff;
  margin: 0 0 0.8rem;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid li {
  margin: 0.4rem 0;
}
.footer-brand p {
  font-size: 0.9375rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.1rem 0;
  font-size: 0.8125rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}
.social__link:hover {
  background: #c9a24d;
  color: #0d3b2e !important;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: var(--deep);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  z-index: 400;
  font-size: 0.9rem;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* modal bagikan */
.modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(3, 14, 12, 0.6);
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
}
.modal__box {
  background: #fafaf7;
  color: #1c1c1a;
  width: min(100%, 900px);
  border-radius: 22px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.75rem;
  max-height: 96vh;
  overflow: auto;
}
[data-theme="dark"] .modal__box {
  background: #14231f;
  color: var(--ink);
}
.modal__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.modal__preview canvas {
  display: block;
  max-width: 100%;
  max-height: min(68vh, 640px);
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.modal__dim {
  color: #6a6a66;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .modal__dim {
  color: var(--muted);
}
.modal__panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal__head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.modal .icon-btn {
  color: inherit;
  border-color: rgba(128, 128, 128, 0.35);
}
.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.swatches {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.swatch {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  color: #fff;
  padding: 0;
}
.swatch[aria-checked="true"] {
  outline: 2px solid #0b8d7e;
  outline-offset: 2px;
}
.swatch--light {
  border-color: #d8d8d4;
  color: #111;
}
.swatch svg {
  opacity: 0;
}
.swatch[aria-checked="true"] svg {
  opacity: 1;
}
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.45rem 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(128, 128, 128, 0.4);
  background: transparent;
  line-height: 1.25;
  font-weight: 600;
  font-size: 0.85rem;
}
.seg button small {
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.72rem;
}
.seg button[aria-checked="true"] {
  background: #0a3d3a;
  color: #fff;
  border-color: #0a3d3a;
}
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 12px;
  padding: 3px;
}
.stepper button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: grid;
  place-items: center;
  color: inherit;
}
.stepper button:hover {
  background: rgba(128, 128, 128, 0.15);
}
.stepper output {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
}
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
}
.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch__ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c8c8c4;
  transition: background 0.2s;
  pointer-events: none;
}
.switch__ui::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.switch input:checked + .switch__ui {
  background: #0b8d7e;
}
.switch input:checked + .switch__ui::after {
  transform: translateX(22px);
}
.switch input:focus-visible + .switch__ui {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.modal .btn--ghost {
  color: inherit;
  border-color: rgba(128, 128, 128, 0.4);
  padding: 0.75rem 1rem;
}
.social-share {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.ss {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
}
.ss--wa {
  background: #12c44d;
}
.ss--x {
  background: #111;
}
.ss--tg {
  background: #1f9be0;
}
.ss--fb {
  background: #1877f2;
}
.ss--ig {
  background: linear-gradient(45deg, #f9a843, #e1306c 55%, #833ab4);
}
.ss:hover {
  filter: brightness(1.1);
}
body.modal-open {
  overflow: hidden;
}

/* mode baca */
html.reading .site-header,
html.reading .hero-band,
html.reading .site-footer,
html.reading .pager,
html.reading .ayat-grid,
html.reading .surah-kisah,
html.reading .tj-legend,
html.reading .tafsir {
  display: none;
}
html.reading .app-page {
  padding-top: 1rem;
  max-width: 880px;
}
html.reading .ayah {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding-inline: 0;
}
html.reading body {
  background: var(--card);
}
html.reading .toolbar {
  top: 0;
}
.reading-only {
  display: none;
}

/* responsif */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  html {
    scroll-padding-top: 72px;
  }
  .site-header .wrap {
    min-height: 60px;
    gap: 0.5rem;
  }
  .nav-toggle {
    display: inline-grid;
  }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(86vw, 340px);
    height: 100dvh;
    background: var(--card);
    border-left: 1px solid var(--line);
    padding: 5rem 1rem 1.5rem;
    transform: translateX(105%);
    transition: transform 0.25s;
    z-index: 70;
    overflow: auto;
    margin: 0;
  }
  .nav.is-open {
    transform: none;
  }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }
  .nav a {
    border-radius: var(--r-s);
    padding: 0.75rem 0.9rem;
  }
  .nav-close {
    display: inline-grid;
    position: absolute;
    top: 14px;
    right: 14px;
  }
  .header-actions {
    margin-left: auto;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .logo {
    height: 38px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar {
    top: 60px;
  }
  .player__wrap {
    grid-template-columns: 1fr auto;
    grid-template-areas: "t s" "c c";
  }
  .player__title {
    grid-area: t;
  }
  .player__ctrl {
    grid-area: c;
  }
  .player__side {
    grid-area: s;
  }
  .modal__box {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .modal__preview canvas {
    max-height: 46vh;
  }
}
@media (max-width: 640px) {
  .hero-band {
    padding: 1.4rem 0 1.5rem;
  }
  .card-grid,
  .mu-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-bottom {
    flex-direction: column;
  }
  .ayah {
    padding: 0.85rem 0.9rem 1rem;
  }
  .ayah__ar {
    font-size: min(var(--ar-size), 2.4rem);
    line-height: 2.2;
  }
  .ayah__tafsir-link span {
    display: none;
  }
  .ayah__tafsir-link {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .toolbar__row {
    gap: 0.4rem;
  }
  .qori select {
    max-width: 150px;
  }
  .player__btns button {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 380px) {
  .logo {
    height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .site-header,
  .site-footer,
  .toolbar,
  .player,
  .ayah__actions {
    display: none !important;
  }
}
.support-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--tint); /* Mengikuti warna latar belakang tema */
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 1.25rem 1.5rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
  transition: border-color 0.2s ease;
}

.support-banner:hover {
  border-color: var(--gold);
}

.support-banner__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-banner__content {
  flex: 1;
  min-width: 0;
}

.support-banner__title {
  font-family: var(--f-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--ink);
  line-height: 1.2;
}

.support-banner__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.support-banner__badge {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.support-banner__desc {
  font-size: 0.875rem;
  color: var(--muted);
}

.support-banner__action {
  flex: none;
}

/* Responsif untuk layar kecil (Mobile) */
@media (max-width: 768px) {
  .support-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .support-banner__meta {
    justify-content: center;
  }

  .support-banner__action {
    width: 100%;
  }

  .support-banner__action .btn {
    width: 100%;
  }
}
/* Daftar surat/ayat yang sering dicari (beranda) */
.pick-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.6rem;
}
.pick-list li {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line, rgba(127, 127, 127, 0.25));
  border-radius: 0.7rem;
}
.pick-list a {
  font-weight: 600;
}
.pick-list small {
  display: block;
  opacity: 0.75;
  margin-top: 0.15rem;
}

/* Halaman bacaan: Tahlil, Doa, Wirid, Maulid */
.bc-modes {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.bc-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 2.5rem;
  align-items: start;
}
.bc-wrap--single {
  grid-template-columns: minmax(0, 56rem);
  justify-content: center;
}
.bc-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.bc-item:last-child {
  border-bottom: 0;
}
.bc-h {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}
.bc-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.4rem;
}
.bc-bar .bc-h {
  flex: 1 1 9rem;
  min-width: 0;
  margin: 0;
}
.bc-bar .bc-h--empty {
  display: block;
}
.bc-num {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: var(--gold);
  font: 700 0.85rem var(--f-head);
  box-shadow: 0 0 0 2px var(--gold) inset;
  text-decoration: none !important;
  line-height: 1;
}
.bc-item--tools.is-last {
  box-shadow: inset 5px 0 0 var(--gold);
  padding-left: 1rem;
}
.bc-toc a .bc-tn {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--gold);
  font: 700 0.72rem var(--f-head);
  min-width: 0 !important;
}
.bc-n {
  color: var(--leaf);
  font: 700 0.85rem var(--f-head);
}
.bc-ar {
  font-family: var(--f-ar);
  font-size: var(--ar-size);
  line-height: 2.3;
  direction: rtl;
  text-align: right;
  margin: 0.4rem 0 0.6rem;
}
.bc-lat {
  color: var(--link);
  font-style: italic;
  font-size: 0.975rem;
  margin: 0 0 0.4rem;
}
.bc-id {
  margin: 0;
}
html[data-lat="0"] .bc-lat {
  display: none;
}
html[data-id="0"] .bc-id {
  display: none;
}
.bc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: center;
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.bc-rep {
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #5c4510;
  font-weight: 600;
}
.bc[data-mode="ringkas"] .bc-item:not([data-r]) {
  display: none;
}
.bc-toc {
  position: sticky;
  top: 90px;
}
.bc-toc h2 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.bc-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}
.bc-toc a {
  display: flex;
  gap: 0.6rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--r-s);
  color: var(--muted);
  font-size: 0.9rem;
}
.bc-toc a span {
  color: var(--leaf);
  font-weight: 700;
  min-width: 1.2rem;
}
.bc-toc a:hover {
  background: var(--tint);
  color: var(--ink);
  text-decoration: none;
}
.bc-links {
  padding-left: 1.1rem;
  line-height: 1.9;
}
@media (max-width: 900px) {
  .bc-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .bc-toc {
    position: static;
    order: -1;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    padding: 0.8rem 1rem;
  }
}

/* ===== v1.3: menu 8 item (menyusut lebih awal), filter ayat, pemutar, sumber bacaan ===== */
@media (max-width: 1180px) and (min-width: 981px) {
  .nav a {
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
  }
}
@media (max-width: 980px) {
  .site-header .wrap {
    min-height: 60px;
    gap: 0.5rem;
  }
  .nav-toggle {
    display: inline-grid;
  }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(86vw, 340px);
    height: 100dvh;
    background: var(--card);
    border-left: 1px solid var(--line);
    padding: 5rem 1rem 1.5rem;
    transform: translateX(105%);
    transition: transform 0.25s;
    z-index: 70;
    overflow: auto;
    margin: 0;
  }
  .nav.is-open {
    transform: none;
  }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }
  .nav a {
    border-radius: var(--r-s);
    padding: 0.75rem 0.9rem;
    font-size: 0.9375rem;
  }
  .nav-close {
    display: inline-grid;
    position: absolute;
    top: 14px;
    right: 14px;
  }
  .header-actions {
    margin-left: auto;
  }
}

/* filter rentang ayat */
.ayat-filter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
}
.ayat-filter__lbl {
  font-size: 0.9rem;
}
.ayat-filter__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  align-items: center;
}
.ayat-filter input[type="number"] {
  width: 5.4rem;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--bg);
  color: var(--ink);
  -moz-appearance: textfield;
}
.ayat-filter input[type="number"]::-webkit-outer-spin-button,
.ayat-filter input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ayat-filter small {
  color: var(--muted);
}
.ayat-filter__err {
  flex-basis: 100%;
  margin: 0;
  color: #b3261e;
  font-size: 0.875rem;
  font-weight: 600;
}
[data-theme="dark"] .ayat-filter__err {
  color: #ff9c94;
}
html.reading .ayat-filter {
  display: none;
}

/* tafsir ringkas di halaman rentang */
.tafsir-mini {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 0.2rem 1.1rem;
  margin: -0.4rem 0 1.1rem;
}
.tafsir-mini summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.7rem 0;
}
.tafsir-mini .tafsir__body p {
  line-height: 1.85;
}
html.reading .tafsir-mini {
  display: none;
}

/* pemutar: kecepatan + ulangi */
.player__side {
  align-items: center;
  flex-wrap: wrap;
}
.pl-speed select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.35rem 1.5rem 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right
    0.6rem center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.pl-speed select option {
  color: #0f2420;
  background: #fff;
}
.player {
  position: fixed;
}
.pl-pop {
  position: absolute;
  right: max(1rem, calc((100% - var(--wrap)) / 2));
  bottom: calc(100% + 8px);
  width: min(94vw, 25rem);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.75rem;
}
.pl-pop__row {
  display: grid;
  gap: 0.35rem;
}
.pl-pop__row b {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pl-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pl-seg button {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
}
.pl-seg button[aria-checked="true"] {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}
.pl-pop input[type="number"] {
  width: 6rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--bg);
  color: var(--ink);
}
.pl-pop__hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
@media (max-width: 900px) {
  .player__side {
    gap: 0.35rem;
  }
  .pl-pop {
    right: 1rem;
    left: 1rem;
    width: auto;
  }
}

/* sumber bacaan */
.bc-src {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  align-items: baseline;
}
.bc-src b {
  font-weight: 700;
  color: var(--ink);
}
.bc-src a {
  font-weight: 600;
}
.bc-src .bc-src__sep {
  opacity: 0.5;
}
.bc-src--warn {
  color: #8a5a00;
}

/* ===== v1.3 mobile: toolbar ringkas + pemutar gaya pil ===== */
/* desktop: pembungkus baru tidak mengubah tata letak lama */
.toolbar__chips,
.toolbar__play {
  display: contents;
}
.player__num,
.pl-speed__ico,
.pl-speed__val,
.pl-rep__ico {
  display: none;
}

@media (max-width: 900px) {
  /* toolbar: tidak lengket, 2 baris (chip bisa digeser, lalu qori + putar) */
  .toolbar {
    position: static;
    padding: 0.55rem 0.6rem;
    border-radius: 16px;
  }
  .toolbar__row {
    display: grid;
    gap: 0.5rem;
  }
  .toolbar__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -0.2rem;
    padding: 0.1rem 0.2rem;
  }
  .toolbar__chips::-webkit-scrollbar {
    display: none;
  }
  .toolbar__chips > * {
    flex: 0 0 auto;
  }
  .toolbar__chips .chip {
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    font-size: 0.8125rem;
  }
  .toolbar__play {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  .toolbar__play .qori {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.35rem;
  }
  .toolbar__play .qori__lbl {
    display: none;
  }
  .toolbar__play .qori select {
    width: 100%;
    max-width: none;
    min-width: 0;
    font-size: 0.8125rem;
    padding: 0.45rem 0.55rem;
    text-overflow: ellipsis;
  }
  .toolbar__play .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
  }
  .tj-legend {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
  }
  .ayat-filter {
    padding: 0.55rem 0.6rem;
    gap: 0.35rem;
    border-radius: 16px;
  }
  .ayat-filter__lbl {
    font-size: 0.8125rem;
    flex-basis: 100%;
  }
  .ayat-filter__row {
    flex-wrap: nowrap;
    width: 100%;
    gap: 0.4rem;
  }
  .ayat-filter input[type="number"] {
    width: 3.8rem;
    flex: 0 0 auto;
  }
  .ayat-filter small {
    display: none;
  }
  .ayat-filter .btn {
    white-space: nowrap;
  }

  /* pemutar: pil melayang di atas menu bawah */
  .player {
    left: 0.6rem;
    right: 0.6rem;
    width: auto;
    bottom: calc(84px + env(safe-area-inset-bottom));
    padding: 0.5rem 0.55rem 0.7rem;
    border: 0;
    border-radius: 26px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  }
  html.reading .player {
    bottom: calc(0.6rem + env(safe-area-inset-bottom));
  }
  .player .wrap.player__wrap {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    max-width: none;
  }
  .player__ctrl,
  .player__btns,
  .player__side,
  .player__seek {
    display: contents;
  }
  .player__num {
    order: 0;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin-right: 0.2rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
  }
  .player__num:empty {
    display: none;
  }
  .player__title {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    line-height: 1.25;
  }
  .player__title b {
    font-size: 0.95rem;
  }
  .player__title small {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pl-speed {
    order: 2;
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 36px;
    color: var(--gold);
  }
  .pl-speed__ico,
  .pl-rep__ico {
    display: block;
  }
  .pl-speed__val {
    display: none;
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
  }
  .player.is-fast .pl-speed__val {
    display: block;
  }
  .pl-speed select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    font-size: 16px;
  }
  .player__side button#pRepeat {
    order: 3;
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    display: grid;
    place-items: center;
  }
  .player__side button#pRepeat[aria-pressed="true"] {
    background: transparent;
    color: var(--gold);
  }
  .pl-rep__t {
    display: none;
  }
  #pRepeat[data-n]:not([data-n=""])::after {
    content: attr(data-n);
    position: absolute;
    top: -2px;
    right: -3px;
    min-width: 16px;
    padding: 0 3px;
    border-radius: 999px;
    background: var(--gold);
    color: #2b2006;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
  }
  #pPrev {
    order: 4;
  }
  #pPlay {
    order: 5;
  }
  #pNext {
    order: 6;
  }
  .player__btns button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
  }
  .player__btns button svg {
    width: 20px;
    height: 20px;
  }
  .player__btns .play {
    width: 44px;
    height: 44px;
    background: #fff;
    color: var(--deep);
    border: 0;
  }
  .player__btns .play svg {
    width: 22px;
    height: 22px;
  }
  #pClose {
    order: 7;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
  }
  /* bilah progres tipis di dasar pil; input transparan di atasnya untuk menggeser */
  .player__seek span {
    display: none;
  }
  .player__seek input {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 1px;
    width: auto;
    height: 18px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
  }
  .player::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 6px;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
  }
  .player::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: 6px;
    height: 3px;
    border-radius: 3px;
    background: var(--gold);
    width: calc((100% - 36px) * var(--p, 0));
  }
  .pl-pop {
    left: 0.6rem;
    right: 0.6rem;
    width: auto;
    bottom: calc(100% + 8px);
  }
  body.has-player {
    padding-bottom: 150px;
  }
  .toast {
    bottom: calc(160px + env(safe-area-inset-bottom));
  }
}

/* filter ayat: dropdown */
.ayat-filter select {
  padding: 0.42rem 1.6rem 0.42rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--bg);
  color: var(--ink);
  min-width: 7.2rem;
  max-width: 100%;
  font-size: 0.9rem;
}
@media (max-width: 900px) {
  .ayat-filter select {
    flex: 1 1 0;
    min-width: 0;
    font-size: 16px;
  }
  .ayat-filter .btn {
    flex: 0 0 auto;
  }
}

/* hasil pintasan ayat di kolom cari */
.ref-hit {
  margin: 0.6rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--card);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.ref-hit--err {
  color: #b3261e;
  font-weight: 600;
}
[data-theme="dark"] .ref-hit--err {
  color: #ff9c94;
}
.app-dl {
  margin-top: 20px;
}
.app-dl__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}
.app-dl__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.app-dl__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.app-dl__btn:hover,
.app-dl__btn:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  transform: translateY(-1px);
}
.app-dl__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.app-dl__btn.is-soon {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}
.app-dl__icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}
.app-dl__txt {
  display: flex;
  flex-direction: column;
}
.app-dl__txt small {
  font-size: 10px;
  letter-spacing: 0.02em;
  opacity: 0.8;
}
.app-dl__txt strong {
  font-size: 15px;
  font-weight: 700;
}
@media (max-width: 480px) {
  .app-dl__btn {
    flex: 1 1 100%;
  }
}
/* ===== v1.3.1: Cetak surat (hanya isi surat; dipakai di halaman dengan <body class="print-surah">) ===== */
.print-only {
  display: none;
}
@media print {
  @page {
    margin: 14mm 14mm 20mm;
  }
  /* selalu terang & tinta hitam di kertas, walau situs sedang mode gelap */
  html,
  html[data-theme="dark"] {
    --bg: #fff;
    --card: #fff;
    --ink: #000;
    --muted: #444;
    --line: #bbb;
    --tint: #fff;
    --link: #000;
    --deep: #000;
    --gold: #000;
    --tj-h: #8a9a96;
    --tj-n: #c26a00;
    --tj-p: #d98e00;
    --tj-o: #d0521a;
    --tj-m: #c62828;
    --tj-q: #1e78d2;
    --tj-f: #c2185b;
    --tj-c: #d6457f;
    --tj-a: #2e8b3a;
    --tj-u: #8c8a12;
    --tj-w: #7048c9;
    --tj-d: #4a5bc0;
    --tj-i: #0a97ac;
    --tj-g: #1f7a2c;
    color-scheme: light;
  }
  body.print-surah {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* buang semua yang bukan isi surat: header, hero, footer, menu bawah, player, toast, modal */
  body.print-surah > *:not(main) {
    display: none !important;
  }
  body.print-surah main > *:not(.reader__view):not(.print-only) {
    display: none !important;
  }
  body.print-surah main {
    display: block;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.print-surah .print-only {
    display: block;
  }
  /* kop (logo kecil + nama surat) di awal, footer tipis di setiap halaman */
  body.print-surah .print-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 3mm;
    margin-bottom: 5mm;
    border-bottom: 0.75pt solid #999;
    font: 600 9.5pt var(--f-body);
    color: #333;
  }
  body.print-surah .print-brand img {
    height: auto;
    width: 34mm;
  }
  /* isi */
  body.print-surah .reader__view {
    display: block;
    padding: 0;
    margin: 0;
  }
  body.print-surah .surah-head {
    background: none !important;
    color: #000;
    border: 0;
    border-bottom: 1.25pt solid #000;
    border-radius: 0;
    padding: 0 0 3mm;
    margin: 0 0 4mm;
  }
  body.print-surah .surah-head .ar {
    color: #000;
    font-size: 34pt;
    line-height: 1.5;
  }
  body.print-surah .surah-head h2 {
    color: #000;
    font-size: 15pt;
    margin: 0;
  }
  body.print-surah .surah-head p {
    color: #333;
    font-size: 10pt;
  }
  body.print-surah .bismillah {
    color: #000;
    margin: 0 0 4mm;
  }
  body.print-surah .ayah {
    background: none;
    border: 0;
    border-bottom: 0.5pt solid #ccc;
    border-radius: 0;
    box-shadow: none;
    padding: 2.5mm 0 3.5mm;
    margin: 0;
    break-inside: avoid;
    page-break-inside: avoid;
    content-visibility: visible;
    contain-intrinsic-size: none;
  }
  body.print-surah .ayah__bar {
    margin: 0;
    min-height: 0;
  }
  body.print-surah .ayah__actions {
    display: none !important;
  }
  body.print-surah .ayah__num {
    width: 8mm !important;
    height: 8mm !important;
    border-radius: 50% !important;
    background: none !important;
    background-image: none !important;
    color: #000 !important;
    box-shadow: none !important;
    border: 0.75pt solid #000;
    font: 700 8.5pt var(--f-head);
  }
  body.print-surah .ayah__ar {
    line-height: 2.2;
    margin: 0 0 2mm;
    color: #000;
  }
  body.print-surah .ayah__lat {
    color: #000;
    font-size: 10pt;
    margin: 0 0 1.5mm;
  }
  body.print-surah .ayah__id {
    color: #000;
    font-size: 10.5pt;
  }
  body.print-surah .tafsir-mini {
    display: none !important;
  }
  body.print-surah a {
    color: inherit;
    text-decoration: none;
  }
}
