:root{
  --bg:#08110f;
  --bg-soft:#10201d;
  --panel:rgba(12, 25, 22, 0.9);
  --panel-strong:#132a25;
  --line:rgba(202, 173, 111, 0.22);
  --line-strong:rgba(240, 207, 138, 0.45);
  --text:#f6f2e8;
  --muted:#b7b3a8;
  --accent:#e8c77a;
  --accent-strong:#f4dba5;
  --shadow:0 24px 60px rgba(0, 0, 0, 0.38);
  --day-bg:#f8f4ed;
  --day-panel:#fffaf1;
  --day-text:#201a15;
  --day-muted:#6e655c;
  --day-line:rgba(178, 142, 83, 0.2);
  --day-line-strong:rgba(178, 142, 83, 0.42);
  --day-accent:#b0843f;
  --day-accent-soft:#f2e2bc;
  --day-shadow:0 22px 48px rgba(120, 91, 44, 0.12);
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  font-family:"IBM Plex Sans Arabic", Georgia, "Times New Roman", serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(232, 199, 122, 0.15), transparent 32%),
    radial-gradient(circle at top right, rgba(41, 86, 75, 0.35), transparent 28%),
    linear-gradient(160deg, #06100f 0%, #0b1614 48%, #07100f 100%);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size:26px 26px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.08));
}

