@font-face { font-family: "Plus Jakarta Sans"; src: url(/fonts/plus-jakarta-sans.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Amiri"; src: url(/fonts/amiri-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
/* Arabic letters only, so digits and Latin text stay in Plus Jakarta Sans. The browser loads it when Arabic text appears. */
@font-face { font-family: "Noto Sans Arabic"; src: url(/fonts/noto-sans-arabic.woff2) format("woff2"); font-weight: 500 800; font-display: swap; unicode-range: U+0600-06FF, U+200C-200F; }

:root {
  --ink: #0B1840;
  --ink-2: #102358;
  --cobalt: #123A8C;
  --cobalt-2: #1A4FA8;
  --teal: #14607F;
  --turquoise: #5FD4DC;
  --gold: #F4DC9D;
  --gold-2: #F0D48A;
  --white: #FFFFFF;
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%235FD4DC' stroke-width='1.6'%3E%3Cpath d='M40 0L51.7 11.7L68.3 11.7L68.3 28.3L80 40L68.3 51.7L68.3 68.3L51.7 68.3L40 80L28.3 68.3L11.7 68.3L11.7 51.7L0 40L11.7 28.3L11.7 11.7L28.3 11.7Z'/%3E%3Cpath d='M40 22L45.2 27.2L52.8 27.2L52.8 34.8L58 40L52.8 45.2L52.8 52.8L45.2 52.8L40 58L34.8 52.8L27.2 52.8L27.2 45.2L22 40L27.2 34.8L27.2 27.2L34.8 27.2Z'/%3E%3Cpath d='M0 0L11.7 11.7M80 0L68.3 11.7M0 80L11.7 68.3M80 80L68.3 68.3'/%3E%3C/g%3E%3C/svg%3E");

  /* A theme is these values. This first set is the blue arch; display.test.js checks the contrast of all of them. */
  --page: var(--ink);
  --text: #FFFFFF;
  --soft: #B8C6E3;
  --accent: #F4DC9D;
  --past: #93A5CC;
  --rule: transparent;
  --pattern: var(--stars);
  --pattern-size: 7rem;
  --pattern-opacity: .055;
  --hero-fill: #123A8C;
  --hero-flow: linear-gradient(120deg, #123A8C, #1A4FA8, #14607F, #1A4FA8, #123A8C);
  --hero-flow-iqama: linear-gradient(120deg, #0C4F66, #14607F, #116B78, #14607F, #0C4F66);
  --hero-pattern: var(--stars);
  --hero-pattern-size: 6rem;
  --hero-pattern-opacity: .14;
  --hero-text: #FFFFFF;
  --hero-accent: #F4DC9D;
  --arch-stroke: #F0D48A;
  --badge: rgba(95, 212, 220, .16);
  --badge-icon: #5FD4DC;
  --active: #F0D48A;
  --active-text: #0B1840;
  --active-badge: #123A8C;
  --active-icon: #FFFFFF;
}

/* Dusk: the sky just after sunset, with the last of the light low in the arch. */
:root[data-theme="dusk"] {
  --page: linear-gradient(168deg, #121D37 0%, #182645 55%, #232C4E 100%);
  --text: #FFF9F0;
  --soft: #C5CDE0;
  --accent: #F6CBA6;
  --past: #9CA7C2;
  --rule: rgba(246, 203, 166, .1);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23F6CBA6' stroke-width='1.1'%3E%3Cpath d='M0 24L24 0L48 24L24 48Z'/%3E%3Cpath d='M24 14L34 24L24 34L14 24Z'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-size: 4.4rem;
  --pattern-opacity: .04;
  --hero-fill: #1D2F55;
  --hero-flow: linear-gradient(180deg, #1B2C50 0%, #2A3460 28%, #573E63 50%, #90503F 70%, #AA5230 86%, #B55A33 100%);
  --hero-flow-iqama: linear-gradient(180deg, #3B2B4C 0%, #6C3A4A 34%, #974A30 66%, #B55A33 100%);
  --hero-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23FFF9F0' stroke-width='1.1'%3E%3Cpath d='M0 24L24 0L48 24L24 48Z'/%3E%3Cpath d='M24 14L34 24L24 34L14 24Z'/%3E%3C/g%3E%3C/svg%3E");
  --hero-pattern-size: 3.8rem;
  --hero-pattern-opacity: .07;
  --hero-text: #FFF9F0;
  --hero-accent: #FBDDBE;
  --arch-stroke: #F6CBA6;
  --badge: rgba(246, 203, 166, .15);
  --badge-icon: #F6CBA6;
  --active: #F2B58C;
  --active-text: #161F38;
  --active-badge: #1B2C50;
  --active-icon: #F6CBA6;
}

/* Warm white: plaster and deep teal, with terracotta for what matters now. The one light look, for bright rooms. */
:root[data-theme="sand"] {
  --page: linear-gradient(180deg, #FBF7EE 0%, #F7F0E2 100%);
  --text: #10292B;
  --soft: #4A5A57;
  --accent: #96401F;
  --past: #686C63;
  --rule: rgba(16, 41, 43, .11);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%2396401F' stroke-width='1.2'%3E%3Ccircle cx='0' cy='0' r='40'/%3E%3Ccircle cx='80' cy='0' r='40'/%3E%3Ccircle cx='0' cy='80' r='40'/%3E%3Ccircle cx='80' cy='80' r='40'/%3E%3Ccircle cx='40' cy='40' r='40'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-size: 6.4rem;
  --pattern-opacity: .06;
  --hero-fill: #0E4A4E;
  --hero-flow: linear-gradient(120deg, #0C4044, #125A5C, #0E4C50, #125A5C, #0C4044);
  --hero-flow-iqama: linear-gradient(120deg, #7C361B, #96401F, #863A1D, #96401F, #7C361B);
  --hero-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23FBF7EE' stroke-width='1.2'%3E%3Ccircle cx='0' cy='0' r='40'/%3E%3Ccircle cx='80' cy='0' r='40'/%3E%3Ccircle cx='0' cy='80' r='40'/%3E%3Ccircle cx='80' cy='80' r='40'/%3E%3Ccircle cx='40' cy='40' r='40'/%3E%3C/g%3E%3C/svg%3E");
  --hero-pattern-size: 5.6rem;
  --hero-pattern-opacity: .09;
  --hero-text: #FFFBF3;
  --hero-accent: #F7DFB7;
  --arch-stroke: #E9C68E;
  --prayer-stroke: #96401F;
  --badge: rgba(14, 74, 78, .11);
  --badge-icon: #0E4A4E;
  --active: #A0451F;
  --active-text: #FFFBF3;
  --active-badge: #FFFBF3;
  --active-icon: #A0451F;
}

/* Night: nearly black and very still, one thin gold line. For a dim room, or a mosque that wants less light. */
:root[data-theme="night"] {
  --page: radial-gradient(130% 110% at 24% 0%, #0E151D 0%, #06090D 72%);
  --text: #F4EFE3;
  --soft: #ABABA0;
  --accent: #DCC289;
  --past: #8E8D82;
  --rule: rgba(220, 194, 137, .13);
  --pattern-opacity: 0;
  --hero-fill: #0B1118;
  --hero-flow: linear-gradient(180deg, #111A24, #0A1016);
  --hero-flow-iqama: linear-gradient(180deg, #1B2531, #111921);
  --hero-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23DCC289' stroke-width='1.4'%3E%3Cpath d='M40 0L51.7 11.7L68.3 11.7L68.3 28.3L80 40L68.3 51.7L68.3 68.3L51.7 68.3L40 80L28.3 68.3L11.7 68.3L11.7 51.7L0 40L11.7 28.3L11.7 11.7L28.3 11.7Z'/%3E%3C/g%3E%3C/svg%3E");
  --hero-pattern-opacity: .05;
  --hero-text: #F4EFE3;
  --hero-accent: #DCC289;
  --arch-stroke: #DCC289;
  --badge: rgba(220, 194, 137, .11);
  --badge-icon: #DCC289;
  --active: #272319;
  --active-text: #FBE9BF;
  --active-badge: #DCC289;
  --active-icon: #0B1118;
}

/* One rem is 1/100 of the long side of a 16:9 screen, so the same layout holds from 720p to 4K. */
html { font-size: min(1vw, 1.7778vh); }
@media (orientation: portrait) { html { font-size: min(1.7778vw, 1vh); } }

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  position: relative;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Noto Sans Arabic", -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  cursor: none;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--pattern);
  background-size: var(--pattern-size);
  opacity: var(--pattern-opacity);
}
body[data-view="finder"] { cursor: auto; overflow: auto; }
.defs { position: absolute; }
.soft { color: var(--soft); }
.gold { color: var(--accent); }

/* Landscape board: arch on the left, clock and times on the right. */
.board {
  position: relative;
  display: grid;
  height: 100%;
  padding: 2rem 2.6rem 2.2rem;
  grid-template-columns: 36rem minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "hero now"
    "hero times";
  column-gap: 2.6rem;
}
.has-footer .board {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "top top"
    "hero now"
    "hero times"
    "foot foot";
}
body[data-view="prayer"] .board,
body[data-view="finder"] .board { display: none; }

/* Dark during prayer: only black, nothing else on the screen, not even the status line. */
body[data-view="dark"] { background: #000; }
body[data-view="dark"]::before,
body[data-view="dark"] .board,
body[data-view="dark"] .status { display: none; }

.top { grid-area: top; display: flex; align-items: flex-start; justify-content: space-between; gap: 3rem; min-width: 0; }
/* Names by authors use dir="auto". Their own direction orders the letters but must not move them across the layout. */
#mosque, #place, .finder-results strong, .finder-results span { text-align: left; }
:root[dir="rtl"] #mosque, :root[dir="rtl"] #place, :root[dir="rtl"] .finder-results strong, :root[dir="rtl"] .finder-results span { text-align: right; }
.identity { display: flex; align-items: center; gap: 1.4rem; min-width: 0; }
.identity-text { min-width: 0; }
/* Always on white: a logo is drawn for paper, and must not vanish on a dark look. */
.logo { flex-shrink: 0; height: 5.6rem; max-width: 16rem; padding: .35rem .6rem; border-radius: .8rem; background: #FFFFFF; object-fit: contain; }
.top h1 { font-size: 3.1rem; line-height: 1.15; font-weight: 800; letter-spacing: -.015em; }
.top h1.long { font-size: 2.3rem; }
.top h1.long + #place { display: none; }
#place { font-size: 1.7rem; line-height: 1.3; font-weight: 500; }
.dates { text-align: end; flex-shrink: 0; }
#gregorian { font-size: 2.1rem; line-height: 1.3; font-weight: 700; }
/* Weekdays are lowercase in French and Swedish; on a line of their own they start with a capital. */
#gregorian::first-letter { text-transform: uppercase; }
#hijri { font-size: 1.7rem; line-height: 1.3; font-weight: 600; }

/* Pointed arch with the slow gradient. It moves by transform, so it costs a TV stick almost nothing. */
.hero { grid-area: hero; position: relative; min-height: 0; margin-top: .6rem; display: flex; }
.arch-fill { position: absolute; inset: 0; clip-path: url(#arch); overflow: hidden; background: var(--hero-fill); }
.flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 300%;
  height: 300%;
  background-image: var(--hero-flow);
  animation: flow 60s ease-in-out infinite alternate;
  will-change: transform;
}
.flow-iqama {
  background-image: var(--hero-flow-iqama);
  opacity: 0;
  transition: opacity 3s;
}
body[data-view="iqama"] .flow-iqama { opacity: 1; }
@keyframes flow { to { transform: translate(-66.66%, -66.66%); } }
/* In these two the gradient has a top and a bottom, so it may only rise and fall a little. */
:root[data-theme="dusk"] .flow, :root[data-theme="night"] .flow { width: 100%; height: 124%; animation-name: rise; }
@keyframes rise { to { transform: translateY(-19.3%); } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }
.stars { position: absolute; inset: 0; background-image: var(--hero-pattern); background-size: var(--hero-pattern-size); opacity: var(--hero-pattern-opacity); }
.arch-line { position: absolute; inset: .7rem .7rem 0; width: calc(100% - 1.4rem); height: calc(100% - .7rem); overflow: visible; }
.arch-line path { fill: none; stroke: var(--arch-stroke); stroke-width: .16rem; vector-effect: non-scaling-stroke; }
.hero-text {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16% 1.6rem 1rem;
  text-align: center;
  color: var(--hero-text);
}
.hero-arabic { font-family: "Amiri", serif; font-weight: 700; font-size: 7.4rem; line-height: 1.25; color: var(--hero-accent); }
.hero-label { font-size: 3rem; line-height: 1.25; font-weight: 700; }
.hero-count { font-size: 8rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.hero-note { font-size: 2.3rem; line-height: 1.3; font-weight: 600; margin-top: .6rem; }
body[data-view="iqama"] .hero-count { color: var(--hero-accent); }
body[data-view="iqama"] .hero-count:not(.long) { font-size: 10rem; }
body[data-view="nodata"] .hero-label, body[data-view="loading"] .hero-label { font-size: 3.2rem; font-weight: 800; }

.now { grid-area: now; display: flex; justify-content: flex-end; }
.clock { font-size: 13.5rem; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.seconds { display: inline-block; width: 1.3em; margin-inline-start: .25em; font-size: .34em; font-weight: 700; letter-spacing: 0; color: var(--accent); }

.times { grid-area: times; min-height: 0; display: flex; flex-direction: column; margin-top: .4rem; }
.times-head, .row { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto 12.2rem 12.2rem; align-items: center; column-gap: 1rem; }
.times-head { flex-shrink: 0; padding-inline: .5rem 1.2rem; font-size: 1.7rem; line-height: 2.4rem; font-weight: 700; color: var(--accent); }
.times-head span { text-align: end; }
.times-head span:first-child { grid-column: 4; }
.rows { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: .35rem; }
.row { padding-inline: .5rem 1.2rem; border-radius: .9rem; background: linear-gradient(var(--rule), var(--rule)) bottom / 100% .07rem no-repeat; }
.badge { position: relative; width: 4rem; height: 4rem; display: flex; align-items: center; justify-content: center; }
.badge-star { position: absolute; inset: 0; fill: var(--badge); }
.badge-icon { position: relative; width: 2.2rem; height: 2.2rem; fill: none; stroke: var(--badge-icon); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-name { font-size: 3rem; line-height: 1.1; font-weight: 700; min-width: 0; }
.row-name.long { font-size: 2.1rem; }
.row-name.longer { font-size: 1.85rem; }
.row-arabic { font-family: "Amiri", serif; font-weight: 700; font-size: 2.7rem; line-height: 1; color: var(--accent); text-align: end; }
.row-time { font-size: 4.3rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; text-align: end; }
.row.past .row-name, .row.past .row-time { color: var(--past); }
.row.past .row-arabic { color: var(--past); }
.row.past .badge-icon { stroke: var(--past); }
.row-sunrise .row-name { font-size: 2.1rem; font-weight: 600; }
.row-sunrise .row-arabic { font-size: 2.2rem; }
.row-sunrise .row-time { font-size: 3.8rem; font-weight: 700; }

.row.active { background: var(--active); color: var(--active-text); }
.row.active .row-name, .row.active .row-time, .row.active .row-arabic { color: var(--active-text); }
.row.active .badge-star { fill: var(--active-badge); }
.row.active .badge-icon { stroke: var(--active-icon); }
.jumuah-note { flex-shrink: 0; font-size: 2rem; line-height: 2.8rem; font-weight: 700; color: var(--accent); text-align: end; padding-inline-end: 1.2rem; }

/* Iqama first, for mosques where people come by it: the adhan steps back and the iqama takes its room. */
.iqama-large .times-head, .iqama-large .row { grid-template-columns: 4.2rem minmax(0, 1fr) auto 8.4rem 15.4rem; }
.iqama-large .row-time { font-size: 3rem; font-weight: 600; letter-spacing: -.01em; }
.iqama-large .row .row-iqama { font-size: 5.1rem; line-height: .9; font-weight: 800; letter-spacing: -.025em; }
.iqama-large.has-footer .row .row-iqama { font-size: 4.7rem; }
.iqama-large .row:not(.active):not(.past) .row-iqama { color: var(--accent); }
.iqama-large .row-sunrise .row-time { font-size: 2.8rem; }
.iqama-large .times-head span:last-child { font-size: 2.2rem; }

/* A line the mosque writes itself. */
.footer { grid-area: foot; min-width: 0; margin-top: .9rem; font-size: 2.7rem; line-height: 1.2; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; color: var(--accent); }
.footer.long { font-size: 2.1rem; line-height: 1.55; }
/* The clock gives up height so that the rows keep theirs. */
.has-footer .clock, .iqama-large .clock { font-size: 11.6rem; }
.iqama-large.has-footer .clock { font-size: 10.2rem; }

/* Quran, hadith, dua, reminders: the board fades out, the text fades in, and the next prayer stays in a strip. Only opacity
   moves, which costs a TV stick almost nothing. The panel sits in the grid area of the board's content without taking part in
   its sizing, so a long text can never push anything aside. */
.hero, .now, .times { transition: opacity 1.6s ease 1s; }
body.showing-text .hero, body.showing-text .now, body.showing-text .times { opacity: 0; transition: opacity 1.4s ease; }
.text-panel {
  position: absolute;
  inset: 0;
  grid-row: 2 / 4;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: .6rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.4s ease, visibility 0s linear 1.4s;
}
body.showing-text .text-panel { opacity: 1; visibility: visible; transition: opacity 1.6s ease 1s; }
@media (prefers-reduced-motion: reduce) {
  .hero, .now, .times, .text-panel,
  body.showing-text .hero, body.showing-text .now, body.showing-text .times, body.showing-text .text-panel { transition: none; }
  .text-content.is-turning { animation: none; }
}
.text-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; padding-inline: 1rem; }
.text-fit { flex: 1; width: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.text-content { --size: 3rem; text-align: center; overflow-wrap: anywhere; }
.text-content.is-turning { animation: text-turn 1.6s ease; }
@keyframes text-turn { from { opacity: 0; } to { opacity: 1; } }
/* Each line keeps what the author broke it into. Most-written-in script decides the letter: Amiri for Arabic. */
.text-body { font-size: calc(var(--size) * .8); line-height: 1.32; font-weight: 700; white-space: pre-line; text-wrap: balance; color: var(--text); }
.text-body.is-arabic { font-family: "Amiri", serif; font-size: var(--size); line-height: 1.75; }
/* Amiri sets Quranic pause marks high above the word. Tighter than this they run into the letters of the line above. */
.text-body.has-marks { line-height: 2.14; }
.text-translation { margin-top: calc(var(--size) * .22); font-size: clamp(2.3rem, calc(var(--size) * .46), 3.6rem); line-height: 1.34; font-weight: 600; white-space: pre-line; text-wrap: balance; color: var(--soft); }
.text-translation.is-alone { margin-top: 0; font-size: calc(var(--size) * .8); line-height: 1.32; font-weight: 700; color: var(--text); }
.text-source { flex-shrink: 0; width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 1.2rem; margin-top: .4rem; font-size: 2.3rem; line-height: 1.3; font-weight: 700; color: var(--accent); text-align: center; }
.text-source::before, .text-source::after { content: ""; flex: 0 1 7rem; min-width: 1rem; align-self: center; height: .1rem; background: var(--accent); opacity: .45; }
.text-kind { flex-shrink: 0; }
.text-reference { color: var(--text); }
.text-page { flex-shrink: 0; font-weight: 600; color: var(--soft); }
.text-page:empty { display: none; }
.text-credit { flex-shrink: 0; font-size: 1.15rem; line-height: 1.5; font-weight: 500; color: var(--soft); }
/* The strip: the next prayer and its countdown, always in view, in the arch's own colours. */
.text-strip { position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 7.2rem; padding: .4rem 2.6rem; border-radius: 1.4rem; color: var(--hero-text); overflow: hidden; }
.text-strip-fill { clip-path: none; }
.strip-next { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.8rem; min-width: 0; }
.strip-clock { position: relative; flex-shrink: 0; }
.strip-arabic { font-family: "Amiri", serif; font-weight: 700; font-size: 4.2rem; line-height: 1.2; color: var(--hero-accent); }
.strip-label { font-size: 2.7rem; line-height: 1.2; font-weight: 700; min-width: 0; }
.strip-count { font-size: 5rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.strip-clock { font-size: 5rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
:root[lang="ar"] .strip-label { font-weight: 600; }

/* Calm screen during the prayer: nothing moves. */
.prayer-screen { display: none; }
body[data-view="prayer"] .prayer-screen {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.prayer-arch { position: relative; width: 52rem; height: 42rem; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 7rem; }
.prayer-arch .arch-line { inset: 0; width: 100%; height: 100%; }
.prayer-arch .arch-line path { stroke: var(--prayer-stroke, var(--arch-stroke)); stroke-opacity: .7; }
.prayer-arabic { font-family: "Amiri", serif; font-weight: 700; font-size: 13rem; line-height: 1.25; color: var(--accent); }
.prayer-name { font-size: 4.2rem; line-height: 1.3; font-weight: 700; }
.prayer-note { font-size: 2.3rem; line-height: 1.4; font-weight: 500; color: var(--soft); margin-top: 1.4rem; }
.prayer-clock { font-size: 3.4rem; line-height: 1.2; font-weight: 700; color: var(--soft); margin-top: 2rem; }

/* Discreet status in the corner. */
.status { position: fixed; inset-inline-start: 2.6rem; bottom: .5rem; display: flex; gap: 1.4rem; align-items: center; font-size: 1.15rem; line-height: 1.6rem; font-weight: 600; }
.offline { color: var(--soft); }
.offline::before { content: ""; display: inline-block; width: .7rem; height: .7rem; margin-inline-end: .5rem; border-radius: 50%; background: var(--past); }
.clock-warning { padding: 0 .7rem; border-radius: .4rem; background: var(--gold-2); color: var(--ink); font-weight: 700; }

/* Tight letter spacing breaks up joined Arabic letters. */
:root[lang="ar"] .top h1, :root[lang="ar"] .finder h1 { letter-spacing: 0; }

/* Choosing a mosque. Rem is tied to the screen, so this also reads fine on a TV with a keyboard. */
.finder { position: relative; display: flex; flex-direction: column; gap: 1rem; width: min(52rem, calc(100% - 4rem)); margin: 0 auto; padding: 7vh 0 4vh; }
.finder h1 { font-size: 3.2rem; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; }
.finder > p.soft { font-size: 1.7rem; line-height: 1.4; }
.finder input {
  margin-top: 1rem;
  width: 100%;
  padding: 1.1rem 1.5rem;
  border: .14rem solid var(--gold-2);
  border-radius: 1rem;
  background: var(--ink-2);
  color: var(--white);
  font: inherit;
  font-size: 2rem;
  font-weight: 600;
  outline: none;
}
.finder input::placeholder { color: var(--soft); }
.finder input:focus { border-color: var(--turquoise); }
.finder-results { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.finder-results a { display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1.5rem; border-radius: .9rem; background: var(--ink-2); color: var(--white); text-decoration: none; outline: none; }
.finder-results a:hover, .finder-results a:focus { background: var(--cobalt); }
.finder-results strong { font-size: 2rem; line-height: 1.3; font-weight: 700; }
.finder-results span { font-size: 1.5rem; line-height: 1.4; color: var(--soft); }
.finder-status { font-size: 1.7rem; line-height: 1.4; font-weight: 600; color: var(--gold); }

/* Portrait: clock on top, arch below it, times filling the rest. */
@media (orientation: portrait) {
  .board {
    padding: 2.4rem 2.2rem 2.6rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "top"
      "now"
      "hero"
      "times";
    row-gap: 1rem;
  }
  .has-footer .board {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "top"
      "now"
      "hero"
      "times"
      "foot";
  }
  .top { flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
  .identity { justify-content: center; }
  :root #mosque, :root #place, :root[dir="rtl"] #mosque, :root[dir="rtl"] #place { text-align: center; }
  .dates { text-align: center; }
  .now { justify-content: center; }
  .clock { font-size: 13rem; }
  .seconds { width: 1.2em; margin-inline-start: .2em; }
  .hero { margin: 0 auto; width: 44rem; }
  .hero-text { padding: 12% 1.6rem .6rem; }
  .hero-arabic { font-size: 6.2rem; }
  .hero-label.long { font-size: 2.2rem; }
  .times { height: 34rem; flex: none; margin-top: 0; }
  /* The arch has less height with a footer: what is in it gets smaller rather than cut off. */
  .has-footer .times { height: 30.5rem; }
  .has-footer .hero-text { padding-top: 9%; }
  .has-footer .hero-arabic { font-size: 5rem; }
  body.has-footer[data-view="iqama"] .hero-count:not(.long) { font-size: 8.6rem; }
  .has-footer .clock, .iqama-large.has-footer .clock { font-size: 11.6rem; }
  .iqama-large .clock { font-size: 13rem; }
  .footer, .footer.long { margin-top: 0; font-size: 2.3rem; line-height: 1.25; white-space: normal; overflow: visible; text-wrap: balance; }
  .times-head, .row { grid-template-columns: 3.8rem minmax(0, 1fr) auto 11.2rem 11.2rem; column-gap: .8rem; }
  .row-arabic { font-size: 2.4rem; }
  .row-time { font-size: 4.1rem; }
  .row-sunrise .row-name { font-size: 2rem; }
  .row-sunrise .row-arabic { font-size: 2rem; }
  .row-sunrise .row-time { font-size: 3.6rem; }
  .badge { width: 3.4rem; height: 3.4rem; }
  .badge-icon { width: 1.9rem; height: 1.9rem; }
  .row-name { font-size: 2.7rem; }
  .row-name.long { font-size: 2rem; }
  .row-name.longer { font-size: 1.85rem; }
  .iqama-large .times-head, .iqama-large .row { grid-template-columns: 3.8rem minmax(0, 1fr) auto 7.8rem 14.2rem; }
  .iqama-large .row-time { font-size: 2.8rem; }
  .iqama-large .row .row-iqama { font-size: 4.9rem; }
  .iqama-large.has-footer .row .row-iqama { font-size: 4.4rem; }
  .iqama-large .row-sunrise .row-time { font-size: 2.6rem; }
  .text-panel { grid-row: 2 / 5; margin-top: 0; }
  .text-strip { gap: 1.2rem; padding: .9rem 2rem; }
  .strip-next { gap: 0 1.2rem; }
  .strip-arabic { font-size: 3.4rem; }
  .strip-label { font-size: 2.2rem; }
  .strip-count, .strip-clock { font-size: 4rem; }
  .prayer-arch { width: 48rem; height: 60rem; padding-top: 12rem; }
  .status { inset-inline-start: 2.2rem; bottom: .7rem; }
}
