@font-face {
  font-family: 'UthmanTN';
  src: url('font/UthmanTN_v2-0.ttf') format('truetype');
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px;
  background: #fafaf8;
  color: #222;
}
.nav-bar {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 12px;
}
.nav-bar:last-child { border-bottom: none; border-top: 1px solid #ddd; margin-top: 12px; margin-bottom: 0; }
.nav-bar a, .nav-bar .nav-disabled {
  padding: 6px 12px;
  text-decoration: none;
  color: #2563eb;
}
.nav-disabled { color: #aaa !important; }
.rub-marker {
  text-align: center;
  font-size: 2em;
  color: #b8860b;
  margin: 8px 0;
}
.surah-header {
  display: flex;
  align-items: center;
  background: #1a5e3a;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0 8px;
  gap: 16px;
}
.surah-num {
  font-size: 2em;
  font-weight: bold;
  min-width: 2em;
  text-align: center;
}
.surah-arabic {
  font-family: 'UthmanTN', serif;
  font-size: 3em;
  direction: rtl;
}
.surah-english { font-size: 1em; opacity: 0.9; }
.bismillah {
  text-align: center;
  font-family: 'UthmanTN', serif;
  font-size: 4em;
  direction: rtl;
  padding: 12px 0;
  color: #1a5e3a;
}
.ayah {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}
.word {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.word:nth-child(even) { background: #fafafa; }
.word-latin {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 6px;
  padding: 8px 6px;
  font-size: 1em;
  min-width: 0;
}
.word-loc { text-decoration: none; color: #999; font-size: 0.85em; min-width: 5em; flex-shrink: 0; }
.word-translit { color: #2563eb; min-width: 7em; flex-shrink: 0; }
.word-trans { color: #222; flex: 1; }
.word-arabic a {
  text-decoration: none;
}
.word-arabic {
  font-family: 'UthmanTN', serif;
  font-size: 2.5em;
  padding: 4px 8px;
  direction: rtl;
  text-align: right;
  white-space: nowrap;
  line-height: 1.8;
  order: -1;
}
.ayah-with-trans {
  display: grid;
  grid-template-columns: 1fr auto;
}
.ayah-trans {
  writing-mode: vertical-rl;
  font-size: 0.85em;
  color: #555;
  padding: 8px 4px;
  border-left: 2px solid #e0d8c8;
}
.ayah-words {
  display: flex;
  flex-direction: column;
}
.ayah-end {
  display: inline-grid;
  place-items: center;
  color: #b8860b;
  padding: 4px 0;
}
.ayah-end > * { grid-area: 1 / 1; }
.ayah-sym { font-family: 'UthmanTN', serif; font-size: 2.4em; line-height: 1; }
.ayah-num { font-family: 'UthmanTN', serif; font-size: 1.1em; }
h1 { margin: 16px 0; }
h2 { margin: 12px 0 8px; }
.nav-section { margin: 16px 0; padding: 12px; background: #fff; border-radius: 8px; border: 1px solid #e0e0e0; }
.nav-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-form select, .nav-form input { padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; }
.nav-form select { flex: 1; min-width: 200px; }
.nav-form input[type=number] { width: 80px; }
.nav-form input[type=text] { flex: 1; min-width: 150px; }
.nav-form button { padding: 6px 16px; background: #2563eb; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.rub-list { display: grid; gap: 4px; }
.rub-entry { padding: 4px 0; }
.rub-entry a { color: #2563eb; text-decoration: none; }
.rub-range { color: #666; }
.rub-hizb { color: #999; font-size: 0.9em; }