body.day{
  color:var(--day-text);
  background:
    radial-gradient(circle at top left, rgba(214, 181, 109, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(214, 181, 109, 0.1), transparent 24%),
    linear-gradient(160deg, #fcf8f0 0%, #efe5d3 48%, #fbf8f2 100%);
}

body.day::before{
  background-image:
    linear-gradient(rgba(124,96,54,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,96,54,0.04) 1px, transparent 1px);
}

body.modal-open{
  overflow:hidden;
}

.container{
  width:min(1120px, calc(100% - 32px));
  margin:0 auto;
  padding:32px 0 48px;
}

.app-footer{
  padding:0 0 28px;
}

.app-footer-inner{
  width:min(1120px, calc(100% - 32px));
  margin:0 auto;
  padding:18px 20px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(255,255,255,0.03);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.app-footer-copy{
  margin:0;
  color:var(--muted);
  line-height:1.7;
  font-size:14px;
}

.app-footer-btn{
  white-space:nowrap;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}

.loading-spinner{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:200px;
}

.spinner{
  width:48px;
  height:48px;
  border:4px solid rgba(232, 199, 122, 0.2);
  border-top:4px solid var(--accent);
  border-radius:50%;
  animation:spin 1s linear infinite;
}

@keyframes spin{
  0%{transform:rotate(0deg);}
  100%{transform:rotate(360deg);}
}

.loading-text{
  margin-left:16px;
  color:var(--accent);
  font-size:16px;
}

.hero{
  position:relative;
  overflow:hidden;
  padding:32px;
  margin-bottom:24px;
  border:1px solid var(--line);
  border-radius:28px;
  background:
    radial-gradient(circle at 85% 15%, rgba(232, 199, 122, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(16, 32, 29, 0.94), rgba(8, 17, 15, 0.92));
  box-shadow:var(--shadow);
}

body.day .hero,
body.day .detail-panel,
body.day .surah,
body.day .hero-card,
body.day .player-banner,
body.day .ayat,
body.day .bismillah-card,
body.day .bookmark-panel,
body.day .bookmark-card,
body.day .tajweed-guide{
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248, 242, 230, 0.95));
  color:var(--day-text);
  border-color:var(--day-line);
  box-shadow:var(--day-shadow);
}

body.day .hero{
  background:
    radial-gradient(circle at 85% 15%, rgba(214, 181, 109, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(247, 240, 226, 0.98));
}

body.day .hero-chip,
body.day .section-tag,
body.day .detail-pill,
body.day .surah-stat{
  color:#7b5929;
}

body.day .hero p,
body.day .hero-card-copy,
body.day .section-copy,
body.day .detail-subtitle,
body.day .player-status-label,
body.day .surah-meta,
body.day .arti,
body.day .status-box,
body.day .empty-state{
  color:var(--day-muted);
}

body.day .search-box input,
body.day button,
body.day .status-box{
  background:rgba(255,255,255,0.85);
  color:var(--day-text);
  border-color:var(--day-line);
}

body.day .app-footer-inner{
  background:rgba(255,255,255,0.72);
  border-color:var(--day-line);
  box-shadow:var(--day-shadow);
}

body.day .app-footer-copy{
  color:var(--day-muted);
}

body.day .surah-number{
  background:rgba(176, 132, 63, 0.08);
  color:var(--day-accent);
  border-color:rgba(176, 132, 63, 0.18);
}

body.day .surah-meta,
body.day .bookmark-meta,
body.day .tajweed-item-reading,
body.day .tajweed-legend-copy{
  color:var(--day-muted);
}

body.day .surah-arabic,
body.day .detail-title,
body.day .bookmark-title,
body.day .tajweed-item-name{
  color:#6f4b17;
}

body.day .player-status-text,
body.day .bookmark-arti{
  color:#52463c;
}

body.day .tajweed-item-arabic{
  background:rgba(176, 132, 63, 0.09);
  color:#7a5522;
}

body.day .tajweed-item-reading{
  color:var(--day-muted);
}

body.day .arab-tajweed{
  color:#2a241d;
}

body.day .empty-state{
  background:rgba(255,255,255,0.65);
  border-color:rgba(176, 132, 63, 0.2);
}

body.day button:hover{
  border-color:var(--day-line-strong);
  background:rgba(176, 132, 63, 0.08);
}

body.day .icon-btn,
body.day .icon-btn:hover,
body.day .icon-btn:focus-visible,
body.day .share-ayat-btn,
body.day .share-ayat-btn:hover,
body.day .bookmark-btn,
body.day .bookmark-btn:hover,
body.day .play-btn,
body.day .play-btn:hover{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}

body.day button.primary{
  background:linear-gradient(135deg, #c89d57, #edd6a6);
  color:#2b2115;
}

body.day button.primary:hover{
  background:linear-gradient(135deg, #d4aa63, #f1ddaf);
}

body.day .search-box input{
  background:rgba(255,255,255,0.92);
}

body.day .search-clear-btn{
  background:rgba(255,255,255,0.92);
  color:var(--day-accent);
  border-color:var(--day-line);
}

body.day .search-clear-btn:hover{
  background:rgba(176, 132, 63, 0.08);
}

body.day .search-box::before{
  border-color:rgba(176, 132, 63, 0.8);
}

body.day .search-box::after{
  background:rgba(176, 132, 63, 0.8);
}

body.day .quick-tools-hint{
  color:var(--day-muted);
}

body.day kbd{
  background:rgba(176, 132, 63, 0.08);
  color:var(--day-accent);
  border-color:rgba(176, 132, 63, 0.16);
}

body.day .surah:hover,
body.day .ayat.is-playing,
body.day .surah.is-selected{
  border-color:var(--day-line-strong);
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243, 232, 210, 0.98));
}

body.day .share-panel{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246, 237, 222, 0.98));
  border-color:var(--day-line-strong);
}

body.day .reading-tools{
  background:rgba(255,255,255,0.72);
  border-color:var(--day-line);
}

body.day .reading-tools-text{
  color:#5c5146;
}

body.day .jump-ayah-input{
  background:rgba(255,255,255,0.9);
  color:var(--day-text);
  border-color:var(--day-line);
}

body.day .detail-fab-btn{
  background:rgba(255,255,255,0.94);
  color:#7a5522;
  border-color:var(--day-line);
  box-shadow:var(--day-shadow);
}

body.day .app-toast{
  background:rgba(255,255,255,0.96);
  color:var(--day-text);
  border-color:var(--day-line);
}

.hero-grid{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0, 1.45fr) minmax(280px, 0.95fr);
  gap:24px;
  align-items:end;
}

.hero::after{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  right:-70px;
  top:-80px;
  border-radius:50%;
  border:1px solid rgba(240, 219, 165, 0.14);
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  margin-bottom:18px;
  border:1px solid rgba(240, 219, 165, 0.16);
  border-radius:999px;
  background:rgba(255,255,255,0.03);
  color:var(--accent-strong);
  font-size:12px;
  letter-spacing:0.18em;
  text-transform:uppercase;
}

.hero h1{
  margin:0;
  max-width:650px;
  font-size:clamp(34px, 5vw, 58px);
  line-height:1.04;
  font-weight:700;
}

.hero p{
  margin:16px 0 0;
  max-width:650px;
  color:var(--muted);
  font-size:16px;
  line-height:1.75;
}

