@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Libre+Caslon+Display&display=swap");
:root {
  --bg: #121716;
  --surface: #1a211f;
  --elevated: #25302b;
  --line: #ffffff19;
  --text: #f0eee8;
  --muted: #a8b4ac;
  --accent: #b9ce89;
  --soft: #cbd5ce;
  --player: #121716f5;
}
.light {
  --bg: #f8f8f3;
  --surface: #fff;
  --elevated: #edf0e7;
  --line: #25382022;
  --text: #21322a;
  --muted: #657367;
  --accent: #4b6535;
  --soft: #455e4e;
  --player: #f8f8f3f5;
}
header {
  height: 100px;
  border-bottom: 0;
}
.brand {
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: 39px;
  font-weight: 400;
  gap: 12px;
}
.brand-mark {
  border: 0;
  font-size: 42px;
}
.brand small {
  font-family: "DM Mono", monospace;
  letter-spacing: 0.3px;
  font-size: 12px;
}
.header-right > span {
  font-size: 13px;
}
.app-nav {
  display: flex;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 35px;
  gap: 30px;
}
.app-nav button {
  background: none;
  border: 0;
  padding: 19px 0;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}
.app-nav button[aria-current] {
  color: var(--text);
  border-color: var(--accent);
}
main {
  padding-top: 0;
}
.page-heading {
  margin: 0 0 32px;
}
.page-heading h1 {
  font-family: "Libre Caslon Display", Georgia, serif;
  font-weight: 400;
  font-size: 52px;
  line-height: 1.03;
  letter-spacing: -1.5px;
  margin: 10px 0;
}
.eyebrow {
  font-family: "DM Mono", monospace;
  letter-spacing: 1px;
  font-size: 12px;
}
.reciters-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
}
.section-heading h2 {
  font-size: 15px;
  font-weight: 500;
}
.section-heading > span {
  font-size: 12px;
}
.reciters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding: 0;
}
.reciter {
  border-radius: 0;
  padding: 10px 13px;
  min-width: 0;
  flex: none;
  background: none;
  display: block;
  min-height: 42px;
}
.reciter .avatar,
.reciter small,
.reciter .check {
  display: none;
}
.reciter strong {
  font-size: 14px;
  font-weight: 400;
}
.reciter.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.light .reciter.active {
  background: var(--accent);
  color: white;
}
.reciter:hover {
  transform: none;
}
.listening-layout {
  margin-top: 32px;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 40px;
}
.session {
  border-radius: 0;
  background: none;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 0 0 25px;
}
.session-top {
  display: none;
}
.album {
  background: none;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--accent);
  aspect-ratio: 1.05;
}
.album-arabic {
  font-size: 43px;
}
.album-edition {
  color: var(--muted);
}
.album-bottom {
  font-size: 9px;
  white-space: normal;
  text-align: center;
}
.session-title h3 {
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}
.primary,
.share,
.search,
.surah.active {
  border-radius: 0;
}
.primary {
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
}
.session-options > button,
.session-options > label {
  font-size: 13px;
}
.quiet-note {
  font-family: "DM Mono", monospace;
  font-style: normal;
  font-size: 12px;
}
.library-top h2 {
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
}
.search {
  background: none;
}
.search input {
  font-size: 14px;
}
.surah-title {
  font-weight: 400;
  font-size: 17px;
}
.surah-meta {
  font-size: 13px;
}
.surah.active {
  background: var(--surface);
  box-shadow: inset 2px 0 var(--accent);
}
.surah-arabic {
  font-size: 27px;
}
.number {
  font-family: "DM Mono", monospace;
  font-size: 12px;
}
.list-head {
  font-family: "DM Mono", monospace;
  font-size: 11px;
}
.player {
  border-top: 1px solid var(--line);
}
#track-art {
  background: var(--elevated);
  color: var(--accent);
  border-color: var(--line);
  border-radius: 0;
}
.play {
  background: var(--accent);
}
.maker-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  margin-top: 45px;
}
.maker-footer span {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.progress-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  padding: 25px 0;
  margin: 25px 0;
}
.progress-summary > div {
  padding: 0 20px;
  border-right: 1px solid var(--line);
}
.progress-summary > div:first-child {
  padding-left: 0;
}
.progress-summary > div:last-child {
  border: 0;
}
.progress-summary strong {
  display: block;
  font-family: "Libre Caslon Display", Georgia, serif;
  font-weight: 400;
  font-size: 46px;
  line-height: 1;
}
.progress-summary strong small {
  font-family: "DM Mono", monospace;
  font-size: 13px;
  color: var(--muted);
}
.progress-summary span {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 12px;
}
.save-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.save-note p {
  max-width: 550px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.save-note > div {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
#memorise-view button,
.file-button,
.mushaf-toolbar button,
.page-turner button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 11px 14px;
  font-size: 14px;
}
.file-button {
  cursor: pointer;
  position: relative;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.hifdh-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 35px;
}
.surah-notebook {
  max-height: 75vh;
  overflow: auto;
  position: sticky;
  top: 20px;
  align-self: start;
  padding-right: 15px;
  border-right: 1px solid var(--line);
}
.field-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.field-label input,
.field-label select,
.mushaf-toolbar input,
.mushaf-toolbar select {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  margin: 8px 0 15px;
  font: inherit;
  font-size: 16px;
}
#memorise-view .notebook-row {
  display: grid;
  grid-template-columns: 25px 1fr 40px;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 17px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
}
.notebook-row > span {
  font-size: 12px;
  color: var(--muted);
}
.notebook-row strong {
  font-size: 14px;
  font-weight: 500;
}
.notebook-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.notebook-row b {
  font-size: 12px;
  text-align: right;
  font-weight: 400;
  color: var(--accent);
}
.notebook-row progress {
  grid-column: 2/-1;
  height: 3px;
}
.notebook-row.selected {
  background: var(--surface) !important;
}
.ayah-notebook h2 {
  font-family: "Libre Caslon Display", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.ayah-notebook h2 span {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 30px;
}
.hifdh-count {
  font-size: 14px;
  color: var(--muted);
}
progress {
  width: 100%;
  height: 5px;
  accent-color: var(--accent);
  border: 0;
  background: var(--elevated);
}
progress::-webkit-progress-bar {
  background: var(--elevated);
}
progress::-webkit-progress-value {
  background: var(--accent);
}
.hifdh-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.ayah-row {
  display: grid;
  grid-template-columns: 22px 25px 1fr;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  cursor: pointer;
}
.ayah-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.ayah-label {
  font-family: "DM Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}
.ayah-row [lang="ar"] {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 28px;
  line-height: 2.1;
}
.ayah-row:has(input:checked) {
  background: var(--surface);
}
.mobile-surah-label {
  display: none;
}
.mushaf-toolbar {
  display: flex;
  align-items: end;
  gap: 15px;
  flex-wrap: wrap;
  border-block: 1px solid var(--line);
  padding: 20px 0;
}
.mushaf-toolbar label {
  font-size: 13px;
  color: var(--muted);
}
.mushaf-toolbar input,
.mushaf-toolbar select {
  margin-bottom: 0;
}
.mushaf-toolbar input[type="number"] {
  width: 88px;
}
.mushaf-toolbar .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
}
.mushaf-toolbar input[type="checkbox"] {
  width: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.page-turner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 680px;
  margin: 22px auto;
  font-size: 14px;
}
.mushaf-scroll {
  overflow: auto;
  max-width: 720px;
  margin: auto;
  background: #fff;
}
.mushaf-scroll img {
  display: block;
  width: 100%;
  max-width: 650px;
  margin: auto;
  height: auto;
}
.mushaf-scroll.zoomed img {
  width: 950px;
  max-width: none;
}
.reader-notes {
  max-width: 720px;
  margin: 25px auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.reader-notes summary {
  cursor: pointer;
  color: var(--text);
}
#mushaf-status {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 800px) {
  header {
    height: 85px;
  }
  .brand {
    font-size: 33px;
  }
  .brand small {
    font-size: 11px;
  }
  .app-nav {
    gap: 0;
    justify-content: space-between;
    margin-bottom: 28px;
  }
  .app-nav button {
    font-size: 12px;
    padding: 17px 0;
  }
  .page-heading h1 {
    font-size: 41px;
  }
  .page-heading .eyebrow {
    font-size: 10px;
  }
  .reciters {
    flex-wrap: nowrap;
    overflow: auto;
    padding-bottom: 12px;
    gap: 7px;
  }
  .reciter {
    flex: 0 0 auto;
    padding: 10px 12px;
    min-width: 0;
  }
  .reciter strong {
    font-size: 14px;
  }
  .listening-layout {
    display: block;
    margin-top: 25px;
  }
  .session {
    display: none;
  }
  .surah-meta {
    font-size: 12px;
  }
  .surah-title {
    font-size: 16px;
  }
  .library-top h2 {
    font-size: 28px;
  }
  .hifdh-layout {
    display: block;
  }
  .surah-notebook {
    display: none;
  }
  .mobile-surah-label {
    display: block;
  }
  .progress-summary {
    padding: 20px 0;
    gap: 8px;
  }
  .progress-summary > div {
    padding: 0 8px;
  }
  .progress-summary strong {
    font-size: 34px;
  }
  .progress-summary strong small {
    font-size: 10px;
  }
  .progress-summary span {
    font-size: 12px;
    line-height: 1.5;
  }
  .save-note {
    display: block;
  }
  .save-note > div {
    flex-wrap: wrap;
  }
  .save-note p {
    font-size: 12px;
  }
  .ayah-notebook h2 {
    font-size: 28px;
  }
  .ayah-row {
    grid-template-columns: 20px 20px 1fr;
    gap: 10px;
    padding: 18px 0;
  }
  .ayah-row [lang="ar"] {
    font-size: 25px;
    line-height: 2;
  }
  .hifdh-actions button {
    font-size: 12px !important;
    padding: 10px !important;
  }
  .mushaf-toolbar {
    gap: 10px;
  }
  .mushaf-toolbar select {
    max-width: 195px;
  }
  .page-turner {
    font-size: 12px;
  }
  .page-turner button {
    font-size: 12px;
    padding: 10px;
  }
  .mushaf-scroll {
    margin-inline: -10px;
  }
  .header-right .icon-btn {
    font-size: 24px;
  }
  .maker-footer {
    margin-top: 30px;
  }
  .mobile-options button {
    border-radius: 0;
  }
  .mushaf-toolbar .check-label {
    font-size: 13px;
  }
  .player-track h3 {
    font-size: 14px;
  }
  .player-track p {
    font-size: 12px;
  }
  main {
    padding-bottom: 160px;
  }
}

/* Independent sections, rather than numbered steps. */
.app-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:6px;border:1px solid var(--line);background:var(--surface)}
.app-nav button{font-family:'DM Sans',sans-serif;font-size:16px;font-weight:500;padding:14px 10px;border:0;background:transparent;color:var(--muted)}
.app-nav button:hover{background:var(--elevated);color:var(--text)}
.app-nav button[aria-current]{background:var(--accent);color:var(--bg)}
.light .app-nav button[aria-current]{color:#fff}
@media(max-width:800px){.app-nav{gap:4px;padding:4px}.app-nav button{font-size:14px;padding:13px 5px}}

/* Avoid excessive upscaling of the sharper source. */
.mushaf-scroll.zoomed img{width:645px;min-width:100%;max-width:none}
