.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.view {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 32px);
}

#view-detail {
  padding-bottom: calc(110px + var(--safe-bottom));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 18px;
}

.hero {
  padding: calc(var(--safe-top) + 22px) 0 20px;
  color: #ffffff;
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  border-radius: 0 0 28px 28px;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-greeting {
  font-size: 13px;
  opacity: 0.85;
}

.hero-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.hero-actions {
  display: flex;
  gap: 8px;
}

.last-read {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
}

.last-read-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--hero-to);
  background: #ffffff;
  border-radius: var(--radius-md);
}

.last-read-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.last-read-text span {
  font-size: 12px;
  opacity: 0.8;
}

.last-read-text strong {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.juz-scroller {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.juz-scroller::-webkit-scrollbar {
  display: none;
}

.juz-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
  color: #ffffff;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.juz-chip.active {
  font-weight: 600;
  color: var(--hero-to);
  background: #ffffff;
}

.search-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(var(--safe-top) + 12px) 0 10px;
  background: var(--bg);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.search-box input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  color: var(--text);
  background: none;
  border: 0;
  outline: 0;
}

.search-box:focus-within {
  border-color: var(--primary);
}

.list-meta {
  margin: 4px 2px 8px;
  font-size: 12px;
  color: var(--text-faint);
}

.page-head {
  padding: calc(var(--safe-top) + 24px) 0 22px;
  color: #ffffff;
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  border-radius: 0 0 28px 28px;
}

.page-head-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.page-sub {
  font-size: 13px;
  opacity: 0.85;
}

.detail-top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(var(--safe-top) + 10px) 0 10px;
  color: #ffffff;
  background: var(--hero-from);
}

.detail-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-top-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-top-actions {
  display: flex;
  gap: 8px;
}

.detail-hero {
  padding: 8px 0 28px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(180deg, var(--hero-from), var(--hero-to));
  border-radius: 0 0 28px 28px;
}

.detail-arabic {
  font-family: var(--font-arabic);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.5;
}

.detail-latin {
  font-size: 18px;
  font-weight: 600;
}

.detail-meaning {
  margin-bottom: 14px;
  font-size: 14px;
  opacity: 0.85;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ayah-list {
  padding-top: 22px;
}

.bismillah {
  margin-bottom: 24px;
  font-family: var(--font-arabic);
  font-size: calc(var(--arabic-size) + 4px);
  line-height: 1.9;
  text-align: center;
  color: var(--primary);
}

.surah-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max-width);
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  margin: 0 auto;
}

body.nav-hidden .bottom-nav {
  display: none;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-faint);
  transition: color 0.2s;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active svg {
  fill: var(--primary-soft);
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 0 12px calc(12px + var(--safe-bottom));
  pointer-events: none;
}

.player-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: calc(var(--max-width) - 24px);
  padding: 10px 12px 10px 18px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-title {
  font-size: 14px;
  font-weight: 600;
}

.player-sub {
  font-size: 12px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