.hero-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.hero-chip{
  padding:10px 14px;
  border:1px solid rgba(240, 219, 165, 0.16);
  border-radius:999px;
  background:rgba(255,255,255,0.03);
  color:#dfd7c8;
  font-size:13px;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.hero-stats{
  display:grid;
  gap:14px;
}

.hero-card{
  padding:18px;
  border:1px solid rgba(240, 219, 165, 0.14);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  backdrop-filter:blur(10px);
}

.hero-card-label{
  margin-bottom:10px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:0.12em;
  text-transform:uppercase;
}

.hero-card-value{
  font-size:40px;
  line-height:1;
}

.hero-card-value-small{
  font-size:28px;
}

.hero-card-copy{
  margin-top:10px;
  color:#d8d2c4;
  line-height:1.6;
  font-size:14px;
}

.search-box{
  position:relative;
  margin-top:28px;
}

.search-box input{
  width:100%;
  padding:18px 56px 18px 58px;
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(6, 13, 12, 0.72);
  color:var(--text);
  font-size:16px;
  outline:none;
  transition:border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.search-box input::placeholder{
  color:#8f9189;
}

.search-box::before{
  content:"";
  position:absolute;
  left:22px;
  top:50%;
  width:18px;
  height:18px;
  border:2px solid rgba(232, 199, 122, 0.7);
  border-radius:50%;
  transform:translateY(-58%);
}

.search-box::after{
  content:"";
  position:absolute;
  left:36px;
  top:54%;
  width:10px;
  height:2px;
  border-radius:999px;
  background:rgba(232, 199, 122, 0.7);
  transform:rotate(45deg);
  transform-origin:left center;
}

.search-box input:focus{
  border-color:var(--line-strong);
  box-shadow:0 0 0 5px rgba(232, 199, 122, 0.08);
  transform:translateY(-1px);
}

.search-clear-btn{
  position:absolute;
  right:14px;
  top:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  min-height:34px;
  padding:0;
  border:1px solid rgba(240, 219, 165, 0.14);
  border-radius:50%;
  background:rgba(255,255,255,0.06);
  color:var(--accent-strong);
  transform:translateY(-50%);
}

.search-clear-btn:hover{
  background:rgba(232, 199, 122, 0.12);
}

.quick-tools{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.quick-tool-btn{
  white-space:nowrap;
}

.quick-tools-hint{
  margin:12px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}

kbd{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border:1px solid rgba(240, 219, 165, 0.16);
  border-radius:8px;
  background:rgba(255,255,255,0.05);
  color:var(--accent-strong);
  font:inherit;
  font-size:12px;
}

.stack{
  display:grid;
  gap:24px;
}

.list-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin:0 0 18px;
}

.section-title{
  margin:0;
  font-size:26px;
}

.section-copy{
  margin-top:6px;
  color:var(--muted);
  line-height:1.6;
}

.section-tag{
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,0.03);
  color:var(--accent-strong);
  font-size:13px;
  white-space:nowrap;
}

.surah{
  position:relative;
  overflow:hidden;
  width:100%;
  padding:18px;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(18, 36, 32, 0.94), rgba(10, 22, 19, 0.96));
  box-shadow:0 20px 40px rgba(0, 0, 0, 0.18);
  cursor:pointer;
  text-align:left;
  transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.surah::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(232, 199, 122, 0.08), transparent 45%);
  opacity:0;
  transition:opacity .22s ease;
}

.surah:hover{
  transform:translateY(-4px);
  border-color:var(--line-strong);
  box-shadow:0 24px 45px rgba(0, 0, 0, 0.28);
}

.surah:hover::before,
.surah.is-selected::before{
  opacity:1;
}

.surah.is-selected{
  border-color:var(--line-strong);
  background:linear-gradient(180deg, rgba(28, 54, 48, 0.98), rgba(11, 24, 21, 0.98));
}

.surah:focus-visible,
button:focus-visible,
.search-box input:focus-visible{
  outline:2px solid var(--accent-strong);
  outline-offset:3px;
}

.surah-number{
  display:flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  margin-bottom:18px;
  border:1px solid rgba(240, 219, 165, 0.22);
  border-radius:16px;
  background:rgba(255,255,255,0.03);
  color:var(--accent);
  font-size:15px;
}

.surah-name{
  margin:0 0 6px;
  font-size:23px;
  line-height:1.2;
}

