/* m1 · Ivory (founder's pick). Night player, Ring-only sky, Room panels (Door removed 2026-11-05).
   Still open, on the Compare chip (app/mlook.js): Theme Light / Dark, and the tray's colour. */

/* ---------- Theme: Light (the Ivory share paper) ---------- */
html[data-v2='ivory'] {
  --v-bg: #f3ede2; --v-card: #fbf8f2; --v-ink: #1d2236; --v-ink-2: #474c5e; --v-ink-3: #5f6475; --v-line: rgba(29, 34, 54, 0.13); --v-line-strong: rgba(29, 34, 54, 0.22);
  --v-arabic: #1d2236; --v-gold: #b58a3a; --v-gold-ink: #85631f; --v-glow: rgba(255, 252, 245, 0.95);
  /* The recited word: a deeper, brighter gold with a soft glow of its own, so it reads on paper as it did on the sky. */
  --v-word: #c07f0c; --v-word-glow: none; /* no haze (founder, 2026-10-26): just a clear, deep gold */
  --v-tray: rgba(251, 248, 242, 0.94); --v-sheet: #faf6ee;
  --v-pill: var(--night); --v-pill-ink: #ecc97a;
}
/* ---------- Theme: Dark (the share image's Night as the page; the tray a shade lighter so it still stands apart) ---------- */
html[data-v2='ivory'][data-vtheme='dark'] {
  --v-bg: #0f1324; --v-card: #161b31; --v-ink: #f1ebdf; --v-ink-2: #cfcbc1; --v-ink-3: #aaa79f; --v-line: rgba(241, 235, 223, 0.12); --v-line-strong: rgba(241, 235, 223, 0.22);
  --v-arabic: #f1ebdf; --v-gold: #e2bc6c; --v-gold-ink: #ecc97a; --v-glow: rgba(120, 140, 220, 0.07);
  --v-word: #f5c451; --v-word-glow: none;
  --v-pill: color-mix(in srgb, var(--night) 70%, #ffffff 10%); --v-pill-ink: #ecc97a;
}
html[data-vtheme='dark'] .v-try button { background: rgba(22, 27, 49, 0.92); color: #f1ebdf; border-color: rgba(241, 235, 223, 0.2); }
/* On the dark page the voice line needs no turning over: it is drawn for a dark ground. */
html.m-on[data-v2][data-vtheme='dark'] :is(.m-bars, .m-mini-voice) { filter: none; }

/* ---------- The tray's colour ----------
   Light (the main theme): Navy. Dark: a neutral Charcoal page with the deepest Graphite tray, only just above the cards
   (#1a1b1f) so it still reads as raised (Apple's own dark mode: only the gold and the skies have colour). Both the
   founder's picks, 2026-11-05. */
html { --night: #1d2236; }
html[data-v2='ivory'][data-vtheme='dark'] { --v-bg: #121316; --v-card: #1a1b1f; --v-glow: rgba(255, 255, 255, 0.04); --night: #1c1d21; }

/* Light: no sky colour fades in behind an open panel any more (founder, 2026-11-05: the Prayer screen's live sky does
   that job better); the cream page simply stays behind it. */
html[data-vtheme='light'] .v-room-sky { display: none; }

/* ---------- The Night player: connected along the bottom, and every panel it opens is the same surface ---------- */
html.m-on[data-vplayer='night'] body, html.m-on[data-vplayer='night'] body[data-phase] { --tray: var(--night); --sheet: var(--night); --sheet-text-2: #d8d6cf; --sheet-text-3: #bcbab3; }
html.m-on[data-vplayer='night'] .player.dock { --text: #f3ede2; --text-2: #d8d6cf; --text-3: #bcbab3; --accent: #ecc97a; color: #f3ede2;
  backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 0; box-shadow: 0 -10px 34px color-mix(in srgb, var(--night) 22%, transparent); }
/* No gold hairline on paper (it got lost there); on the dark page a faint one marks the edge. */
html.m-on[data-vtheme='dark'][data-vplayer='night'] .player.dock { border-top: 1px solid rgba(236, 201, 122, 0.22); box-shadow: none; }
html.m-on[data-vplayer='night'] .player.dock :is(.m-actions .pill, .m-actions .icon-btn, .ctl, .ctl-icon, .m-mini-t, .m-mini-line) { color: #d8d6cf; }
html.m-on[data-vplayer='night'] .player.dock :is(.np-reciter, .np-reciter span) { color: #f3ede2; }
html.m-on[data-vplayer='night'] .player.dock :is(.audio-time, .audio-dur) { color: #bcbab3; }
html.m-on[data-vplayer='night'] .player.dock .m-actions { border-color: rgba(243, 237, 226, 0.09); }
html.m-on[data-vplayer='night'] .player.dock .np-reciter[data-mono]::before { border-color: rgba(236, 201, 122, 0.55); color: #ecc97a; }
html.m-on[data-vplayer='night'] .player.dock :is(.m-bars, .m-mini-voice) { filter: none; }
html.m-on[data-vplayer='night'] .prayer-ring .ring-track { stroke: rgba(243, 237, 226, 0.2); }
html.m-on[data-vplayer='night'] .prayer-ring .ring-fill { stroke: #ecc97a; }
html.m-on[data-vplayer='night'] .m-grab::before, html.m-on[data-vplayer='night'] .m-grab span { background: rgba(243, 237, 226, 0.32); }
html.m-on[data-vplayer='night'] .play-btn, html.m-on[data-vplayer='night'] .m-mini-play { background: #f3ede2; color: var(--night); }
html.m-on[data-v2] .play-btn { box-shadow: 0 0 0 6px rgba(236, 201, 122, 0.16), 0 10px 24px rgba(10, 14, 30, 0.22); }
html.m-on[data-vplayer='night'] :is(.m-screen-sheet, .modal-card, #readPop) { --text: #f3ede2; --text-2: #d8d6cf; --text-3: #bcbab3; --accent: #ecc97a; color: #f3ede2; }

/* ---------- The Ayah ---------- */
html.m-on[data-v2] .verse .w.is-reciting, html.m-on[data-v2] .verse .tw.is-reciting { color: var(--v-word); text-shadow: var(--v-word-glow); }
/* The Surah on its own line, centred; the theme pill beneath it. */
html.m-on[data-v2] .verse .reference { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
html.m-on[data-v2] .verse .reference #referenceText { font-size: 13px; font-weight: 500; color: var(--v-ink-2); letter-spacing: 0.01em; } /* (founder, 2026-11-15) smaller than the Ayah's own lines, transliteration included: a label, not a heading */
html.m-on[data-v2] .verse .reference .pillar-tags { margin: 0; }

/* ---------- Explore: Sources once (on Moments), and not indented ---------- */
html.m-on[data-v2] .m-inline-src .m-inline-in { padding-left: 0; padding-right: 0; }

/* ---------- Room (app/room.js): every panel rises to the same height, just under the Ayah of the Day pill,
   which always stays in view. Behind the top bar the current prayer's sky fades in; the Ayah steps back. ---------- */
html[data-v2] { --v-safe-top: env(safe-area-inset-top, 0px); --v-panel-top: 74px; }
.v-room-sky { position: fixed; inset: 0; pointer-events: none; background: var(--orb); opacity: 0; }
html[data-vsheet='room'] .m-scrim { background: transparent !important; }
html.m-on[data-vsheet='room'] .modal { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.m-on[data-vsheet='room'] .m-screen.m-screen-sheet { top: var(--v-panel-top); }
html.m-on[data-vsheet='room'] .modal-card { height: calc(100dvh - var(--v-panel-top)); max-height: none; }
/* Aa (the reading options) keeps its own height: a few switches do not need a whole page (founder, 2026-10-26). */
html.m-on[data-vsheet='room'] :is(.m-screen-sheet, .modal-card, #readPop) { border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(10, 14, 30, 0.18); }
/* While a panel is open the top bar sits on the sky: logo and search turn light; the pill stays as it is. */
html.v-room-open .m-top { position: relative; z-index: 61; }
/* white on the sky behind an open panel - Dark only now: in Light the cream page stays behind it (2026-11-05), and white
   on cream left the logo and search unseen */
html.v-room-open:not([data-vtheme='light']) .m-top .brand-logo { filter: brightness(0) invert(1); transition: filter 0.3s ease; }
html.v-room-open:not([data-vtheme='light']) .m-top #jumpBtn { color: #fff; }
html.v-room-open .v-try { display: none; }
/* Aa: the page stays as it is above the panel (no sky), so the logo and search keep their own colours */
html.v-room-open.v-room-live .m-top .brand-logo { filter: none; }
html.v-room-open.v-room-live .m-top #jumpBtn { color: inherit; }

/* ---------- Door (the back-up) ---------- */

/* ---------- Prayer: the day switcher (under the countdown, within easy reach of the thumb) ---------- */
.v-daynav { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; padding: 6px 0; border-top: 1px solid rgba(243, 237, 226, 0.08); border-bottom: 1px solid rgba(243, 237, 226, 0.08); }
.v-daynav-btn { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(243, 237, 226, 0.06); color: var(--text); display: inline-flex; align-items: center; justify-content: center;
  transition: scale 0.12s ease-out, background 0.2s; }
.v-daynav-btn:active { scale: 0.92; background: rgba(236, 201, 122, 0.18); }
.v-daynav-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; }
.v-daynav-mid b { font: 600 var(--fs-base) var(--font-ui); color: var(--text); }
.v-daynav-mid span { font-size: var(--fs-s); color: var(--text-3); }
.v-sun-wait { height: 158px; }

/* ---------- The tray's controls: gold when something is switched on ---------- */
/* The "..." (repeat / auto-play) and the speed show gold once you change them; a saved Ayah's bookmark is gold too. */
html.m-on[data-vplayer='night'] .player.dock :is(.ctl.on, .ctl[aria-pressed='true']) { color: #ecc97a; }
html.m-on[data-vplayer='night'] .player.dock .m-actions .icon-btn:is([aria-pressed='true'], [aria-expanded='true']) { color: #ecc97a; }

/* ---------- The Compare chip (Mac and phone only) ---------- */
.v-try { position: fixed; z-index: 70; left: 50px; top: calc(env(safe-area-inset-top) + 21px); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.v-try:not(.is-open) button:not(.v-try-fold) { display: none; }
.v-try .v-try-fold { opacity: 0.75; min-height: 28px; padding: 0 10px; }
.v-try button { pointer-events: auto; min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid rgba(29, 34, 54, 0.18); background: rgba(251, 248, 242, 0.92);
  font: 600 12px/1 'Cairo UI', 'Inter', sans-serif; color: #1d2236; box-shadow: 0 2px 8px rgba(29, 34, 54, 0.12); }
html:has(.m-screen:not([hidden])) .v-try { display: none; }

/* ---------- The prayer button's icon (Compare > Icon): see app/prayer.css ---------- */
html[data-v2] .v-picon { display: none; }

/* ---------- From the Sunnah: in the same family as the navy pills above it (founder, 2026-10-27: "needs updated") ----------
   The theme pill is the solid one; this one, a step quieter: a fine navy outline, navy words, a gold chevron. */
html.m-on[data-v2] .sn-toggle { min-height: 32px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--night) 32%, transparent); background: transparent;
  color: var(--v-ink); font-weight: 600; }
html.m-on[data-v2] .sn-toggle .nav-chev { color: var(--v-gold); }
html.m-on[data-v2] .sn-fold.is-open .sn-toggle { background: var(--night); border-color: var(--night); color: #ecc97a; }
html.m-on[data-v2][data-vtheme='dark'] .sn-toggle { border-color: rgba(241, 235, 223, 0.28); }

/* ---------- "When it was revealed": the Ink bar (app/revline.js; founder's pick, 2026-11-05) ----------
   Makkah in ink, Madinah in gold, on the Light and Dark themes alike (the old one could not be seen). */
.v-rv { display: none; margin: 4px 0 18px; font-family: var(--font-ui); }
html[data-vrev]:not([data-vrev='old']) .card-back .rev-timeline { display: none; }
html[data-vrev='bar'] .v-rv-bar { display: block; }
.v-rv-cap { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: var(--fs-s); color: var(--v-ink-3); }
.v-rv-tag { position: absolute; bottom: calc(100% + 8px); translate: -50% 0; padding: 3px 8px; border-radius: 999px; background: var(--v-ink); color: var(--v-bg); font: 600 11px/1.2 var(--font-ui); white-space: nowrap; }
.v-rv-bar { padding-top: 26px; }
.v-rv-track { position: relative; display: flex; gap: 3px; height: 8px; }
.v-rv-track i { border-radius: 999px; }
.v-rv-track .mk { background: color-mix(in srgb, var(--v-ink) 78%, transparent); }
.v-rv-track .md { background: var(--v-gold); }
.v-rv-track b { position: absolute; top: 50%; width: 18px; height: 18px; box-sizing: border-box; translate: -50% -50%; border-radius: 50%; background: var(--v-bg); border: 4px solid var(--v-ink); box-shadow: 0 0 0 2px var(--v-bg); }
/* Round 6 (founder, 2026-11-05: opening a screen "sticks" at the end): an open sheet stays on its own layer, so when its
   rise finishes the phone does not redraw the whole panel in one go (measured on the S24: a 33-50 ms frame at the end of
   every open, none with this). */
html.v-room-open .m-screen-sheet:not([hidden]) { will-change: transform, opacity; }
html.v-room-open .m-screen-sheet:not([hidden]) > * { will-change: opacity; }

/* One sheet header (founder, 2026-11-05): Aa, Share and every other sheet - the title 20px in, level with the close
   button, whose centre sits 32px from the top (Share's sat 6px lower, and 18px in) */
html.m-on[data-v2] .modal-card { padding-left: 20px; padding-right: 20px; }
html.m-on[data-v2] .modal-card .m-sheet-bar { margin-left: -20px; margin-right: -20px; padding: 10px 20px 6px; }

/* (founder, 2026-11-14: one family feel) "Ayah of the Day" in its own case, not capitals; away from today it folds into
   a round button with the same "<" as Explore's Back, the same size as Explore's round faces */
html.m-on[data-v2] .day-tag { text-transform: none; letter-spacing: 0; font-size: 13px; }
html.m-on[data-v2] .m-centre .day-tag.is-away { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
html.m-on[data-v2] .day-tag.is-away .day-back { width: 18px; height: 18px; margin-left: -1px; }
html.m-on[data-v2] .day-back { rotate: 0deg; } /* (the "<" slides in; the old spin suited the curved arrow, not this) */
/* the search button in a faint round face, as the Back and close buttons (founder, 2026-11-14: one family feel) */
html.m-on[data-v2] #jumpBtn { background: radial-gradient(circle, rgba(29, 34, 54, 0.07) 15.5px, transparent 16px) !important; }

/* One 20px side margin on every screen (founder, 2026-11-14), the same as each screen's title; the close button's round
   face on that same line (Explore sets its own, explore.css, to the same values) */
html.m-on[data-v2] :is(.m-list, .m-prayer) { padding-left: 20px; padding-right: 20px; }
html.m-on[data-v2] .m-x { margin-right: 2px; }

/* (founder, 2026-11-14: one family feel) section headings in their own case; every arrow in a round face - a settings
   row's arrow as Explore's rows, the place's small arrow as "See all", the day arrows as the Back button */
html.m-on[data-v2] .m-head { text-transform: none; letter-spacing: 0; font-size: var(--fs-s); }
html.m-on[data-v2] .m-row-chev { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); font-size: 0; }
html.m-on[data-v2] .m-row-chev svg { width: 14px; height: 14px; margin-left: 1px; }
html.m-on[data-v2] .v-pr-chev { box-sizing: content-box; width: 10px; height: 10px; padding: 4px; margin-left: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
html.m-on[data-v2] .v-daynav-btn { background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 15.5px, transparent 16px); }
html.m-on[data-v2] .v-daynav-btn:last-of-type { margin-right: 6px; } /* its round face on the 20px line */

/* (founder, 2026-11-15) the day arrows the size of a settings row's arrow (28px face, 14px arrow) */
html.m-on[data-v2] .v-daynav-btn { width: 36px; height: 36px; background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 13.5px, transparent 14px); }
html.m-on[data-v2] .v-daynav-btn svg { width: 14px; height: 14px; }
html.m-on[data-v2] .v-daynav-btn:last-of-type { margin-right: 2px; }

/* (founder, 2026-11-15: on the Mac the main screen looked like the phone but Explore, Prayer and the back of the card
   filled the whole window) On a wide screen everything sits in the one centred column the player already uses (640px):
   the top bar, the card's back, and every sheet - so the app reads as one phone-shaped place on any screen. */
@media (min-width: 641px) {
  html.m-on[data-v2] .m-screen.m-screen-sheet { left: calc(50% - 320px); right: calc(50% - 320px); }
  html.m-on[data-v2] .m-top { max-width: 640px; margin-inline: auto; }
  html.m-on[data-v2] .card-back { max-width: 640px; margin-inline: auto; }
  /* Share and Aa too (founder, 2026-11-15: they still filled the Mac's window) */
  html.m-on[data-v2] .modal-card { width: 640px !important; max-width: 640px !important; margin-inline: auto !important; }
  html.m-on[data-v2] #readPop { width: 640px !important; max-width: 640px !important; left: calc(50% - 320px) !important; right: auto !important; }
}
@media (min-width: 641px) { html.m-on[data-v2] .m-top { width: 100%; } }
/* (founder, 2026-11-15) the back of the card's labels in their own case, as everywhere else */
html.m-on[data-v2] .card-back :is(.back-title, h3) { text-transform: none; letter-spacing: 0; font-size: var(--fs-s); }

/* No capitals anywhere on the phone (founder, 2026-11-15: "go through every single screen"). Labels that used to be small
   spaced-out capitals are now in their own case, a touch larger and without the wide spacing, like the day tag and the
   section headings changed on 2026-11-14. The last rule is a safety net so no capitals come back from a shared file. */
html.m-on[data-v2] :is(.share-label, .rc-head, #readPop .rd-head, .sr-label, .list-head, .sources-list dt, .jump-label, .section h3, .vx-part-h, .vx-top small, .vx-hero-tag) { text-transform: none; letter-spacing: 0; font-size: var(--fs-s); }
html.m-on[data-v2] :is(.position, .list-name, .sn-toggle) { text-transform: none; letter-spacing: 0; }
html.m-on[data-v2] * { text-transform: none !important; }

/* Share fits whole on the phone, from its handle to Save image and Copy text (founder, 2026-11-15): the preview is a little
   smaller, so nothing scrolls and the handle shows at the top like every other sheet. */
html.m-on[data-v2] .share-preview { height: clamp(120px, calc(100dvh - 464px), 270px); } /* whatever room is left after the options */
html.m-on[data-v2] .share-layout { margin-top: 6px; gap: 18px; } /* a little bigger picture (founder, 2026-11-15): the room taken from the spacing around it */

/* One family of round arrows, three sizes, each with one job (founder, 2026-11-16: "how many different forward and back
   icon sizes do we have?" - there were six):
   - step forward or back (days in Prayer, the Explore cards, list rows): a 28px face, a 14px arrow
   - leave a page (Explore's Back, the main screen's back to today): a 32px face, an 18px arrow
   - a small arrow inside a line of words (See all, Scene, the place in Prayer): a 20px face, a 12px arrow */
html.m-on[data-v2] .v-pr-chev { width: 12px; height: 12px; padding: 4px; }
html.m-on[data-v2] #mExplore .vx-back svg { width: 18px; height: 18px; }

/* Accessibility pass (founder, 2026-11-16: "Yes, fix them"). Measured against the 4.5 to 1 contrast that small text needs,
   12px as the smallest text, and 44px as a comfortable tap.
   - The live card's top line was see-through ivory at 11px: now solid colours, 12px */
html.m-on[data-v2] .vx-dtop, html.m-on[data-v2] .vx-dtop .vx-dref { font-size: 12px; color: #f3ede2; }
html.m-on[data-v2] .vx-dparent { opacity: 1; color: #d9d3c8; }
html.m-on[data-v2] .vx-dsep { opacity: 1; color: #d9d3c8; }
/* - the back of the card: its two gold headings were 3 to 1 on the light paper; a deeper gold reads 5.4 to 1 */
html.m-on[data-v2] .card-back :is(.back-title, h3) { color: #7a5a1e; }
html.m-on[data-v2]:not([data-vtheme='light']) .card-back :is(.back-title, h3) { color: inherit; }
/* - the smallest words up to 12px: Prayer's Now / Next / Fajr ends, and the prayer's name under its button */
html.m-on[data-v2] .v-r5-k { font-size: 12px; min-height: 14px; }
html.m-on[data-v2] .m-actions .prayer-pill small { font-size: 12px; }
/* - small controls keep their look but take a tap 44px tall (and wide where they are narrower): an invisible area around them */
html.m-on[data-v2] :is(.m-grab, .v-pr-place, .swatch, #shareModal .chip, #shareModal .share-actions button, .rd-seg button, .vx-scene-pick, #audioBar) { touch-action: manipulation; }
html.m-on[data-v2] :is(.v-pr-place, .swatch, #shareModal .chip, #shareModal .share-actions button, .rd-seg button) { position: relative; }
html.m-on[data-v2] :is(.m-grab, .v-pr-place, .swatch, #shareModal .chip, #shareModal .share-actions button, .rd-seg button, .vx-scene-pick, #audioBar)::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); background: none; border: 0; }
html.m-on[data-v2] #dayTag::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
/* - a Moment page's description line over the scene: full ivory (it was 90%) */
html.m-on[data-v2] .vx-mtop .vx-mhero p { color: #f3ede2; }
/* (2026-11-16) On a wide screen, the sky that fades in behind an open panel (dark theme) stays in the app's centre column,
   as everything else does - it used to fill the whole Mac window with the bright midday sky around a dark panel */
@media (min-width: 641px) { html.m-on[data-v2] .v-room-sky { left: calc(50% - 320px); right: calc(50% - 320px); } }
