/* zikrist.com round 3: what every chapter shares (r3/SPEC.md). The page's own styles are r3/page.css. */

:root {
  --zk-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter Tight", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --zk-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
}

/* The pop-out layer: the screen's own 402 x 874 point space laid over the glass, unclipped, above the frame. Its box
   is the glass's size on screen and is the compositing layer, so a phone's browser draws what pops out at the size
   it shows, not at the screen's full 402 x 874 (which costs it several times the memory). */
.zk-device .r3-fxw {
  position: absolute; left: calc(11px * var(--s)); top: calc(11px * var(--s));
  width: calc(402px * var(--s)); height: calc(874px * var(--s)); pointer-events: none; z-index: 6; will-change: transform;
}
.zk-device .r3-fx {
  position: absolute; left: 0; top: 0; width: 402px; height: 874px; transform: scale(var(--s)); transform-origin: 0 0;
}
/* The kit's sheen follows its rim light, which the page never lights: left out, it costs nothing. */
.zk-device .zk-sheen { display: none; }
.r3-scr { position: absolute; inset: 0; z-index: 3; overflow: hidden; }
/* a chapter more than a step from where the page is (page.js, prune) */
.r3-far { display: none !important; }
.r3-pop { position: absolute; inset: 0; }
.r3-pop > *, .r3-scr > * { will-change: auto; }

/* Round 2's fingertips never show here: things answer by themselves. */
.zk-device .zks-touch { display: none !important; }

/* The status bar over a Light screen. */
.zk-status.r3-ink-dark { color: #14161A; }
.zk-status.r3-ink-dark svg { color: #14161A; }
.zk-status .t { transition: color .3s; }

/* A card lifted out of the phone: glass, the light bend on its top edge, a deep soft shadow. */
.r3-card {
  position: absolute; border-radius: 24px; color: #F4F5F7;
  background: rgba(21, 23, 27, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.10); border-top-color: rgba(243, 227, 204, 0.30);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.75), 0 10px 24px -12px rgba(0, 0, 0, 0.5);
}
.r3-card.light {
  color: #14161A; background: rgba(255, 255, 255, 0.86);
  border-color: rgba(20, 22, 26, 0.08); border-top-color: rgba(169, 186, 208, 0.55);
  box-shadow: 0 30px 70px -24px rgba(20, 30, 50, 0.45), 0 10px 24px -14px rgba(20, 30, 50, 0.3);
}
/* A soft light to swell behind something: warm white on dark, pearl on light. Size it with width/height. */
.r3-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 247, 234, 0.55), rgba(243, 227, 204, 0.18) 45%, rgba(243, 227, 204, 0) 100%);
}
.r3-glow.pearl { background: radial-gradient(closest-side, rgba(214, 226, 240, 0.7), rgba(169, 186, 208, 0.22) 45%, rgba(169, 186, 208, 0) 100%); }
.r3-ar { font-family: "Amiri", serif; direction: rtl; }