.surah-arabic{
  color:var(--accent-strong);
  font-size:18px;
  text-align:right;
}

.surah-meta{
  margin-top:10px;
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

.surah-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.surah-stat{
  padding:6px 10px;
  border:1px solid rgba(240, 219, 165, 0.12);
  border-radius:999px;
  background:rgba(255,255,255,0.03);
  color:#ddd4c3;
  font-size:12px;
}

.surah-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
}

.surah-badge{
  padding:7px 10px;
  border-radius:999px;
  background:rgba(232, 199, 122, 0.12);
  color:var(--accent-strong);
  font-size:12px;
}

.surah-arrow{
  color:var(--accent-strong);
  font-size:13px;
  letter-spacing:0.08em;
  text-transform:uppercase;
}

body.day .surah-arrow{
  color:var(--day-accent);
}

.detail-panel{
  padding:24px;
  border:1px solid var(--line);
  border-radius:28px;
  background:linear-gradient(180deg, rgba(13, 26, 23, 0.98), rgba(8, 18, 16, 0.96));
  box-shadow:var(--shadow);
}

.bookmark-panel{
  padding:24px;
  border:1px solid var(--line);
  border-radius:28px;
  background:linear-gradient(180deg, rgba(13, 26, 23, 0.98), rgba(8, 18, 16, 0.96));
  box-shadow:var(--shadow);
}

.bookmark-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:16px;
}

.bookmark-card{
  padding:18px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(255,255,255,0.03);
}

.bookmark-top,
.bookmark-actions{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.bookmark-title{
  font-size:20px;
  font-weight:700;
}

.bookmark-meta{
  margin-top:4px;
  color:var(--muted);
  font-size:14px;
}

.bookmark-arab{
  margin:16px 0 10px;
  text-align:right;
  direction:rtl;
  unicode-bidi:plaintext;
  font-family:"Amiri Quran", "Traditional Arabic", serif;
  font-size:28px;
  line-height:1.9;
  letter-spacing:0;
  overflow-wrap:anywhere;
}

.bookmark-arab-text{
  font:inherit;
}

.bookmark-arab .ayah-mark{
  margin-inline-start:8px;
  font-size:.78em;
}

.bookmark-arti{
  color:#d4cec1;
  line-height:1.7;
  font-size:14px;
}

.detail-shell{
  display:grid;
  gap:16px;
}

.detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.detail-title{
  margin:0;
  font-size:30px;
}

.detail-subtitle{
  margin-top:8px;
  color:var(--muted);
  line-height:1.6;
}

.detail-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.detail-pill{
  padding:10px 14px;
  border:1px solid rgba(240, 219, 165, 0.16);
  border-radius:999px;
  background:rgba(255,255,255,0.03);
  color:#ddd4c3;
  font-size:13px;
}

.top-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.bismillah-card{
  padding:18px 20px;
  border:1px solid rgba(240, 219, 165, 0.14);
  border-radius:20px;
  text-align:center;
  font-size:clamp(32px, 4vw, 42px);
  line-height:2;
  color:#ffffff;
  background:rgba(255,255,255,0.03);
}

.detail-fab{
  position:fixed;
  right:18px;
  bottom:20px;
  z-index:900;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.detail-fab-btn{
  width:48px;
  height:48px;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(240, 219, 165, 0.18);
  background:rgba(8, 17, 15, 0.92);
  color:var(--accent-strong);
  box-shadow:0 18px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter:blur(10px);
}

.detail-fab-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
}

.detail-fab-btn:hover{
  background:rgba(21, 39, 34, 0.96);
}

.player-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border:1px solid rgba(240, 219, 165, 0.14);
  border-radius:18px;
  background:rgba(255,255,255,0.03);
}

.player-status-label{
  margin-bottom:4px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:0.12em;
  text-transform:uppercase;
}

.player-status-text{
  color:#ebe1cf;
  line-height:1.55;
}

.reading-tools{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px;
  border:1px solid rgba(240, 219, 165, 0.14);
  border-radius:20px;
  background:rgba(255,255,255,0.03);
}

.reading-tools-title{
  font-size:18px;
  font-weight:700;
}

.reading-tools-text{
  margin-top:4px;
  color:var(--muted);
  line-height:1.55;
  font-size:14px;
}

.reading-tools-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

.reading-tools-btn{
  white-space:nowrap;
}

.jump-ayah-box{
  display:flex;
  align-items:center;
  gap:10px;
}

