:root {
  color-scheme: dark;
  --bg: #061612;
  --bg-2: #09221c;
  --card: rgba(18, 43, 35, 0.76);
  --card-strong: rgba(20, 54, 44, 0.88);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f3fbf7;
  --muted: rgba(243, 251, 247, 0.62);
  --faint: rgba(243, 251, 247, 0.42);
  --accent: #58e79f;
  --accent-2: #bff7d5;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.30);
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.09);
  --danger: #ff7777;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --max: 1120px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f1e5;
  --bg-2: #edf7ec;
  --card: rgba(255, 255, 255, 0.76);
  --card-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(22, 50, 40, 0.10);
  --text: #14241f;
  --muted: rgba(20, 36, 31, 0.62);
  --faint: rgba(20, 36, 31, 0.42);
  --accent: #188e5c;
  --accent-2: #0f6f49;
  --shadow: 0 24px 70px rgba(37, 77, 58, 0.14);
  --surface: rgba(20, 36, 31, 0.045);
  --surface-2: rgba(20, 36, 31, 0.075);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(88, 231, 159, 0.13), transparent 32rem),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

.bg-orb {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.6;
}
.orb-a { top: -160px; right: -130px; width: 360px; height: 360px; background: rgba(88, 231, 159, 0.18); }
.orb-b { bottom: -190px; left: -150px; width: 420px; height: 420px; background: rgba(191, 247, 213, 0.10); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 10px;
  backdrop-filter: blur(16px);
}
.brand-wrap { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}
.brand-mark span {
  width: 12px;
  height: 22px;
  border-radius: 999px 999px 999px 999px;
  background: linear-gradient(180deg, var(--accent), #31d98a);
  transform: rotate(0deg);
}
.brand-name { font-size: 18px; line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; }
.brand-sub { margin-top: 3px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.language-select {
  min-width: 58px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  outline: none;
  box-shadow: none;
}
.language-select option { background: #10251f; color: #f3fbf7; }
[data-theme="light"] .language-select option { background: white; color: #14241f; }
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: transform 0.16s ease, background 0.16s ease;
}
.icon-button:active { transform: scale(0.96); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 4px 0 18px;
}

.next-card, .times-card, .panel {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.next-card {
  border-radius: var(--radius-xl);
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.next-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -80px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(88, 231, 159, 0.13);
  pointer-events: none;
}
.next-topline, .next-main, .location-line { position: relative; z-index: 1; }
.next-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.next-actions { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.adhan-mute-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}
.adhan-mute-button:active { transform: scale(0.95); }
.adhan-mute-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.adhan-mute-button .speaker-off { display: none; }
.adhan-mute-button.is-muted { color: var(--muted); background: var(--surface-2); }
.adhan-mute-button.is-muted .speaker-on { display: none; }
.adhan-mute-button.is-muted .speaker-off { display: block; }
.adhan-mute-button.is-missing { opacity: 0.72; }
.pill, .method-chip, .small-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.method-chip { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-main {
  margin-top: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.muted-label, .eyebrow, .field-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.01em; }
h1, h2 { margin: 0; letter-spacing: -0.055em; }
h1 { margin-top: 4px; font-size: clamp(46px, 13vw, 76px); line-height: 0.92; }
h2 { font-size: 22px; line-height: 1.08; }
.time-block { text-align: right; flex: 0 0 auto; }
.next-time { font-size: clamp(38px, 11vw, 68px); line-height: 0.92; font-weight: 850; letter-spacing: -0.07em; font-variant-numeric: tabular-nums; }
.countdown { margin-top: 8px; color: var(--accent-2); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.location-line {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.location-line svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.times-card {
  border-radius: var(--radius-xl);
  padding: 15px;
}
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.compact-head { margin-bottom: 10px; }
.prayer-list { display: grid; gap: 8px; }
.prayer-row {
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 13px;
}
.prayer-row.active {
  background: linear-gradient(135deg, rgba(88, 231, 159, 0.18), rgba(255, 255, 255, 0.045));
  border-color: rgba(88, 231, 159, 0.33);
}
.prayer-name { font-size: 16px; font-weight: 850; letter-spacing: -0.035em; }
.prayer-note { margin-top: 2px; font-size: 12px; color: var(--muted); font-weight: 650; }
.prayer-time { font-size: 22px; font-weight: 850; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

.settings-grid { display: grid; gap: 12px; }
.panel {
  border-radius: var(--radius-lg);
  padding: 18px;
}
.small-button {
  min-height: 38px;
  border: 1px solid rgba(88, 231, 159, 0.34);
  border-radius: 999px;
  background: rgba(88, 231, 159, 0.14);
  color: var(--text);
  padding: 0 14px;
  font-weight: 850;
}
.field-label { display: block; margin: 13px 0 7px; }
.input {
  width: 100%;
  min-height: 48px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text);
  outline: none;
  padding: 0 14px;
  font-weight: 650;
}
[data-theme="light"] .input { background: rgba(255, 255, 255, 0.65); }
.input:focus { border-color: rgba(88, 231, 159, 0.55); box-shadow: 0 0 0 4px rgba(88, 231, 159, 0.10); }
.input option { background: #10251f; color: #f3fbf7; }
[data-theme="light"] .input option { background: white; color: #14241f; }
.advanced-panel summary {
  list-style: none;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.035em;
}
.advanced-panel summary::-webkit-details-marker { display: none; }
.advanced-panel summary::before { content: "+"; display: inline-flex; justify-content: center; width: 22px; color: var(--accent); }
.advanced-panel[open] summary::before { content: "–"; }
.advanced-content { padding-top: 8px; }
.adjust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.adjust-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.adjust-control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: center;
}
.adjust-grid input {
  width: 100%;
  min-height: 42px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 8px;
  text-align: center;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.adjust-step {
  width: 38px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.adjust-step:active { transform: scale(0.97); }

.footer {
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
  padding: 12px 0 calc(18px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 750;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(18px);
  z-index: 50;
  max-width: min(92vw, 430px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card-strong);
  color: var(--text);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 13px;
  font-weight: 750;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


.clean-view .topbar,
.clean-view .times-card,
.clean-view .settings-grid,
.clean-view .footer { display: none; }
.clean-view .app-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px 0;
}
.clean-view .next-card { width: 100%; max-width: 520px; }
.clean-view .next-card::before {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

@media (min-width: 840px) {
  .app-shell {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.72fr);
    align-items: start;
    gap: 16px;
    padding-top: 26px;
  }
  .next-card { grid-column: 1; grid-row: 1; min-height: 278px; padding: 26px; }
  .times-card { grid-column: 2; grid-row: 1 / span 2; padding: 20px; }
  .settings-grid { grid-column: 1; grid-row: 2; grid-template-columns: 1fr; gap: 16px; }
  .prayer-row { min-height: 66px; padding: 13px 16px; }
  .prayer-time { font-size: 24px; }
}

@media (max-width: 430px) {
  .topbar { width: calc(100% - 22px); padding-top: 11px; }
  .app-shell, .footer { width: calc(100% - 22px); }
  .brand-mark { width: 42px; height: 42px; border-radius: 16px; }
  .brand-name { font-size: 17px; }
  .brand-sub { max-width: 160px; }
  .icon-button { width: 39px; height: 39px; border-radius: 15px; }
  .language-select { min-width: 54px; height: 39px; border-radius: 15px; padding: 0 8px; }
  .next-card { padding: 15px; border-radius: 26px; }
  .times-card { padding: 12px; border-radius: 26px; }
  h1 { font-size: 44px; }
  .next-time { font-size: 39px; }
  .countdown { font-size: 13px; }
  .method-chip { max-width: 122px; }
  .adhan-mute-button { width: 34px; height: 34px; }
  .prayer-row { min-height: 51px; border-radius: 18px; padding: 9px 11px; }
  .prayer-name { font-size: 15px; }
  .prayer-time { font-size: 21px; }
  .panel { padding: 15px; border-radius: 23px; }
  .footer { flex-direction: column; }
}



/* v7 clean view polish: true centered fullscreen card + visible Back control */
.clean-exit {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 100;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px 0 12px;
  background: color-mix(in srgb, var(--card-strong) 88%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  font-weight: 850;
  letter-spacing: -0.02em;
}
.clean-exit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clean-exit:active { transform: scale(0.97); }

.clean-more {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 14px;
  z-index: 100;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px 0 12px;
  background: color-mix(in srgb, var(--card-strong) 88%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  font-weight: 850;
  letter-spacing: -0.02em;
}
.clean-more svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clean-more:active { transform: scale(0.97); }
.clean-view .clean-more { display: inline-flex; }

body.clean-view {
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(88, 231, 159, 0.16), transparent 26rem),
    radial-gradient(circle at 50% 110%, rgba(191, 247, 213, 0.10), transparent 30rem),
    linear-gradient(135deg, var(--bg), var(--bg-2));
}
.clean-view .clean-exit { display: inline-flex; }

.clean-view .topbar,
.clean-view .times-card,
.clean-view .settings-grid,
.clean-view .footer { display: none !important; }
.clean-view .app-shell {
  width: 100% !important;
  max-width: none !important;
  min-height: 100svh !important;
  margin: 0 !important;
  padding: calc(70px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}
.clean-view .next-card {
  grid-column: auto !important;
  grid-row: auto !important;
  width: min(100%, 540px) !important;
  max-width: 540px !important;
  min-height: 0 !important;
  border-radius: clamp(28px, 6vw, 42px) !important;
  padding: clamp(20px, 5vw, 34px) !important;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.34) !important;
}
.clean-view .next-card::before { display: none !important; }
.clean-view .next-card::after {
  width: clamp(150px, 32vw, 220px);
  height: clamp(150px, 32vw, 220px);
  right: -54px;
  bottom: -64px;
  opacity: 0.82;
}
.clean-view .next-topline { margin-bottom: clamp(18px, 4vw, 28px); }
.clean-view h1 { font-size: clamp(52px, 12vw, 88px); }
.clean-view .next-time { font-size: clamp(46px, 10vw, 78px); }
.clean-view .countdown { font-size: clamp(13px, 3vw, 16px); }
.clean-view .location-line { margin-top: clamp(18px, 4vw, 26px); }
.clean-view .bg-orb { opacity: 0.72; }

@media (max-width: 560px) {
  .clean-exit,
  .clean-more {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    min-height: 42px;
    padding: 0 12px 0 10px;
    font-size: 13px;
  }
  .clean-view .app-shell {
    padding-left: 13px !important;
    padding-right: 13px !important;
  }
  .clean-view .next-main {
    gap: 12px;
  }
  .clean-view .next-card {
    width: min(100%, 390px) !important;
  }
}


/* language + RTL polish */
[dir="rtl"] body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif; }
[dir="rtl"] .brand-wrap,
[dir="rtl"] .location-line,
[dir="rtl"] .clean-exit,
[dir="rtl"] .clean-more { direction: rtl; }
[dir="rtl"] .next-main,
[dir="rtl"] .section-head,
[dir="rtl"] .prayer-row { direction: rtl; }
[dir="rtl"] .time-block { text-align: left; }
[dir="rtl"] .next-card::after { right: auto; left: -30px; }
[dir="rtl"] .clean-view .next-card::after { right: auto; left: -54px; }

.more-entry {
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  font-weight: 900;
  letter-spacing: -0.025em;
}
.more-entry-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(88, 231, 159, 0.13);
  color: var(--accent-2);
}
.more-entry svg,
.back-pill svg,
.circle-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.more-entry:active,
.back-pill:active,
.circle-button:active { transform: scale(0.98); }

.more-page[hidden] { display: none !important; }
.more-page {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.more-view .next-card,
.more-view .times-card,
.more-view .more-entry { display: none !important; }
.more-view .app-shell {
  grid-template-columns: 1fr !important;
  align-items: stretch;
}
.more-hero {
  display: grid;
  gap: 14px;
}
.more-hero p,
.tool-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
}
.back-pill {
  width: max-content;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px 0 11px;
  font-weight: 850;
}
.soft-button {
  margin-top: 14px;
  width: 100%;
  border-color: var(--border);
  background: var(--surface);
}
.month-panel { overflow: hidden; }
.month-head { align-items: center; }
.month-actions { display: flex; gap: 8px; }
.circle-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--text);
}
.month-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
.month-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.month-table th,
.month-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
}
.month-table thead th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-2);
}
.month-table th:first-child,
.month-table td:first-child {
  text-align: left;
}
.month-table tbody tr:last-child th,
.month-table tbody tr:last-child td { border-bottom: 0; }
.month-table .today-row th,
.month-table .today-row td {
  background: rgba(88, 231, 159, 0.12);
  color: var(--accent-2);
}
.more-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.mini-tool-card h2 {
  margin-top: 8px;
  font-size: clamp(34px, 8vw, 56px);
}
.mini-tool-card .small-button {
  margin-top: 14px;
}
.small-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.clean-view .more-entry,
.clean-view .more-page { display: none !important; }

@media (min-width: 840px) {
  .more-entry { grid-column: 1; grid-row: 2; }
  .more-page { gap: 16px; }
  .more-page .settings-grid {
    grid-column: auto !important;
    grid-row: auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .more-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 430px) {
  .more-entry {
    min-height: 50px;
    border-radius: 20px;
  }
  .more-hero p,
  .tool-copy { font-size: 12px; }
  .month-table th,
  .month-table td {
    padding: 9px 10px;
    font-size: 12px;
  }
}

[dir="rtl"] .more-entry,
[dir="rtl"] .back-pill { direction: rtl; }
[dir="rtl"] .month-table th,
[dir="rtl"] .month-table td { text-align: left; }
[dir="rtl"] .month-table th:first-child,
[dir="rtl"] .month-table td:first-child { text-align: right; }

/* More tools polish: useful actions live behind More while the landing screen stays clean. */
@media (max-width: 560px) {
  .clean-more {
    left: 12px;
    right: auto;
  }
}
[dir="rtl"] .clean-more {
  left: auto;
  right: 14px;
}
[dir="rtl"] .clean-exit {
  right: auto;
  left: 14px;
}
@media (max-width: 560px) {
  [dir="rtl"] .clean-more {
    left: auto;
    right: 12px;
  }
  [dir="rtl"] .clean-exit {
    right: auto;
    left: 12px;
  }
}


.today-tools-panel {
  display: grid;
  gap: 14px;
}
.hijri-box {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  padding: 14px;
}
.hijri-value {
  margin-top: 6px;
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.055em;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tool-actions .small-button { flex: 1 1 140px; }
.inline-soft {
  margin-top: 0 !important;
  width: auto !important;
}
.month-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.month-text-button {
  min-height: 40px;
  padding-inline: 13px;
  white-space: nowrap;
}
@media (min-width: 840px) {
  .today-tools-panel { grid-template-columns: 1fr 1.05fr; align-items: stretch; }
  .today-tools-panel .section-head { margin-bottom: 0; }
  .tool-actions { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .month-head {
    align-items: stretch;
    flex-direction: column;
  }
  .month-actions {
    justify-content: flex-start;
  }
  .month-text-button {
    flex: 1 1 120px;
  }
}

@media print {
  :root, [data-theme="light"] {
    --bg: #ffffff;
    --bg-2: #ffffff;
    --card: #ffffff;
    --card-strong: #ffffff;
    --border: #d8dedb;
    --text: #111f1a;
    --muted: #4d5f57;
    --surface: #ffffff;
    --surface-2: #f2f6f4;
  }
  body {
    background: #ffffff !important;
    color: #111f1a !important;
  }
  .bg-orb,
  .topbar,
  .next-card,
  .times-card,
  .more-entry,
  .more-hero,
  .settings-grid,
  .today-tools-panel,
  .more-card-grid,
  .footer,
  .clean-exit,
  .clean-more,
  .adhan-mute-button,
  .toast { display: none !important; }
  .app-shell,
  .more-page,
  .month-panel {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #ffffff !important;
  }
  .month-actions { display: none !important; }
  .month-table-wrap {
    overflow: visible !important;
    border-color: #d8dedb !important;
  }
  .month-table {
    min-width: 0 !important;
    width: 100% !important;
  }
  .month-table th,
  .month-table td {
    padding: 5px 6px !important;
    font-size: 10px !important;
    color: #111f1a !important;
  }
}

.adhan-settings-panel { display: grid; gap: 14px; }
.adhan-settings-panel .section-head { margin-bottom: 0; }
.switch-row {
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}
.switch-text { font-size: 14px; font-weight: 800; color: var(--text); }
.switch-row input {
  width: 44px;
  height: 26px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.range-field {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}
.range-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); font-size: 14px; font-weight: 800; }
.range-head strong { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.range-control { width: 100%; accent-color: var(--accent); }

.setting-hint {
  margin: -6px 4px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}


.notification-block {
  display: grid;
  gap: 14px;
}
.block-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}
.tiny-head { margin-bottom: 0; }
.select-field {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}
.compact-input { min-height: 42px; }