.jump-ayah-input{
  width:130px;
  padding:11px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(6, 13, 12, 0.6);
  color:var(--text);
  font:inherit;
  outline:none;
}

.jump-ayah-input:focus{
  border-color:var(--line-strong);
  box-shadow:0 0 0 4px rgba(232, 199, 122, 0.08);
}

.jump-ayah-input::-webkit-outer-spin-button,
.jump-ayah-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

.tajweed-guide{
  padding:18px;
  border:1px solid rgba(240, 219, 165, 0.14);
  border-radius:20px;
  background:rgba(255,255,255,0.03);
}

.tajweed-guide-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.tajweed-legend-title{
  margin:0;
  font-size:20px;
}

.tajweed-legend-copy{
  margin:6px 0 0;
  color:var(--muted);
  line-height:1.6;
}

.tajweed-toggle-btn{
  white-space:nowrap;
}

.tajweed-guide-panel{
  margin-top:14px;
}

.tajweed-legend-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.tajweed-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(240, 219, 165, 0.1);
  border-radius:16px;
  background:rgba(255,255,255,0.025);
}

.tajweed-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:74px;
  padding:7px 10px;
  border-radius:999px;
  color:#111;
  font-size:12px;
  font-weight:700;
}

.tajweed-item-name{
  color:#ebe1cf;
  font-size:14px;
  font-weight:700;
}

.tajweed-item-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.tajweed-item-arabic{
  display:inline-flex;
  align-items:center;
  width:fit-content;
  max-width:100%;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(232, 199, 122, 0.08);
  color:var(--accent-strong);
  font-family:"Amiri Quran", "Traditional Arabic", serif;
  font-size:15px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tajweed-item-reading{
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

button{
  padding:12px 18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,0.03);
  color:var(--text);
  font:inherit;
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

button:hover{
  transform:translateY(-1px);
  border-color:var(--line-strong);
  background:rgba(232, 199, 122, 0.12);
}

button.primary{
  background:linear-gradient(135deg, #e8c77a, #f3deb0);
  border-color:transparent;
  color:#1d1710;
  font-weight:700;
}

button.primary:hover{
  background:linear-gradient(135deg, #f1d796, #f7e6be);
}

button.secondary,
.theme-toggle{
  background:rgba(255,255,255,0.06);
}

.theme-toggle{
  width:auto;
  height:auto;
  min-width:0;
  min-height:0;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
}

.theme-toggle .icon-btn-icon{
  width:24px;
  height:24px;
}

body .theme-toggle:hover,
body .theme-toggle:focus-visible{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}

body.day .theme-toggle{
  color:var(--day-accent);
}

body.day .theme-toggle:hover{
  background:transparent;
  border-color:transparent;
}

button.is-active{
  border-color:var(--line-strong);
  background:rgba(232, 199, 122, 0.16);
  color:var(--accent-strong);
}

button:disabled{
  opacity:0.55;
  cursor:not-allowed;
  transform:none;
}

.ayat-list{
  display:grid;
  gap:16px;
}

.ayat{
  padding:20px;
  border:1px solid var(--line);
  border-radius:22px;
  background:rgba(255,255,255,0.025);
  transition:border-color .2s ease, background .2s ease, transform .2s ease;
  overflow:hidden;
}

.ayat.is-playing{
  border-color:var(--line-strong);
  background:rgba(232, 199, 122, 0.06);
  transform:translateY(-2px);
}

.ayat.is-focused{
  border-color:#f4dba5;
  box-shadow:0 0 0 4px rgba(244, 219, 165, 0.12);
}

.arab{
  margin-bottom:16px;
  text-align:right;
  font-family:"Amiri Quran", "Traditional Arabic", serif;
  font-size:clamp(34px, 4.2vw, 46px);
  line-height:2.05;
  letter-spacing:0;
  overflow-wrap:anywhere;
}

.arab-tajweed{
  direction:rtl;
  unicode-bidi:plaintext;
}

.arab-tajweed tajweed,
.arab-tajweed .tajweed{
  font:inherit;
}

.ayah-mark{
  display:inline-flex;
  align-items:center;
  margin-inline-start:10px;
  color:var(--accent-strong);
  font-family:"Amiri Quran", "Traditional Arabic", serif;
  font-size:.8em;
  line-height:1;
  white-space:nowrap;
  vertical-align:middle;
  direction:rtl;
  unicode-bidi:isolate;
}

.arab-tajweed tajweed.ham_wasl,
.arab-tajweed .ham_wasl{color:#c7c7c7;background:transparent;}

.tajweed-chip.ham_wasl{color:#1a1a1a;background:#c7c7c7;}

.arab-tajweed tajweed.slnt,
.arab-tajweed .slnt{color:#9fb3c8;background:transparent;}

.tajweed-chip.slnt{color:#111;background:#9fb3c8;}

.arab-tajweed tajweed.ghn,
.arab-tajweed .ghn{color:#f5a524;background:transparent;}

.tajweed-chip.ghn{color:#111;background:#f5a524;}

.arab-tajweed tajweed.idgh_ghn,
.arab-tajweed .idgh_ghn{color:#8ad06d;background:transparent;}

.tajweed-chip.idgh_ghn{color:#111;background:#8ad06d;}

.arab-tajweed tajweed.ikhf,
.arab-tajweed .ikhf{color:#63c0df;background:transparent;}

.tajweed-chip.ikhf{color:#111;background:#63c0df;}

.arab-tajweed tajweed.iqlb,
.arab-tajweed .iqlb{color:#d47474;background:transparent;}

.tajweed-chip.iqlb{color:#111;background:#d47474;}

.arab-tajweed tajweed.idgh_w_ghn,
.arab-tajweed .idgh_w_ghn{color:#b58cff;background:transparent;}

.tajweed-chip.idgh_w_ghn{color:#111;background:#b58cff;}

.arab-tajweed tajweed.qlq,
.arab-tajweed .qlq{color:#f28f45;background:transparent;}

.tajweed-chip.qlq{color:#111;background:#f28f45;}

.arab-tajweed tajweed.madda_normal,
.arab-tajweed .madda_normal{color:#68d0ae;background:transparent;}

.tajweed-chip.madda_normal{color:#111;background:#68d0ae;}

.arab-tajweed tajweed.madda_permissible,
.arab-tajweed .madda_permissible,
.arab-tajweed tajweed.madda_necessary,
.arab-tajweed .madda_necessary,
.arab-tajweed tajweed.madda_obligatory,
.arab-tajweed .madda_obligatory{color:#f0d66f;background:transparent;}

.tajweed-chip.madda_permissible,
.tajweed-chip.madda_necessary,
.tajweed-chip.madda_obligatory{color:#111;background:#f0d66f;}

.arab-tajweed tajweed.qalaqah,
.arab-tajweed .qalaqah{color:#f28f45;background:transparent;}

.tajweed-chip.qalaqah{color:#111;background:#f28f45;}

.arti{
  color:#d4cec1;
  font-size:15px;
  line-height:1.75;
  overflow-wrap:anywhere;
}

.progress{
  height:6px;
  margin-top:18px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  overflow:hidden;
}

.progress-bar{
  height:100%;
  width:0;
  border-radius:inherit;
  background:linear-gradient(90deg, #d7b160, #f4deb0);
  transition:width .12s linear;
}

.ayat-buttons{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:14px;
  margin-top:14px;
}

.play-btn,
.share-ayat-btn,
.bookmark-btn{
  width:auto;
}

.ayat-buttons button{
  min-height:auto;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
  width:auto;
  min-width:0;
  min-height:0;
}

.icon-btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  line-height:1;
}

.icon-btn-icon svg{
  display:block;
  width:100%;
  height:100%;
}

.ayat-buttons .icon-btn:hover{
  transform:translateY(-1px);
  border:none;
  background:transparent;
  color:var(--accent-strong);
}

.ayat-buttons .icon-btn:focus-visible{
  outline:2px solid rgba(240, 219, 165, 0.45);
  outline-offset:6px;
  border-radius:0;
}

.share-ayat-btn{
  background:transparent;
  color:#fff;
  border:none;
  font-weight:400;
}

.bookmark-btn.is-bookmarked{
  border:none;
  background:transparent;
  color:var(--accent-strong);
}

.share-modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1000;
  opacity:0;
  visibility:hidden;
  transition:opacity .25s ease, visibility .25s ease;
}

.share-modal.open{
  opacity:1;
  visibility:visible;
}

.share-backdrop{
  position:absolute;
  inset:0;
  background:rgba(8, 17, 15, 0.94);
}

.share-panel{
  position:relative;
  z-index:1;
  background:var(--panel-strong);
  border:1px solid var(--line-strong);
  border-radius:24px;
  padding:28px;
  max-width:420px;
  width:min(92vw, 420px);
  max-height:88vh;
  overflow-y:auto;
  box-shadow:var(--shadow);
  text-align:center;
}

.share-image-canvas{
  display:block;
  max-width:100%;
  border-radius:16px;
  box-shadow:var(--shadow);
  margin:18px auto 20px;
}

.share-buttons{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
}

.share-loading{
  display:none;
  margin:20px 0;
  min-height:120px;
}

.share-loading.open{
  display:flex;
}

.empty-state{
  padding:36px 24px;
  border:1px dashed rgba(240, 219, 165, 0.18);
  border-radius:22px;
  text-align:center;
  color:var(--muted);
  background:rgba(255,255,255,0.02);
}

.status-box{
  padding:20px 22px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,0.03);
  color:#ddd4c3;
}

.status-box.error{
  border-color:rgba(214, 116, 116, 0.35);
  background:rgba(214, 116, 116, 0.08);
  color:#f3d1d1;
}

.status-box p{
  margin:0 0 14px;
}

.app-toast{
  position:fixed;
  left:50%;
  bottom:26px;
  transform:translateX(-50%) translateY(20px);
  padding:12px 16px;
  border:1px solid rgba(240, 219, 165, 0.18);
  border-radius:14px;
  background:rgba(8, 17, 15, 0.96);
  color:#f6f2e8;
  box-shadow:var(--shadow);
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index:1200;
}

.app-toast.open{
  opacity:1;
  visibility:visible;
  transform:translateX(-50%) translateY(0);
}

@media (max-width:720px){
  .container{
    width:min(100% - 20px, 1120px);
    padding:20px 0 32px;
  }

  .app-footer{
    padding:0 0 20px;
  }

  .app-footer-inner{
    width:min(100% - 20px, 1120px);
    padding:14px 16px;
    flex-direction:column;
    align-items:flex-start;
  }

  .app-footer-btn{
    width:100%;
  }

  .hero{
    padding:22px 18px;
    border-radius:22px;
  }

  .hero-grid{
    grid-template-columns:1fr;
  }

  .detail-panel{
    padding:18px;
    border-radius:22px;
  }

  .bookmark-panel{
    padding:18px;
    border-radius:22px;
  }

  .reading-tools{
    flex-direction:column;
    align-items:flex-start;
    padding:14px;
  }

  .reading-tools-actions{
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }

  .reading-tools-btn{
    width:100%;
  }

  .jump-ayah-box{
    width:100%;
  }

  .jump-ayah-input{
    width:100%;
    min-width:0;
  }

  .tajweed-legend-list{
    grid-template-columns:1fr;
  }

  .tajweed-guide-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .detail-head,
  .player-banner{
    flex-direction:column;
    align-items:flex-start;
  }

  .detail-title{
    font-size:26px;
  }

  .top-buttons{
    width:100%;
  }

  .top-buttons button,
  .hero-actions button{
    width:100%;
  }

  .quick-tools{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .quick-tool-btn{
    width:100%;
    padding-left:12px;
    padding-right:12px;
    font-size:13px;
  }

  .quick-tools-hint{
    font-size:12px;
  }

  .surah{
    padding:16px;
  }

  .ayat{
    padding:18px;
    border-radius:18px;
  }

  .arab{
    font-size:clamp(28px, 9vw, 38px);
    line-height:1.95;
    margin-bottom:14px;
  }

  .arti{
    font-size:14px;
    line-height:1.7;
  }

  .ayat-buttons{
    gap:12px;
    margin-top:12px;
  }

  .ayat-buttons button{
    min-height:auto;
    padding:0;
    border-radius:0;
    font-size:inherit;
    line-height:1;
  }

  .icon-btn{
    padding:0;
  }

  .icon-btn-icon{
    width:20px;
    height:20px;
  }

  .play-btn,
  .share-ayat-btn,
  .bookmark-btn{
    width:auto;
  }

  .progress{
    margin-top:14px;
  }

  .share-panel{
    padding:22px;
  }

  .detail-fab{
    right:12px;
    bottom:14px;
    gap:8px;
  }

  .detail-fab-btn{
    width:42px;
    height:42px;
  }

  .detail-fab-icon{
    font-size:18px;
  }
}
